eoss-ui 0.4.17 → 0.4.19

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 (92) hide show
  1. package/lib/button-group.js +88 -88
  2. package/lib/button.js +90 -90
  3. package/lib/card.js +2 -2
  4. package/lib/cascader.js +2 -2
  5. package/lib/checkbox-group.js +89 -89
  6. package/lib/clients.js +2 -2
  7. package/lib/data-table-form.js +870 -198
  8. package/lib/data-table.js +91 -91
  9. package/lib/date-picker.js +90 -90
  10. package/lib/dialog.js +144 -105
  11. package/lib/enterprise.js +2 -2
  12. package/lib/eoss-ui.common.js +1518 -671
  13. package/lib/error-page.js +2 -2
  14. package/lib/flow-group.js +112 -95
  15. package/lib/flow-list.js +92 -92
  16. package/lib/flow.js +187 -173
  17. package/lib/form.js +183 -102
  18. package/lib/handle-user.js +91 -91
  19. package/lib/handler.js +91 -91
  20. package/lib/index.js +1 -1
  21. package/lib/input-number.js +90 -90
  22. package/lib/input.js +90 -90
  23. package/lib/label.js +2 -2
  24. package/lib/login.js +174 -131
  25. package/lib/main.js +114 -113
  26. package/lib/mainComp.js +107 -106
  27. package/lib/menu.js +2 -2
  28. package/lib/nav.js +90 -90
  29. package/lib/notify.js +95 -95
  30. package/lib/page.js +90 -90
  31. package/lib/pagination.js +2 -2
  32. package/lib/player.js +90 -90
  33. package/lib/qr-code.js +97 -97
  34. package/lib/radio-group.js +91 -91
  35. package/lib/select-ganged.js +90 -90
  36. package/lib/select.js +101 -101
  37. package/lib/selector-panel.js +115 -108
  38. package/lib/selector.js +97 -95
  39. package/lib/sizer.js +92 -92
  40. package/lib/steps.js +90 -90
  41. package/lib/switch.js +90 -90
  42. package/lib/table-form.js +97 -97
  43. package/lib/tabs-panel.js +2 -2
  44. package/lib/tabs.js +113 -94
  45. package/lib/theme-chalk/data-table-form.css +1 -1
  46. package/lib/theme-chalk/flow.css +1 -1
  47. package/lib/theme-chalk/index.css +1 -1
  48. package/lib/theme-chalk/tree.css +1 -1
  49. package/lib/theme-chalk/upload.css +1 -1
  50. package/lib/tips.js +91 -91
  51. package/lib/toolbar.js +2 -2
  52. package/lib/tree-group.js +105 -95
  53. package/lib/tree.js +104 -94
  54. package/lib/upload.js +175 -125
  55. package/lib/wujie.js +90 -90
  56. package/lib/wxlogin.js +90 -90
  57. package/package.json +2 -2
  58. package/packages/data-table-form/src/checkbox.vue +101 -0
  59. package/packages/data-table-form/src/radio.vue +65 -0
  60. package/packages/data-table-form/src/table.vue +34 -6
  61. package/packages/data-table-form/src/tbody.vue +139 -25
  62. package/packages/dialog/src/main.vue +35 -4
  63. package/packages/flow/src/main.vue +103 -87
  64. package/packages/flow/src/selectUser.vue +13 -12
  65. package/packages/flow-group/src/main.vue +22 -13
  66. package/packages/form/src/main.vue +563 -470
  67. package/packages/login/src/main.vue +79 -34
  68. package/packages/main/src/main.vue +6 -6
  69. package/packages/select/src/main.vue +20 -20
  70. package/packages/selector/src/main.vue +9 -9
  71. package/packages/selector-panel/src/main.vue +27 -17
  72. package/packages/tabs/src/main.vue +20 -12
  73. package/packages/theme-chalk/lib/data-table-form.css +1 -1
  74. package/packages/theme-chalk/lib/flow.css +1 -1
  75. package/packages/theme-chalk/lib/index.css +1 -1
  76. package/packages/theme-chalk/lib/tree.css +1 -1
  77. package/packages/theme-chalk/lib/upload.css +1 -1
  78. package/packages/theme-chalk/src/data-table-form.scss +7 -6
  79. package/packages/theme-chalk/src/flow.scss +10 -20
  80. package/packages/theme-chalk/src/index.scss +0 -1
  81. package/packages/theme-chalk/src/tree.scss +1 -1
  82. package/packages/theme-chalk/src/upload.scss +10 -3
  83. package/packages/tree/src/main.vue +20 -13
  84. package/packages/tree-group/src/main.vue +7 -4
  85. package/packages/upload/src/main.vue +77 -20
  86. package/src/index.js +1 -4
  87. package/lib/ca-login.js +0 -326
  88. package/lib/theme-chalk/ca-login.css +0 -1
  89. package/packages/ca-login/index.js +0 -5
  90. package/packages/ca-login/src/main.vue +0 -62
  91. package/packages/theme-chalk/lib/ca-login.css +0 -1
  92. package/packages/theme-chalk/src/ca-login.scss +0 -4
@@ -62,14 +62,14 @@
62
62
  }
63
63
  }
64
64
  // .commonOpinion{
65
- .commonOpinion-set{
66
- display: flex;
67
- flex-direction: column;
68
- height: 100%;
69
- .el-table__body-wrapper{
70
- flex:1
71
- }
65
+ .commonOpinion-set {
66
+ display: flex;
67
+ flex-direction: column;
68
+ height: 100%;
69
+ .el-table__body-wrapper {
70
+ flex: 1;
72
71
  }
72
+ }
73
73
  // }
74
74
  .es-flow-index-shrink {
75
75
  width: 24px;
@@ -227,19 +227,9 @@
227
227
  .select-users .el-input-group__append {
228
228
  background-color: $--color-primary;
229
229
  }
230
- .select-users .el-input-group__append .el-button::after {
231
- content: '';
232
- display: inline-block;
233
- width: 25px;
234
- height: 25px;
235
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAx5JREFUaEPtWO1RFUEQnI4AiUCJQIhAjECNQI1AiECNQIhAiUCIQIlAjECMQIigrX41Y21d+W4/D+pRb6v4wbvbven56OlZ2IYvbLj9tgVw3xHcRuDBRYDkazN7aWb7ZvbEAV6b2ZWZnQM4Gwl6WAqRlNGfEqPX2SkwxwDORwAZAoDkZzN74wZdmtkX9/aNfiP5yKOid575eycAjntBdANIjL8ViJxnSQrEiZntmNkpgKMeEF0APG2+mpmMPwSgPM8ukqqP7w7iVQ703IG9AH55zr8FoLQpXiTledXMNYC94o2TF5sBeCoo9y8BHLYYQFJRUE00R6EHgDwuyqz2foBNnHAGIEigyhc9AH441+8BEDVWL5LqE0rDKwAH1QeYtYs5ktQHATQ7wSm265zmj5MUx+8MAnALQL2ievUAiAIckULNRNADQFLghcsCNabqlVDpvRSxqPNbD4+TjD7yHIAiWr2aI+AFKPZ53BKFxPu/AYRqvXMAEQV9+KBCSqT7mr2/YsFqyJMNiSf15AjA6dyZJN+5mNNrktVN9RPf6AbgqfTBzN77oUorGaXmJGktOS25IAEn/RPp0m38kAiEJxJlWhLUZu0zPbw7AiSVz0oLTWQ1SzT8sbRu1h3cDMB1jNImFWEXmsRErZ5C6UQWM7KAqn/EkigUkCY91QTA00VSWu1fw4xyXiPiyuDc8hFT9aA/TWbap7Sq7gXVACYsIo9rjCwyfArMgSgCEZEsi3XVwIQyh7CIs1RMZ/q3ar4ojoAXq6RD9UdyKeUgVEtKS63i5lYEwAtWA4xyfpjn/5NSEQmlpDp7trBLAcT4eAGgli5LAvDvHZKhcosUahZAMvaJbfZLvFJl8eTl5Ht6kp01SgCER8TVkgyLL5IhTbJRKAHwx3N/t5UuaxEnUbgBsDu3fxZAom9+AlAnvbNFUrd8T3N3RjkA6rDSOYsxzzqPJD1n9v40ByAG92JeHhWipO/MDvwPHsCqgHvvflqj4pdns4Wci4AoVACaLm9bDY99fvkrAGubZ5ZGe41Yev8WwNIezp2/jUDOQ0s/3/gI/AUY12NA2FztQAAAAABJRU5ErkJggg==)
236
- no-repeat;
237
- background-size: 100% 100%;
238
- position: absolute;
239
- top: 50%;
240
- left: 50%;
241
- transform: translate(-50%, -50%);
242
- z-index: 10;
230
+ .select-users .el-input-group__append .el-button i {
231
+ font-size: 18px;
232
+ color: #fff;
243
233
  }
244
234
  .es-flow-form .input-with-select .el-input-group__prepend {
245
235
  background-color: #fff;
@@ -2,7 +2,6 @@
2
2
  @import "./button.scss";
3
3
  @import "./button-group.scss";
4
4
  @import "./checkbox-group.scss";
5
- @import "./ca-login.scss";
6
5
  @import "./card.scss";
7
6
  @import "./cascader.scss";
8
7
  @import "./clients.scss";
@@ -12,7 +12,7 @@
12
12
  background-color: #f5f7fa;
13
13
  border-bottom: $--border-base;
14
14
  .es-tree-filtrate {
15
- & + .es-tree-search-item {
15
+ &.es-tree-hasfiltrate + .es-tree-search-item {
16
16
  margin-top: 4px;
17
17
  }
18
18
  }
@@ -46,7 +46,7 @@
46
46
  }
47
47
  }
48
48
  .es-upload-text {
49
- & > .el-upload-list,
49
+ & > .el-upload-list:not(.is-disabled),
50
50
  & > .el-scrollbar {
51
51
  margin-top: 8px;
52
52
  }
@@ -75,8 +75,10 @@
75
75
  }
76
76
  }
77
77
  &.es-upload-text:not(.es-avatar-uploader) {
78
- .el-upload-list__item:first-child {
79
- margin-top: 5px;
78
+ .el-upload-list--text:not(.is-disabled) {
79
+ .el-upload-list__item:first-child {
80
+ margin-top: 5px;
81
+ }
80
82
  }
81
83
  }
82
84
  &.es-avatar-uploader {
@@ -129,3 +131,8 @@
129
131
  }
130
132
  }
131
133
  }
134
+ .el-upload-list--picture.is-disabled {
135
+ .el-upload-list__item:first-child {
136
+ margin-top: 0;
137
+ }
138
+ }
@@ -10,7 +10,10 @@
10
10
  >
11
11
  <div v-if="title" class="es-tree-title">{{ title }}</div>
12
12
  <div class="es-tree-search" v-if="showSearch || $slots.filtrate">
13
- <div class="es-tree-filtrate">
13
+ <div
14
+ class="es-tree-filtrate"
15
+ :class="{ 'es-tree-hasfiltrate': $slots.filtrate }"
16
+ >
14
17
  <slot name="filtrate"></slot>
15
18
  </div>
16
19
  <template v-if="showSearch">
@@ -166,6 +169,10 @@ export default {
166
169
  type: String,
167
170
  default: getOrgMainTree
168
171
  },
172
+ currentFirstNode: {
173
+ type: Boolean,
174
+ default: false
175
+ },
169
176
  system: {
170
177
  type: Boolean,
171
178
  default: false
@@ -370,18 +377,18 @@ export default {
370
377
  data: params,
371
378
  params: params
372
379
  })
373
- .then(res => {
380
+ .then((res) => {
374
381
  this.loading = false;
375
382
  if (res.rCode === 0) {
376
383
  this.treeList = JSON.parse(JSON.stringify(res.results));
377
- this.expandedKeys = this.treeList.filter(item => {
384
+ this.expandedKeys = this.treeList.filter((item) => {
378
385
  if (item.open) {
379
386
  return item.id;
380
387
  }
381
388
  });
382
389
  }
383
390
  })
384
- .catch(err => {
391
+ .catch((err) => {
385
392
  if (err.message && err.message !== 'canceled') {
386
393
  this.$message.error(err.message);
387
394
  }
@@ -401,11 +408,11 @@ export default {
401
408
  }
402
409
  if (this.onLoadsub) {
403
410
  this.onLoadsub({ data, params, node })
404
- .then(res => {
411
+ .then((res) => {
405
412
  this.loading = false;
406
413
  this.$set(data, 'children', JSON.parse(JSON.stringify(res)));
407
414
  })
408
- .catch(e => {});
415
+ .catch((e) => {});
409
416
  } else {
410
417
  util
411
418
  .ajax({
@@ -414,7 +421,7 @@ export default {
414
421
  data: params,
415
422
  params: params
416
423
  })
417
- .then(res => {
424
+ .then((res) => {
418
425
  if (res.rCode === 0) {
419
426
  this.loading = false;
420
427
  let results = JSON.parse(JSON.stringify(res.results));
@@ -431,7 +438,7 @@ export default {
431
438
  }
432
439
  }
433
440
  })
434
- .catch(err => {
441
+ .catch((err) => {
435
442
  this.loading = false;
436
443
  if (err.message && err.message !== 'canceled') {
437
444
  this.$message.error(err.message);
@@ -512,7 +519,7 @@ export default {
512
519
  }
513
520
  }
514
521
  } else if (Array.isArray(this.changeData)) {
515
- this.changeData.forEach(item => {
522
+ this.changeData.forEach((item) => {
516
523
  changeData[item] = data[item];
517
524
  });
518
525
  } else {
@@ -532,13 +539,13 @@ export default {
532
539
  let changeData = {};
533
540
  if (util.isObject(this.changeData)) {
534
541
  for (let i in this.changeData) {
535
- changeData[i] = checkeds.map(item => {
542
+ changeData[i] = checkeds.map((item) => {
536
543
  return item[this.changeData[i]];
537
544
  });
538
545
  }
539
546
  } else if (Array.isArray(this.changeData)) {
540
- this.changeData.forEach(item => {
541
- changeData[item] = checkeds.map(ele => {
547
+ this.changeData.forEach((item) => {
548
+ changeData[item] = checkeds.map((ele) => {
542
549
  return ele[this.changeData[i]];
543
550
  });
544
551
  });
@@ -609,7 +616,7 @@ export default {
609
616
  return this.$refs.oaTree.insertAfter(data, refNode);
610
617
  },
611
618
  getKeys(data, result) {
612
- data.forEach(item => {
619
+ data.forEach((item) => {
613
620
  result.push(item.id);
614
621
  if (
615
622
  Object.prototype.hasOwnProperty.call(item, 'children') &&
@@ -65,6 +65,7 @@
65
65
  <es-form
66
66
  v-if="form"
67
67
  v-bind="form"
68
+ :zoom="zoom"
68
69
  :ref="form.ref ? form.ref : 'esForm'"
69
70
  v-on="{ ...$listeners, ...form.events }"
70
71
  >
@@ -81,6 +82,7 @@
81
82
  size="mini"
82
83
  v-bind="{ close: true, ...table }"
83
84
  :param="param"
85
+ :zoom="zoom"
84
86
  :ref="table.ref ? table.ref : 'esDataTable'"
85
87
  v-on="{ ...$listeners, ...table.events }"
86
88
  >
@@ -188,7 +190,8 @@ export default {
188
190
  empty: {
189
191
  type: String,
190
192
  default: '#/empty'
191
- }
193
+ },
194
+ zoom: false
192
195
  },
193
196
  computed: {
194
197
  wujieName() {
@@ -311,7 +314,7 @@ export default {
311
314
  if (this.checkeds) {
312
315
  if (Array.isArray(this.checkeds)) {
313
316
  let creditCodes = [];
314
- this.checkeds.forEach(item => {
317
+ this.checkeds.forEach((item) => {
315
318
  if (item.creditCode && item.creditCode !== 'undefined') {
316
319
  creditCodes.push(item.creditCode);
317
320
  } else {
@@ -334,7 +337,7 @@ export default {
334
337
  if (this.syncKeys && util.isObject(this.syncKeys)) {
335
338
  for (let i in this.syncKeys) {
336
339
  params[i] = this.checkeds
337
- .map(item => {
340
+ .map((item) => {
338
341
  if (
339
342
  Object.prototype.hasOwnProperty.call(
340
343
  item,
@@ -351,7 +354,7 @@ export default {
351
354
  }
352
355
  } else {
353
356
  params.id = this.checkeds
354
- .map(item => {
357
+ .map((item) => {
355
358
  return item.id;
356
359
  })
357
360
  .join(',');
@@ -263,6 +263,7 @@ export default {
263
263
  },
264
264
  // 单文件大小
265
265
  size: Number,
266
+ totalSize: Number,
266
267
  // 是否头像模式上传
267
268
  portrait: {
268
269
  type: Boolean,
@@ -394,6 +395,7 @@ export default {
394
395
  fileAccept: '',
395
396
  fileSize: 0,
396
397
  fileTotalSize: 0,
398
+ filesTotalSize: 0,
397
399
  showImg: false,
398
400
  imgChange: false,
399
401
  title: '',
@@ -447,9 +449,6 @@ export default {
447
449
  if ((this.photo && typeof this.photo === 'string') || this.value) {
448
450
  return false;
449
451
  }
450
- if (this.photo && typeof this.photo === 'string') {
451
- return false;
452
- }
453
452
  return this.showFileList;
454
453
  },
455
454
  url() {
@@ -472,16 +471,23 @@ export default {
472
471
  ? 'image/*'
473
472
  : undefined;
474
473
  },
475
- sizes() {
474
+ _size() {
476
475
  return this.size ? this.size : this.fileSize ? this.fileSize : 0;
477
476
  },
477
+ _totalSize() {
478
+ return this.totalSize
479
+ ? this.totalSize
480
+ : this.fileTotalSize
481
+ ? this.fileTotalSize
482
+ : 0;
483
+ },
478
484
  getAdjunctFileInfos() {
479
485
  return typeof this.fileList === 'string'
480
486
  ? this.fileList
481
487
  : getAdjunctFileInfos;
482
488
  },
483
489
  showList() {
484
- return this.portrait || !this.multiple ? false : this.showFileList;
490
+ return this.portrait ? false : this.showFileList;
485
491
  },
486
492
  isDownloads() {
487
493
  return this.downloads;
@@ -542,10 +548,12 @@ export default {
542
548
  if (this.value) {
543
549
  if (typeof this.value === 'string') {
544
550
  if (this.value.indexOf('data:image/') === -1) {
545
- let val = util.jointUrl({
546
- url: this.value,
547
- reg: this.host + '/main2'
548
- });
551
+ let val =
552
+ this.host +
553
+ util.jointUrl({
554
+ url: this.value,
555
+ reg: '/main2'
556
+ });
549
557
  return val;
550
558
  }
551
559
  if (
@@ -572,10 +580,12 @@ export default {
572
580
  typeof this.photo === 'string' &&
573
581
  this.photo.indexOf('data:image/') === -1
574
582
  ) {
575
- let val = util.jointUrl({
576
- url: this.photo,
577
- reg: this.host + '/main2'
578
- });
583
+ let val =
584
+ this.host +
585
+ util.jointUrl({
586
+ url: this.photo,
587
+ reg: '/main2'
588
+ });
579
589
  return val;
580
590
  }
581
591
  return this.photo;
@@ -588,11 +598,29 @@ export default {
588
598
  handler(val) {
589
599
  if (Array.isArray(val) && val.length > 0) {
590
600
  this.lists = val;
601
+ let filesTotalSize = 0;
602
+ val.forEach((item) => {
603
+ filesTotalSize += item.size ? item.size : 0;
604
+ });
605
+ this.filesTotalSize = filesTotalSize;
591
606
  } else {
592
607
  this.getFiles(this.params);
593
608
  }
594
609
  }
595
610
  },
611
+ value: {
612
+ immediate: true,
613
+ deep: true,
614
+ handler(val) {
615
+ if (val && typeof val === 'object' && this.showFileList) {
616
+ if (Array.isArray(val)) {
617
+ this.lists = val;
618
+ } else {
619
+ this.lists = [val];
620
+ }
621
+ }
622
+ }
623
+ },
596
624
  params: {
597
625
  deep: true,
598
626
  handler(val) {
@@ -649,7 +677,7 @@ export default {
649
677
  ','
650
678
  );
651
679
  this.fileSize = res.results.limitFileSize
652
- ? res.results.limitFileSize / 1024 / 1024
680
+ ? res.results.limitFileSize
653
681
  : 0;
654
682
  this.fileTotalSize = res.results.limitTotalSize;
655
683
  }
@@ -663,7 +691,6 @@ export default {
663
691
  }
664
692
  },
665
693
  getFiles(params) {
666
- console.log(111, params);
667
694
  if (
668
695
  !this.show ||
669
696
  (this.isRequiredOwnId &&
@@ -685,6 +712,11 @@ export default {
685
712
  this.image = JSON.parse(JSON.stringify(res.results))[0];
686
713
  } else {
687
714
  this.lists = JSON.parse(JSON.stringify(res.results));
715
+ let filesTotalSize = 0;
716
+ this.lists.forEach((item) => {
717
+ filesTotalSize += item.size ? item.size : 0;
718
+ });
719
+ this.filesTotalSize = filesTotalSize;
688
720
  this.$emit('input', this.lists);
689
721
  }
690
722
  } else {
@@ -803,10 +835,35 @@ export default {
803
835
  };
804
836
  },
805
837
  isLt(file) {
806
- const flag =
807
- this.sizes === 0 ? true : file.size / 1024 / 1024 < this.sizes;
808
- if (!flag) {
809
- this.$message.error('上传头像图片大小不能超过 ' + this.sizes + 'MB!');
838
+ let flag = false;
839
+ let size = this._size;
840
+ let text = '单个附件';
841
+ if (this._size === 0 && this._totalSize === 0) {
842
+ flag = true;
843
+ } else if (this._size > 0 && this._totalSize === 0) {
844
+ flag = file.size < this._size;
845
+ size = this._size;
846
+ text = '单个附件';
847
+ } else if (this._size === 0 && this._totalSize > 0) {
848
+ flag = this.filesTotalSize + file.size < this._totalSize;
849
+ size = this._totalSize;
850
+ text = '附件总';
851
+ } else {
852
+ flag =
853
+ file.size < this._size &&
854
+ this.filesTotalSize + file.size < this._totalSize;
855
+ if (file.size < this._size) {
856
+ size = this._size;
857
+ text = '单个附件';
858
+ } else {
859
+ size = this._totalSize;
860
+ text = '附件总';
861
+ }
862
+ }
863
+ if (flag) {
864
+ this.filesTotalSize += file.size;
865
+ } else {
866
+ this.$message.error(`上传${text}大小不能超过${size}KB!`);
810
867
  }
811
868
  return flag;
812
869
  },
@@ -821,7 +878,7 @@ export default {
821
878
  if (this.beforeUpload) {
822
879
  return this.beforeUpload(file);
823
880
  }
824
- return true;
881
+ return this.isLt(file);
825
882
  },
826
883
  handleBeforeRemove(file, fileList) {
827
884
  if (file && file.status === 'success') {
package/src/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  import Button from '../packages/button/index.js';
4
4
  import ButtonGroup from '../packages/button-group/index.js';
5
5
  import CheckboxGroup from '../packages/checkbox-group/index.js';
6
- import CaLogin from '../packages/ca-login/index.js';
7
6
  import Card from '../packages/card/index.js';
8
7
  import Cascader from '../packages/cascader/index.js';
9
8
  import Clients from '../packages/clients/index.js';
@@ -55,7 +54,6 @@ const components = [
55
54
  Button,
56
55
  ButtonGroup,
57
56
  CheckboxGroup,
58
- CaLogin,
59
57
  Card,
60
58
  Cascader,
61
59
  Clients,
@@ -115,12 +113,11 @@ if (typeof window !== 'undefined' && window.Vue) {
115
113
  }
116
114
 
117
115
  export default {
118
- version: '0.4.17',
116
+ version: '0.4.19',
119
117
  install,
120
118
  Button,
121
119
  ButtonGroup,
122
120
  CheckboxGroup,
123
- CaLogin,
124
121
  Card,
125
122
  Cascader,
126
123
  Clients,