eoss-ui 0.5.82 → 0.5.84

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 (80) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +152 -73
  3. package/lib/button.js +124 -76
  4. package/lib/checkbox-group.js +70 -53
  5. package/lib/config/api.js +3 -0
  6. package/lib/data-table-form.js +70 -53
  7. package/lib/data-table.js +93 -71
  8. package/lib/date-picker.js +70 -53
  9. package/lib/dialog.js +86 -56
  10. package/lib/eoss-ui.common.js +1197 -258
  11. package/lib/flow-group.js +70 -53
  12. package/lib/flow-list.js +71 -54
  13. package/lib/flow.js +119 -84
  14. package/lib/form.js +88 -55
  15. package/lib/handle-user.js +71 -54
  16. package/lib/handler.js +70 -53
  17. package/lib/icon.js +70 -53
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +70 -53
  20. package/lib/input.js +70 -53
  21. package/lib/login.js +81 -61
  22. package/lib/main.js +901 -110
  23. package/lib/nav.js +70 -53
  24. package/lib/notify.js +49 -45
  25. package/lib/page.js +70 -53
  26. package/lib/pagination.js +70 -53
  27. package/lib/player.js +70 -53
  28. package/lib/qr-code.js +70 -53
  29. package/lib/radio-group.js +70 -53
  30. package/lib/retrial-auth.js +70 -53
  31. package/lib/select-ganged.js +70 -53
  32. package/lib/select.js +70 -53
  33. package/lib/selector-panel.js +70 -53
  34. package/lib/selector.js +70 -53
  35. package/lib/sizer.js +70 -53
  36. package/lib/steps.js +70 -53
  37. package/lib/switch.js +70 -53
  38. package/lib/table-form.js +70 -53
  39. package/lib/tabs.js +70 -53
  40. package/lib/theme-chalk/dialog.css +1 -1
  41. package/lib/theme-chalk/flow-group.css +1 -1
  42. package/lib/theme-chalk/form.css +1 -1
  43. package/lib/theme-chalk/index.css +1 -1
  44. package/lib/theme-chalk/main.css +1 -1
  45. package/lib/theme-chalk/simplicity.css +1 -1
  46. package/lib/tips.js +70 -53
  47. package/lib/tree-group.js +74 -57
  48. package/lib/tree.js +70 -53
  49. package/lib/upload.js +74 -57
  50. package/lib/utils/util.js +26 -13
  51. package/lib/wujie.js +70 -53
  52. package/lib/wxlogin.js +70 -53
  53. package/package.json +2 -2
  54. package/packages/button/src/main.vue +88 -55
  55. package/packages/button-group/src/main.vue +56 -13
  56. package/packages/data-table/src/column.vue +4 -0
  57. package/packages/data-table/src/main.vue +6 -7
  58. package/packages/dialog/src/main.vue +10 -1
  59. package/packages/flow/src/main.vue +26 -17
  60. package/packages/form/src/main.vue +10 -0
  61. package/packages/login/src/resetPassword.vue +4 -2
  62. package/packages/main/src/default/userinfo.vue +2 -1
  63. package/packages/main/src/public/search.vue +337 -0
  64. package/packages/main/src/simplicity/apps.vue +8 -2
  65. package/packages/main/src/simplicity/index.vue +38 -9
  66. package/packages/main/src/simplicity/userinfo.vue +1 -0
  67. package/packages/theme-chalk/lib/dialog.css +1 -1
  68. package/packages/theme-chalk/lib/flow-group.css +1 -1
  69. package/packages/theme-chalk/lib/form.css +1 -1
  70. package/packages/theme-chalk/lib/index.css +1 -1
  71. package/packages/theme-chalk/lib/main.css +1 -1
  72. package/packages/theme-chalk/lib/simplicity.css +1 -1
  73. package/packages/theme-chalk/src/dialog.scss +25 -0
  74. package/packages/theme-chalk/src/flow-group.scss +1 -0
  75. package/packages/theme-chalk/src/form.scss +6 -0
  76. package/packages/theme-chalk/src/simplicity.scss +159 -4
  77. package/packages/tree-group/src/main.vue +2 -3
  78. package/src/config/api.js +3 -0
  79. package/src/index.js +157 -157
  80. package/src/utils/util.js +18 -5
@@ -17,6 +17,7 @@ export default {
17
17
  }
18
18
  },
19
19
  props: {
20
+ data: {},
20
21
  icon: String,
21
22
  iconPlacement: {
22
23
  type: String,
@@ -46,10 +47,14 @@ export default {
46
47
  syncKeys: Object,
47
48
  text: String,
48
49
  onClick: Function,
49
- badge: [Object, Number],
50
+ badge: [Object, Number, Function],
50
51
  float: String,
51
52
  selector: Boolean,
52
- upload: Boolean
53
+ upload: Boolean,
54
+ outside: {
55
+ type: Boolean,
56
+ default: true
57
+ }
53
58
  },
54
59
  computed: {
55
60
  _type() {
@@ -266,6 +271,7 @@ export default {
266
271
  let attrs = {};
267
272
  let listeners = {};
268
273
  let config = {};
274
+ let badgeConfig;
269
275
  if (this.selector) {
270
276
  tag = 'es-selector';
271
277
  props = {
@@ -300,44 +306,66 @@ export default {
300
306
  ]);
301
307
  }
302
308
  if (this.badge) {
303
- let config = {};
304
309
  if (typeof this.badge === 'number') {
305
- config = { class: 'es-button-badge', props: { value: this.badge } };
310
+ badgeConfig = {
311
+ class: 'es-button-badge',
312
+ props: { value: this.badge }
313
+ };
314
+ } else if (typeof this.badge === 'function') {
315
+ let badge = this.badge(this.data);
316
+ if (badge) {
317
+ if (typeof badge === 'number') {
318
+ badgeConfig = {
319
+ class: 'es-button-badge',
320
+ props: { value: badge }
321
+ };
322
+ } else {
323
+ let { value, max, isDot, hidden, type } = badge;
324
+ badgeConfig = {
325
+ class: this.badge.class
326
+ ? this.badge.class + ' es-button-badge'
327
+ : 'es-button-badge',
328
+ props: { value, max, isDot, hidden, type }
329
+ };
330
+ }
331
+ }
306
332
  } else {
307
333
  let { value, max, isDot, hidden, type } = this.badge;
308
- config = {
334
+ badgeConfig = {
309
335
  class: this.badge.class
310
336
  ? this.badge.class + ' es-button-badge'
311
337
  : 'es-button-badge',
312
338
  props: { value, max, isDot, hidden, type }
313
339
  };
314
340
  }
315
- return h('el-badge', config, [
316
- h(
317
- tag,
318
- {
319
- class: clas,
320
- props: { ...this.$attrs, ...props },
321
- attrs: attrs,
322
- on: { ...this.$listeners, click: this.handleClick },
323
- directives: [
324
- {
325
- name: 'show',
326
- value: !this.hide
327
- }
328
- ]
329
- },
330
- this.iconPlacement === 'start'
331
- ? [
332
- this.icon ? h('i', { class: this.icon }) : '',
333
- this.$slots.default || this.text
334
- ]
335
- : [
336
- this.$slots.default || this.text,
337
- this.icon ? h('i', { class: this.icon }) : ''
341
+ if (badgeConfig && Object.keys(badgeConfig).length && this.outside) {
342
+ return h('el-badge', badgeConfig, [
343
+ h(
344
+ tag,
345
+ {
346
+ class: clas,
347
+ props: { ...this.$attrs, ...props },
348
+ attrs: attrs,
349
+ on: { ...this.$listeners, click: this.handleClick },
350
+ directives: [
351
+ {
352
+ name: 'show',
353
+ value: !this.hide
354
+ }
338
355
  ]
339
- )
340
- ]);
356
+ },
357
+ this.iconPlacement === 'start'
358
+ ? [
359
+ this.icon ? h('i', { class: this.icon }) : '',
360
+ this.$slots.default || this.text
361
+ ]
362
+ : [
363
+ this.$slots.default || this.text,
364
+ this.icon ? h('i', { class: this.icon }) : ''
365
+ ]
366
+ )
367
+ ]);
368
+ }
341
369
  }
342
370
  }
343
371
  return h(
@@ -354,31 +382,36 @@ export default {
354
382
  }
355
383
  ]
356
384
  },
357
- this.iconPlacement === 'start'
358
- ? [
359
- this.icon ? h('i', { class: this.icon }) : '',
360
- this.upload
361
- ? h(
362
- 'el-button',
363
- {
364
- props: config
365
- },
366
- [this.$slots.default || this.text]
367
- )
368
- : this.$slots.default || this.text
369
- ]
370
- : [
371
- this.upload
372
- ? h(
373
- 'el-button',
374
- {
375
- props: config
376
- },
377
- [this.$slots.default || this.text]
378
- )
379
- : this.$slots.default || this.text,
380
- this.icon ? h('i', { class: this.icon }) : ''
381
- ]
385
+ [
386
+ ...(this.iconPlacement === 'start'
387
+ ? [
388
+ this.icon ? h('i', { class: this.icon }) : '',
389
+ this.upload
390
+ ? h(
391
+ 'el-button',
392
+ {
393
+ props: config
394
+ },
395
+ [this.$slots.default || this.text]
396
+ )
397
+ : this.$slots.default || this.text
398
+ ]
399
+ : [
400
+ this.upload
401
+ ? h(
402
+ 'el-button',
403
+ {
404
+ props: config
405
+ },
406
+ [this.$slots.default || this.text]
407
+ )
408
+ : this.$slots.default || this.text,
409
+ this.icon ? h('i', { class: this.icon }) : ''
410
+ ]),
411
+ !this.outside && badgeConfig && Object.keys(badgeConfig).length
412
+ ? h('el-badge', badgeConfig)
413
+ : ''
414
+ ]
382
415
  );
383
416
  }
384
417
  };
@@ -21,6 +21,8 @@
21
21
  <es-button
22
22
  v-else
23
23
  :stop="stop"
24
+ :data="data"
25
+ :outside="outside"
24
26
  v-bind="
25
27
  exclAttribute({
26
28
  data: item,
@@ -50,17 +52,19 @@
50
52
  :trigger="trigger"
51
53
  >
52
54
  <el-button :size="size" :type="mode == 'plus' ? 'text' : ''">
53
- <template v-if="mode == 'plus'">更多</template>
54
- <template v-else-if="moreText">
55
- {{ moreText }}
56
- <i
57
- :class="{
58
- 'el-icon-arrow-down': !show,
59
- 'el-icon-arrow-up': show
60
- }"
61
- ></i>
62
- </template>
63
- <i v-else class="es-icon-omit"></i>
55
+ <el-badge v-bind="badges">
56
+ <template v-if="mode == 'plus'">更多</template>
57
+ <template v-else-if="moreText">
58
+ {{ moreText }}
59
+ <i
60
+ :class="{
61
+ 'el-icon-arrow-down': !show,
62
+ 'el-icon-arrow-up': show
63
+ }"
64
+ ></i>
65
+ </template>
66
+ <i v-else class="es-icon-omit"></i>
67
+ </el-badge>
64
68
  </el-button>
65
69
  <el-dropdown-menu slot="dropdown">
66
70
  <el-dropdown-item
@@ -114,6 +118,14 @@
114
118
  : item.text
115
119
  }}
116
120
  </template>
121
+ <el-badge
122
+ v-if="item.badge"
123
+ v-bind="
124
+ typeof item.badge === 'number'
125
+ ? { value: item.badge }
126
+ : item.badge
127
+ "
128
+ ></el-badge>
117
129
  </el-dropdown-item>
118
130
  </el-dropdown-menu>
119
131
  </el-dropdown>
@@ -153,7 +165,13 @@ export default {
153
165
  type: String,
154
166
  default: 'bottom'
155
167
  },
156
- parseData: Function
168
+ parseData: Function,
169
+ badge: Object,
170
+ sort: Boolean,
171
+ outside: {
172
+ type: Boolean,
173
+ default: true
174
+ }
157
175
  },
158
176
  computed: {
159
177
  btns() {
@@ -170,6 +188,19 @@ export default {
170
188
  ? this.btns.slice(this.length - 1, this.btns.length)
171
189
  : [];
172
190
  return btns;
191
+ },
192
+ badges() {
193
+ if (
194
+ this.other.length &&
195
+ this.other.filter((item) => {
196
+ return item.badge;
197
+ }).length
198
+ ) {
199
+ return this.badge ? { isDot: true, ...this.badge } : { isDot: true };
200
+ }
201
+ return this.badge
202
+ ? { isDot: true, hidden: true, ...this.badge }
203
+ : { isDot: true, hidden: true };
173
204
  }
174
205
  },
175
206
  watch: {},
@@ -215,7 +246,19 @@ export default {
215
246
  }
216
247
  return true;
217
248
  });
218
- return arry;
249
+ let newBtns = arry.map((item) => {
250
+ let badge;
251
+ if (item.badge && typeof item.badge === 'function') {
252
+ badge = item.badge(this.data.row);
253
+ }
254
+ return badge ? { ...item, badge: badge } : { ...item };
255
+ });
256
+ if (this.sort) {
257
+ newBtns = newBtns.sort((a, b) => {
258
+ return (b.badge ? 1 : 0) - (a.badge ? 1 : 0);
259
+ });
260
+ }
261
+ return newBtns;
219
262
  },
220
263
  handleChange(res) {
221
264
  this.show = res;
@@ -602,6 +602,10 @@ export default {
602
602
  required = this.rules.required;
603
603
  }
604
604
  }
605
+ if (this.type === 'handle') {
606
+ config.sort = true;
607
+ config.outside = false;
608
+ }
605
609
  let minWidth =
606
610
  this.label || this.title
607
611
  ? (this.label || this.title).length * 14 + 20
@@ -77,7 +77,7 @@
77
77
  (theadBorder && border != 'none' ? ' es-thead-border' : '')
78
78
  "
79
79
  >
80
- <slot name="prepend"></slot>
80
+ <slot name="suffix"></slot>
81
81
  <slot></slot>
82
82
  <template v-for="(item, index) in theads">
83
83
  <template v-if="item.hide !== true">
@@ -120,7 +120,7 @@
120
120
  ></children>
121
121
  </template>
122
122
  </template>
123
- <slot name="append"></slot>
123
+ <slot name="prefix"></slot>
124
124
  <el-table-column
125
125
  v-if="editable && !readonly"
126
126
  width="80"
@@ -149,6 +149,7 @@
149
149
  </el-button>
150
150
  </template>
151
151
  </el-table-column>
152
+ <template slot="append"><slot name="append"></slot></template>
152
153
  </el-table>
153
154
  <div v-if="infiniteScroll" class="es-table-page es-loading-page">
154
155
  <span>共{{ config.totalCount }}条,</span>
@@ -182,8 +183,7 @@ import sizer from './sizer.vue';
182
183
  import util from 'eoss-ui/src/utils/util';
183
184
  import bus from 'eoss-ui/src/utils/bus';
184
185
  import qs from 'qs';
185
- const dataTableMode =
186
- util.win.top.dataTableMode || util.win.dataTableMode || 'default';
186
+ const systemMode = util.win.top.systemMode || util.win.systemMode || 'default';
187
187
  export default {
188
188
  name: 'EsDataTable',
189
189
  inheritAttrs: false,
@@ -211,7 +211,7 @@ export default {
211
211
  props: {
212
212
  mode: {
213
213
  type: String,
214
- default: dataTableMode
214
+ default: systemMode
215
215
  },
216
216
  service: String,
217
217
  loading: {
@@ -723,8 +723,7 @@ export default {
723
723
  }
724
724
  },
725
725
  param: {
726
- deep: true,
727
- handler() {
726
+ handler(val) {
728
727
  this.getTableData();
729
728
  }
730
729
  },
@@ -11,7 +11,11 @@
11
11
  :modal-append-to-body="modalAppendToBody"
12
12
  v-bind="$attrs"
13
13
  v-on="{ ...$listeners, close: handleClosed, scale: handleScale }"
14
- :class="{ 'is-middle': middle }"
14
+ :class="{
15
+ 'es-dialog-plus': mode == 'plus',
16
+ 'is-middle': middle,
17
+ 'es-title-hide': !titles
18
+ }"
15
19
  :append-to-body="appendToBody"
16
20
  :id="wujieName"
17
21
  :ref="wujieName"
@@ -268,6 +272,7 @@ let availWidth = 0;
268
272
  let availHeight = 0;
269
273
  availWidth = util.win.top.document.body.offsetWidth - 260;
270
274
  availHeight = util.win.top.document.body.offsetHeight - 60;
275
+ const systemMode = util.win.top.systemMode || util.win.systemMode || 'default';
271
276
  export default {
272
277
  name: 'EsDialog',
273
278
  inheritAttrs: false,
@@ -289,6 +294,10 @@ export default {
289
294
  }
290
295
  },
291
296
  props: {
297
+ mode: {
298
+ type: String,
299
+ default: systemMode
300
+ },
292
301
  title: String,
293
302
  busEvent: String,
294
303
  contents: [Array, Object],
@@ -562,19 +562,20 @@
562
562
  </div>
563
563
  <!-- 弹窗内容 -->
564
564
  <es-dialog
565
+ v-if="handleVisible"
565
566
  append-to-body
567
+ height="auto"
568
+ ref="handleVisible"
566
569
  :title="title"
567
570
  :close-on-click-modal="false"
568
571
  :visible.sync="handleVisible"
569
- v-if="handleVisible"
570
572
  :closeParent="closeParent"
571
- height="auto"
572
573
  >
573
574
  <ProcessForm
574
575
  :id="businessIds"
575
576
  :process-definition-id="nodeInfo.nextNode"
576
577
  :opinion="value"
577
- @cancel="closeProcess($event, 'handleVisible')"
578
+ @cancel="closeProcess($event, 'handleVisible', closeParent)"
578
579
  />
579
580
  </es-dialog>
580
581
  <es-dialog
@@ -592,11 +593,12 @@
592
593
  />
593
594
  </es-dialog>
594
595
  <es-dialog
595
- append-to-body
596
- :close-on-click-modal="false"
597
- title="驳回"
598
596
  v-if="showReject"
597
+ append-to-body
599
598
  height="auto"
599
+ title="驳回"
600
+ ref="showReject"
601
+ :close-on-click-modal="false"
600
602
  :visible.sync="showReject"
601
603
  >
602
604
  <ProcessReject
@@ -608,12 +610,13 @@
608
610
  />
609
611
  </es-dialog>
610
612
  <es-dialog
613
+ v-if="showTaskRead"
611
614
  append-to-body
615
+ height="auto"
616
+ ref="showTaskRead"
612
617
  :close-on-click-modal="false"
613
618
  :title="taskReadType === 'transfer' ? '转办' : '分阅'"
614
619
  :visible.sync="showTaskRead"
615
- height="auto"
616
- v-if="showTaskRead"
617
620
  >
618
621
  <StartTaskRead
619
622
  :pending-id="pendingId"
@@ -625,11 +628,11 @@
625
628
  />
626
629
  </es-dialog>
627
630
  <es-dialog
631
+ v-if="showFileList"
628
632
  append-to-body
629
- :close-on-click-modal="false"
630
633
  title="意见附件"
634
+ :close-on-click-modal="false"
631
635
  :visible.sync="showFileList"
632
- v-if="showFileList"
633
636
  >
634
637
  <FileList
635
638
  :ownId="pendingId"
@@ -638,12 +641,13 @@
638
641
  />
639
642
  </es-dialog>
640
643
  <es-dialog
644
+ v-if="showSendMsg"
641
645
  append-to-body
642
- :close-on-click-modal="false"
646
+ height="auto"
643
647
  title="发送消息"
648
+ ref="showSendMsg"
649
+ :close-on-click-modal="false"
644
650
  :visible.sync="showSendMsg"
645
- height="auto"
646
- v-if="showSendMsg"
647
651
  >
648
652
  <SendMsg
649
653
  @cancel="closeProcess($event, 'showSendMsg')"
@@ -652,12 +656,13 @@
652
656
  />
653
657
  </es-dialog>
654
658
  <es-dialog
659
+ v-if="showTaskUnionExamine"
655
660
  append-to-body
661
+ height="auto"
662
+ ref="showTaskUnionExamine"
656
663
  :close-on-click-modal="false"
657
664
  :title="flowTitle"
658
665
  :visible.sync="showTaskUnionExamine"
659
- height="auto"
660
- v-if="showTaskUnionExamine"
661
666
  >
662
667
  <TaskUnionExamine
663
668
  @cancel="closeProcess($event, 'showTaskUnionExamine')"
@@ -2272,8 +2277,12 @@ export default {
2272
2277
  * @param {String} type 当前点击的弹窗类型
2273
2278
  * @date 2022年5月25日
2274
2279
  **/
2275
- closeProcess(val, type) {
2276
- this[type] = false;
2280
+ closeProcess(val, type, closeParent) {
2281
+ if (closeParent) {
2282
+ this.$refs[type].handleClosed();
2283
+ } else {
2284
+ this[type] = false;
2285
+ }
2277
2286
  if (
2278
2287
  val == 'taskReadAndEnd' ||
2279
2288
  (val == true && type != 'taskRead') ||
@@ -25,6 +25,12 @@
25
25
  v-on="$listeners"
26
26
  >
27
27
  <input type="text" style="display: none" v-if="forbid" />
28
+ <input
29
+ type="password"
30
+ class="hidden-input"
31
+ autocomplete="new-password"
32
+ v-if="!autocomplete"
33
+ />
28
34
  <es-steps
29
35
  v-if="steps"
30
36
  class="es-steps-group"
@@ -4071,6 +4077,10 @@ export default {
4071
4077
  }
4072
4078
  },
4073
4079
  props: {
4080
+ autocomplete: {
4081
+ type: Boolean,
4082
+ default: true
4083
+ },
4074
4084
  hides: {
4075
4085
  type: Array,
4076
4086
  default() {
@@ -26,9 +26,10 @@
26
26
  element-loading-text="修改中..."
27
27
  element-loading-spinner="el-icon-loading"
28
28
  element-loading-background="rgba(0, 0, 0, 0.65)"
29
+ class="es-user-info"
29
30
  :model="formData"
30
31
  :contents="page"
31
- class="es-user-info"
32
+ :autocomplete="false"
32
33
  @submit="handleSubmit"
33
34
  >
34
35
  </es-form>
@@ -369,6 +370,8 @@ export default {
369
370
  if (types.length) {
370
371
  this.activeIndex = types[0];
371
372
  }
373
+ } else {
374
+ this.activeIndex = '0';
372
375
  }
373
376
  },
374
377
  destroyed() {
@@ -499,7 +502,6 @@ export default {
499
502
  } else {
500
503
  let msg = res.msg || '系统错误,请联系管理员!';
501
504
  this.$message.error(msg);
502
- this.btnText = '获取验证码';
503
505
  this.disabled = false;
504
506
  delete this.formData.verificationCode;
505
507
  clearInterval(this.timer);
@@ -1,9 +1,10 @@
1
1
  <template>
2
2
  <es-form
3
3
  ref="form"
4
+ class="es-user-info"
4
5
  :model="values"
5
6
  :contents="forms"
6
- class="es-user-info"
7
+ :autocomplete="false"
7
8
  @change="handleFormChange"
8
9
  @submit="handleFormSubmit"
9
10
  >