eoss-ui 0.4.65 → 0.4.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/lib/button-group.js +17 -8
  2. package/lib/button.js +17 -8
  3. package/lib/checkbox-group.js +53 -15
  4. package/lib/data-table-form.js +17 -8
  5. package/lib/data-table.js +17 -8
  6. package/lib/date-picker.js +17 -8
  7. package/lib/dialog.js +20 -11
  8. package/lib/editor.js +2 -2
  9. package/lib/eoss-ui.common.js +6479 -5844
  10. package/lib/flow-group.js +17 -8
  11. package/lib/flow-list.js +17 -8
  12. package/lib/flow.js +22 -12
  13. package/lib/form.js +6354 -5979
  14. package/lib/handle-user.js +17 -8
  15. package/lib/handler.js +17 -8
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +17 -8
  18. package/lib/input.js +37 -15
  19. package/lib/login.js +22 -15
  20. package/lib/main.js +138 -101
  21. package/lib/menu.js +7 -3
  22. package/lib/nav.js +21 -11
  23. package/lib/page.js +17 -8
  24. package/lib/player.js +19 -10
  25. package/lib/qr-code.js +17 -8
  26. package/lib/radio-group.js +53 -15
  27. package/lib/retrial-auth.js +17 -8
  28. package/lib/select-ganged.js +42 -13
  29. package/lib/select.js +72 -23
  30. package/lib/selector-panel.js +17 -8
  31. package/lib/selector.js +17 -8
  32. package/lib/sizer.js +17 -8
  33. package/lib/steps.js +17 -8
  34. package/lib/switch.js +17 -8
  35. package/lib/table-form.js +1320 -1204
  36. package/lib/tabs.js +17 -8
  37. package/lib/theme-chalk/index.css +1 -1
  38. package/lib/theme-chalk/main.css +1 -1
  39. package/lib/tips.js +17 -8
  40. package/lib/tree-group.js +17 -8
  41. package/lib/tree.js +17 -8
  42. package/lib/upload.js +17 -8
  43. package/lib/utils/util.js +17 -8
  44. package/lib/wujie.js +17 -8
  45. package/lib/wxlogin.js +17 -8
  46. package/package.json +2 -2
  47. package/packages/checkbox-group/src/main.vue +47 -5
  48. package/packages/flow/src/main.vue +6 -5
  49. package/packages/form/src/main.vue +1442 -1315
  50. package/packages/form/src/table.vue +375 -318
  51. package/packages/input/src/main.vue +20 -7
  52. package/packages/login/src/main.vue +3 -5
  53. package/packages/main/src/main.vue +82 -61
  54. package/packages/main/src/userinfo.vue +12 -2
  55. package/packages/menu/src/main.vue +19 -3
  56. package/packages/nav/src/main.vue +2 -1
  57. package/packages/radio-group/src/main.vue +47 -5
  58. package/packages/select/src/main.vue +66 -21
  59. package/packages/select-ganged/src/main.vue +42 -18
  60. package/packages/theme-chalk/lib/index.css +1 -1
  61. package/packages/theme-chalk/lib/main.css +1 -1
  62. package/packages/theme-chalk/src/main.scss +5 -1
  63. package/packages/theme-chalk/src/menu.scss +1 -1
  64. package/src/index.js +1 -1
  65. package/src/utils/util.js +18 -8
package/lib/wujie.js CHANGED
@@ -2275,16 +2275,19 @@ var uuid = function uuid(len) {
2275
2275
  **/
2276
2276
  var watermark = function watermark(option) {
2277
2277
  // 默认设置
2278
+ var _width = parseInt(option.width || 480, 10);
2279
+ var _height = parseInt(option.width || 180, 10);
2280
+ var _rows = Math.round(document.body.clientHeight / _height);
2281
+ var _cols = Math.round(document.body.clientWidth / _width);
2278
2282
  var config = {
2279
- rows: 5, // 水印行数
2280
- cols: 5,
2283
+ rows: _rows, // 水印行数
2284
+ cols: _cols,
2281
2285
  html: '水印示例', // 水印文本内容
2282
2286
  angle: -15, // 旋转角度
2283
2287
  color: '#000', // 水印文字颜色
2284
- width: '', // 水印宽度
2285
- minWidth: 300, // 水印最小宽度
2286
- height: 120, // 水印高度
2287
- lineHeight: 120, // 水印行高
2288
+ minWidth: _width, // 水印最小宽度
2289
+ height: _height, // 水印高度
2290
+ lineHeight: 20, // 水印行高
2288
2291
  opacity: 0.1, // 水印透明度
2289
2292
  fontSize: 14, // 水印文字字体大小
2290
2293
  fontWeight: 400, // 水印字体粗细
@@ -2310,7 +2313,6 @@ var watermark = function watermark(option) {
2310
2313
  html = options.html,
2311
2314
  angle = options.angle,
2312
2315
  color = options.color,
2313
- width = options.width,
2314
2316
  minWidth = options.minWidth,
2315
2317
  height = options.height,
2316
2318
  lineHeight = options.lineHeight,
@@ -2327,11 +2329,18 @@ var watermark = function watermark(option) {
2327
2329
  for (var i = 0; i < num; i++) {
2328
2330
  var item = document.createElement('div');
2329
2331
  item.innerHTML = html;
2330
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (width ? parseInt(width, 10) + 'px' : 100 / cols + '%') + ';min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2332
+ item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2331
2333
  docFrag.appendChild(item);
2332
2334
  }
2333
2335
  wrap.appendChild(docFrag);
2334
2336
  document.body.appendChild(wrap);
2337
+ var _timeout = void 0;
2338
+ window.onresize = function () {
2339
+ clearTimeout(_timeout);
2340
+ _timeout = setTimeout(function () {
2341
+ watermark(options);
2342
+ }, 1000);
2343
+ };
2335
2344
  };
2336
2345
 
2337
2346
  /* harmony default export */ __webpack_exports__["a"] = ({
package/lib/wxlogin.js CHANGED
@@ -2275,16 +2275,19 @@ var uuid = function uuid(len) {
2275
2275
  **/
2276
2276
  var watermark = function watermark(option) {
2277
2277
  // 默认设置
2278
+ var _width = parseInt(option.width || 480, 10);
2279
+ var _height = parseInt(option.width || 180, 10);
2280
+ var _rows = Math.round(document.body.clientHeight / _height);
2281
+ var _cols = Math.round(document.body.clientWidth / _width);
2278
2282
  var config = {
2279
- rows: 5, // 水印行数
2280
- cols: 5,
2283
+ rows: _rows, // 水印行数
2284
+ cols: _cols,
2281
2285
  html: '水印示例', // 水印文本内容
2282
2286
  angle: -15, // 旋转角度
2283
2287
  color: '#000', // 水印文字颜色
2284
- width: '', // 水印宽度
2285
- minWidth: 300, // 水印最小宽度
2286
- height: 120, // 水印高度
2287
- lineHeight: 120, // 水印行高
2288
+ minWidth: _width, // 水印最小宽度
2289
+ height: _height, // 水印高度
2290
+ lineHeight: 20, // 水印行高
2288
2291
  opacity: 0.1, // 水印透明度
2289
2292
  fontSize: 14, // 水印文字字体大小
2290
2293
  fontWeight: 400, // 水印字体粗细
@@ -2310,7 +2313,6 @@ var watermark = function watermark(option) {
2310
2313
  html = options.html,
2311
2314
  angle = options.angle,
2312
2315
  color = options.color,
2313
- width = options.width,
2314
2316
  minWidth = options.minWidth,
2315
2317
  height = options.height,
2316
2318
  lineHeight = options.lineHeight,
@@ -2327,11 +2329,18 @@ var watermark = function watermark(option) {
2327
2329
  for (var i = 0; i < num; i++) {
2328
2330
  var item = document.createElement('div');
2329
2331
  item.innerHTML = html;
2330
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (width ? parseInt(width, 10) + 'px' : 100 / cols + '%') + ';min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2332
+ item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2331
2333
  docFrag.appendChild(item);
2332
2334
  }
2333
2335
  wrap.appendChild(docFrag);
2334
2336
  document.body.appendChild(wrap);
2337
+ var _timeout = void 0;
2338
+ window.onresize = function () {
2339
+ clearTimeout(_timeout);
2340
+ _timeout = setTimeout(function () {
2341
+ watermark(options);
2342
+ }, 1000);
2343
+ };
2335
2344
  };
2336
2345
 
2337
2346
  /* harmony default export */ __webpack_exports__["a"] = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.65",
3
+ "version": "0.4.67",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -93,7 +93,7 @@
93
93
  "cp-cli": "^1.0.2",
94
94
  "cross-env": "^3.1.3",
95
95
  "css-loader": "^2.1.0",
96
- "eoss-element": "^0.2.68",
96
+ "eoss-element": "^0.2.69",
97
97
  "es6-promise": "^4.0.5",
98
98
  "eslint": "4.18.2",
99
99
  "eslint-config-elemefe": "0.1.1",
@@ -60,6 +60,14 @@ import util from 'eoss-ui/src/utils/util';
60
60
  export default {
61
61
  name: 'EsCheckboxGroup',
62
62
  inheritAttrs: false,
63
+ inject: {
64
+ esForm: {
65
+ default: ''
66
+ },
67
+ sysCodes: {
68
+ default: ''
69
+ }
70
+ },
63
71
  props: {
64
72
  method: {
65
73
  type: String,
@@ -121,11 +129,13 @@ export default {
121
129
  isNoParamRequest: {
122
130
  type: Boolean,
123
131
  default: true
124
- }
132
+ },
133
+ dataKey: String
125
134
  },
126
135
  data() {
127
136
  return {
128
- options: ''
137
+ options: '',
138
+ canceled: false
129
139
  };
130
140
  },
131
141
  computed: {
@@ -216,6 +226,27 @@ export default {
216
226
  handler() {
217
227
  this.url && this.getData(this.url);
218
228
  }
229
+ },
230
+ sysCodes: {
231
+ deep: true,
232
+ handler(val) {
233
+ if (
234
+ this.canceled &&
235
+ val &&
236
+ ((this.sysCode && val[this.sysCode]) ||
237
+ (this.dataKey && val[this.dataKey]))
238
+ ) {
239
+ if (this.parseData) {
240
+ this.options = this.parseData(
241
+ JSON.parse(JSON.stringify(val[this.sysCode || this.dataKey]))
242
+ );
243
+ } else {
244
+ this.options = JSON.parse(
245
+ JSON.stringify(val[this.sysCode || this.dataKey])
246
+ );
247
+ }
248
+ }
249
+ }
219
250
  }
220
251
  },
221
252
  created() {},
@@ -248,9 +279,15 @@ export default {
248
279
  })
249
280
  .then((res) => {
250
281
  this.loading = false;
282
+ this.canceled = false;
251
283
  if (res.rCode === 0) {
252
284
  this.options = JSON.parse(JSON.stringify(res.results));
253
- if (sysCode) {
285
+ if (sysCode || this.dataKey) {
286
+ this.esForm &&
287
+ this.esForm.setSysCodes(
288
+ sysCode || this.dataKey,
289
+ JSON.parse(JSON.stringify(this.options))
290
+ );
254
291
  store.set(sysCode, JSON.parse(JSON.stringify(res.results)));
255
292
  }
256
293
  } else {
@@ -260,8 +297,13 @@ export default {
260
297
  })
261
298
  .catch((err) => {
262
299
  this.loading = false;
263
- if (err.message && err.message !== 'canceled') {
264
- this.$message.error(err.message);
300
+ if (err.message) {
301
+ if (err.message !== 'canceled') {
302
+ this.$message.error(err.message);
303
+ }
304
+ if (err.message === 'canceled' && sysCode) {
305
+ this.canceled = true;
306
+ }
265
307
  }
266
308
  });
267
309
  },
@@ -1011,7 +1011,7 @@ export default {
1011
1011
  }
1012
1012
  },
1013
1013
  setShrink() {
1014
- this.shrink = !this.shrink
1014
+ this.shrink = !this.shrink;
1015
1015
  this.$emit('shrink', this.shrink);
1016
1016
  },
1017
1017
  customLoading(type) {
@@ -1708,13 +1708,14 @@ export default {
1708
1708
  this.nextNode.isReturnRejectNode = 0;
1709
1709
  this.nextNode.isSerialSubmit = 0;
1710
1710
  this.nodeInfos = [];
1711
- this.operationList.map((item) => {
1711
+ this.operationList.forEach((item) => {
1712
1712
  if (item.key === val) {
1713
1713
  if (!item.taskNodeList) {
1714
1714
  this.nodeInfos = [];
1715
1715
  } else {
1716
1716
  this.nodeInfos = item.taskNodeList;
1717
1717
  }
1718
+ return;
1718
1719
  }
1719
1720
  });
1720
1721
  if (this.defaultNextNode) {
@@ -1865,8 +1866,8 @@ export default {
1865
1866
  }
1866
1867
  } = res;
1867
1868
  this.$emit('startTaskRead', res);
1868
- this.currentOrgName = currentOrgName
1869
- this.otherOrgName = otherOrgName
1869
+ this.currentOrgName = currentOrgName;
1870
+ this.otherOrgName = otherOrgName;
1870
1871
  this.endFlowInfo.choiceOrgId = choiceOrgId;
1871
1872
  this.endFlowInfo.choiceDeptId = choiceDeptId;
1872
1873
  this.endFlowInfo.pendingId = this.pendingId;
@@ -1874,7 +1875,7 @@ export default {
1874
1875
  this.endFlowInfo.pOrgId = pOrgId;
1875
1876
  this.canPresetRead = canPresetRead;
1876
1877
  this.isCdjxjTaskHandle = isCdjxjTaskHandle;
1877
- this.operationList = taskOperations;
1878
+ this.operationList = taskOperations || [];
1878
1879
  this.customPresetHintMessage = customPresetHintMessage;
1879
1880
  if (canPresetRead) {
1880
1881
  let ids =