eoss-ui 0.5.99 → 0.6.10

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 (120) hide show
  1. package/lib/button-group.js +210 -198
  2. package/lib/button.js +2 -2
  3. package/lib/calendar.js +2 -2
  4. package/lib/card.js +2 -2
  5. package/lib/cascader.js +2 -2
  6. package/lib/checkbox-group.js +12 -30
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +2 -4
  9. package/lib/data-table.js +21 -36
  10. package/lib/date-picker.js +2 -2
  11. package/lib/dialog.js +16 -33
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +1506 -936
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +2 -2
  16. package/lib/flow-list.js +4 -4
  17. package/lib/flow.js +475 -239
  18. package/lib/form.js +2 -4
  19. package/lib/handle-user.js +2 -2
  20. package/lib/handler.js +12 -12
  21. package/lib/icon.js +9 -9
  22. package/lib/icons.js +5 -5
  23. package/lib/index.js +1 -1
  24. package/lib/input-number.js +2 -2
  25. package/lib/input.js +2 -2
  26. package/lib/label.js +2 -2
  27. package/lib/layout.js +4 -4
  28. package/lib/login.js +728 -489
  29. package/lib/main.js +201 -113
  30. package/lib/menu.js +2 -2
  31. package/lib/nav.js +2 -2
  32. package/lib/notify.js +2 -2
  33. package/lib/page.js +2 -2
  34. package/lib/pagination.js +2 -2
  35. package/lib/player.js +11 -11
  36. package/lib/qr-code.js +4 -4
  37. package/lib/radio-group.js +10 -30
  38. package/lib/retrial-auth.js +9 -9
  39. package/lib/select-ganged.js +9 -9
  40. package/lib/select.js +8 -28
  41. package/lib/selector-panel.js +6 -8
  42. package/lib/selector.js +11 -11
  43. package/lib/sizer.js +2 -2
  44. package/lib/steps.js +2 -2
  45. package/lib/switch.js +9 -9
  46. package/lib/table-form.js +2 -2
  47. package/lib/tabs-panel.js +2 -2
  48. package/lib/tabs.js +2 -2
  49. package/lib/theme-chalk/base.css +1 -1
  50. package/lib/theme-chalk/flow.css +1 -1
  51. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  52. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  53. package/lib/theme-chalk/icon.css +1 -1
  54. package/lib/theme-chalk/icons.css +1 -1
  55. package/lib/theme-chalk/index.css +1 -1
  56. package/lib/theme-chalk/login.css +1 -1
  57. package/lib/theme-chalk/main.css +1 -1
  58. package/lib/theme-chalk/menu.css +1 -1
  59. package/lib/theme-chalk/simplicity.css +1 -1
  60. package/lib/theme-chalk/sizer.css +1 -1
  61. package/lib/theme-chalk/upload.css +1 -1
  62. package/lib/tips.js +2 -2
  63. package/lib/toolbar.js +2 -2
  64. package/lib/tree-group.js +6 -5
  65. package/lib/tree.js +2 -2
  66. package/lib/upload.js +6 -8
  67. package/lib/wujie.js +145 -145
  68. package/lib/wxlogin.js +145 -145
  69. package/package.json +2 -2
  70. package/packages/.DS_Store +0 -0
  71. package/packages/checkbox-group/.DS_Store +0 -0
  72. package/packages/checkbox-group/src/main.vue +10 -7
  73. package/packages/data-table/src/main.vue +23 -15
  74. package/packages/dialog/.DS_Store +0 -0
  75. package/packages/dialog/src/main.vue +13 -8
  76. package/packages/flow/src/component/SendMsg.vue +7 -1
  77. package/packages/flow/src/component/taskUnionExamine.vue +19 -1
  78. package/packages/flow/src/main.vue +69 -47
  79. package/packages/flow/src/processForm.vue +21 -5
  80. package/packages/flow/src/processReject.vue +31 -14
  81. package/packages/flow/src/startTaskRead.vue +22 -8
  82. package/packages/handler/.DS_Store +0 -0
  83. package/packages/handler/src/main.vue +1 -1
  84. package/packages/icons/src/icon.json +1 -1
  85. package/packages/login/.DS_Store +0 -0
  86. package/packages/login/src/main.vue +211 -115
  87. package/packages/main/.DS_Store +0 -0
  88. package/packages/main/src/.DS_Store +0 -0
  89. package/packages/main/src/default/index.vue +3 -11
  90. package/packages/main/src/default/message.vue +13 -1
  91. package/packages/main/src/default/notice.vue +16 -4
  92. package/packages/main/src/main.vue +41 -13
  93. package/packages/main/src/simplicity/index.vue +25 -18
  94. package/packages/main/src/simplicity/message.vue +14 -1
  95. package/packages/main/src/simplicity/notice.vue +13 -1
  96. package/packages/radio-group/src/main.vue +10 -7
  97. package/packages/select/src/main.vue +10 -7
  98. package/packages/theme-chalk/lib/base.css +1 -1
  99. package/packages/theme-chalk/lib/flow.css +1 -1
  100. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  101. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  102. package/packages/theme-chalk/lib/icon.css +1 -1
  103. package/packages/theme-chalk/lib/icons.css +1 -1
  104. package/packages/theme-chalk/lib/index.css +1 -1
  105. package/packages/theme-chalk/lib/login.css +1 -1
  106. package/packages/theme-chalk/lib/main.css +1 -1
  107. package/packages/theme-chalk/lib/menu.css +1 -1
  108. package/packages/theme-chalk/lib/simplicity.css +1 -1
  109. package/packages/theme-chalk/lib/sizer.css +1 -1
  110. package/packages/theme-chalk/lib/upload.css +1 -1
  111. package/packages/theme-chalk/src/.DS_Store +0 -0
  112. package/packages/theme-chalk/src/common/var.scss +3 -1
  113. package/packages/theme-chalk/src/flow.scss +12 -0
  114. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  115. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  116. package/packages/theme-chalk/src/icon.scss +16 -0
  117. package/packages/theme-chalk/src/icons.scss +1 -1
  118. package/packages/theme-chalk/src/login.scss +609 -757
  119. package/packages/tree-group/src/main.vue +5 -1
  120. package/src/index.js +1 -1
@@ -8,6 +8,7 @@
8
8
  v-bind="$attrs"
9
9
  v-on="$listeners"
10
10
  @chang-layout="changLayout"
11
+ @bus-emit="busEmit"
11
12
  ></simplicity>
12
13
  <main-default
13
14
  v-else
@@ -17,6 +18,7 @@
17
18
  ref="main"
18
19
  v-on="$listeners"
19
20
  @chang-layout="changLayout"
21
+ @bus-emit="busEmit"
20
22
  ></main-default>
21
23
 
22
24
  <!-- 公用弹窗 -->
@@ -31,7 +33,7 @@
31
33
  attrs: ['visible', 'url']
32
34
  })
33
35
  "
34
- @closed="handleClosed(item, index)"
36
+ @close="handleClosed(item, index)"
35
37
  >
36
38
  <iframe
37
39
  v-if="visibles[index]"
@@ -50,7 +52,6 @@ import Simplicity from './simplicity/index.vue';
50
52
  import MainDefault from './default/index.vue';
51
53
  import util from 'eoss-ui/src/utils/util';
52
54
  import WujieVue from 'wujie-vue2';
53
- const { bus } = WujieVue;
54
55
  export default {
55
56
  name: 'EsMain',
56
57
  inheritAttrs: false,
@@ -100,7 +101,8 @@ export default {
100
101
  visibles: [],
101
102
  isLogin: false,
102
103
  layoutType: this.type,
103
- layout: this.scene
104
+ layout: this.scene,
105
+ emit: false
104
106
  };
105
107
  },
106
108
  created() {
@@ -125,12 +127,12 @@ export default {
125
127
  util.win.windowOpen = this.openPage;
126
128
  util.win.refresh = this.$refs.main.handleRefresh;
127
129
  util.win.jumpMenu = this.$refs.main.jumpMenu;
128
- bus.$on('reLogin', this.handleReLogin);
129
- bus.$on('refresh', this.$refs.main.handleRefresh);
130
- bus.$on('jumpMenu', this.$refs.main.jumpMenu);
131
- bus.$on('emit', function (method, args) {
130
+ WujieVue.bus.$on('reLogin', this.handleReLogin);
131
+ WujieVue.bus.$on('refresh', this.$refs.main.handleRefresh);
132
+ WujieVue.bus.$on('jumpMenu', this.$refs.main.jumpMenu);
133
+ WujieVue.bus.$on('emit', function (method, args) {
132
134
  // 主应用发送事件
133
- bus.$emit(method, args);
135
+ WujieVue.bus.$emit(method, args);
134
136
  });
135
137
 
136
138
  window.addEventListener('message', (method, args) => {
@@ -290,12 +292,18 @@ export default {
290
292
  return false;
291
293
  }
292
294
  let mainConfig = util.getStorage('mainConfig');
293
- if (!mainConfig || mainConfig == '{}') {
294
- util.getMainConfig((res) => {
295
- this.$refs.main.init(res);
295
+ if (mainConfig) {
296
+ mainConfig = JSON.parse(mainConfig);
297
+ this.$nextTick(() => {
298
+ this.$refs.main.init(mainConfig, true);
299
+ util.getMainConfig((res) => {
300
+ this.$refs.main.init(res, false);
301
+ });
296
302
  });
297
303
  } else {
298
- mainConfig = JSON.parse(mainConfig);
304
+ util.getMainConfig((res) => {
305
+ this.$refs.main.init(res, true);
306
+ });
299
307
  }
300
308
  },
301
309
  /**
@@ -349,8 +357,28 @@ export default {
349
357
  handleClosed(res, index) {
350
358
  this.dialogs.splice(index, 1);
351
359
  this.visibles.splice(index, 1);
360
+ },
361
+ /**
362
+ * @desc:主应用相子应用发送事件
363
+ * @author huangbo
364
+ * @date 2024年9月7日
365
+ **/
366
+ busEmit(event, args) {
367
+ if (this.emit) {
368
+ WujieVue.bus.$emit(event, args);
369
+ window.postMessage({ method: event, query: args }, '*');
370
+ const bus = this.bus || this.$root.Bus;
371
+ bus && bus.$emit(event, args);
372
+ this.$emit('busEvent', event, args);
373
+ }
374
+ this.emit = true;
352
375
  }
353
376
  },
354
- beforeDestroy() {}
377
+ beforeDestroy() {
378
+ WujieVue.bus.$off('reLogin');
379
+ WujieVue.bus.$off('refresh');
380
+ WujieVue.bus.$off('jumpMenu');
381
+ WujieVue.bus.$off('emit');
382
+ }
355
383
  };
356
384
  </script>
@@ -698,13 +698,6 @@ export default {
698
698
  }
699
699
  },
700
700
  created() {
701
- let mainConfig = util.getStorage('mainConfig');
702
- if (mainConfig) {
703
- const results = JSON.parse(mainConfig);
704
- if (Object.keys(results).length) {
705
- this.init(results);
706
- }
707
- }
708
701
  this.doorIndex = sessionStorage.getItem('doorIndex');
709
702
  },
710
703
  mounted() {
@@ -734,18 +727,26 @@ export default {
734
727
  }
735
728
  let pathname = url.substring(url.indexOf('#/') + 1);
736
729
  pathname = pathname.split('?')[0];
730
+ let appCode;
737
731
  if (res.path !== '/' && pathname == path) {
738
732
  if (res.components) {
739
733
  if (!res.components[code]) {
740
- console.error('“命名视图”规范属性名称与菜单appCode不一致', res);
734
+ console.error(
735
+ '路由“命名视图”规范属性名称与菜单appCode不一致',
736
+ res,
737
+ code
738
+ );
739
+ appCode = Object.keys(res.components).filter((item) => {
740
+ return item !== 'default';
741
+ })[0];
741
742
  }
742
743
  } else {
743
744
  console.error(
744
- '请根据“命名视图”规范,正确添加components属性名称',
745
+ '请根据路由“命名视图”规范,正确添加components属性名称',
745
746
  res
746
747
  );
747
748
  }
748
- return pathname;
749
+ return appCode ? { path: pathname, appCode } : pathname;
749
750
  }
750
751
  if (res && Object.prototype.hasOwnProperty.call(res, 'children')) {
751
752
  let path = this.hasRouter(res.children, url, code);
@@ -761,9 +762,9 @@ export default {
761
762
  * @author huangbo
762
763
  * @date 2024年9月7日
763
764
  **/
764
- init(results) {
765
+ init(results, first) {
765
766
  this.setConfig(results);
766
- if (this.remote) {
767
+ if (this.remote && first) {
767
768
  this.getApplications();
768
769
  }
769
770
  },
@@ -776,7 +777,7 @@ export default {
776
777
  if (this.socket) {
777
778
  this.initWebSocket();
778
779
  }
779
- sessionStorage.setItem('mainConfig', JSON.stringify(results));
780
+ localStorage.setItem('mainConfig', JSON.stringify(results));
780
781
  util.setStorage({
781
782
  type: this.storage,
782
783
  key: {
@@ -1094,7 +1095,12 @@ export default {
1094
1095
  let path = this.hasRouter(routes, urls[0], res.appCode);
1095
1096
  if (path && this.routeType !== 'wujie') {
1096
1097
  res.method = 'router';
1097
- res.path = path;
1098
+ if (typeof path === 'string') {
1099
+ res.path = path;
1100
+ } else {
1101
+ res.path = path.path;
1102
+ res.appCode = path.appCode;
1103
+ }
1098
1104
  res.keys = util.uuid();
1099
1105
  } else {
1100
1106
  let urlopenmode = util.getParams({
@@ -1287,6 +1293,7 @@ export default {
1287
1293
  this.notice = data[i];
1288
1294
  if (this.showMsg) {
1289
1295
  this.$refs.message.getMsg(true);
1296
+ this.$emit('bus-emit', 'waitdone');
1290
1297
  }
1291
1298
  }
1292
1299
  if (i === 'menuTipsMap') {
@@ -1515,7 +1522,7 @@ export default {
1515
1522
  if (name == 'userHeadUrl') {
1516
1523
  this.$set(this.userModel, 'userHeadUrl', res);
1517
1524
  store.set('userModel', this.userModel);
1518
- let mainConfig = JSON.parse(sessionStorage.getItem('mainConfig'));
1525
+ let mainConfig = JSON.parse(localStorage.getItem('mainConfig'));
1519
1526
  sessionStorage.setItem(
1520
1527
  'mainConfig',
1521
1528
  JSON.stringify({ ...mainConfig, userModel: this.userModel })
@@ -1523,8 +1530,8 @@ export default {
1523
1530
  } else {
1524
1531
  this.$set(this.userStyle, 'notify', res);
1525
1532
  store.set('userStyle', this.userStyle);
1526
- let mainConfig = JSON.parse(sessionStorage.getItem('mainConfig'));
1527
- sessionStorage.setItem(
1533
+ let mainConfig = JSON.parse(localStorage.getItem('mainConfig'));
1534
+ localStorage.setItem(
1528
1535
  'mainConfig',
1529
1536
  JSON.stringify({ ...mainConfig, userStyle: this.userStyle })
1530
1537
  );
@@ -1715,7 +1722,7 @@ export default {
1715
1722
  * @date 2024年9月7日
1716
1723
  **/
1717
1724
  handleQuit() {
1718
- this.$confirm('确定注销吗?', '退出系统', {
1725
+ this.$confirm('确定退出吗?', '退出系统', {
1719
1726
  confirmButtonText: '确定',
1720
1727
  cancelButtonText: '取消',
1721
1728
  type: 'warning'
@@ -62,6 +62,7 @@
62
62
  :visible.sync="dialog.show"
63
63
  :url="dialog.url"
64
64
  :param="dialog.params"
65
+ @close="handleClose"
65
66
  ></es-dialog>
66
67
  </el-drawer>
67
68
  </template>
@@ -217,7 +218,15 @@ export default {
217
218
  this.count -= 1;
218
219
  this.msgs.splice(index, 1);
219
220
  if (this.winopen) {
220
- util.win.open(item.handlerUrl);
221
+ const mywin = util.win.open(item.handlerUrl);
222
+ if (mywin) {
223
+ let times = setInterval(() => {
224
+ if (mywin.closed) {
225
+ clearInterval(times);
226
+ this.$parent.$emit('bus-emit', 'waitdone');
227
+ }
228
+ }, 1000);
229
+ }
221
230
  } else {
222
231
  this.dialog = {
223
232
  show: true,
@@ -241,6 +250,10 @@ export default {
241
250
  this.$emit('handle', id);
242
251
  }
243
252
  this.dialog.show = false;
253
+ },
254
+ handleClose() {
255
+ console.log(22222);
256
+ this.$parent.$emit('bus-emit', 'waitdone');
244
257
  }
245
258
  }
246
259
  };
@@ -57,6 +57,7 @@
57
57
  :visible.sync="dialog.show"
58
58
  :url="dialog.url"
59
59
  :param="dialog.params"
60
+ @close="handleClose"
60
61
  ></es-dialog>
61
62
  </div>
62
63
  </transition>
@@ -152,7 +153,15 @@ export default {
152
153
  //处理消息
153
154
  handleMessage(item, index) {
154
155
  if (item.urlopenmode === 1 || this.winopen) {
155
- util.win.open(item.handlerUrl);
156
+ const mywin = util.win.open(item.handlerUrl);
157
+ if (mywin) {
158
+ let times = setInterval(() => {
159
+ if (mywin.closed) {
160
+ clearInterval(times);
161
+ this.$parent.$emit('bus-emit', 'waitdone');
162
+ }
163
+ }, 1000);
164
+ }
156
165
  } else {
157
166
  this.dialog = {
158
167
  show: true,
@@ -172,6 +181,9 @@ export default {
172
181
  this.msgs = this.msgs.splice(this.index, 1);
173
182
  }
174
183
  this.dialog.show = false;
184
+ },
185
+ handleClose() {
186
+ this.$parent.$emit('bus-emit', 'waitdone');
175
187
  }
176
188
  }
177
189
  };
@@ -59,7 +59,6 @@ import { findSysCode, getDictList } from 'eoss-ui/src/config/api.js';
59
59
  import { debounce } from 'throttle-debounce';
60
60
  import store from 'eoss-ui/src/utils/store';
61
61
  import util from 'eoss-ui/src/utils/util';
62
- import bus from 'eoss-ui/src/utils/bus';
63
62
  export default {
64
63
  name: 'EsRadioGroup',
65
64
  inheritAttrs: false,
@@ -270,10 +269,12 @@ export default {
270
269
  if (res.rCode === 0) {
271
270
  this.options = JSON.parse(JSON.stringify(res.results));
272
271
  if (sysCode || this.dataKey) {
273
- bus.$emit(
274
- sysCode || this.dataKey,
275
- JSON.parse(JSON.stringify(this.options))
276
- );
272
+ const bus = this.bus || this.$root.Bus;
273
+ bus &&
274
+ bus.$emit(
275
+ sysCode || this.dataKey,
276
+ JSON.parse(JSON.stringify(this.options))
277
+ );
277
278
  store.set(sysCode, JSON.parse(JSON.stringify(res.results)));
278
279
  }
279
280
  }
@@ -303,10 +304,12 @@ export default {
303
304
  this.options = val;
304
305
  },
305
306
  bindEventBus() {
306
- bus.$on(this.sysCode || this.dataKey, this.setOptions);
307
+ const bus = this.bus || this.$root.Bus;
308
+ bus && bus.$on(this.sysCode || this.dataKey, this.setOptions);
307
309
  },
308
310
  unbindEventBus() {
309
- bus.$off(this.sysCode || this.dataKey, this.setOptions);
311
+ const bus = this.bus || this.$root.Bus;
312
+ bus && bus.$off(this.sysCode || this.dataKey, this.setOptions);
310
313
  }
311
314
  },
312
315
  beforeDestroy() {
@@ -3,7 +3,6 @@ import { findSysCode, getDictList } from 'eoss-ui/src/config/api.js';
3
3
  import { debounce } from 'throttle-debounce';
4
4
  import store from 'eoss-ui/src/utils/store';
5
5
  import util from 'eoss-ui/src/utils/util';
6
- import bus from 'eoss-ui/src/utils/bus';
7
6
  export default {
8
7
  name: 'EsSelect',
9
8
  componentName: 'EsSelect',
@@ -368,10 +367,12 @@ export default {
368
367
  this.options = JSON.parse(JSON.stringify(res.results));
369
368
  }
370
369
  if (sysCode || this.dataKey) {
371
- bus.$emit(
372
- sysCode || this.dataKey,
373
- JSON.parse(JSON.stringify(this.options))
374
- );
370
+ const bus = this.bus || this.$root.Bus;
371
+ bus &&
372
+ bus.$emit(
373
+ sysCode || this.dataKey,
374
+ JSON.parse(JSON.stringify(this.options))
375
+ );
375
376
  store.set(sysCode, JSON.parse(JSON.stringify(this.options)));
376
377
  }
377
378
  } else {
@@ -606,10 +607,12 @@ export default {
606
607
  this.options = val;
607
608
  },
608
609
  bindEventBus() {
609
- bus.$on(this.sysCode || this.dataKey, this.setOptions);
610
+ const bus = this.bus || this.$root.Bus;
611
+ bus && bus.$on(this.sysCode || this.dataKey, this.setOptions);
610
612
  },
611
613
  unbindEventBus() {
612
- bus.$off(this.sysCode || this.dataKey, this.setOptions);
614
+ const bus = this.bus || this.$root.Bus;
615
+ bus && bus.$off(this.sysCode || this.dataKey, this.setOptions);
613
616
  }
614
617
  },
615
618
  beforeDestroy() {