eoss-ui 0.6.76 → 0.6.78

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 (289) hide show
  1. package/lib/button-group.js +30 -8
  2. package/lib/button.js +30 -8
  3. package/lib/calogin.js +263 -241
  4. package/lib/checkbox-group.js +30 -8
  5. package/lib/data-table-form.js +30 -8
  6. package/lib/data-table.js +30 -8
  7. package/lib/date-picker.js +30 -8
  8. package/lib/dialog.js +30 -8
  9. package/lib/eoss-ui.common.js +1699 -1212
  10. package/lib/flow-group.js +30 -8
  11. package/lib/flow-list.js +111 -89
  12. package/lib/flow.js +965 -515
  13. package/lib/form.js +50 -10
  14. package/lib/handle-user.js +30 -8
  15. package/lib/handler.js +30 -8
  16. package/lib/icon.js +30 -8
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +30 -8
  19. package/lib/input.js +30 -8
  20. package/lib/login.js +30 -8
  21. package/lib/main.js +373 -332
  22. package/lib/nav.js +30 -8
  23. package/lib/page.js +30 -8
  24. package/lib/pagination.js +30 -8
  25. package/lib/player.js +30 -8
  26. package/lib/qr-code.js +43 -21
  27. package/lib/radio-group.js +30 -8
  28. package/lib/retrial-auth.js +30 -8
  29. package/lib/select-ganged.js +30 -8
  30. package/lib/select.js +30 -8
  31. package/lib/selector-panel.js +30 -8
  32. package/lib/selector.js +30 -8
  33. package/lib/sizer.js +30 -8
  34. package/lib/steps.js +30 -8
  35. package/lib/switch.js +30 -8
  36. package/lib/table-form.js +30 -8
  37. package/lib/tabs.js +30 -8
  38. package/lib/theme-chalk/flow.css +1 -1
  39. package/lib/theme-chalk/form.css +1 -1
  40. package/lib/theme-chalk/index.css +1 -1
  41. package/lib/tips.js +30 -8
  42. package/lib/tree-group.js +30 -8
  43. package/lib/tree.js +30 -8
  44. package/lib/upload.js +30 -8
  45. package/lib/utils/util.js +26 -4
  46. package/lib/wujie.js +30 -8
  47. package/lib/wxlogin.js +30 -8
  48. package/package.json +160 -160
  49. package/packages/button/index.js +5 -5
  50. package/packages/button/src/main.vue +418 -418
  51. package/packages/button-group/index.js +5 -5
  52. package/packages/button-group/src/main.vue +298 -298
  53. package/packages/calendar/index.js +5 -5
  54. package/packages/calogin/index.js +5 -5
  55. package/packages/calogin/src/main.vue +412 -412
  56. package/packages/calogin/src/plugin.js +915 -915
  57. package/packages/card/index.js +5 -5
  58. package/packages/card/src/main.vue +156 -156
  59. package/packages/cascader/index.js +5 -5
  60. package/packages/cascader/src/main.vue +168 -168
  61. package/packages/checkbox-group/index.js +5 -5
  62. package/packages/checkbox-group/src/main.vue +333 -333
  63. package/packages/clients/index.js +5 -5
  64. package/packages/clients/src/main.vue +151 -151
  65. package/packages/data-table/index.js +5 -5
  66. package/packages/data-table/src/children.vue +39 -39
  67. package/packages/data-table/src/column.vue +989 -989
  68. package/packages/data-table/src/main.vue +1822 -1822
  69. package/packages/data-table/src/sizer.vue +195 -195
  70. package/packages/data-table-form/index.js +5 -5
  71. package/packages/data-table-form/src/checkbox.vue +101 -101
  72. package/packages/data-table-form/src/colgroup.vue +17 -17
  73. package/packages/data-table-form/src/main.vue +181 -181
  74. package/packages/data-table-form/src/radio.vue +65 -65
  75. package/packages/data-table-form/src/table.vue +233 -233
  76. package/packages/data-table-form/src/tbody.vue +336 -336
  77. package/packages/data-table-form/src/thead.vue +68 -68
  78. package/packages/date-picker/index.js +5 -5
  79. package/packages/date-picker/src/main.vue +236 -236
  80. package/packages/dialog/index.js +5 -5
  81. package/packages/enable-drag/index.js +5 -5
  82. package/packages/enterprise/index.js +5 -5
  83. package/packages/enterprise/src/main.vue +66 -66
  84. package/packages/error-page/index.js +5 -5
  85. package/packages/error-page/src/main.vue +44 -44
  86. package/packages/flow/index.js +5 -5
  87. package/packages/flow/src/component/Circulate.vue +370 -363
  88. package/packages/flow/src/component/CommonOpinions.vue +364 -346
  89. package/packages/flow/src/component/CustomPreset.vue +322 -322
  90. package/packages/flow/src/component/FileList.vue +99 -99
  91. package/packages/flow/src/component/Preset.vue +255 -255
  92. package/packages/flow/src/component/SendMsg.vue +241 -241
  93. package/packages/flow/src/component/TimeLimit.vue +190 -190
  94. package/packages/flow/src/component/taskUnionExamine.vue +627 -627
  95. package/packages/flow/src/form.vue +121 -121
  96. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  97. package/packages/flow/src/main.vue +3564 -3445
  98. package/packages/flow/src/processForm.vue +1177 -1096
  99. package/packages/flow/src/processReject.vue +294 -294
  100. package/packages/flow/src/reset.vue +906 -905
  101. package/packages/flow/src/startTaskRead.vue +677 -659
  102. package/packages/flow/src/supervise.vue +149 -149
  103. package/packages/flow/src/table.vue +58 -58
  104. package/packages/flow-group/index.js +5 -5
  105. package/packages/flow-group/src/main.vue +688 -688
  106. package/packages/flow-list/index.js +5 -5
  107. package/packages/flow-list/src/main.vue +1770 -1770
  108. package/packages/form/index.js +5 -5
  109. package/packages/form/src/main.vue +3797 -3796
  110. package/packages/form/src/table.vue +1502 -1502
  111. package/packages/handle-user/index.js +5 -5
  112. package/packages/handle-user/src/main.vue +138 -138
  113. package/packages/handler/index.js +5 -5
  114. package/packages/handler/src/main.vue +493 -493
  115. package/packages/icon/index.js +5 -5
  116. package/packages/icon/src/main.vue +101 -101
  117. package/packages/icons/index.js +5 -5
  118. package/packages/icons/src/main.vue +81 -81
  119. package/packages/input/index.js +5 -5
  120. package/packages/input/src/main.vue +356 -356
  121. package/packages/input-number/index.js +5 -5
  122. package/packages/input-number/src/main.vue +106 -106
  123. package/packages/label/index.js +5 -5
  124. package/packages/label/src/main.vue +457 -457
  125. package/packages/layout/index.js +5 -5
  126. package/packages/layout/src/item.vue +152 -152
  127. package/packages/layout/src/main.vue +31 -31
  128. package/packages/login/index.js +5 -5
  129. package/packages/login/src/main.vue +2001 -2001
  130. package/packages/login/src/resetPassword.vue +562 -562
  131. package/packages/main/index.js +5 -5
  132. package/packages/main/src/default/index.vue +6 -5
  133. package/packages/main/src/default/message.vue +249 -249
  134. package/packages/main/src/default/notice.vue +157 -157
  135. package/packages/main/src/default/userinfo.vue +503 -503
  136. package/packages/main/src/main.vue +107 -84
  137. package/packages/main/src/public/online.vue +89 -89
  138. package/packages/main/src/public/search.vue +458 -458
  139. package/packages/main/src/public/settings.vue +221 -221
  140. package/packages/main/src/simplicity/apps.vue +388 -388
  141. package/packages/main/src/simplicity/avatar.vue +82 -82
  142. package/packages/main/src/simplicity/handler.vue +259 -259
  143. package/packages/main/src/simplicity/index.vue +2102 -2099
  144. package/packages/main/src/simplicity/lists.vue +84 -84
  145. package/packages/main/src/simplicity/menu-list.vue +135 -135
  146. package/packages/main/src/simplicity/message.vue +259 -259
  147. package/packages/main/src/simplicity/notice.vue +190 -190
  148. package/packages/main/src/simplicity/router-page.vue +45 -45
  149. package/packages/main/src/simplicity/sub-menu.vue +264 -264
  150. package/packages/main/src/simplicity/user.vue +260 -260
  151. package/packages/main/src/simplicity/userinfo.vue +312 -312
  152. package/packages/menu/index.js +5 -5
  153. package/packages/menu/src/main.vue +584 -584
  154. package/packages/nav/index.js +5 -5
  155. package/packages/nav/src/main.vue +351 -351
  156. package/packages/notify/index.js +5 -5
  157. package/packages/notify/src/main.vue +538 -538
  158. package/packages/page/index.js +5 -5
  159. package/packages/page/src/main.vue +167 -167
  160. package/packages/pagination/index.js +5 -5
  161. package/packages/pagination/src/main.vue +96 -96
  162. package/packages/player/index.js +5 -5
  163. package/packages/player/src/main.vue +194 -194
  164. package/packages/qr-code/index.js +5 -5
  165. package/packages/qr-code/src/main.vue +170 -170
  166. package/packages/radio-group/index.js +6 -6
  167. package/packages/radio-group/src/main.vue +319 -319
  168. package/packages/retrial-auth/index.js +5 -5
  169. package/packages/retrial-auth/src/main.vue +280 -280
  170. package/packages/select/index.js +5 -5
  171. package/packages/select/src/main.vue +778 -778
  172. package/packages/select-ganged/index.js +5 -5
  173. package/packages/select-ganged/src/main.vue +724 -724
  174. package/packages/selector/index.js +5 -5
  175. package/packages/selector/src/main.vue +729 -729
  176. package/packages/selector-panel/index.js +5 -5
  177. package/packages/selector-panel/src/main.vue +1027 -1027
  178. package/packages/selector-panel/src/selection.vue +170 -170
  179. package/packages/selector-panel/src/tree.vue +129 -129
  180. package/packages/sizer/index.js +5 -5
  181. package/packages/sizer/src/main.vue +254 -254
  182. package/packages/steps/index.js +5 -5
  183. package/packages/steps/src/main.vue +181 -181
  184. package/packages/switch/index.js +5 -5
  185. package/packages/switch/src/main.vue +154 -154
  186. package/packages/table-form/index.js +5 -5
  187. package/packages/tabs/index.js +5 -5
  188. package/packages/tabs/src/main.vue +788 -788
  189. package/packages/tabs-panel/index.js +5 -5
  190. package/packages/tabs-panel/src/main.vue +29 -29
  191. package/packages/theme-chalk/lib/flow.css +1 -1
  192. package/packages/theme-chalk/lib/form.css +1 -1
  193. package/packages/theme-chalk/lib/index.css +1 -1
  194. package/packages/theme-chalk/src/base.scss +261 -261
  195. package/packages/theme-chalk/src/button-group.scss +176 -176
  196. package/packages/theme-chalk/src/button.scss +24 -24
  197. package/packages/theme-chalk/src/calendar.scss +113 -113
  198. package/packages/theme-chalk/src/card.scss +99 -99
  199. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  200. package/packages/theme-chalk/src/clients.scss +87 -87
  201. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  202. package/packages/theme-chalk/src/data-table.scss +293 -293
  203. package/packages/theme-chalk/src/date-picker.scss +7 -7
  204. package/packages/theme-chalk/src/dialog.scss +77 -77
  205. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  206. package/packages/theme-chalk/src/enterprise.scss +5 -5
  207. package/packages/theme-chalk/src/error-page.scss +18 -18
  208. package/packages/theme-chalk/src/flow-group.scss +110 -110
  209. package/packages/theme-chalk/src/flow-list.scss +39 -39
  210. package/packages/theme-chalk/src/flow.scss +348 -343
  211. package/packages/theme-chalk/src/form.scss +499 -496
  212. package/packages/theme-chalk/src/handle-user.scss +40 -40
  213. package/packages/theme-chalk/src/handler.scss +143 -143
  214. package/packages/theme-chalk/src/icon.scss +1792 -1792
  215. package/packages/theme-chalk/src/icons.scss +99 -99
  216. package/packages/theme-chalk/src/input.scss +9 -9
  217. package/packages/theme-chalk/src/label.scss +24 -24
  218. package/packages/theme-chalk/src/layout.scss +46 -46
  219. package/packages/theme-chalk/src/login.scss +984 -984
  220. package/packages/theme-chalk/src/main.scss +663 -663
  221. package/packages/theme-chalk/src/menu.scss +222 -222
  222. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  223. package/packages/theme-chalk/src/nav.scss +111 -111
  224. package/packages/theme-chalk/src/page.scss +3 -3
  225. package/packages/theme-chalk/src/pagination.scss +29 -29
  226. package/packages/theme-chalk/src/player.scss +9 -9
  227. package/packages/theme-chalk/src/qr-code.scss +17 -17
  228. package/packages/theme-chalk/src/radio-group.scss +9 -9
  229. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  230. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  231. package/packages/theme-chalk/src/select.scss +8 -8
  232. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  233. package/packages/theme-chalk/src/selector.scss +91 -91
  234. package/packages/theme-chalk/src/simplicity.scss +1355 -1355
  235. package/packages/theme-chalk/src/sizer.scss +36 -36
  236. package/packages/theme-chalk/src/steps.scss +88 -88
  237. package/packages/theme-chalk/src/switch.scss +3 -3
  238. package/packages/theme-chalk/src/table-form.scss +1 -1
  239. package/packages/theme-chalk/src/tabs.scss +87 -87
  240. package/packages/theme-chalk/src/tips.scss +7 -7
  241. package/packages/theme-chalk/src/toolbar.scss +179 -179
  242. package/packages/theme-chalk/src/tree-group.scss +72 -72
  243. package/packages/theme-chalk/src/tree.scss +165 -165
  244. package/packages/theme-chalk/src/upload.scss +172 -172
  245. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  246. package/packages/tips/index.js +5 -5
  247. package/packages/tips/src/main.vue +141 -141
  248. package/packages/toolbar/index.js +5 -5
  249. package/packages/toolbar/src/main.vue +430 -430
  250. package/packages/tree/index.js +5 -5
  251. package/packages/tree-group/index.js +5 -5
  252. package/packages/upload/index.js +5 -5
  253. package/packages/upload/src/main.vue +1348 -1348
  254. package/packages/upload/src/picture.js +15 -15
  255. package/packages/wujie/index.js +5 -5
  256. package/packages/wujie/src/main.vue +145 -145
  257. package/packages/wxlogin/index.js +5 -5
  258. package/packages/wxlogin/src/main.vue +128 -128
  259. package/src/config/api.js +294 -294
  260. package/src/config/image.js +2 -2
  261. package/src/index.js +163 -163
  262. package/src/utils/bus.js +3 -3
  263. package/src/utils/date-util.js +312 -312
  264. package/src/utils/http.js +50 -50
  265. package/src/utils/rules.js +18 -18
  266. package/src/utils/store.js +21 -21
  267. package/src/utils/util.js +39 -3
  268. package/src/utils/webSocket.js +107 -107
  269. package/packages/.DS_Store +0 -0
  270. package/packages/autocomplete/.DS_Store +0 -0
  271. package/packages/calogin/.DS_Store +0 -0
  272. package/packages/date-picker/.DS_Store +0 -0
  273. package/packages/date-picker/src/.DS_Store +0 -0
  274. package/packages/flow/.DS_Store +0 -0
  275. package/packages/flow-list/.DS_Store +0 -0
  276. package/packages/form/.DS_Store +0 -0
  277. package/packages/login/.DS_Store +0 -0
  278. package/packages/login/src/IcpItem.vue +0 -66
  279. package/packages/main/.DS_Store +0 -0
  280. package/packages/main/src/.DS_Store +0 -0
  281. package/packages/menu/.DS_Store +0 -0
  282. package/packages/scrollbar/.DS_Store +0 -0
  283. package/packages/select/.DS_Store +0 -0
  284. package/packages/selector/.DS_Store +0 -0
  285. package/packages/selector-panel/.DS_Store +0 -0
  286. package/packages/theme-chalk/src/.DS_Store +0 -0
  287. package/packages/upload/.DS_Store +0 -0
  288. package/src/.DS_Store +0 -0
  289. package/src/utils/.DS_Store +0 -0
@@ -1,659 +1,677 @@
1
- <template>
2
- <div
3
- v-loading="loading"
4
- class="task-read"
5
- element-loading-text="加载中..."
6
- element-loading-spinner="el-icon-loading"
7
- element-loading-background="rgba(255, 255,255, 0.8)"
8
- >
9
- <el-form
10
- ref="nextNode"
11
- :model="nextNode"
12
- class="demo-dynamic"
13
- label-width="110px"
14
- >
15
- <div
16
- :style="`max-height: ${
17
- typeCode ? 'unset' : '290px'
18
- }; overflow-y: auto; margin-bottom: 10px`"
19
- >
20
- <el-form-item
21
- prop="handleExplain"
22
- label="当前步骤"
23
- v-if="type === 'transfer'"
24
- >
25
- <el-input readonly v-model="nextNode.nodeName"></el-input>
26
- </el-form-item>
27
- <el-form-item
28
- v-if="type == 'transfer' && transferInfo.isSinglePage"
29
- prop="handleExplain"
30
- label="意见"
31
- >
32
- <el-input
33
- v-model="nextNode.handleExplain"
34
- placeholder="请填写意见"
35
- ></el-input>
36
- </el-form-item>
37
- <el-form-item
38
- prop="nextUser"
39
- :label="
40
- type === 'transfer'
41
- ? '转办对象'
42
- : configInfo.isCdjxjTaskHandle == 'true'
43
- ? '接收人'
44
- : '办理用户'
45
- "
46
- >
47
- <SelectUser
48
- :nextUser="nextNode.nextUser"
49
- :options="userOptions"
50
- :multiple="type != 'transfer' ? multiple : false"
51
- :mix="type != 'transfer'"
52
- :selectUserList="selectUserList"
53
- :types="
54
- type == 'transfer'
55
- ? ['employee', 'persongroup']
56
- : ['employee', 'enterprise', 'department', 'persongroup']
57
- "
58
- @change="changeSelectUser($event, 'nextUser')"
59
- :tabs="tabs"
60
- :where="{ type: 'user' }"
61
- />
62
- </el-form-item>
63
-
64
- <el-form-item
65
- v-if="configInfo.isCdjxjTaskHandle != 'true' && type != 'transfer'"
66
- prop="cy"
67
- label="常用群组"
68
- ><el-checkbox-group v-model="selectCheck">
69
- <el-checkbox
70
- @change="handleSelectCheck($event, item)"
71
- v-for="item in configInfo.groups"
72
- :label="item.name"
73
- :key="item.id"
74
- >{{ item.name }}</el-checkbox
75
- >
76
- </el-checkbox-group>
77
- </el-form-item>
78
- <el-form-item
79
- v-if="configInfo.fyDoresult == 'true'"
80
- prop="showDoresult"
81
- label="流程意见"
82
- ><el-radio v-model="nextNode.showDoresult" label="0">分阅</el-radio>
83
- <el-radio v-model="nextNode.showDoresult" label="1">不分阅</el-radio>
84
- </el-form-item>
85
- <el-form-item
86
- v-if="configInfo.fyeh == 'true'"
87
- prop="isInHistory"
88
- label="分阅记录"
89
- ><el-radio v-model="nextNode.isInHistory" label="0">记录</el-radio>
90
- <el-radio v-model="nextNode.isInHistory" label="1">不记录</el-radio>
91
- </el-form-item>
92
- <el-form-item
93
- v-if="configInfo.download"
94
- prop="isDownload"
95
- label="打印下载文件"
96
- ><el-radio v-model="nextNode.isDownload" label="0">允许</el-radio>
97
- <el-radio v-model="nextNode.isDownload" label="1">不允许</el-radio>
98
- </el-form-item>
99
- <el-form-item
100
- prop="handleExplain"
101
- :label="configInfo.isCdjxjTaskHandle == 'true' ? '附言' : '办理说明'"
102
- v-if="type != 'transfer'"
103
- >
104
- <el-input
105
- v-model="nextNode.handleExplain"
106
- placeholder="请填写办理说明"
107
- ></el-input>
108
- </el-form-item>
109
- <el-form-item
110
- v-if="configInfo.isCdjxjTaskHandle != 'true'"
111
- prop="noticeType"
112
- label="通知方式"
113
- :rules="[
114
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
115
- ]"
116
- >
117
- <el-checkbox-group
118
- v-model="nextNode.noticeType"
119
- style="display: contents"
120
- >
121
- <el-checkbox
122
- v-for="item of noticeList"
123
- :key="item.cciValue"
124
- :label="item.cciValue"
125
- :disabled="
126
- readOnlyNotificationType
127
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
128
- : false
129
- "
130
- >
131
- {{ item.shortName }}
132
- </el-checkbox>
133
- </el-checkbox-group>
134
- </el-form-item>
135
- <el-form-item
136
- v-show="
137
- nextNode.noticeType.length != 0 &&
138
- configInfo.isCdjxjTaskHandle != 'true'
139
- "
140
- prop="nextNode"
141
- label="通知消息"
142
- >
143
- <es-input
144
- style="
145
- border-color: #ccc;
146
- padding: 5px;
147
- border-radius: 5px;
148
- font-size: 13px;
149
- "
150
- type="textarea"
151
- v-model="newsNoice"
152
- :readonly="notificationMessageReadOnly == 'true'"
153
- />
154
- <!-- <span>{{ newsInfo }}</span> -->
155
- </el-form-item>
156
- </div>
157
- <el-form-item>
158
- <div style="text-align: right">
159
- <el-button type="primary" size="small" @click="submit('nextNode')">
160
- 提交
161
- </el-button>
162
- </div>
163
- </el-form-item>
164
- </el-form>
165
- </div>
166
- </template>
167
-
168
- <script>
169
- import {
170
- findSysCodes,
171
- taskReadHtml,
172
- toStartTaskRead,
173
- toTaskTransferIndex,
174
- getNotificationMsg,
175
- taskTransfer,
176
- findCodeValues
177
- } from 'eoss-ui/src/config/api';
178
- import util from 'eoss-ui/src/utils/util';
179
- import SelectUser from './selectUser.vue';
180
- export default {
181
- name: 'StartTaskRead',
182
- components: {
183
- [Option.name]: Option,
184
- [SelectUser.name]: SelectUser
185
- },
186
- props: {
187
- pendingId: { type: String, default: '' },
188
- simpleTips:{type:Boolean,default:true},
189
- newsInfo: { type: String, default: '' },
190
- type: { type: String, default: '' },
191
- option: { type: String, default: '' },
192
- typeCode: { type: String, default: '' },
193
- resetAppId: { type: String, default: '' },
194
- param: { type: Object, default: () => {} },
195
- taskExamine: { type: Object, default: () => {} },
196
- readParams: {
197
- type: [Object,undefined],
198
- default: undefined
199
- },
200
- },
201
- data() {
202
- return {
203
- loading: false,
204
- newsNoice: '',
205
- readOnlyNotificationType: '',
206
- notificationMessageReadOnly: false,
207
- nextNode: {
208
- nextUser: [],
209
- userInfo: [],
210
- noticeType: [],
211
- handleExplain: '',
212
- showDoresult: '0',
213
- isInHistory: '0',
214
- isDownload: '0'
215
- },
216
- mixList: [],
217
- newSelectUserList: [],
218
- orgId: '',
219
- noticeList: [],
220
- userOptions: [],
221
- selectCheck: [],
222
- selectUserList: [],
223
- transferInfo: {},
224
- multiple: true,
225
- params: { filid: 'all' },
226
- configInfo: {}
227
- };
228
- },
229
- computed: {
230
- tabs() {
231
- let tab = {};
232
- if (this.type != 'transfer') {
233
- tab = {
234
- employee: {
235
- param: {
236
- filid: this.orgId,
237
- name: '本单位用户'
238
- }
239
- },
240
- department: { param: { filid: this.orgId } },
241
- enterprise: {}
242
- };
243
- } else {
244
- tab = {
245
- employee: {
246
- param: {
247
- filid: this.orgId
248
- }
249
- }
250
- };
251
- }
252
- return tab;
253
- }
254
- },
255
- mounted() {
256
- this.newsNoice = this.newsInfo;
257
- if(this.readParams || this.typeCode=='read'){
258
- this.getMessage()
259
- }
260
- this.getFind();
261
- if (util.getStorage('mainConfig')) {
262
- this.orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
263
- }
264
- },
265
- methods: {
266
- //获取通知信息
267
- getMessage() {
268
- let params = {};
269
- if(this.typeCode=='read'){
270
- params = {
271
- processDefinitionId: this.param.processDefinitionId,
272
- businessId: this.param.businessId,
273
- businessName: this.param.businessName,
274
- bCode: this.param.bCode,
275
- bName:this.param.bName
276
- };
277
- }else{
278
- params.appId = this.readParams.appId
279
- }
280
- util
281
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
282
- .then((res) => {
283
- if (res.status === 'success') {
284
- this.newsNoice = res.message;
285
- }
286
- })
287
- .catch((err) => {
288
- this.loading = false;
289
- if (err.message && err.message !== 'canceled') {
290
- this.$message.error(err.message);
291
- }
292
- });
293
- },
294
- toTaskTransfer() {
295
- const { opinion, pendingId, taskExamine } = this;
296
- let params = {
297
- url: toTaskTransferIndex,
298
- params: {
299
- opinion,
300
- pendingId,
301
- isSubFlow: taskExamine.isSubFlow,
302
- isSinglePage: taskExamine.isSinglePage
303
- }
304
- };
305
- util
306
- .ajax(params)
307
- .then((res) => {
308
- const {
309
- status,
310
- message,
311
- data: { choiceDeptId, choiceOrgId, nodeInfoMap, taskExamine }
312
- } = res;
313
- if (status == 'success') {
314
- this.isMultipleTransfer(
315
- nodeInfoMap.nodeExtAttr.userSelectionType,
316
- choiceOrgId,
317
- choiceDeptId
318
- );
319
- this.nextNode.nodeName = taskExamine.nodeName;
320
- this.transferInfo = taskExamine;
321
- } else {
322
- this.$message.error(message || '系统错误,请联系管理员!');
323
- }
324
- })
325
- .catch((err) => {
326
- this.loading = false;
327
- if (err.message && err.message !== 'canceled') {
328
- this.$message.error(err.message);
329
- }
330
- });
331
- },
332
- isMultipleTransfer(val, choiceOrgId, choiceDeptId, pOrgId) {
333
- if (val == 2 || val == 4 || val == 6 || val == 16) {
334
- this.multiple = true;
335
- } else {
336
- this.multiple = false;
337
- }
338
- if (val == 1 || val == 2 || val == 5) {
339
- this.params.filid = this.orgId;
340
- if (choiceOrgId) {
341
- this.params.filid = choiceOrgId;
342
- }
343
- }
344
- if (val == 5 || val == 6) {
345
- this.params.filid = this.orgId;
346
- this.params.deptid = this.orgId;
347
- if (choiceDeptId) {
348
- this.params.deptid = choiceDeptId;
349
- }
350
- if (choiceOrgId) {
351
- this.params.filid = choiceOrgId;
352
- }
353
- }
354
- if (val == 15 || val == 16) {
355
- this.params.filid = this.orgId;
356
- if (pOrgId) {
357
- this.params.filid = pOrgId;
358
- }
359
- }
360
- },
361
- isMultiple() {
362
- let orgId = this.orgId;
363
- if (this.configInfo.selectPersonValue == 1) {
364
- this.multiple = false;
365
- this.params.filid = orgId;
366
- } else if (this.configInfo.selectPersonValue == 2) {
367
- this.multiple = true;
368
- this.params.filid = orgId;
369
- } else if (this.configInfo.selectPersonValue == 3) {
370
- this.multiple = false;
371
- this.params.filid = 'all';
372
- } else if (this.configInfo.selectPersonValue == 4) {
373
- this.multiple = true;
374
- this.params.filid = 'all';
375
- } else if (this.configInfo.selectPersonValue == 5) {
376
- this.multiple = false;
377
- this.params.filid = '';
378
- } else if (this.configInfo.selectPersonValue == 6) {
379
- this.multiple = true;
380
- this.params.filid = '';
381
- }
382
- },
383
- handleSelectCheck(val, data) {
384
- let { userIds, userNames } = data;
385
- if (val) {
386
- let newUserIds = userIds.split(',');
387
- let newUserNames = userNames.split(',');
388
- newUserIds.map((item, index) => {
389
- this.nextNode.nextUser.push(item);
390
- this.userOptions.push({ id: item, name: newUserNames[index] });
391
-
392
- this.selectUserList.push({
393
- showid: item,
394
- showname: newUserNames[index]
395
- });
396
- });
397
- // this.selectUserList = this.newSelectUserList
398
- } else {
399
- let newUserIds = userIds.split(',');
400
- for (let i = 0; i < this.nextNode.nextUser.length; i++) {
401
- for (let j = 0; j < newUserIds.length; j++) {
402
- if (this.nextNode.nextUser[i] == newUserIds[j]) {
403
- this.nextNode.nextUser.splice(i, 1);
404
- }
405
- }
406
- }
407
- for (let z = 0; z < this.userOptions.length; z++) {
408
- for (let x = 0; x < newUserIds.length; x++) {
409
- if (this.userOptions[z].id == newUserIds[x]) {
410
- this.userOptions.splice(z, 1);
411
- this.selectUserList.splice(z, 1);
412
- }
413
- }
414
- }
415
- // this.newSelectUserList = this.selectUserList
416
- }
417
- },
418
- toStartTaskRead() {
419
- let params = {
420
- url: toStartTaskRead,
421
- params: { pendingId: this.pendingId, taskAction: this.type,...this.param }
422
- };
423
- if(this.typeCode == 'read'){
424
- delete params.params.pendingId;
425
- // params.params.appid = this.resetAppId;
426
- }
427
- if (this.type != 'taskReadAndEnd') delete params.params.taskAction;
428
- util
429
- .ajax(params)
430
- .then((res) => {
431
- const { status, data } = res;
432
- if (status === 'success') {
433
- this.configInfo = data;
434
- this.isMultiple();
435
- }
436
- })
437
- .catch((err) => {
438
- this.loading = false;
439
- if (err.message && err.message !== 'canceled') {
440
- this.$message.error(err.message);
441
- }
442
- });
443
- },
444
- changeSelectUser(val, type) {
445
- const { nextUser, options, mixList } = val;
446
- this.nextNode[type] = nextUser;
447
- this.mixList = mixList;
448
- options.map((item) => {
449
- this.newSelectUserList.push({
450
- showname: item.showname,
451
- showid: item.showid
452
- });
453
- });
454
- },
455
- getNodeType() {
456
- util
457
- .ajax({
458
- url: findCodeValues,
459
- params: {
460
- ccCode: 'notification_type',
461
- userId: util.getStorage('userId')
462
- }
463
- })
464
- .then((res) => {
465
- const { status, data } = res;
466
- if (status === 'success') {
467
- this.noticeList = data;
468
- let arr = [];
469
- this.noticeList.map((item) => {
470
- this.nextNode.noticeType.map((x) => {
471
- if (x == item.cciValue) {
472
- arr.push(x);
473
- }
474
- });
475
- });
476
- this.nextNode.noticeType = arr;
477
- }
478
- })
479
- .catch((err) => {
480
- this.loading = false;
481
- if (err.message && err.message !== 'canceled') {
482
- this.$message.error(err.message);
483
- }
484
- });
485
- },
486
- // 转办提交
487
- subTaskTransfer() {
488
- const { choiceDeptId, choiceOrgId, bCode, bName } = this.taskExamine;
489
- const { opinion, pendingId, nextNode, newsNoice, multiple, type } = this;
490
- let params = {
491
- url: taskTransfer,
492
- data: {
493
- choiceDeptId,
494
- choiceOrgId,
495
- bCode,
496
- bName,
497
- nextUserId:
498
- multiple && type != 'transfer'
499
- ? nextNode.nextUser.join(',')
500
- : nextNode.nextUser,
501
- opinion,
502
- pendingId,
503
- notificationType: nextNode.noticeType.join(','),
504
- notificationMsg: newsNoice
505
- },
506
- headers: { Accept: 'application/json,text/plain' },
507
- method: 'post'
508
- };
509
- util
510
- .ajax(params)
511
- .then((res) => {
512
- const { message, status } = res;
513
- if (status === 'success') {
514
- this.simpleTips && this.$message.success('操作成功');
515
- this.quit(true);
516
- } else {
517
- this.$message.error(message || '系统错误,请联系管理员!');
518
- }
519
- this.loading = false;
520
- })
521
- .catch((err) => {
522
- this.loading = false;
523
- if (err.message && err.message !== 'canceled') {
524
- this.$message.error(err.message);
525
- }
526
- });
527
- },
528
- // 提交表单
529
- submit(formName) {
530
- this.$refs[formName].validate((valid) => {
531
- if (valid) {
532
- if (!this.option && this.isOpinionRequired === 1) {
533
- this.$message.warning('请选择输入审批意见');
534
- return;
535
- }
536
- // let nextUser = [];
537
- // this.nextNode.nextUser.map(item => {
538
- // nextUser.push(item);
539
- // });
540
- let noticeType = '';
541
- noticeType = this.nextNode.noticeType.join(',');
542
- this.loading = true;
543
- if (this.type === 'transfer') {
544
- this.subTaskTransfer();
545
- } else {
546
- const {
547
- appId,
548
- businessId,
549
- bCode,
550
- bName,
551
- choiceDeptId,
552
- choiceOrgId,
553
- businessName,
554
- processDefinitionId
555
- } = this.taskExamine;
556
- let params = {
557
- ...this.nextNode,
558
- bCode,
559
- bName,
560
- appId,
561
- businessId:businessId || this.param.businessId,
562
- choiceDeptId,
563
- choiceOrgId,
564
- businessName,
565
- processDefinitionId,
566
- currentOrgProcessKey: processDefinitionId || this.param.currentOrgProcessKey,
567
- pendingId: this.pendingId,
568
- opinion: this.option, // 审批意见
569
- userId: util.getStorage('userId'),
570
- nextReadUserId: this.mixList.join('|'),
571
- notificationType:noticeType,
572
- notificationMsg:this.newsNoice,
573
- taskAction: this.type
574
- // nextNodeId: this.form.nextNodeId
575
- };
576
- delete params.nextUser;
577
- delete params.noticeType;
578
- const { fyDoresult, fyeh, download, isCdjxjTaskHandle } =
579
- this.configInfo;
580
- fyDoresult != 'true' && delete params.showDoresult;
581
- fyeh != 'true' && delete params.isInHistory;
582
- !download && delete params.isDownload;
583
- isCdjxjTaskHandle == 'true' && delete params.noticeType;
584
- if (this.readParams) {
585
- params = { ...params, ...this.readParams };
586
- }
587
- util
588
- .ajax({
589
- url: taskReadHtml,
590
- params: { taskAction: this.type },
591
- headers: {
592
- Accept: 'application/json,text/plain'
593
- },
594
- method: 'post',
595
- data: params
596
- })
597
- .then((res) => {
598
- const { message, status } = res;
599
- this.loading = false;
600
- if (status === 'success') {
601
- this.simpleTips && this.$message.success('操作成功');
602
- this.quit(true);
603
- } else {
604
- this.$message.error(message || '系统错误,请联系管理员!');
605
- }
606
- })
607
- .catch((err) => {
608
- this.loading = false;
609
- if (err.message && err.message !== 'canceled') {
610
- this.$message.error(err.message);
611
- }
612
- });
613
- }
614
- } else {
615
- return false;
616
- }
617
- });
618
- },
619
- quit(val) {
620
- if (val === true) return this.$emit('cancel', this.type);
621
- this.$emit('cancel');
622
- },
623
-
624
- getFind() {
625
- this.loading = true;
626
- util
627
- .ajax({
628
- url: findSysCodes
629
- })
630
- .then((res) => {
631
- const { status, message, data } = res;
632
- this.loading = false;
633
- if (status === 'success') {
634
- this.nextNode.noticeType = message.split(',');
635
- if (data) {
636
- this.notificationMessageReadOnly =
637
- data.notificationMessageReadOnly;
638
- this.readOnlyNotificationType = data.readOnlyNotificationType;
639
- }
640
- } else {
641
- this.$message.error(message || '系统错误,请联系管理员!');
642
- }
643
- this.getNodeType();
644
- if (this.type === 'transfer') {
645
- this.toTaskTransfer();
646
- } else if(!this.readParams) {
647
- this.toStartTaskRead();
648
- }
649
- })
650
- .catch((err) => {
651
- this.loading = false;
652
- if (err.message && err.message !== 'canceled') {
653
- this.$message.error(err.message);
654
- }
655
- });
656
- }
657
- }
658
- };
659
- </script>
1
+ <template>
2
+ <div
3
+ v-loading="loading"
4
+ class="task-read"
5
+ element-loading-text="加载中..."
6
+ element-loading-spinner="el-icon-loading"
7
+ element-loading-background="rgba(255, 255,255, 0.8)"
8
+ >
9
+ <el-form
10
+ ref="nextNode"
11
+ :model="nextNode"
12
+ class="demo-dynamic"
13
+ label-width="110px"
14
+ >
15
+ <div
16
+ :style="`max-height: ${
17
+ typeCode ? 'unset' : '290px'
18
+ }; overflow-y: auto; margin-bottom: 10px`"
19
+ >
20
+ <el-form-item
21
+ prop="handleExplain"
22
+ label="当前步骤"
23
+ v-if="type === 'transfer'"
24
+ >
25
+ <el-input readonly v-model="nextNode.nodeName"></el-input>
26
+ </el-form-item>
27
+ <el-form-item
28
+ v-if="type == 'transfer' && transferInfo.isSinglePage"
29
+ prop="handleExplain"
30
+ label="意见"
31
+ >
32
+ <el-input
33
+ v-model="nextNode.handleExplain"
34
+ placeholder="请填写意见"
35
+ ></el-input>
36
+ </el-form-item>
37
+ <el-form-item
38
+ prop="nextUser"
39
+ :label="
40
+ type === 'transfer'
41
+ ? '转办对象'
42
+ : configInfo.isCdjxjTaskHandle == 'true'
43
+ ? '接收人'
44
+ : '办理用户'
45
+ "
46
+ >
47
+ <SelectUser
48
+ :nextUser="nextNode.nextUser"
49
+ :options="userOptions"
50
+ :multiple="type != 'transfer' ? multiple : false"
51
+ :mix="type != 'transfer'"
52
+ :selectUserList="selectUserList"
53
+ :types="
54
+ selectorTabs
55
+ ? selectorTabs
56
+ : type == 'transfer'
57
+ ? ['employee', 'persongroup']
58
+ : ['employee', 'enterprise', 'department', 'persongroup']
59
+ "
60
+ @change="changeSelectUser($event, 'nextUser')"
61
+ :tabs="tabs"
62
+ :params="selectorParams"
63
+ :where="{ type: 'user' }"
64
+ />
65
+ </el-form-item>
66
+
67
+ <el-form-item
68
+ v-if="configInfo.isCdjxjTaskHandle != 'true' && type != 'transfer'"
69
+ prop="cy"
70
+ label="常用群组"
71
+ ><el-checkbox-group v-model="selectCheck">
72
+ <el-checkbox
73
+ @change="handleSelectCheck($event, item)"
74
+ v-for="item in configInfo.groups"
75
+ :label="item.name"
76
+ :key="item.id"
77
+ >{{ item.name }}</el-checkbox
78
+ >
79
+ </el-checkbox-group>
80
+ </el-form-item>
81
+ <el-form-item
82
+ v-if="configInfo.fyDoresult == 'true'"
83
+ prop="showDoresult"
84
+ label="流程意见"
85
+ ><el-radio v-model="nextNode.showDoresult" label="0">分阅</el-radio>
86
+ <el-radio v-model="nextNode.showDoresult" label="1">不分阅</el-radio>
87
+ </el-form-item>
88
+ <el-form-item
89
+ v-if="configInfo.fyeh == 'true'"
90
+ prop="isInHistory"
91
+ label="分阅记录"
92
+ ><el-radio v-model="nextNode.isInHistory" label="0">记录</el-radio>
93
+ <el-radio v-model="nextNode.isInHistory" label="1">不记录</el-radio>
94
+ </el-form-item>
95
+ <el-form-item
96
+ v-if="configInfo.download"
97
+ prop="isDownload"
98
+ label="打印下载文件"
99
+ ><el-radio v-model="nextNode.isDownload" label="0">允许</el-radio>
100
+ <el-radio v-model="nextNode.isDownload" label="1">不允许</el-radio>
101
+ </el-form-item>
102
+ <el-form-item
103
+ prop="handleExplain"
104
+ :label="configInfo.isCdjxjTaskHandle == 'true' ? '附言' : '办理说明'"
105
+ v-if="type != 'transfer'"
106
+ >
107
+ <el-input
108
+ v-model="nextNode.handleExplain"
109
+ placeholder="请填写办理说明"
110
+ ></el-input>
111
+ </el-form-item>
112
+ <el-form-item
113
+ v-if="configInfo.isCdjxjTaskHandle != 'true'"
114
+ prop="noticeType"
115
+ label="通知方式"
116
+ :rules="[
117
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
118
+ ]"
119
+ >
120
+ <el-checkbox-group
121
+ v-model="nextNode.noticeType"
122
+ style="display: contents"
123
+ >
124
+ <el-checkbox
125
+ v-for="item of noticeList"
126
+ :key="item.cciValue"
127
+ :label="item.cciValue"
128
+ :disabled="
129
+ readOnlyNotificationType
130
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
131
+ : false
132
+ "
133
+ >
134
+ {{ item.shortName }}
135
+ </el-checkbox>
136
+ </el-checkbox-group>
137
+ </el-form-item>
138
+ <el-form-item
139
+ v-show="
140
+ nextNode.noticeType.length != 0 &&
141
+ configInfo.isCdjxjTaskHandle != 'true'
142
+ "
143
+ prop="nextNode"
144
+ label="通知消息"
145
+ >
146
+ <es-input
147
+ style="
148
+ border-color: #ccc;
149
+ padding: 5px;
150
+ border-radius: 5px;
151
+ font-size: 13px;
152
+ "
153
+ type="textarea"
154
+ v-model="newsNoice"
155
+ :readonly="notificationMessageReadOnly == 'true'"
156
+ />
157
+ <!-- <span>{{ newsInfo }}</span> -->
158
+ </el-form-item>
159
+ </div>
160
+ <el-form-item>
161
+ <div style="text-align: right">
162
+ <el-button type="primary" size="small" @click="submit('nextNode')">
163
+ 提交
164
+ </el-button>
165
+ </div>
166
+ </el-form-item>
167
+ </el-form>
168
+ </div>
169
+ </template>
170
+
171
+ <script>
172
+ import {
173
+ findSysCodes,
174
+ taskReadHtml,
175
+ toStartTaskRead,
176
+ toTaskTransferIndex,
177
+ getNotificationMsg,
178
+ taskTransfer,
179
+ findCodeValues
180
+ } from 'eoss-ui/src/config/api';
181
+ import util from 'eoss-ui/src/utils/util';
182
+ import SelectUser from './selectUser.vue';
183
+ export default {
184
+ name: 'StartTaskRead',
185
+ components: {
186
+ [Option.name]: Option,
187
+ [SelectUser.name]: SelectUser
188
+ },
189
+ props: {
190
+ pendingId: { type: String, default: '' },
191
+ simpleTips: { type: Boolean, default: true },
192
+ newsInfo: { type: String, default: '' },
193
+ type: { type: String, default: '' },
194
+ option: { type: String, default: '' },
195
+ typeCode: { type: String, default: '' },
196
+ resetAppId: { type: String, default: '' },
197
+ selectorConfig: { type: [Object, undefined], default: undefined },
198
+ param: { type: Object, default: () => {} },
199
+ taskExamine: { type: Object, default: () => {} },
200
+ readParams: {
201
+ type: [Object, undefined],
202
+ default: undefined
203
+ }
204
+ },
205
+ data() {
206
+ return {
207
+ loading: false,
208
+ newsNoice: '',
209
+ readOnlyNotificationType: '',
210
+ notificationMessageReadOnly: false,
211
+ selectorTabs: null,
212
+ selectorParams: null,
213
+ nextNode: {
214
+ nextUser: [],
215
+ userInfo: [],
216
+ noticeType: [],
217
+ handleExplain: '',
218
+ showDoresult: '0',
219
+ isInHistory: '0',
220
+ isDownload: '0'
221
+ },
222
+ mixList: [],
223
+ newSelectUserList: [],
224
+ orgId: '',
225
+ noticeList: [],
226
+ userOptions: [],
227
+ selectCheck: [],
228
+ selectUserList: [],
229
+ transferInfo: {},
230
+ multiple: true,
231
+ params: { filid: 'all' },
232
+ configInfo: {}
233
+ };
234
+ },
235
+ computed: {
236
+ tabs() {
237
+ let tab = {};
238
+ if (this.type != 'transfer') {
239
+ tab = {
240
+ employee: {
241
+ param: {
242
+ filid: this.orgId,
243
+ name: '本单位用户'
244
+ }
245
+ },
246
+ department: { param: { filid: this.orgId } },
247
+ enterprise: {}
248
+ };
249
+ } else {
250
+ tab = {
251
+ employee: {
252
+ param: {
253
+ filid: this.orgId
254
+ }
255
+ }
256
+ };
257
+ }
258
+ return tab;
259
+ }
260
+ },
261
+ mounted() {
262
+ this.newsNoice = this.newsInfo;
263
+ if (this.readParams || this.typeCode == 'read') {
264
+ this.getMessage();
265
+ }
266
+ this.getFind();
267
+ if (util.getStorage('mainConfig')) {
268
+ this.orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
269
+ }
270
+ if(this.selectorConfig){
271
+ this.getSelectorConfig()
272
+ }
273
+ },
274
+ methods: {
275
+ getSelectorConfig() {
276
+ this.selectorTabs = this.selectorConfig.type.split(',');
277
+ this.selectorParams = this.selectorConfig.params;
278
+ },
279
+ //获取通知信息
280
+ getMessage() {
281
+ let params = {};
282
+ if (this.typeCode == 'read') {
283
+ params = {
284
+ processDefinitionId: this.param.processDefinitionId,
285
+ businessId: this.param.businessId,
286
+ businessName: this.param.businessName,
287
+ bCode: this.param.bCode,
288
+ bName: this.param.bName
289
+ };
290
+ } else {
291
+ params.appId = this.readParams.appId;
292
+ }
293
+ util
294
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
295
+ .then((res) => {
296
+ if (res.status === 'success') {
297
+ this.newsNoice = res.message;
298
+ }
299
+ })
300
+ .catch((err) => {
301
+ this.loading = false;
302
+ if (err.message && err.message !== 'canceled') {
303
+ this.$message.error(err.message);
304
+ }
305
+ });
306
+ },
307
+ toTaskTransfer() {
308
+ const { opinion, pendingId, taskExamine } = this;
309
+ let params = {
310
+ url: toTaskTransferIndex,
311
+ params: {
312
+ opinion,
313
+ pendingId,
314
+ isSubFlow: taskExamine.isSubFlow,
315
+ isSinglePage: taskExamine.isSinglePage
316
+ }
317
+ };
318
+ util
319
+ .ajax(params)
320
+ .then((res) => {
321
+ const {
322
+ status,
323
+ message,
324
+ data: { choiceDeptId, choiceOrgId, nodeInfoMap, taskExamine }
325
+ } = res;
326
+ if (status == 'success') {
327
+ this.isMultipleTransfer(
328
+ nodeInfoMap.nodeExtAttr.userSelectionType,
329
+ choiceOrgId,
330
+ choiceDeptId
331
+ );
332
+ this.nextNode.nodeName = taskExamine.nodeName;
333
+ this.transferInfo = taskExamine;
334
+ } else {
335
+ this.$message.error(message || '系统错误,请联系管理员!');
336
+ }
337
+ })
338
+ .catch((err) => {
339
+ this.loading = false;
340
+ if (err.message && err.message !== 'canceled') {
341
+ this.$message.error(err.message);
342
+ }
343
+ });
344
+ },
345
+ isMultipleTransfer(val, choiceOrgId, choiceDeptId, pOrgId) {
346
+ if (val == 2 || val == 4 || val == 6 || val == 16) {
347
+ this.multiple = true;
348
+ } else {
349
+ this.multiple = false;
350
+ }
351
+ if (val == 1 || val == 2 || val == 5) {
352
+ this.params.filid = this.orgId;
353
+ if (choiceOrgId) {
354
+ this.params.filid = choiceOrgId;
355
+ }
356
+ }
357
+ if (val == 5 || val == 6) {
358
+ this.params.filid = this.orgId;
359
+ this.params.deptid = this.orgId;
360
+ if (choiceDeptId) {
361
+ this.params.deptid = choiceDeptId;
362
+ }
363
+ if (choiceOrgId) {
364
+ this.params.filid = choiceOrgId;
365
+ }
366
+ }
367
+ if (val == 15 || val == 16) {
368
+ this.params.filid = this.orgId;
369
+ if (pOrgId) {
370
+ this.params.filid = pOrgId;
371
+ }
372
+ }
373
+ },
374
+ isMultiple() {
375
+ let orgId = this.orgId;
376
+ if (this.configInfo.selectPersonValue == 1) {
377
+ this.multiple = false;
378
+ this.params.filid = orgId;
379
+ } else if (this.configInfo.selectPersonValue == 2) {
380
+ this.multiple = true;
381
+ this.params.filid = orgId;
382
+ } else if (this.configInfo.selectPersonValue == 3) {
383
+ this.multiple = false;
384
+ this.params.filid = 'all';
385
+ } else if (this.configInfo.selectPersonValue == 4) {
386
+ this.multiple = true;
387
+ this.params.filid = 'all';
388
+ } else if (this.configInfo.selectPersonValue == 5) {
389
+ this.multiple = false;
390
+ this.params.filid = '';
391
+ } else if (this.configInfo.selectPersonValue == 6) {
392
+ this.multiple = true;
393
+ this.params.filid = '';
394
+ }
395
+ },
396
+ handleSelectCheck(val, data) {
397
+ let { userIds, userNames } = data;
398
+ if (val) {
399
+ let newUserIds = userIds.split(',');
400
+ let newUserNames = userNames.split(',');
401
+ newUserIds.map((item, index) => {
402
+ this.nextNode.nextUser.push(item);
403
+ this.userOptions.push({ id: item, name: newUserNames[index] });
404
+
405
+ this.selectUserList.push({
406
+ showid: item,
407
+ showname: newUserNames[index]
408
+ });
409
+ });
410
+ // this.selectUserList = this.newSelectUserList
411
+ } else {
412
+ let newUserIds = userIds.split(',');
413
+ for (let i = 0; i < this.nextNode.nextUser.length; i++) {
414
+ for (let j = 0; j < newUserIds.length; j++) {
415
+ if (this.nextNode.nextUser[i] == newUserIds[j]) {
416
+ this.nextNode.nextUser.splice(i, 1);
417
+ }
418
+ }
419
+ }
420
+ for (let z = 0; z < this.userOptions.length; z++) {
421
+ for (let x = 0; x < newUserIds.length; x++) {
422
+ if (this.userOptions[z].id == newUserIds[x]) {
423
+ this.userOptions.splice(z, 1);
424
+ this.selectUserList.splice(z, 1);
425
+ }
426
+ }
427
+ }
428
+ // this.newSelectUserList = this.selectUserList
429
+ }
430
+ },
431
+ toStartTaskRead() {
432
+ let params = {
433
+ url: toStartTaskRead,
434
+ params: {
435
+ pendingId: this.pendingId,
436
+ taskAction: this.type,
437
+ ...this.param
438
+ }
439
+ };
440
+ if (this.typeCode == 'read') {
441
+ delete params.params.pendingId;
442
+ // params.params.appid = this.resetAppId;
443
+ }
444
+ if (this.type != 'taskReadAndEnd') delete params.params.taskAction;
445
+ util
446
+ .ajax(params)
447
+ .then((res) => {
448
+ const { status, data } = res;
449
+ if (status === 'success') {
450
+ this.configInfo = data;
451
+ this.isMultiple();
452
+ }
453
+ })
454
+ .catch((err) => {
455
+ this.loading = false;
456
+ if (err.message && err.message !== 'canceled') {
457
+ this.$message.error(err.message);
458
+ }
459
+ });
460
+ },
461
+ changeSelectUser(val, type) {
462
+ const { nextUser, options, mixList } = val;
463
+ this.nextNode[type] = nextUser;
464
+ this.mixList = mixList;
465
+ options.map((item) => {
466
+ this.newSelectUserList.push({
467
+ showname: item.showname,
468
+ showid: item.showid
469
+ });
470
+ });
471
+ },
472
+ getNodeType() {
473
+ util
474
+ .ajax({
475
+ url: findCodeValues,
476
+ params: {
477
+ ccCode: 'notification_type',
478
+ userId: util.getStorage('userId')
479
+ }
480
+ })
481
+ .then((res) => {
482
+ const { status, data } = res;
483
+ if (status === 'success') {
484
+ this.noticeList = data;
485
+ let arr = [];
486
+ this.noticeList.map((item) => {
487
+ this.nextNode.noticeType.map((x) => {
488
+ if (x == item.cciValue) {
489
+ arr.push(x);
490
+ }
491
+ });
492
+ });
493
+ this.nextNode.noticeType = arr;
494
+ }
495
+ })
496
+ .catch((err) => {
497
+ this.loading = false;
498
+ if (err.message && err.message !== 'canceled') {
499
+ this.$message.error(err.message);
500
+ }
501
+ });
502
+ },
503
+ // 转办提交
504
+ subTaskTransfer() {
505
+ const { choiceDeptId, choiceOrgId, bCode, bName } = this.taskExamine;
506
+ const { opinion, pendingId, nextNode, newsNoice, multiple, type } = this;
507
+ let params = {
508
+ url: taskTransfer,
509
+ data: {
510
+ choiceDeptId,
511
+ choiceOrgId,
512
+ bCode,
513
+ bName,
514
+ nextUserId:
515
+ multiple && type != 'transfer'
516
+ ? nextNode.nextUser.join(',')
517
+ : nextNode.nextUser,
518
+ opinion,
519
+ pendingId,
520
+ notificationType: nextNode.noticeType.join(','),
521
+ notificationMsg: newsNoice
522
+ },
523
+ headers: { Accept: 'application/json,text/plain' },
524
+ method: 'post'
525
+ };
526
+ util
527
+ .ajax(params)
528
+ .then((res) => {
529
+ const { message, status } = res;
530
+ if (status === 'success') {
531
+ this.simpleTips && this.$message.success('操作成功');
532
+ this.quit(true);
533
+ } else {
534
+ this.$message.error(message || '系统错误,请联系管理员!');
535
+ }
536
+ this.loading = false;
537
+ })
538
+ .catch((err) => {
539
+ this.loading = false;
540
+ if (err.message && err.message !== 'canceled') {
541
+ this.$message.error(err.message);
542
+ }
543
+ });
544
+ },
545
+ // 提交表单
546
+ submit(formName) {
547
+ this.$refs[formName].validate((valid) => {
548
+ if (valid) {
549
+ if (!this.option && this.isOpinionRequired === 1) {
550
+ this.$message.warning('请选择输入审批意见');
551
+ return;
552
+ }
553
+ // let nextUser = [];
554
+ // this.nextNode.nextUser.map(item => {
555
+ // nextUser.push(item);
556
+ // });
557
+ let noticeType = '';
558
+ noticeType = this.nextNode.noticeType.join(',');
559
+ this.loading = true;
560
+ if (this.type === 'transfer') {
561
+ this.subTaskTransfer();
562
+ } else {
563
+ const {
564
+ appId,
565
+ businessId,
566
+ bCode,
567
+ bName,
568
+ choiceDeptId,
569
+ choiceOrgId,
570
+ businessName,
571
+ processDefinitionId
572
+ } = this.taskExamine;
573
+ let params = {
574
+ ...this.nextNode,
575
+ bCode,
576
+ bName,
577
+ appId,
578
+ businessId: businessId || this.param.businessId,
579
+ choiceDeptId,
580
+ choiceOrgId,
581
+ businessName,
582
+ processDefinitionId,
583
+ currentOrgProcessKey:
584
+ processDefinitionId || this.param.currentOrgProcessKey,
585
+ pendingId: this.pendingId,
586
+ opinion: this.option, // 审批意见
587
+ userId: util.getStorage('userId'),
588
+ nextReadUserId: this.mixList.join('|'),
589
+ notificationType: noticeType,
590
+ notificationMsg: this.newsNoice,
591
+ taskAction: this.type
592
+ // nextNodeId: this.form.nextNodeId
593
+ };
594
+ delete params.nextUser;
595
+ delete params.noticeType;
596
+ const { fyDoresult, fyeh, download, isCdjxjTaskHandle } =
597
+ this.configInfo;
598
+ fyDoresult != 'true' && delete params.showDoresult;
599
+ fyeh != 'true' && delete params.isInHistory;
600
+ !download && delete params.isDownload;
601
+ isCdjxjTaskHandle == 'true' && delete params.noticeType;
602
+ if (this.readParams) {
603
+ params = { ...params, ...this.readParams };
604
+ }
605
+ util
606
+ .ajax({
607
+ url: taskReadHtml,
608
+ params: { taskAction: this.type },
609
+ headers: {
610
+ Accept: 'application/json,text/plain'
611
+ },
612
+ method: 'post',
613
+ data: params
614
+ })
615
+ .then((res) => {
616
+ const { message, status } = res;
617
+ this.loading = false;
618
+ if (status === 'success') {
619
+ this.simpleTips && this.$message.success('操作成功');
620
+ this.quit(true);
621
+ } else {
622
+ this.$message.error(message || '系统错误,请联系管理员!');
623
+ }
624
+ })
625
+ .catch((err) => {
626
+ this.loading = false;
627
+ if (err.message && err.message !== 'canceled') {
628
+ this.$message.error(err.message);
629
+ }
630
+ });
631
+ }
632
+ } else {
633
+ return false;
634
+ }
635
+ });
636
+ },
637
+ quit(val) {
638
+ if (val === true) return this.$emit('cancel', this.type);
639
+ this.$emit('cancel');
640
+ },
641
+
642
+ getFind() {
643
+ this.loading = true;
644
+ util
645
+ .ajax({
646
+ url: findSysCodes
647
+ })
648
+ .then((res) => {
649
+ const { status, message, data } = res;
650
+ this.loading = false;
651
+ if (status === 'success') {
652
+ this.nextNode.noticeType = message.split(',');
653
+ if (data) {
654
+ this.notificationMessageReadOnly =
655
+ data.notificationMessageReadOnly;
656
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
657
+ }
658
+ } else {
659
+ this.$message.error(message || '系统错误,请联系管理员!');
660
+ }
661
+ this.getNodeType();
662
+ if (this.type === 'transfer') {
663
+ this.toTaskTransfer();
664
+ } else if (!this.readParams) {
665
+ this.toStartTaskRead();
666
+ }
667
+ })
668
+ .catch((err) => {
669
+ this.loading = false;
670
+ if (err.message && err.message !== 'canceled') {
671
+ this.$message.error(err.message);
672
+ }
673
+ });
674
+ }
675
+ }
676
+ };
677
+ </script>