eoss-ui 0.6.39 → 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 (295) hide show
  1. package/lib/button-group.js +48 -6
  2. package/lib/button.js +48 -6
  3. package/lib/checkbox-group.js +48 -6
  4. package/lib/data-table-form.js +48 -6
  5. package/lib/data-table.js +67 -22
  6. package/lib/date-picker.js +48 -6
  7. package/lib/dialog.js +48 -6
  8. package/lib/eoss-ui.common.js +1393 -955
  9. package/lib/flow-group.js +48 -6
  10. package/lib/flow-list.js +129 -87
  11. package/lib/flow.js +360 -321
  12. package/lib/form.js +48 -6
  13. package/lib/handle-user.js +48 -6
  14. package/lib/handler.js +195 -82
  15. package/lib/icon.js +48 -6
  16. package/lib/icons.js +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +48 -6
  19. package/lib/input.js +48 -6
  20. package/lib/login.js +291 -166
  21. package/lib/main.js +504 -251
  22. package/lib/nav.js +48 -6
  23. package/lib/page.js +48 -6
  24. package/lib/pagination.js +48 -6
  25. package/lib/player.js +48 -6
  26. package/lib/qr-code.js +61 -19
  27. package/lib/radio-group.js +48 -6
  28. package/lib/retrial-auth.js +48 -6
  29. package/lib/select-ganged.js +48 -6
  30. package/lib/select.js +48 -6
  31. package/lib/selector-panel.js +50 -9
  32. package/lib/selector.js +85 -11
  33. package/lib/sizer.js +48 -6
  34. package/lib/steps.js +48 -6
  35. package/lib/switch.js +48 -6
  36. package/lib/table-form.js +48 -6
  37. package/lib/tabs.js +48 -6
  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 +48 -6
  50. package/lib/tree-group.js +48 -6
  51. package/lib/tree.js +48 -6
  52. package/lib/upload.js +48 -6
  53. package/lib/utils/util.js +48 -6
  54. package/lib/wujie.js +48 -6
  55. package/lib/wxlogin.js +48 -6
  56. package/package.json +159 -159
  57. package/packages/.DS_Store +0 -0
  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/.DS_Store +0 -0
  72. package/packages/data-table/index.js +5 -5
  73. package/packages/data-table/src/children.vue +39 -39
  74. package/packages/data-table/src/column.vue +989 -983
  75. package/packages/data-table/src/main.vue +1822 -1820
  76. package/packages/data-table/src/sizer.vue +195 -195
  77. package/packages/data-table-form/.DS_Store +0 -0
  78. package/packages/data-table-form/index.js +5 -5
  79. package/packages/data-table-form/src/checkbox.vue +101 -101
  80. package/packages/data-table-form/src/colgroup.vue +17 -17
  81. package/packages/data-table-form/src/main.vue +181 -181
  82. package/packages/data-table-form/src/radio.vue +65 -65
  83. package/packages/data-table-form/src/table.vue +233 -233
  84. package/packages/data-table-form/src/tbody.vue +336 -336
  85. package/packages/data-table-form/src/thead.vue +68 -68
  86. package/packages/date-picker/index.js +5 -5
  87. package/packages/date-picker/src/main.vue +236 -236
  88. package/packages/dialog/index.js +5 -5
  89. package/packages/enterprise/index.js +5 -5
  90. package/packages/enterprise/src/main.vue +66 -66
  91. package/packages/error-page/.DS_Store +0 -0
  92. package/packages/error-page/index.js +5 -5
  93. package/packages/error-page/src/main.vue +44 -44
  94. package/packages/flow/.DS_Store +0 -0
  95. package/packages/flow/index.js +5 -5
  96. package/packages/flow/src/component/CommonOpinions.vue +345 -345
  97. package/packages/flow/src/component/CustomPreset.vue +322 -322
  98. package/packages/flow/src/component/FileList.vue +99 -99
  99. package/packages/flow/src/component/Preset.vue +255 -255
  100. package/packages/flow/src/component/SendMsg.vue +229 -229
  101. package/packages/flow/src/component/TimeLimit.vue +190 -190
  102. package/packages/flow/src/component/taskUnionExamine.vue +611 -603
  103. package/packages/flow/src/form.vue +121 -121
  104. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  105. package/packages/flow/src/main.vue +2862 -2864
  106. package/packages/flow/src/processForm.vue +1018 -1007
  107. package/packages/flow/src/processReject.vue +293 -293
  108. package/packages/flow/src/reset.vue +899 -901
  109. package/packages/flow/src/startTaskRead.vue +596 -596
  110. package/packages/flow/src/table.vue +58 -58
  111. package/packages/flow-group/index.js +5 -5
  112. package/packages/flow-group/src/main.vue +688 -688
  113. package/packages/flow-list/index.js +5 -5
  114. package/packages/flow-list/src/main.vue +1172 -1172
  115. package/packages/form/.DS_Store +0 -0
  116. package/packages/form/index.js +5 -5
  117. package/packages/form/src/main.vue +3584 -3584
  118. package/packages/form/src/table.vue +1420 -1420
  119. package/packages/handle-user/index.js +5 -5
  120. package/packages/handle-user/src/main.vue +138 -138
  121. package/packages/handler/index.js +5 -5
  122. package/packages/handler/src/main.vue +474 -388
  123. package/packages/icon/index.js +5 -5
  124. package/packages/icon/src/main.vue +101 -101
  125. package/packages/icons/index.js +5 -5
  126. package/packages/icons/src/icon.json +1 -1
  127. package/packages/icons/src/main.vue +81 -81
  128. package/packages/input/index.js +5 -5
  129. package/packages/input/src/main.vue +356 -356
  130. package/packages/input-number/index.js +5 -5
  131. package/packages/input-number/src/main.vue +106 -106
  132. package/packages/label/index.js +5 -5
  133. package/packages/label/src/main.vue +457 -457
  134. package/packages/layout/index.js +5 -5
  135. package/packages/layout/src/item.vue +152 -152
  136. package/packages/layout/src/main.vue +31 -31
  137. package/packages/login/.DS_Store +0 -0
  138. package/packages/login/index.js +5 -5
  139. package/packages/login/src/main.vue +1935 -1892
  140. package/packages/login/src/resetPassword.vue +562 -562
  141. package/packages/main/.DS_Store +0 -0
  142. package/packages/main/index.js +5 -5
  143. package/packages/main/src/.DS_Store +0 -0
  144. package/packages/main/src/default/index.vue +32 -3
  145. package/packages/main/src/default/message.vue +249 -249
  146. package/packages/main/src/default/notice.vue +157 -157
  147. package/packages/main/src/default/userinfo.vue +505 -505
  148. package/packages/main/src/public/online.vue +89 -89
  149. package/packages/main/src/public/search.vue +461 -454
  150. package/packages/main/src/public/settings.vue +221 -221
  151. package/packages/main/src/simplicity/apps.vue +388 -388
  152. package/packages/main/src/simplicity/avatar.vue +82 -82
  153. package/packages/main/src/simplicity/handler.vue +259 -221
  154. package/packages/main/src/simplicity/index.vue +2047 -1993
  155. package/packages/main/src/simplicity/lists.vue +84 -84
  156. package/packages/main/src/simplicity/menu-list.vue +128 -128
  157. package/packages/main/src/simplicity/message.vue +259 -259
  158. package/packages/main/src/simplicity/notice.vue +190 -190
  159. package/packages/main/src/simplicity/router-page.vue +45 -45
  160. package/packages/main/src/simplicity/sub-menu.vue +241 -241
  161. package/packages/main/src/simplicity/user.vue +257 -257
  162. package/packages/main/src/simplicity/userinfo.vue +312 -312
  163. package/packages/menu/index.js +5 -5
  164. package/packages/menu/src/main.vue +536 -536
  165. package/packages/nav/index.js +5 -5
  166. package/packages/nav/src/main.vue +402 -402
  167. package/packages/notify/index.js +5 -5
  168. package/packages/notify/src/main.vue +538 -538
  169. package/packages/page/index.js +5 -5
  170. package/packages/page/src/main.vue +167 -167
  171. package/packages/pagination/index.js +5 -5
  172. package/packages/pagination/src/main.vue +96 -96
  173. package/packages/player/index.js +5 -5
  174. package/packages/player/src/main.vue +194 -194
  175. package/packages/qr-code/index.js +5 -5
  176. package/packages/qr-code/src/main.vue +170 -170
  177. package/packages/radio-group/index.js +6 -6
  178. package/packages/radio-group/src/main.vue +319 -319
  179. package/packages/retrial-auth/index.js +5 -5
  180. package/packages/retrial-auth/src/main.vue +280 -280
  181. package/packages/select/index.js +5 -5
  182. package/packages/select/src/main.vue +775 -775
  183. package/packages/select-ganged/index.js +5 -5
  184. package/packages/select-ganged/src/main.vue +724 -724
  185. package/packages/selector/.DS_Store +0 -0
  186. package/packages/selector/index.js +5 -5
  187. package/packages/selector/src/main.vue +689 -677
  188. package/packages/selector-panel/.DS_Store +0 -0
  189. package/packages/selector-panel/index.js +5 -5
  190. package/packages/selector-panel/src/main.vue +1027 -1028
  191. package/packages/selector-panel/src/selection.vue +177 -177
  192. package/packages/selector-panel/src/tree.vue +129 -129
  193. package/packages/sizer/.DS_Store +0 -0
  194. package/packages/sizer/index.js +5 -5
  195. package/packages/sizer/src/main.vue +254 -254
  196. package/packages/steps/index.js +5 -5
  197. package/packages/steps/src/main.vue +181 -181
  198. package/packages/switch/index.js +5 -5
  199. package/packages/switch/src/main.vue +154 -154
  200. package/packages/table-form/index.js +5 -5
  201. package/packages/tabs/.DS_Store +0 -0
  202. package/packages/tabs/index.js +5 -5
  203. package/packages/tabs/src/main.vue +788 -788
  204. package/packages/tabs-panel/index.js +5 -5
  205. package/packages/tabs-panel/src/main.vue +29 -29
  206. package/packages/theme-chalk/lib/base.css +1 -1
  207. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  208. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  209. package/packages/theme-chalk/lib/icon.css +1 -1
  210. package/packages/theme-chalk/lib/index.css +1 -1
  211. package/packages/theme-chalk/lib/login.css +1 -1
  212. package/packages/theme-chalk/lib/main.css +1 -1
  213. package/packages/theme-chalk/lib/menu.css +1 -1
  214. package/packages/theme-chalk/lib/simplicity.css +1 -1
  215. package/packages/theme-chalk/lib/sizer.css +1 -1
  216. package/packages/theme-chalk/lib/upload.css +1 -1
  217. package/packages/theme-chalk/src/.DS_Store +0 -0
  218. package/packages/theme-chalk/src/base.scss +260 -260
  219. package/packages/theme-chalk/src/button-group.scss +175 -175
  220. package/packages/theme-chalk/src/button.scss +24 -24
  221. package/packages/theme-chalk/src/calendar.scss +113 -113
  222. package/packages/theme-chalk/src/card.scss +99 -99
  223. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  224. package/packages/theme-chalk/src/clients.scss +87 -87
  225. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  226. package/packages/theme-chalk/src/data-table.scss +293 -293
  227. package/packages/theme-chalk/src/date-picker.scss +7 -7
  228. package/packages/theme-chalk/src/dialog.scss +77 -77
  229. package/packages/theme-chalk/src/enterprise.scss +5 -5
  230. package/packages/theme-chalk/src/error-page.scss +18 -18
  231. package/packages/theme-chalk/src/flow-group.scss +110 -110
  232. package/packages/theme-chalk/src/flow-list.scss +36 -36
  233. package/packages/theme-chalk/src/flow.scss +310 -310
  234. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  235. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  236. package/packages/theme-chalk/src/form.scss +496 -496
  237. package/packages/theme-chalk/src/handle-user.scss +40 -40
  238. package/packages/theme-chalk/src/handler.scss +143 -143
  239. package/packages/theme-chalk/src/icon.scss +1789 -1760
  240. package/packages/theme-chalk/src/icons.scss +99 -99
  241. package/packages/theme-chalk/src/input.scss +9 -9
  242. package/packages/theme-chalk/src/label.scss +24 -24
  243. package/packages/theme-chalk/src/layout.scss +46 -46
  244. package/packages/theme-chalk/src/login.scss +947 -939
  245. package/packages/theme-chalk/src/main.scss +639 -632
  246. package/packages/theme-chalk/src/menu.scss +222 -222
  247. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  248. package/packages/theme-chalk/src/nav.scss +125 -125
  249. package/packages/theme-chalk/src/page.scss +3 -3
  250. package/packages/theme-chalk/src/pagination.scss +29 -29
  251. package/packages/theme-chalk/src/player.scss +9 -9
  252. package/packages/theme-chalk/src/qr-code.scss +17 -17
  253. package/packages/theme-chalk/src/radio-group.scss +9 -9
  254. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  255. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  256. package/packages/theme-chalk/src/select.scss +8 -8
  257. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  258. package/packages/theme-chalk/src/selector.scss +91 -91
  259. package/packages/theme-chalk/src/simplicity.scss +1262 -1262
  260. package/packages/theme-chalk/src/sizer.scss +36 -36
  261. package/packages/theme-chalk/src/steps.scss +88 -88
  262. package/packages/theme-chalk/src/switch.scss +3 -3
  263. package/packages/theme-chalk/src/table-form.scss +1 -1
  264. package/packages/theme-chalk/src/tabs.scss +87 -87
  265. package/packages/theme-chalk/src/tips.scss +7 -7
  266. package/packages/theme-chalk/src/toolbar.scss +179 -179
  267. package/packages/theme-chalk/src/tree-group.scss +72 -72
  268. package/packages/theme-chalk/src/tree.scss +165 -165
  269. package/packages/theme-chalk/src/upload.scss +167 -167
  270. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  271. package/packages/tips/index.js +5 -5
  272. package/packages/tips/src/main.vue +141 -141
  273. package/packages/toolbar/index.js +5 -5
  274. package/packages/toolbar/src/main.vue +430 -430
  275. package/packages/tree/index.js +5 -5
  276. package/packages/tree-group/index.js +5 -5
  277. package/packages/upload/.DS_Store +0 -0
  278. package/packages/upload/index.js +5 -5
  279. package/packages/upload/src/main.vue +1334 -1334
  280. package/packages/upload/src/picture.js +15 -15
  281. package/packages/wujie/index.js +5 -5
  282. package/packages/wujie/src/main.vue +145 -145
  283. package/packages/wxlogin/index.js +5 -5
  284. package/packages/wxlogin/src/main.vue +128 -128
  285. package/src/.DS_Store +0 -0
  286. package/src/config/api.js +248 -248
  287. package/src/config/image.js +2 -2
  288. package/src/index.js +157 -157
  289. package/src/utils/bus.js +3 -3
  290. package/src/utils/date-util.js +312 -312
  291. package/src/utils/http.js +50 -50
  292. package/src/utils/rules.js +18 -18
  293. package/src/utils/store.js +21 -21
  294. package/src/utils/util.js +146 -106
  295. package/src/utils/webSocket.js +107 -107
Binary file
@@ -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;
Binary file
@@ -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>