eoss-ui 0.6.40 → 0.6.42

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 (297) 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 +1967 -1458
  9. package/lib/flow-group.js +5 -0
  10. package/lib/flow-list.js +128 -112
  11. package/lib/flow.js +903 -801
  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 +461 -245
  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 +18 -13
  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/flow.css +1 -1
  40. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  41. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  42. package/lib/theme-chalk/icon.css +1 -1
  43. package/lib/theme-chalk/index.css +1 -1
  44. package/lib/theme-chalk/login.css +1 -1
  45. package/lib/theme-chalk/main.css +1 -1
  46. package/lib/theme-chalk/menu.css +1 -1
  47. package/lib/theme-chalk/simplicity.css +1 -1
  48. package/lib/theme-chalk/sizer.css +1 -1
  49. package/lib/theme-chalk/upload.css +1 -1
  50. package/lib/tips.js +5 -0
  51. package/lib/tree-group.js +5 -0
  52. package/lib/tree.js +5 -0
  53. package/lib/upload.js +5 -0
  54. package/lib/utils/util.js +5 -0
  55. package/lib/wujie.js +5 -0
  56. package/lib/wxlogin.js +5 -0
  57. package/package.json +159 -159
  58. package/packages/button/index.js +5 -5
  59. package/packages/button/src/main.vue +418 -418
  60. package/packages/button-group/index.js +5 -5
  61. package/packages/button-group/src/main.vue +298 -298
  62. package/packages/calendar/index.js +5 -5
  63. package/packages/card/index.js +5 -5
  64. package/packages/card/src/main.vue +156 -156
  65. package/packages/cascader/index.js +5 -5
  66. package/packages/cascader/src/main.vue +168 -168
  67. package/packages/checkbox-group/index.js +5 -5
  68. package/packages/checkbox-group/src/main.vue +333 -333
  69. package/packages/clients/index.js +5 -5
  70. package/packages/clients/src/main.vue +144 -144
  71. package/packages/data-table/index.js +5 -5
  72. package/packages/data-table/src/children.vue +39 -39
  73. package/packages/data-table/src/column.vue +989 -989
  74. package/packages/data-table/src/main.vue +1822 -1820
  75. package/packages/data-table/src/sizer.vue +195 -195
  76. package/packages/data-table-form/index.js +5 -5
  77. package/packages/data-table-form/src/checkbox.vue +101 -101
  78. package/packages/data-table-form/src/colgroup.vue +17 -17
  79. package/packages/data-table-form/src/main.vue +181 -181
  80. package/packages/data-table-form/src/radio.vue +65 -65
  81. package/packages/data-table-form/src/table.vue +233 -233
  82. package/packages/data-table-form/src/tbody.vue +336 -336
  83. package/packages/data-table-form/src/thead.vue +68 -68
  84. package/packages/date-picker/index.js +5 -5
  85. package/packages/date-picker/src/main.vue +236 -236
  86. package/packages/dialog/index.js +5 -5
  87. package/packages/enterprise/index.js +5 -5
  88. package/packages/enterprise/src/main.vue +66 -66
  89. package/packages/error-page/index.js +5 -5
  90. package/packages/error-page/src/main.vue +44 -44
  91. package/packages/flow/index.js +5 -5
  92. package/packages/flow/src/component/CommonOpinions.vue +345 -345
  93. package/packages/flow/src/component/CustomPreset.vue +322 -322
  94. package/packages/flow/src/component/FileList.vue +99 -99
  95. package/packages/flow/src/component/Preset.vue +255 -255
  96. package/packages/flow/src/component/SendMsg.vue +229 -229
  97. package/packages/flow/src/component/TimeLimit.vue +190 -190
  98. package/packages/flow/src/component/taskUnionExamine.vue +611 -603
  99. package/packages/flow/src/form.vue +121 -121
  100. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  101. package/packages/flow/src/main.vue +2952 -2864
  102. package/packages/flow/src/processForm.vue +1018 -1007
  103. package/packages/flow/src/processReject.vue +293 -293
  104. package/packages/flow/src/reset.vue +899 -901
  105. package/packages/flow/src/startTaskRead.vue +596 -596
  106. package/packages/flow/src/table.vue +58 -58
  107. package/packages/flow-group/index.js +5 -5
  108. package/packages/flow-group/src/main.vue +688 -688
  109. package/packages/flow-list/index.js +5 -5
  110. package/packages/flow-list/src/main.vue +1183 -1172
  111. package/packages/form/index.js +5 -5
  112. package/packages/form/src/main.vue +3584 -3584
  113. package/packages/form/src/table.vue +1420 -1420
  114. package/packages/handle-user/index.js +5 -5
  115. package/packages/handle-user/src/main.vue +138 -138
  116. package/packages/handler/index.js +5 -5
  117. package/packages/handler/src/main.vue +474 -388
  118. package/packages/icon/index.js +5 -5
  119. package/packages/icon/src/main.vue +101 -101
  120. package/packages/icons/index.js +5 -5
  121. package/packages/icons/src/icon.json +1 -1
  122. package/packages/icons/src/main.vue +81 -81
  123. package/packages/input/index.js +5 -5
  124. package/packages/input/src/main.vue +356 -356
  125. package/packages/input-number/index.js +5 -5
  126. package/packages/input-number/src/main.vue +106 -106
  127. package/packages/label/index.js +5 -5
  128. package/packages/label/src/main.vue +457 -457
  129. package/packages/layout/index.js +5 -5
  130. package/packages/layout/src/item.vue +152 -152
  131. package/packages/layout/src/main.vue +31 -31
  132. package/packages/login/index.js +5 -5
  133. package/packages/login/src/main.vue +1935 -1892
  134. package/packages/login/src/resetPassword.vue +562 -562
  135. package/packages/main/index.js +5 -5
  136. package/packages/main/src/default/index.vue +32 -3
  137. package/packages/main/src/default/message.vue +249 -249
  138. package/packages/main/src/default/notice.vue +157 -157
  139. package/packages/main/src/default/userinfo.vue +505 -505
  140. package/packages/main/src/public/online.vue +89 -89
  141. package/packages/main/src/public/search.vue +461 -454
  142. package/packages/main/src/public/settings.vue +221 -221
  143. package/packages/main/src/simplicity/apps.vue +388 -388
  144. package/packages/main/src/simplicity/avatar.vue +82 -82
  145. package/packages/main/src/simplicity/handler.vue +259 -221
  146. package/packages/main/src/simplicity/index.vue +2047 -1993
  147. package/packages/main/src/simplicity/lists.vue +84 -84
  148. package/packages/main/src/simplicity/menu-list.vue +128 -128
  149. package/packages/main/src/simplicity/message.vue +259 -259
  150. package/packages/main/src/simplicity/notice.vue +190 -190
  151. package/packages/main/src/simplicity/router-page.vue +45 -45
  152. package/packages/main/src/simplicity/sub-menu.vue +241 -241
  153. package/packages/main/src/simplicity/user.vue +257 -257
  154. package/packages/main/src/simplicity/userinfo.vue +312 -312
  155. package/packages/menu/index.js +5 -5
  156. package/packages/menu/src/main.vue +536 -536
  157. package/packages/nav/index.js +5 -5
  158. package/packages/nav/src/main.vue +402 -402
  159. package/packages/notify/index.js +5 -5
  160. package/packages/notify/src/main.vue +538 -538
  161. package/packages/page/index.js +5 -5
  162. package/packages/page/src/main.vue +167 -167
  163. package/packages/pagination/index.js +5 -5
  164. package/packages/pagination/src/main.vue +96 -96
  165. package/packages/player/index.js +5 -5
  166. package/packages/player/src/main.vue +194 -194
  167. package/packages/qr-code/index.js +5 -5
  168. package/packages/qr-code/src/main.vue +170 -170
  169. package/packages/radio-group/index.js +6 -6
  170. package/packages/radio-group/src/main.vue +319 -319
  171. package/packages/retrial-auth/index.js +5 -5
  172. package/packages/retrial-auth/src/main.vue +280 -280
  173. package/packages/select/index.js +5 -5
  174. package/packages/select/src/main.vue +775 -775
  175. package/packages/select-ganged/index.js +5 -5
  176. package/packages/select-ganged/src/main.vue +724 -724
  177. package/packages/selector/index.js +5 -5
  178. package/packages/selector/src/main.vue +689 -677
  179. package/packages/selector-panel/index.js +5 -5
  180. package/packages/selector-panel/src/main.vue +1027 -1028
  181. package/packages/selector-panel/src/selection.vue +177 -177
  182. package/packages/selector-panel/src/tree.vue +129 -129
  183. package/packages/sizer/index.js +5 -5
  184. package/packages/sizer/src/main.vue +254 -254
  185. package/packages/steps/index.js +5 -5
  186. package/packages/steps/src/main.vue +181 -181
  187. package/packages/switch/index.js +5 -5
  188. package/packages/switch/src/main.vue +154 -154
  189. package/packages/table-form/index.js +5 -5
  190. package/packages/tabs/index.js +5 -5
  191. package/packages/tabs/src/main.vue +788 -788
  192. package/packages/tabs-panel/index.js +5 -5
  193. package/packages/tabs-panel/src/main.vue +29 -29
  194. package/packages/theme-chalk/lib/base.css +1 -1
  195. package/packages/theme-chalk/lib/flow.css +1 -1
  196. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  197. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  198. package/packages/theme-chalk/lib/icon.css +1 -1
  199. package/packages/theme-chalk/lib/index.css +1 -1
  200. package/packages/theme-chalk/lib/login.css +1 -1
  201. package/packages/theme-chalk/lib/main.css +1 -1
  202. package/packages/theme-chalk/lib/menu.css +1 -1
  203. package/packages/theme-chalk/lib/simplicity.css +1 -1
  204. package/packages/theme-chalk/lib/sizer.css +1 -1
  205. package/packages/theme-chalk/lib/upload.css +1 -1
  206. package/packages/theme-chalk/src/base.scss +260 -260
  207. package/packages/theme-chalk/src/button-group.scss +175 -175
  208. package/packages/theme-chalk/src/button.scss +24 -24
  209. package/packages/theme-chalk/src/calendar.scss +113 -113
  210. package/packages/theme-chalk/src/card.scss +99 -99
  211. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  212. package/packages/theme-chalk/src/clients.scss +87 -87
  213. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  214. package/packages/theme-chalk/src/data-table.scss +293 -293
  215. package/packages/theme-chalk/src/date-picker.scss +7 -7
  216. package/packages/theme-chalk/src/dialog.scss +77 -77
  217. package/packages/theme-chalk/src/enterprise.scss +5 -5
  218. package/packages/theme-chalk/src/error-page.scss +18 -18
  219. package/packages/theme-chalk/src/flow-group.scss +110 -110
  220. package/packages/theme-chalk/src/flow-list.scss +36 -36
  221. package/packages/theme-chalk/src/flow.scss +318 -310
  222. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  223. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  224. package/packages/theme-chalk/src/form.scss +496 -496
  225. package/packages/theme-chalk/src/handle-user.scss +40 -40
  226. package/packages/theme-chalk/src/handler.scss +143 -143
  227. package/packages/theme-chalk/src/icon.scss +1789 -1760
  228. package/packages/theme-chalk/src/icons.scss +99 -99
  229. package/packages/theme-chalk/src/input.scss +9 -9
  230. package/packages/theme-chalk/src/label.scss +24 -24
  231. package/packages/theme-chalk/src/layout.scss +46 -46
  232. package/packages/theme-chalk/src/login.scss +947 -939
  233. package/packages/theme-chalk/src/main.scss +639 -632
  234. package/packages/theme-chalk/src/menu.scss +222 -222
  235. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  236. package/packages/theme-chalk/src/nav.scss +125 -125
  237. package/packages/theme-chalk/src/page.scss +3 -3
  238. package/packages/theme-chalk/src/pagination.scss +29 -29
  239. package/packages/theme-chalk/src/player.scss +9 -9
  240. package/packages/theme-chalk/src/qr-code.scss +17 -17
  241. package/packages/theme-chalk/src/radio-group.scss +9 -9
  242. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  243. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  244. package/packages/theme-chalk/src/select.scss +8 -8
  245. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  246. package/packages/theme-chalk/src/selector.scss +91 -91
  247. package/packages/theme-chalk/src/simplicity.scss +1262 -1262
  248. package/packages/theme-chalk/src/sizer.scss +36 -36
  249. package/packages/theme-chalk/src/steps.scss +88 -88
  250. package/packages/theme-chalk/src/switch.scss +3 -3
  251. package/packages/theme-chalk/src/table-form.scss +1 -1
  252. package/packages/theme-chalk/src/tabs.scss +87 -87
  253. package/packages/theme-chalk/src/tips.scss +7 -7
  254. package/packages/theme-chalk/src/toolbar.scss +179 -179
  255. package/packages/theme-chalk/src/tree-group.scss +72 -72
  256. package/packages/theme-chalk/src/tree.scss +165 -165
  257. package/packages/theme-chalk/src/upload.scss +167 -167
  258. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  259. package/packages/tips/index.js +5 -5
  260. package/packages/tips/src/main.vue +141 -141
  261. package/packages/toolbar/index.js +5 -5
  262. package/packages/toolbar/src/main.vue +430 -430
  263. package/packages/tree/index.js +5 -5
  264. package/packages/tree-group/index.js +5 -5
  265. package/packages/upload/index.js +5 -5
  266. package/packages/upload/src/main.vue +1334 -1334
  267. package/packages/upload/src/picture.js +15 -15
  268. package/packages/wujie/index.js +5 -5
  269. package/packages/wujie/src/main.vue +145 -145
  270. package/packages/wxlogin/index.js +5 -5
  271. package/packages/wxlogin/src/main.vue +128 -128
  272. package/src/config/api.js +248 -248
  273. package/src/config/image.js +2 -2
  274. package/src/index.js +157 -157
  275. package/src/utils/bus.js +3 -3
  276. package/src/utils/date-util.js +312 -312
  277. package/src/utils/http.js +50 -50
  278. package/src/utils/rules.js +18 -18
  279. package/src/utils/store.js +21 -21
  280. package/src/utils/util.js +5 -0
  281. package/src/utils/webSocket.js +107 -107
  282. package/packages/.DS_Store +0 -0
  283. package/packages/data-table/.DS_Store +0 -0
  284. package/packages/data-table-form/.DS_Store +0 -0
  285. package/packages/error-page/.DS_Store +0 -0
  286. package/packages/flow/.DS_Store +0 -0
  287. package/packages/form/.DS_Store +0 -0
  288. package/packages/login/.DS_Store +0 -0
  289. package/packages/main/.DS_Store +0 -0
  290. package/packages/main/src/.DS_Store +0 -0
  291. package/packages/selector/.DS_Store +0 -0
  292. package/packages/selector-panel/.DS_Store +0 -0
  293. package/packages/sizer/.DS_Store +0 -0
  294. package/packages/tabs/.DS_Store +0 -0
  295. package/packages/theme-chalk/src/.DS_Store +0 -0
  296. package/packages/upload/.DS_Store +0 -0
  297. package/src/.DS_Store +0 -0
@@ -1,5 +1,5 @@
1
- import EsMain from './src/main';
2
-
3
- EsMain.install = Vue => Vue.component(EsMain.name, EsMain);
4
-
5
- export default EsMain;
1
+ import EsMain from './src/main';
2
+
3
+ EsMain.install = Vue => Vue.component(EsMain.name, EsMain);
4
+
5
+ export default EsMain;
@@ -39,7 +39,7 @@
39
39
  :online="online"
40
40
  :application="application"
41
41
  :storage="storage"
42
- :notice="notice"
42
+ :noticeNum="notice"
43
43
  :data="handleData"
44
44
  :max-height="_maxHeight"
45
45
  @visible-change="handleVisibleChange"
@@ -195,6 +195,17 @@
195
195
  </slot>
196
196
  </es-dialog>
197
197
  <notice :data="sysMsg" :winopen="winopen" @opened="handleOpened"></notice>
198
+ <es-dialog
199
+ class="es-public-search-dialog"
200
+ :visible.sync="showSearch"
201
+ size="lg"
202
+ >
203
+ <search
204
+ :menus="menus"
205
+ :menuIcon="menuIcon"
206
+ @select="handleOnSearch"
207
+ ></search>
208
+ </es-dialog>
198
209
  <es-dialog :title="dialog.title" :visible.sync="dialog.show" size="md">
199
210
  <template v-if="dialog.title == '查看在线人员' && !dialog.src">
200
211
  <online></online>
@@ -215,6 +226,7 @@ import settings from '../public/settings.vue';
215
226
  import message from './message.vue';
216
227
  import notice from './notice.vue';
217
228
  import online from '../public/online.vue';
229
+ import search from '../public/search.vue';
218
230
  import {
219
231
  //authCenter,
220
232
  wss,
@@ -244,7 +256,8 @@ export default {
244
256
  settings,
245
257
  message,
246
258
  notice,
247
- online
259
+ online,
260
+ search
248
261
  },
249
262
  props: {
250
263
  jobScrollbar: Boolean,
@@ -254,7 +267,10 @@ export default {
254
267
  //菜单展开关闭图标
255
268
  icons: Object,
256
269
  //菜单前置默认图标
257
- menuIcon: String,
270
+ menuIcon: {
271
+ type: String,
272
+ default: 'es-icon-application'
273
+ },
258
274
  //子菜单是否显示前置图标
259
275
  subIcon: {
260
276
  type: Boolean,
@@ -605,6 +621,8 @@ export default {
605
621
  showMsg: false,
606
622
  //即时消息
607
623
  sysMsg: [],
624
+ //搜索
625
+ showSearch: false,
608
626
  //定时关闭及时消息对象
609
627
  sysMsgOut: null,
610
628
  //额外信息数据
@@ -1727,6 +1745,10 @@ export default {
1727
1745
  case 'set':
1728
1746
  this.handleSet();
1729
1747
  break;
1748
+ case 'search':
1749
+ this.showSearch = true;
1750
+ this.showMsg = false;
1751
+ break;
1730
1752
  case 'goView':
1731
1753
  util.win.open(res.path, '_blank');
1732
1754
  break;
@@ -2048,6 +2070,13 @@ export default {
2048
2070
  let n = parseInt(this.menuTips[id], 10) - 1;
2049
2071
  this.$set(this.menuTips, id, n);
2050
2072
  }
2073
+ },
2074
+ //搜索
2075
+ handleOnSearch(res, parent) {
2076
+ this.showSearch = false;
2077
+ if (parent.name === '菜单') {
2078
+ this.jumpMenu(res.appCode);
2079
+ }
2051
2080
  }
2052
2081
  },
2053
2082
  beforeDestroy() {
@@ -1,249 +1,249 @@
1
- <template>
2
- <el-drawer
3
- class="es-msgs-box"
4
- custom-class="es-msgs-main"
5
- direction="rtl"
6
- size="200px"
7
- :modal="false"
8
- :withHeader="false"
9
- :visible.sync="show"
10
- >
11
- <div class="es-msg-header">
12
- <span class="es-msg-title">消息提示</span>
13
- <span class="es-overlook" @click="handleIgnoreAll">全部忽略</span>
14
- </div>
15
- <div class="es-msg-lists-box">
16
- <div class="es-msg-lists">
17
- <el-scrollbar class="es-scrollbar">
18
- <div v-infinite-scroll="getMsg" :infinite-scroll-disabled="disabled">
19
- <el-card
20
- v-for="(item, index) in msgs"
21
- :key="item.id"
22
- class="es-msg-item"
23
- >
24
- <i
25
- class="el-icon-circle-close"
26
- title="忽略"
27
- @click="handleIgnore(item, index)"
28
- ></i>
29
- <div class="es-msg-item-title">{{ item.title }}</div>
30
- <div>
31
- <span class="es-msg-item-time">{{ item.time }}</span>
32
- <span
33
- class="es-overlook"
34
- v-show="item.handlerUrl"
35
- @click="handleMessage(item, index)"
36
- >处理</span
37
- >
38
- </div>
39
- </el-card>
40
- <p class="es-msg-tips" v-if="loading">加载中...</p>
41
- <p class="es-msg-tips" v-if="noMore && count > 0">没有更多了</p>
42
- </div>
43
- </el-scrollbar>
44
- </div>
45
- </div>
46
- <div class="es-msg-total">当前共有{{ count }}条消息记录</div>
47
- <es-dialog
48
- title="处理"
49
- name="manage"
50
- width="90%"
51
- height="80%"
52
- :visible.sync="dialog.show"
53
- :url="dialog.url"
54
- :param="dialog.params"
55
- @close="handleClose"
56
- ></es-dialog>
57
- </el-drawer>
58
- </template>
59
- <script>
60
- import {
61
- sysMsgPage,
62
- ignoreSysMsg,
63
- ignoreAllSysMsg
64
- } from 'eoss-ui/src/config/api.js';
65
- import util from 'eoss-ui/src/utils/util';
66
- export default {
67
- name: 'message',
68
- provide() {
69
- return {
70
- deleteMessage: this.handleRemove
71
- };
72
- },
73
- props: {
74
- visible: Boolean,
75
- total: {
76
- type: Number,
77
- default: 0
78
- },
79
- winopen: Boolean
80
- },
81
- computed: {
82
- show: {
83
- get() {
84
- return this.visible;
85
- },
86
- set(val) {
87
- this.$emit('update:visible', val);
88
- }
89
- },
90
- count: {
91
- get() {
92
- return this.total;
93
- },
94
- set(val) {
95
- this.$emit('update:total', val);
96
- }
97
- },
98
- noMore() {
99
- return this.msgs.length >= this.count;
100
- },
101
- disabled() {
102
- return this.loading || this.noMore;
103
- }
104
- },
105
- watch: {
106
- total(val, old) {
107
- if (parseInt(val, 10) < parseInt(old, 10) && this.index !== null) {
108
- this.handleRemove();
109
- }
110
- }
111
- },
112
- data() {
113
- return {
114
- //加载数据
115
- loading: false,
116
- //消息页码
117
- pageNum: 1,
118
- pageSize: 20,
119
- pageCount: 1,
120
- //消息数据,
121
- msgs: [],
122
- dialog: {
123
- params: {},
124
- url: '',
125
- show: false
126
- },
127
- index: null,
128
- deleteId: null
129
- };
130
- },
131
- mounted() {
132
- util.win.deleteMsg = this.handleRemove;
133
- },
134
- methods: {
135
- //获取消息列表
136
- getMsg(reload) {
137
- if (this.pageNum <= this.pageCount) {
138
- this.loading = true;
139
- util
140
- .ajax({
141
- url: sysMsgPage,
142
- params: {
143
- pageNum: reload ? 1 : this.pageNum,
144
- pageSize: this.pageSize
145
- }
146
- })
147
- .then((res) => {
148
- if (res && res.rCode === 0) {
149
- this.pageCount = res.results.pageCount;
150
- this.loading = false;
151
- if (reload || this.pageNum == 1) {
152
- this.msgs = JSON.parse(JSON.stringify(res.results.records));
153
- } else {
154
- this.msgs = this.msgs.concat(res.results.records);
155
- }
156
- this.pageNum++;
157
- } else {
158
- let msg = res.msg || '系统错误,请联系管理员!';
159
- this.$message.error(msg);
160
- }
161
- })
162
- .catch((err) => {
163
- this.loading = false;
164
- if (err.message && err.message !== 'canceled') {
165
- this.$message.error(err.message);
166
- }
167
- });
168
- }
169
- },
170
- //忽略
171
- handleIgnore(res, i) {
172
- util
173
- .ajax({
174
- url: ignoreSysMsg,
175
- params: {
176
- id: res.id
177
- }
178
- })
179
- .then((res) => {
180
- if (res.rCode == 0) {
181
- this.count -= 1;
182
- this.msgs.splice(i, 1);
183
- } else {
184
- let msg = res.msg || '系统错误,请联系管理员!';
185
- this.$message.error(msg);
186
- }
187
- });
188
- },
189
- //全部忽略
190
- handleIgnoreAll() {
191
- util
192
- .ajax({
193
- url: ignoreAllSysMsg
194
- })
195
- .then((res) => {
196
- this.count = 0;
197
- this.msgs = [];
198
- this.$emit('ignore', { type: 'ignore', value: 'all' });
199
- })
200
- .catch((err) => {
201
- if (err.message && err.message !== 'canceled') {
202
- this.$message.error(err.message);
203
- }
204
- });
205
- },
206
- //处理消息
207
- handleMessage(item, index) {
208
- this.count -= 1;
209
- this.msgs.splice(index, 1);
210
- if (this.winopen) {
211
- const mywin = util.win.open(item.handlerUrl);
212
- if (mywin) {
213
- let times = setInterval(() => {
214
- if (mywin.closed) {
215
- clearInterval(times);
216
- this.$parent.$emit('bus-emit', 'waitdone');
217
- }
218
- }, 1000);
219
- }
220
- } else {
221
- this.dialog = {
222
- show: true,
223
- url: item.handlerUrl,
224
- data: {
225
- id: item.id,
226
- pendingId: item.pendingId,
227
- userId: item.userId
228
- }
229
- };
230
- this.index = index;
231
- }
232
- },
233
- handleRemove(id) {
234
- if (this.index !== null) {
235
- this.count -= 1;
236
- this.msgs.splice(this.index, 1);
237
- this.index = null;
238
- }
239
- if (id) {
240
- this.$emit('handle', id);
241
- }
242
- this.dialog.show = false;
243
- },
244
- handleClose() {
245
- this.$parent.$emit('bus-emit', 'waitdone');
246
- }
247
- }
248
- };
249
- </script>
1
+ <template>
2
+ <el-drawer
3
+ class="es-msgs-box"
4
+ custom-class="es-msgs-main"
5
+ direction="rtl"
6
+ size="200px"
7
+ :modal="false"
8
+ :withHeader="false"
9
+ :visible.sync="show"
10
+ >
11
+ <div class="es-msg-header">
12
+ <span class="es-msg-title">消息提示</span>
13
+ <span class="es-overlook" @click="handleIgnoreAll">全部忽略</span>
14
+ </div>
15
+ <div class="es-msg-lists-box">
16
+ <div class="es-msg-lists">
17
+ <el-scrollbar class="es-scrollbar">
18
+ <div v-infinite-scroll="getMsg" :infinite-scroll-disabled="disabled">
19
+ <el-card
20
+ v-for="(item, index) in msgs"
21
+ :key="item.id"
22
+ class="es-msg-item"
23
+ >
24
+ <i
25
+ class="el-icon-circle-close"
26
+ title="忽略"
27
+ @click="handleIgnore(item, index)"
28
+ ></i>
29
+ <div class="es-msg-item-title">{{ item.title }}</div>
30
+ <div>
31
+ <span class="es-msg-item-time">{{ item.time }}</span>
32
+ <span
33
+ class="es-overlook"
34
+ v-show="item.handlerUrl"
35
+ @click="handleMessage(item, index)"
36
+ >处理</span
37
+ >
38
+ </div>
39
+ </el-card>
40
+ <p class="es-msg-tips" v-if="loading">加载中...</p>
41
+ <p class="es-msg-tips" v-if="noMore && count > 0">没有更多了</p>
42
+ </div>
43
+ </el-scrollbar>
44
+ </div>
45
+ </div>
46
+ <div class="es-msg-total">当前共有{{ count }}条消息记录</div>
47
+ <es-dialog
48
+ title="处理"
49
+ name="manage"
50
+ width="90%"
51
+ height="80%"
52
+ :visible.sync="dialog.show"
53
+ :url="dialog.url"
54
+ :param="dialog.params"
55
+ @close="handleClose"
56
+ ></es-dialog>
57
+ </el-drawer>
58
+ </template>
59
+ <script>
60
+ import {
61
+ sysMsgPage,
62
+ ignoreSysMsg,
63
+ ignoreAllSysMsg
64
+ } from 'eoss-ui/src/config/api.js';
65
+ import util from 'eoss-ui/src/utils/util';
66
+ export default {
67
+ name: 'message',
68
+ provide() {
69
+ return {
70
+ deleteMessage: this.handleRemove
71
+ };
72
+ },
73
+ props: {
74
+ visible: Boolean,
75
+ total: {
76
+ type: Number,
77
+ default: 0
78
+ },
79
+ winopen: Boolean
80
+ },
81
+ computed: {
82
+ show: {
83
+ get() {
84
+ return this.visible;
85
+ },
86
+ set(val) {
87
+ this.$emit('update:visible', val);
88
+ }
89
+ },
90
+ count: {
91
+ get() {
92
+ return this.total;
93
+ },
94
+ set(val) {
95
+ this.$emit('update:total', val);
96
+ }
97
+ },
98
+ noMore() {
99
+ return this.msgs.length >= this.count;
100
+ },
101
+ disabled() {
102
+ return this.loading || this.noMore;
103
+ }
104
+ },
105
+ watch: {
106
+ total(val, old) {
107
+ if (parseInt(val, 10) < parseInt(old, 10) && this.index !== null) {
108
+ this.handleRemove();
109
+ }
110
+ }
111
+ },
112
+ data() {
113
+ return {
114
+ //加载数据
115
+ loading: false,
116
+ //消息页码
117
+ pageNum: 1,
118
+ pageSize: 20,
119
+ pageCount: 1,
120
+ //消息数据,
121
+ msgs: [],
122
+ dialog: {
123
+ params: {},
124
+ url: '',
125
+ show: false
126
+ },
127
+ index: null,
128
+ deleteId: null
129
+ };
130
+ },
131
+ mounted() {
132
+ util.win.deleteMsg = this.handleRemove;
133
+ },
134
+ methods: {
135
+ //获取消息列表
136
+ getMsg(reload) {
137
+ if (this.pageNum <= this.pageCount) {
138
+ this.loading = true;
139
+ util
140
+ .ajax({
141
+ url: sysMsgPage,
142
+ params: {
143
+ pageNum: reload ? 1 : this.pageNum,
144
+ pageSize: this.pageSize
145
+ }
146
+ })
147
+ .then((res) => {
148
+ if (res && res.rCode === 0) {
149
+ this.pageCount = res.results.pageCount;
150
+ this.loading = false;
151
+ if (reload || this.pageNum == 1) {
152
+ this.msgs = JSON.parse(JSON.stringify(res.results.records));
153
+ } else {
154
+ this.msgs = this.msgs.concat(res.results.records);
155
+ }
156
+ this.pageNum++;
157
+ } else {
158
+ let msg = res.msg || '系统错误,请联系管理员!';
159
+ this.$message.error(msg);
160
+ }
161
+ })
162
+ .catch((err) => {
163
+ this.loading = false;
164
+ if (err.message && err.message !== 'canceled') {
165
+ this.$message.error(err.message);
166
+ }
167
+ });
168
+ }
169
+ },
170
+ //忽略
171
+ handleIgnore(res, i) {
172
+ util
173
+ .ajax({
174
+ url: ignoreSysMsg,
175
+ params: {
176
+ id: res.id
177
+ }
178
+ })
179
+ .then((res) => {
180
+ if (res.rCode == 0) {
181
+ this.count -= 1;
182
+ this.msgs.splice(i, 1);
183
+ } else {
184
+ let msg = res.msg || '系统错误,请联系管理员!';
185
+ this.$message.error(msg);
186
+ }
187
+ });
188
+ },
189
+ //全部忽略
190
+ handleIgnoreAll() {
191
+ util
192
+ .ajax({
193
+ url: ignoreAllSysMsg
194
+ })
195
+ .then((res) => {
196
+ this.count = 0;
197
+ this.msgs = [];
198
+ this.$emit('ignore', { type: 'ignore', value: 'all' });
199
+ })
200
+ .catch((err) => {
201
+ if (err.message && err.message !== 'canceled') {
202
+ this.$message.error(err.message);
203
+ }
204
+ });
205
+ },
206
+ //处理消息
207
+ handleMessage(item, index) {
208
+ this.count -= 1;
209
+ this.msgs.splice(index, 1);
210
+ if (this.winopen) {
211
+ const mywin = util.win.open(item.handlerUrl);
212
+ if (mywin) {
213
+ let times = setInterval(() => {
214
+ if (mywin.closed) {
215
+ clearInterval(times);
216
+ this.$parent.$emit('bus-emit', 'waitdone');
217
+ }
218
+ }, 1000);
219
+ }
220
+ } else {
221
+ this.dialog = {
222
+ show: true,
223
+ url: item.handlerUrl,
224
+ data: {
225
+ id: item.id,
226
+ pendingId: item.pendingId,
227
+ userId: item.userId
228
+ }
229
+ };
230
+ this.index = index;
231
+ }
232
+ },
233
+ handleRemove(id) {
234
+ if (this.index !== null) {
235
+ this.count -= 1;
236
+ this.msgs.splice(this.index, 1);
237
+ this.index = null;
238
+ }
239
+ if (id) {
240
+ this.$emit('handle', id);
241
+ }
242
+ this.dialog.show = false;
243
+ },
244
+ handleClose() {
245
+ this.$parent.$emit('bus-emit', 'waitdone');
246
+ }
247
+ }
248
+ };
249
+ </script>