eoss-ui 0.6.40 → 0.6.41

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 (98) hide show
  1. package/lib/button-group.js +5 -0
  2. package/lib/button.js +5 -0
  3. package/lib/checkbox-group.js +5 -0
  4. package/lib/data-table-form.js +5 -0
  5. package/lib/data-table.js +11 -6
  6. package/lib/date-picker.js +5 -0
  7. package/lib/dialog.js +5 -0
  8. package/lib/eoss-ui.common.js +831 -433
  9. package/lib/flow-group.js +5 -0
  10. package/lib/flow-list.js +5 -0
  11. package/lib/flow.js +37 -35
  12. package/lib/form.js +5 -0
  13. package/lib/handle-user.js +5 -0
  14. package/lib/handler.js +152 -76
  15. package/lib/icon.js +5 -0
  16. package/lib/icons.js +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +5 -0
  19. package/lib/input.js +5 -0
  20. package/lib/login.js +248 -160
  21. package/lib/main.js +329 -113
  22. package/lib/nav.js +5 -0
  23. package/lib/page.js +5 -0
  24. package/lib/pagination.js +5 -0
  25. package/lib/player.js +5 -0
  26. package/lib/qr-code.js +5 -0
  27. package/lib/radio-group.js +5 -0
  28. package/lib/retrial-auth.js +5 -0
  29. package/lib/select-ganged.js +5 -0
  30. package/lib/select.js +5 -0
  31. package/lib/selector-panel.js +7 -3
  32. package/lib/selector.js +42 -5
  33. package/lib/sizer.js +5 -0
  34. package/lib/steps.js +5 -0
  35. package/lib/switch.js +5 -0
  36. package/lib/table-form.js +5 -0
  37. package/lib/tabs.js +5 -0
  38. package/lib/theme-chalk/base.css +1 -1
  39. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  40. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  41. package/lib/theme-chalk/icon.css +1 -1
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/theme-chalk/login.css +1 -1
  44. package/lib/theme-chalk/main.css +1 -1
  45. package/lib/theme-chalk/menu.css +1 -1
  46. package/lib/theme-chalk/simplicity.css +1 -1
  47. package/lib/theme-chalk/sizer.css +1 -1
  48. package/lib/theme-chalk/upload.css +1 -1
  49. package/lib/tips.js +5 -0
  50. package/lib/tree-group.js +5 -0
  51. package/lib/tree.js +5 -0
  52. package/lib/upload.js +5 -0
  53. package/lib/utils/util.js +5 -0
  54. package/lib/wujie.js +5 -0
  55. package/lib/wxlogin.js +5 -0
  56. package/package.json +1 -1
  57. package/packages/.DS_Store +0 -0
  58. package/packages/data-table/.DS_Store +0 -0
  59. package/packages/data-table/src/main.vue +3 -1
  60. package/packages/flow/.DS_Store +0 -0
  61. package/packages/flow/src/component/taskUnionExamine.vue +34 -26
  62. package/packages/flow/src/main.vue +0 -2
  63. package/packages/flow/src/processForm.vue +29 -18
  64. package/packages/flow/src/reset.vue +0 -2
  65. package/packages/handler/src/main.vue +163 -77
  66. package/packages/icons/src/icon.json +1 -1
  67. package/packages/login/.DS_Store +0 -0
  68. package/packages/login/src/main.vue +61 -18
  69. package/packages/main/.DS_Store +0 -0
  70. package/packages/main/src/.DS_Store +0 -0
  71. package/packages/main/src/default/index.vue +32 -3
  72. package/packages/main/src/public/search.vue +14 -7
  73. package/packages/main/src/simplicity/handler.vue +64 -26
  74. package/packages/main/src/simplicity/index.vue +80 -26
  75. package/packages/selector/.DS_Store +0 -0
  76. package/packages/selector/src/main.vue +17 -5
  77. package/packages/selector-panel/.DS_Store +0 -0
  78. package/packages/selector-panel/src/main.vue +0 -1
  79. package/packages/theme-chalk/lib/base.css +1 -1
  80. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  81. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  82. package/packages/theme-chalk/lib/icon.css +1 -1
  83. package/packages/theme-chalk/lib/index.css +1 -1
  84. package/packages/theme-chalk/lib/login.css +1 -1
  85. package/packages/theme-chalk/lib/main.css +1 -1
  86. package/packages/theme-chalk/lib/menu.css +1 -1
  87. package/packages/theme-chalk/lib/simplicity.css +1 -1
  88. package/packages/theme-chalk/lib/sizer.css +1 -1
  89. package/packages/theme-chalk/lib/upload.css +1 -1
  90. package/packages/theme-chalk/src/.DS_Store +0 -0
  91. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  92. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  93. package/packages/theme-chalk/src/icon.scss +29 -0
  94. package/packages/theme-chalk/src/login.scss +8 -0
  95. package/packages/theme-chalk/src/main.scss +7 -0
  96. package/src/.DS_Store +0 -0
  97. package/src/index.js +1 -1
  98. package/src/utils/util.js +5 -0
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
  </div>
26
26
  <div
27
- v-else-if="item.type === 'online'"
27
+ v-else-if="item.type === 'online' || item.type === 'onlineUser'"
28
28
  class="es-simplicity-online"
29
29
  :key="item.type"
30
30
  >
@@ -40,7 +40,7 @@
40
40
  </div>
41
41
  <el-badge
42
42
  class="es-simplicity-handler-item"
43
- v-else-if="item.type === 'notice'"
43
+ v-else-if="item.type === 'notice' || item.type === 'messsage'"
44
44
  :key="item.type"
45
45
  :value="noticeNum"
46
46
  :max="99"
@@ -73,31 +73,64 @@ export default {
73
73
  props: {
74
74
  contact: Object,
75
75
  dateTime: {
76
- type: Boolean,
77
- default: true
76
+ type: [Boolean, Object],
77
+ default() {
78
+ return { type: 'dateTime' };
79
+ },
80
+ validator: (val) => {
81
+ return val === false || typeof val === 'object';
82
+ }
83
+ },
84
+ onlineUser: {
85
+ type: [Boolean, Object],
86
+ default() {
87
+ return { type: 'onlineUser' };
88
+ },
89
+ validator: (val) => {
90
+ return val === false || typeof val === 'object';
91
+ }
78
92
  },
79
93
  search: {
80
- type: Object,
94
+ type: [Boolean, Object],
81
95
  default() {
82
96
  return {
83
97
  type: 'search',
84
98
  icon: 'es-icon-magnifier',
85
99
  title: '搜索'
86
100
  };
101
+ },
102
+ validator: (val) => {
103
+ return val === false || typeof val === 'object';
104
+ }
105
+ },
106
+ im: {
107
+ type: [Boolean, Object],
108
+ default() {
109
+ return {
110
+ type: 'im',
111
+ icon: 'es-icon-liaotian',
112
+ title: 'IM'
113
+ };
114
+ },
115
+ validator: (val) => {
116
+ return val === false || typeof val === 'object';
87
117
  }
88
118
  },
89
119
  index: {
90
- type: Object,
120
+ type: [Boolean, Object],
91
121
  default() {
92
122
  return {
93
123
  type: 'index',
94
124
  icon: 'es-icon-home',
95
125
  title: '门户'
96
126
  };
127
+ },
128
+ validator: (val) => {
129
+ return val === false || typeof val === 'object';
97
130
  }
98
131
  },
99
132
  home: {
100
- type: Object,
133
+ type: [Boolean, Object],
101
134
  default() {
102
135
  return {
103
136
  type: 'home',
@@ -107,7 +140,7 @@ export default {
107
140
  }
108
141
  },
109
142
  notice: {
110
- type: Object,
143
+ type: [Boolean, Object],
111
144
  default() {
112
145
  return {
113
146
  type: 'notice',
@@ -117,7 +150,7 @@ export default {
117
150
  }
118
151
  },
119
152
  quit: {
120
- type: Object,
153
+ type: [Boolean, Object],
121
154
  default() {
122
155
  return {
123
156
  type: 'quit',
@@ -127,24 +160,29 @@ export default {
127
160
  }
128
161
  },
129
162
  set: {
130
- type: Object,
163
+ type: [Boolean, Object],
131
164
  default() {
132
165
  return {
133
166
  type: 'set',
134
167
  icon: 'es-icon-xitongguanli',
135
168
  title: '设置'
136
169
  };
170
+ },
171
+ validator: (val) => {
172
+ return val === false || typeof val === 'object';
137
173
  }
138
174
  },
139
175
  data: Array,
140
176
  hide: {
141
177
  type: Object,
142
178
  default() {
143
- return {
144
- old: true
145
- };
179
+ return {};
146
180
  }
147
181
  },
182
+ msgNum: {
183
+ type: Number,
184
+ default: 0
185
+ },
148
186
  noticeNum: {
149
187
  type: Number,
150
188
  default: 0
@@ -163,21 +201,19 @@ export default {
163
201
  },
164
202
  computed: {
165
203
  lists() {
166
- let df = [];
167
- if (this.contact) {
168
- df.push({ ...this.contact, type: 'contact' });
169
- }
170
- if (this.dateTime) {
171
- df.push({ type: 'dateTime' });
172
- }
173
- if (this.online) {
174
- df.push({ type: 'online' });
175
- }
204
+ let hide = {
205
+ old: true,
206
+ im: true,
207
+ ...this.hide
208
+ };
176
209
  let data = this.data
177
- ? [...df, ...this.data]
210
+ ? this.data
178
211
  : [
179
- ...df,
212
+ this.contact ? { ...this.contact, type: 'contact' } : {},
213
+ this.dateTime,
214
+ this.onlineUser,
180
215
  this.search,
216
+ this.im,
181
217
  this.index,
182
218
  this.home,
183
219
  this.notice,
@@ -185,7 +221,9 @@ export default {
185
221
  this.set
186
222
  ];
187
223
  return data.filter((item) => {
188
- return !this.hide[item.type];
224
+ return (
225
+ item && Object.keys(item).length && !item.hide && !hide[item.type]
226
+ );
189
227
  });
190
228
  },
191
229
  isClick() {
@@ -91,7 +91,7 @@
91
91
  class="es-simplicity-side-app"
92
92
  v-if="_aiConfig"
93
93
  :style="_aibackground"
94
- @click="handlerSetDrawer(_aiConfig)"
94
+ @click="handlerSetDrawer(_aiConfig, 'ai')"
95
95
  >
96
96
  <es-icon
97
97
  v-show="_aiConfig.icon"
@@ -118,27 +118,27 @@
118
118
  ></apps>
119
119
  <!-- 应用 end -->
120
120
 
121
- <!-- AI -->
121
+ <!-- AI/IM -->
122
122
  <el-drawer
123
123
  class="es-simplicity-public-drawer"
124
- direction="ltr"
124
+ :direction="drawer.direction"
125
125
  modal-class="es-simplicity-apps-modal"
126
126
  size="100%"
127
127
  show-close
128
128
  :modal-append-to-body="false"
129
129
  :visible.sync="drawer.visible"
130
130
  >
131
- <!-- <i
132
- class="es-icon-close es-simplicity-drawer-close"
133
- @click="handleCloseDrawer"
134
- ></i> -->
135
- <template v-if="drawer.url">
136
- <template v-if="isIE || drawer.method !== 'wujie'">
131
+ <div
132
+ class="es-simplicity-public-drawer-main"
133
+ v-if="drawer.ai && drawer.ai.url"
134
+ v-show="drawer.active == 'ai'"
135
+ >
136
+ <template v-if="isIE || drawer.ai.method !== 'wujie'">
137
137
  <iframe
138
138
  frameborder="0"
139
139
  width="100%"
140
140
  height="100%"
141
- :src="drawer.url"
141
+ :src="drawer.ai.url"
142
142
  ></iframe>
143
143
  </template>
144
144
  <template v-else>
@@ -147,13 +147,37 @@
147
147
  :show="true"
148
148
  :props="wjProps"
149
149
  :attrs="wjAttrs"
150
- :name="drawer.name"
151
- :url="drawer.url"
150
+ :name="drawer.ai.name"
151
+ :url="drawer.ai.url"
152
152
  ></es-wujie>
153
153
  </template>
154
- </template>
154
+ </div>
155
+ <div
156
+ class="es-simplicity-public-drawer-main"
157
+ v-if="drawer.im && drawer.im.url"
158
+ v-show="drawer.active == 'im'"
159
+ >
160
+ <template v-if="isIE || drawer.im.method !== 'wujie'">
161
+ <iframe
162
+ frameborder="0"
163
+ width="100%"
164
+ height="100%"
165
+ :src="drawer.im.url"
166
+ ></iframe>
167
+ </template>
168
+ <template v-else>
169
+ <es-wujie
170
+ :host="host"
171
+ :show="true"
172
+ :props="wjProps"
173
+ :attrs="wjAttrs"
174
+ :name="drawer.im.name"
175
+ :url="drawer.im.url"
176
+ ></es-wujie>
177
+ </template>
178
+ </div>
155
179
  </el-drawer>
156
- <!-- AI end -->
180
+ <!-- AI/IM end -->
157
181
 
158
182
  <!-- 路由、iframe -->
159
183
  <div class="es-simplicity-tabs-handler-mask" v-show="showTabsHandler">
@@ -487,6 +511,8 @@ export default {
487
511
  },
488
512
  //人工智能配置
489
513
  ai: Object,
514
+ //im
515
+ im: Object,
490
516
  //iframeId
491
517
  iframeId: {
492
518
  type: String,
@@ -557,9 +583,15 @@ export default {
557
583
  fold: false,
558
584
  //人工智能配置
559
585
  aiConfig: null,
586
+ //im配置
587
+ imConfig: null,
560
588
  //公用窗口面板配置
561
589
  drawer: {
562
- visible: false
590
+ visible: false,
591
+ direction: 'ltr',
592
+ ai: {},
593
+ im: {},
594
+ active: ''
563
595
  },
564
596
  //所有应用
565
597
  applications: [],
@@ -657,6 +689,10 @@ export default {
657
689
  }
658
690
  : {};
659
691
  },
692
+ //人工智能配置
693
+ _imConfig() {
694
+ return this.imConfig || this.im;
695
+ },
660
696
  //用户信息
661
697
  user() {
662
698
  return this.userModel ? this.userModel : store.get('userModel');
@@ -870,6 +906,17 @@ export default {
870
906
  this.aiConfig = results[i].aiConfig;
871
907
  }
872
908
  }
909
+ if (results[i].imConfig) {
910
+ if (typeof results[i].imConfig == 'string') {
911
+ try {
912
+ this.imConfig = JSON.parse(results[i].imConfig);
913
+ } catch (error) {
914
+ this.imConfig = { url: results[i].imConfig };
915
+ }
916
+ } else {
917
+ this.imConfig = results[i].imConfig;
918
+ }
919
+ }
873
920
  if (results[i].portalPage || results[i].portalpage) {
874
921
  this.doorIndex = results[i].portalPage || results[i].portalpage;
875
922
  }
@@ -1485,12 +1532,17 @@ export default {
1485
1532
  * @author huangbo
1486
1533
  * @date 2024年9月7日
1487
1534
  **/
1488
- handlerSetDrawer(res) {
1489
- this.drawer.visible = !this.drawer.visible;
1490
- this.drawer.mounted = res.mounted;
1491
- this.drawer.url = res.url;
1492
- if (res.mounted === 'wujie') {
1493
- this.drawer.name = res.name || util.uuid();
1535
+ handlerSetDrawer(res, type, direction = 'ltr') {
1536
+ this.drawer.visible = true;
1537
+ this.active = type;
1538
+ this.drawer.direction = direction;
1539
+ if (!this.drawer[type] && res) {
1540
+ let { mounted, url } = res;
1541
+ this.drawer[type] = {
1542
+ mounted,
1543
+ url,
1544
+ name: res.name || util.uuid()
1545
+ };
1494
1546
  }
1495
1547
  },
1496
1548
  /**
@@ -1741,14 +1793,16 @@ export default {
1741
1793
  this.showSet = false;
1742
1794
  break;
1743
1795
  case 'search':
1744
- if (res.url) {
1745
- this.handlerSetDrawer(res);
1746
- } else {
1747
- this.showSearch = true;
1748
- }
1796
+ this.showSearch = true;
1749
1797
  this.showMsg = false;
1750
1798
  this.showSet = false;
1751
1799
  break;
1800
+ case 'ai':
1801
+ this.handlerSetDrawer(this._aiConfig, 'ai', 'rtl');
1802
+ break;
1803
+ case 'im':
1804
+ this.handlerSetDrawer(this._imConfig, 'im', 'rtl');
1805
+ break;
1752
1806
  case 'goView':
1753
1807
  util.win.open(res.path, '_blank');
1754
1808
  break;
Binary file
@@ -7,9 +7,12 @@
7
7
  v-clickoutside="handleClose"
8
8
  >
9
9
  <template v-if="form">
10
- <el-button v-if="button" v-bind="button" @click="openDialog"
11
- ><slot>选择</slot></el-button
12
- >
10
+ <el-button v-if="button" v-bind="button" @click="openDialog">
11
+ <slot>
12
+ <es-icon v-if="icon" :contents="icon"></es-icon>
13
+ <template v-else>选择</template>
14
+ </slot>
15
+ </el-button>
13
16
  <template v-else>
14
17
  <div
15
18
  :class="[
@@ -98,8 +101,12 @@
98
101
  ref="openDialog"
99
102
  v-if="filterable || showButton"
100
103
  @click.stop="openDialog"
101
- ><slot>选择</slot></el-button
102
104
  >
105
+ <slot>
106
+ <es-icon v-if="icon" :contents="icon"></es-icon>
107
+ <template v-else>选择</template>
108
+ </slot>
109
+ </el-button>
103
110
  </template>
104
111
  </el-input>
105
112
  <el-input
@@ -139,8 +146,12 @@
139
146
  ref="openDialog"
140
147
  v-if="filterable || showButton"
141
148
  @click.stop="openDialog"
142
- ><slot>选择</slot></el-button
143
149
  >
150
+ <slot>
151
+ <es-icon v-if="icon" :contents="icon"></es-icon>
152
+ <template v-else>选择</template>
153
+ </slot>
154
+ </el-button>
144
155
  </template>
145
156
  </el-input>
146
157
  </template>
@@ -317,6 +328,7 @@ export default {
317
328
  default: false
318
329
  },
319
330
  button: Object,
331
+ icon: String,
320
332
  active: String,
321
333
  keywords: {
322
334
  type: String,
Binary file
@@ -518,7 +518,6 @@ export default {
518
518
  if (this.replace) {
519
519
  return this.tabs;
520
520
  } else {
521
- console.log(util.extend(true, tabs, this.tabs), 'this.tabs');
522
521
  return util.extend(true, tabs, this.tabs);
523
522
  }
524
523
  }