eoss-ui 0.6.88 → 0.6.89

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 (249) hide show
  1. package/lib/calogin.js +233 -233
  2. package/lib/eoss-ui.common.js +863 -845
  3. package/lib/flow-list.js +81 -81
  4. package/lib/flow.js +294 -291
  5. package/lib/index.js +1 -1
  6. package/lib/main.js +132 -132
  7. package/lib/qr-code.js +13 -13
  8. package/lib/selector.js +99 -84
  9. package/lib/theme-chalk/index.css +1 -1
  10. package/lib/theme-chalk/selector.css +1 -1
  11. package/package.json +160 -160
  12. package/packages/button/index.js +5 -5
  13. package/packages/button/src/main.vue +418 -418
  14. package/packages/button-group/index.js +5 -5
  15. package/packages/button-group/src/main.vue +298 -298
  16. package/packages/calendar/index.js +5 -5
  17. package/packages/calogin/index.js +5 -5
  18. package/packages/calogin/src/main.vue +412 -412
  19. package/packages/calogin/src/plugin.js +915 -915
  20. package/packages/card/index.js +5 -5
  21. package/packages/card/src/main.vue +156 -156
  22. package/packages/cascader/index.js +5 -5
  23. package/packages/cascader/src/main.vue +168 -168
  24. package/packages/checkbox-group/index.js +5 -5
  25. package/packages/checkbox-group/src/main.vue +333 -333
  26. package/packages/clients/index.js +5 -5
  27. package/packages/clients/src/main.vue +151 -151
  28. package/packages/data-table/index.js +5 -5
  29. package/packages/data-table/src/children.vue +39 -39
  30. package/packages/data-table/src/column.vue +990 -990
  31. package/packages/data-table/src/main.vue +1822 -1822
  32. package/packages/data-table/src/sizer.vue +195 -195
  33. package/packages/data-table-form/index.js +5 -5
  34. package/packages/data-table-form/src/checkbox.vue +101 -101
  35. package/packages/data-table-form/src/colgroup.vue +17 -17
  36. package/packages/data-table-form/src/main.vue +181 -181
  37. package/packages/data-table-form/src/radio.vue +65 -65
  38. package/packages/data-table-form/src/table.vue +233 -233
  39. package/packages/data-table-form/src/tbody.vue +336 -336
  40. package/packages/data-table-form/src/thead.vue +68 -68
  41. package/packages/date-picker/index.js +5 -5
  42. package/packages/date-picker/src/main.vue +236 -236
  43. package/packages/dialog/index.js +5 -5
  44. package/packages/enable-drag/index.js +5 -5
  45. package/packages/enterprise/index.js +5 -5
  46. package/packages/enterprise/src/main.vue +66 -66
  47. package/packages/error-page/index.js +5 -5
  48. package/packages/error-page/src/main.vue +44 -44
  49. package/packages/flow/index.js +5 -5
  50. package/packages/flow/src/component/Circulate.vue +400 -400
  51. package/packages/flow/src/component/CommonOpinions.vue +364 -364
  52. package/packages/flow/src/component/CustomPreset.vue +322 -322
  53. package/packages/flow/src/component/FileList.vue +99 -99
  54. package/packages/flow/src/component/Preset.vue +255 -255
  55. package/packages/flow/src/component/SendMsg.vue +241 -241
  56. package/packages/flow/src/component/TimeLimit.vue +190 -190
  57. package/packages/flow/src/component/taskUnionExamine.vue +640 -640
  58. package/packages/flow/src/form.vue +121 -121
  59. package/packages/flow/src/freeStartFlow.vue +2844 -2844
  60. package/packages/flow/src/main.vue +3657 -3657
  61. package/packages/flow/src/processForm.vue +1245 -1245
  62. package/packages/flow/src/processReject.vue +296 -296
  63. package/packages/flow/src/reset.vue +918 -918
  64. package/packages/flow/src/selectUser.vue +1 -1
  65. package/packages/flow/src/startTaskRead.vue +684 -684
  66. package/packages/flow/src/supervise.vue +152 -152
  67. package/packages/flow/src/table.vue +58 -58
  68. package/packages/flow-group/index.js +5 -5
  69. package/packages/flow-group/src/main.vue +692 -692
  70. package/packages/flow-list/index.js +5 -5
  71. package/packages/flow-list/src/main.vue +1770 -1770
  72. package/packages/form/index.js +5 -5
  73. package/packages/form/src/main.vue +3814 -3814
  74. package/packages/form/src/table.vue +1508 -1508
  75. package/packages/handle-user/index.js +5 -5
  76. package/packages/handle-user/src/main.vue +138 -138
  77. package/packages/handler/index.js +5 -5
  78. package/packages/handler/src/main.vue +493 -493
  79. package/packages/icon/index.js +5 -5
  80. package/packages/icon/src/main.vue +101 -101
  81. package/packages/icons/index.js +5 -5
  82. package/packages/icons/src/main.vue +81 -81
  83. package/packages/input/index.js +5 -5
  84. package/packages/input/src/main.vue +356 -356
  85. package/packages/input-number/index.js +5 -5
  86. package/packages/input-number/src/main.vue +106 -106
  87. package/packages/label/index.js +5 -5
  88. package/packages/label/src/main.vue +457 -457
  89. package/packages/layout/index.js +5 -5
  90. package/packages/layout/src/item.vue +152 -152
  91. package/packages/layout/src/main.vue +31 -31
  92. package/packages/login/index.js +5 -5
  93. package/packages/login/src/main.vue +1998 -1998
  94. package/packages/login/src/resetPassword.vue +562 -562
  95. package/packages/main/index.js +5 -5
  96. package/packages/main/src/default/message.vue +249 -249
  97. package/packages/main/src/default/notice.vue +157 -157
  98. package/packages/main/src/default/userinfo.vue +503 -503
  99. package/packages/main/src/public/online.vue +89 -89
  100. package/packages/main/src/public/search.vue +458 -458
  101. package/packages/main/src/public/settings.vue +221 -221
  102. package/packages/main/src/simplicity/apps.vue +388 -388
  103. package/packages/main/src/simplicity/avatar.vue +82 -82
  104. package/packages/main/src/simplicity/handler.vue +259 -259
  105. package/packages/main/src/simplicity/index.vue +2102 -2102
  106. package/packages/main/src/simplicity/lists.vue +84 -84
  107. package/packages/main/src/simplicity/menu-list.vue +135 -135
  108. package/packages/main/src/simplicity/message.vue +259 -259
  109. package/packages/main/src/simplicity/notice.vue +190 -190
  110. package/packages/main/src/simplicity/router-page.vue +45 -45
  111. package/packages/main/src/simplicity/sub-menu.vue +264 -264
  112. package/packages/main/src/simplicity/user.vue +260 -260
  113. package/packages/main/src/simplicity/userinfo.vue +308 -308
  114. package/packages/menu/index.js +5 -5
  115. package/packages/menu/src/main.vue +584 -584
  116. package/packages/nav/index.js +5 -5
  117. package/packages/nav/src/main.vue +351 -351
  118. package/packages/notify/index.js +5 -5
  119. package/packages/notify/src/main.vue +538 -538
  120. package/packages/page/index.js +5 -5
  121. package/packages/page/src/main.vue +167 -167
  122. package/packages/pagination/index.js +5 -5
  123. package/packages/pagination/src/main.vue +96 -96
  124. package/packages/player/index.js +5 -5
  125. package/packages/player/src/main.vue +194 -194
  126. package/packages/qr-code/index.js +5 -5
  127. package/packages/qr-code/src/main.vue +170 -170
  128. package/packages/radio-group/index.js +6 -6
  129. package/packages/radio-group/src/main.vue +319 -319
  130. package/packages/retrial-auth/index.js +5 -5
  131. package/packages/retrial-auth/src/main.vue +280 -280
  132. package/packages/select/index.js +5 -5
  133. package/packages/select/src/main.vue +778 -778
  134. package/packages/select-ganged/index.js +5 -5
  135. package/packages/select-ganged/src/main.vue +724 -724
  136. package/packages/selector/index.js +5 -5
  137. package/packages/selector/src/main.vue +747 -745
  138. package/packages/selector-panel/index.js +5 -5
  139. package/packages/selector-panel/src/main.vue +1027 -1027
  140. package/packages/selector-panel/src/selection.vue +170 -170
  141. package/packages/selector-panel/src/tree.vue +129 -129
  142. package/packages/sizer/index.js +5 -5
  143. package/packages/sizer/src/main.vue +254 -254
  144. package/packages/steps/index.js +5 -5
  145. package/packages/steps/src/main.vue +181 -181
  146. package/packages/switch/index.js +5 -5
  147. package/packages/switch/src/main.vue +154 -154
  148. package/packages/table-form/index.js +5 -5
  149. package/packages/tabs/index.js +5 -5
  150. package/packages/tabs/src/main.vue +788 -788
  151. package/packages/tabs-panel/index.js +5 -5
  152. package/packages/tabs-panel/src/main.vue +29 -29
  153. package/packages/theme-chalk/lib/index.css +1 -1
  154. package/packages/theme-chalk/lib/selector.css +1 -1
  155. package/packages/theme-chalk/src/base.scss +261 -261
  156. package/packages/theme-chalk/src/button-group.scss +176 -176
  157. package/packages/theme-chalk/src/button.scss +24 -24
  158. package/packages/theme-chalk/src/calendar.scss +113 -113
  159. package/packages/theme-chalk/src/card.scss +99 -99
  160. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  161. package/packages/theme-chalk/src/clients.scss +87 -87
  162. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  163. package/packages/theme-chalk/src/data-table.scss +293 -293
  164. package/packages/theme-chalk/src/date-picker.scss +7 -7
  165. package/packages/theme-chalk/src/dialog.scss +77 -77
  166. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  167. package/packages/theme-chalk/src/enterprise.scss +5 -5
  168. package/packages/theme-chalk/src/error-page.scss +18 -18
  169. package/packages/theme-chalk/src/flow-group.scss +110 -110
  170. package/packages/theme-chalk/src/flow-list.scss +39 -39
  171. package/packages/theme-chalk/src/flow.scss +348 -348
  172. package/packages/theme-chalk/src/form.scss +499 -499
  173. package/packages/theme-chalk/src/handle-user.scss +40 -40
  174. package/packages/theme-chalk/src/handler.scss +143 -143
  175. package/packages/theme-chalk/src/icon.scss +1817 -1817
  176. package/packages/theme-chalk/src/icons.scss +99 -99
  177. package/packages/theme-chalk/src/input.scss +9 -9
  178. package/packages/theme-chalk/src/label.scss +24 -24
  179. package/packages/theme-chalk/src/layout.scss +46 -46
  180. package/packages/theme-chalk/src/login.scss +984 -984
  181. package/packages/theme-chalk/src/main.scss +663 -663
  182. package/packages/theme-chalk/src/menu.scss +222 -222
  183. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  184. package/packages/theme-chalk/src/nav.scss +111 -111
  185. package/packages/theme-chalk/src/page.scss +3 -3
  186. package/packages/theme-chalk/src/pagination.scss +29 -29
  187. package/packages/theme-chalk/src/player.scss +9 -9
  188. package/packages/theme-chalk/src/qr-code.scss +17 -17
  189. package/packages/theme-chalk/src/radio-group.scss +9 -9
  190. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  191. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  192. package/packages/theme-chalk/src/select.scss +8 -8
  193. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  194. package/packages/theme-chalk/src/selector.scss +92 -91
  195. package/packages/theme-chalk/src/simplicity.scss +1355 -1355
  196. package/packages/theme-chalk/src/sizer.scss +36 -36
  197. package/packages/theme-chalk/src/steps.scss +88 -88
  198. package/packages/theme-chalk/src/switch.scss +3 -3
  199. package/packages/theme-chalk/src/table-form.scss +1 -1
  200. package/packages/theme-chalk/src/tabs.scss +87 -87
  201. package/packages/theme-chalk/src/tips.scss +7 -7
  202. package/packages/theme-chalk/src/toolbar.scss +179 -179
  203. package/packages/theme-chalk/src/tree-group.scss +72 -72
  204. package/packages/theme-chalk/src/tree.scss +165 -165
  205. package/packages/theme-chalk/src/upload.scss +172 -172
  206. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  207. package/packages/tips/index.js +5 -5
  208. package/packages/tips/src/main.vue +141 -141
  209. package/packages/toolbar/index.js +5 -5
  210. package/packages/toolbar/src/main.vue +430 -430
  211. package/packages/tree/index.js +5 -5
  212. package/packages/tree-group/index.js +5 -5
  213. package/packages/upload/index.js +5 -5
  214. package/packages/upload/src/main.vue +1348 -1348
  215. package/packages/upload/src/picture.js +15 -15
  216. package/packages/wujie/index.js +5 -5
  217. package/packages/wujie/src/main.vue +145 -145
  218. package/packages/wxlogin/index.js +5 -5
  219. package/packages/wxlogin/src/main.vue +128 -128
  220. package/src/config/api.js +294 -294
  221. package/src/config/image.js +2 -2
  222. package/src/index.js +163 -163
  223. package/src/utils/bus.js +3 -3
  224. package/src/utils/date-util.js +312 -312
  225. package/src/utils/http.js +50 -50
  226. package/src/utils/rules.js +18 -18
  227. package/src/utils/store.js +21 -21
  228. package/src/utils/webSocket.js +107 -107
  229. package/packages/.DS_Store +0 -0
  230. package/packages/autocomplete/.DS_Store +0 -0
  231. package/packages/calogin/.DS_Store +0 -0
  232. package/packages/date-picker/.DS_Store +0 -0
  233. package/packages/date-picker/src/.DS_Store +0 -0
  234. package/packages/flow/.DS_Store +0 -0
  235. package/packages/flow/src/.DS_Store +0 -0
  236. package/packages/flow-list/.DS_Store +0 -0
  237. package/packages/form/.DS_Store +0 -0
  238. package/packages/login/.DS_Store +0 -0
  239. package/packages/main/.DS_Store +0 -0
  240. package/packages/main/src/.DS_Store +0 -0
  241. package/packages/menu/.DS_Store +0 -0
  242. package/packages/scrollbar/.DS_Store +0 -0
  243. package/packages/select/.DS_Store +0 -0
  244. package/packages/selector/.DS_Store +0 -0
  245. package/packages/selector-panel/.DS_Store +0 -0
  246. package/packages/theme-chalk/src/.DS_Store +0 -0
  247. package/packages/upload/.DS_Store +0 -0
  248. package/src/.DS_Store +0 -0
  249. package/src/utils/.DS_Store +0 -0
@@ -1,918 +1,918 @@
1
- <template>
2
- <div
3
- v-loading="loading"
4
- class="es-flow-form"
5
- element-loading-text="加载中..."
6
- element-loading-spinner="el-icon-loading"
7
- element-loading-background="rgba(255, 255,255, 0.8)"
8
- style="height: 100%"
9
- >
10
- <el-form
11
- ref="nextNode"
12
- :model="nextNode"
13
- class="es-reset-flow demo-dynamic"
14
- label-width="100px"
15
- label-position="left"
16
- >
17
- <div class="es-reset-flow-form-box">
18
- <el-form-item prop="nodeName" label="标题">
19
- <el-input v-model="pendtitle" disabled />
20
- </el-form-item>
21
- <el-form-item prop="nodeName" label="当前步骤">
22
- <el-input v-model="nextNode.nodeName" disabled />
23
- </el-form-item>
24
- <el-form-item prop="newOpinion" label="意见">
25
- <CommonOpinions class="opinions" :rows="3" @change="changeOpinion" />
26
- </el-form-item>
27
- <el-form-item
28
- prop="nextNode"
29
- label="下步节点"
30
- :rules="[
31
- { required: true, message: `请选择下步节点`, trigger: 'blur' }
32
- ]"
33
- >
34
- <el-select
35
- v-if="nextNodeCheckType == 'select'"
36
- v-model="nextNode.nextNode"
37
- :placeholder="`请选择下步节点`"
38
- @change="changeSel"
39
- >
40
- <el-option
41
- v-for="items in nextNode.nodeInfo"
42
- :key="items.nodeId"
43
- :label="items.nodeName"
44
- :value="items.nodeId"
45
- ></el-option>
46
- </el-select>
47
- <es-radio-group
48
- v-else-if="nextNodeCheckType == 'radio'"
49
- v-model="nextNode.nextNode"
50
- :data="nextNode.nodeInfo"
51
- @change="changeSel"
52
- value-key="nodeId"
53
- label-key="nodeName"
54
- ></es-radio-group>
55
- </el-form-item>
56
- <el-form-item
57
- v-if="countersignaturetypeCode != 0"
58
- prop="countersignaturetypeText"
59
- label="处理方式"
60
- >
61
- <el-input
62
- v-model="nextNode.countersignaturetypeText"
63
- placeholder="请输入内容"
64
- disabled
65
- />
66
- </el-form-item>
67
- <el-form-item prop="nextNode" label="办理角色" v-if="showRoleUser">
68
- <SelectUser
69
- :nextUser="nextNode.nextRoleId"
70
- :radioList="radioList"
71
- :multiple="multiple"
72
- :isCustomUser="isCustomUser"
73
- :options="options"
74
- :presetEdit="presetEdit"
75
- :isDefSelectedObj="isDefSelectedObj"
76
- :selectUserList="selectUserList"
77
- @change="changeSelectUser"
78
- :types="nextUserTypes"
79
- :params="params"
80
- />
81
- </el-form-item>
82
- <!-- showRoleUser -->
83
- <el-form-item
84
- v-if="
85
- !showRoleUser &&
86
- nodeInfoExtAttr.nodeType != 1 &&
87
- nodeInfoExtAttr.nodeType != 2
88
- "
89
- :prop="isShowNextUser ? 'nextUser' : 'nextOrgId'"
90
- :label="isShowNextUser ? '下步办理人' : '办理对象'"
91
- >
92
- <SelectUser
93
- :nextUser="isShowNextUser ? nextNode.nextUser : nextNode.nextOrgId"
94
- :radioList="radioList"
95
- :multiple="multiple"
96
- :isCustomUser="!isShowNextUser ? 1 : isCustomUser"
97
- :options="options"
98
- :presetEdit="presetEdit"
99
- :mix="multiple"
100
- :isDefSelectedObj="isDefSelectedObj"
101
- :selectUserList="selectUserList"
102
- @change="
103
- changeSelectUser(
104
- $event,
105
- isShowNextUser ? 'nextUser' : 'nextOrgId'
106
- )
107
- "
108
- :types="
109
- !isShowNextUser
110
- ? nextUserTypes
111
- : isCdjxjTaskHandle != 'true'
112
- ? ['employee', 'persongroup']
113
- : ['employee']
114
- "
115
- :params="isShowNextUser ? params : {}"
116
- :tabs="nextUserTabs"
117
- />
118
- </el-form-item>
119
- <el-form-item
120
- prop="nextReadUserId"
121
- v-if="isTaskread == 1"
122
- label="
123
- 分阅用户
124
- "
125
- >
126
- <SelectUser
127
- :nextUser="nextNode.nextReadUserId"
128
- :multiple="true"
129
- :selectUserList="selectReadUserList"
130
- :options="userOptions"
131
- title="分阅用户"
132
- :mix="true"
133
- :types="types"
134
- @change="changeSelectReadUser($event, 'nextReadUserId')"
135
- :tabs="tabs"
136
- />
137
- </el-form-item>
138
- <el-form-item
139
- prop="presetReadUserId"
140
- v-if="canPresetRead"
141
- label="
142
- 自动分阅
143
- "
144
- >
145
- <SelectUser
146
- :nextUser="nextNode.presetReadUserId"
147
- :multiple="true"
148
- :selectUserList="selectPresetUserList"
149
- :options="presetOptions"
150
- title="分阅用户"
151
- :radioList="presetReadUserId"
152
- :presetEdit="1"
153
- :mix="true"
154
- :types="types"
155
- @change="changeSelectReadUser($event, 'presetReadUserId')"
156
- :tabs="tabs"
157
- />
158
- </el-form-item>
159
- <el-form-item
160
- v-if="isHandleExplain == 1"
161
- prop="handleExplain"
162
- label="办理说明"
163
- >
164
- <el-input
165
- placeholder="请输入办理说明"
166
- v-model="nextNode.handleExplain"
167
- />
168
- </el-form-item>
169
- <el-form-item prop="noticeType" label="通知方式">
170
- <el-checkbox-group
171
- v-if="showNoticeType"
172
- v-model="nextNode.noticeType"
173
- >
174
- <el-checkbox
175
- v-for="item of nextNode.noticeList"
176
- :key="item.cciValue"
177
- :label="item.cciValue"
178
- :disabled="
179
- readOnlyNotificationType
180
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
181
- : false
182
- "
183
- >
184
- {{ item.shortName }}
185
- </el-checkbox>
186
- </el-checkbox-group>
187
- </el-form-item>
188
- <el-form-item
189
- v-show="nextNode.noticeType.length != 0"
190
- prop="nextNode"
191
- label="通知消息"
192
- >
193
- <es-input
194
- style="
195
- border-color: #ccc;
196
- padding: 5px;
197
- border-radius: 5px;
198
- font-size: 13px;
199
- "
200
- type="textarea"
201
- v-model="nextNode.noticeInfo"
202
- :readonly="notificationMessageReadOnly"
203
- />
204
- </el-form-item>
205
- </div>
206
- <el-form-item style="margin-bottom: 0px">
207
- <div style="text-align: right">
208
- <el-button
209
- type="primary"
210
- size="small"
211
- @click="subProcess('nextNode')"
212
- >
213
- 确认
214
- </el-button>
215
- <el-button size="small" @click="quit"> 取消 </el-button>
216
- </div>
217
- </el-form-item>
218
- </el-form>
219
- </div>
220
- </template>
221
-
222
- <script>
223
- import {
224
- toResetProcessIndex,
225
- toTaskContinuationIndex,
226
- taskContinuation,
227
- getNodeInfo,
228
- findSysCodes,
229
- getNotificationMsg,
230
- findCodeValues,
231
- loginUserInfo,
232
- resetProcess
233
- } from 'eoss-ui/src/config/api';
234
- import util from 'eoss-ui/src/utils/util';
235
- import SelectUser from './selectUser.vue';
236
- import CommonOpinions from './component/CommonOpinions.vue';
237
- export default {
238
- name: 'resetForm',
239
-
240
- components: {
241
- [Option.name]: Option,
242
- [SelectUser.name]: SelectUser,
243
- [CommonOpinions.name]: CommonOpinions
244
- },
245
- props: {
246
- flowParams: {
247
- type: Object,
248
- default: () => {}
249
- },
250
- subParams: {
251
- type: Object,
252
- default: () => {}
253
- },
254
- appId: {
255
- type: String,
256
- default: ''
257
- },
258
- type: { type: String }
259
- },
260
- data() {
261
- return {
262
- loading: false,
263
- isCustomUser: 0,
264
- selectUser: false,
265
- nextNodeCheckType: 'select',
266
- multiple: false,
267
- showNoticeType: false,
268
- readMultiple: true,
269
- customPresetHintMessage: '', //流程预设标题
270
- notificationMessageReadOnly: false,
271
- readOnlyNotificationType: '',
272
- show: true,
273
- radioList: [],
274
- activeNames: '',
275
- selectUserList: [],
276
- defaultNextNode: '',
277
- presetUserJson: [],
278
- isTaskread: 0, //是否显示分阅用户
279
- isHandleExplain: 0, //是否展示办理说明
280
- isOpinionRequired: 0,
281
- options: [],
282
- presetList: [],
283
- presetReadUserId: [], //自动分阅
284
- canPresetRead: false, //是否展示自动分阅
285
- nextUserTypes: ['employee', 'persongroup'],
286
- isSinglePage: false,
287
- presetEdit: 0,
288
- taskExamine: {},
289
- isDefSelectedObj: 0,
290
- isChooseNextNode: 0,
291
- isHideDefaultOperation: 0,
292
- countersignaturetypeCode: 0,
293
- presetTaskNodeKeyStr: '', //预设办理人顺序
294
- presetTaskNodeMap: {}, //预设办理人
295
- params: {
296
- filid: 'all', //选择范围(my:本单位/ "" or all:全部)
297
- selectmix: 'true1',
298
- deptid: '' //指定部门(my:本部门)
299
- },
300
- newOpinion: '',
301
- operationList: [],
302
- tabs: {
303
- employee: {
304
- param: {
305
- filid: JSON.parse(util.getStorage('mainConfig')).userModel
306
- .orgId,
307
- name: '本单位用户'
308
- }
309
- },
310
- department: {
311
- param: {
312
- filid: JSON.parse(util.getStorage('mainConfig')).userModel
313
- .orgId
314
- }
315
- }
316
- },
317
- userModel: {},
318
- nextUserTabs: {},
319
- selectPresetUserList: [],
320
- presetOptions: [],
321
- selectReadUserList: [],
322
- userOptions: [],
323
- mixReadList: [],
324
- mixPresetList: [],
325
- nodeInfoExtAttr: {},
326
- isCdjxjTaskHandle: '',
327
- isShowNextUser: true,
328
- showRoleUser: false,
329
- pendtitle: '',
330
- mixOrgIdList: [], //办理对象混选
331
- nextNode: {
332
- nodeName: '',
333
- newOpinion: '',
334
- countersignaturetypeText: '',
335
- nextNode: '',
336
- nextReadUserId: [],
337
- nextOrgId: [],
338
- noticeType: [],
339
- nextOperate: '1',
340
- nextUser: [],
341
- presetReadUserId: [], //自动分阅
342
- noticeInfo: '',
343
- nodeInfo: [],
344
- userInfo: [],
345
- handleExplain: '',
346
- noticeList: []
347
- }
348
- };
349
- },
350
- computed: {
351
- types() {
352
- if (this.isCdjxjTaskHandle == 'true') {
353
- return ['employee', 'enterprise', 'department'];
354
- } else {
355
- return ['employee', 'enterprise', 'department', 'persongroup'];
356
- }
357
- }
358
- },
359
- created() {
360
- this.getUserInfo();
361
- this.getResetFlow();
362
- },
363
- mounted() {},
364
- methods: {
365
- changeOpinion(val) {
366
- this.nextNode.newOpinion = val;
367
- },
368
- getUserInfo() {
369
- let mainConfig = util.getStorage('mainConfig');
370
- if (mainConfig) {
371
- this.userModel = JSON.parse(mainConfig).userModel;
372
- } else {
373
- util
374
- .ajax({ url: loginUserInfo })
375
- .then((res) => {
376
- const { status, data } = res;
377
- if (status == 'success') {
378
- this.userModel = data;
379
- } else {
380
- let msg = res.msg || '系统错误,请联系管理员!';
381
- this.$message.error(msg);
382
- }
383
- })
384
- .catch((err) => {
385
- if (err.message && err.message !== 'canceled') {
386
- this.$message.error(err.message);
387
- }
388
- });
389
- }
390
- },
391
- getIsShowNextUser(val) {
392
- if (
393
- val == 7 ||
394
- val == 8 ||
395
- val == 9 ||
396
- val == 10 ||
397
- val == 11 ||
398
- val == 12
399
- ) {
400
- this.isShowNextUser = false;
401
- //设置办理角色
402
- // $("#orgRoleCode").val(handleRoleId);
403
- if (val == 7 || val == 8) {
404
- this.nextUserTypes = ['department'];
405
- this.nextUserTabs = {
406
- department: {
407
- param: {
408
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
409
- }
410
- }
411
- };
412
- this.multiple = true;
413
- } else if (val == 9 || val == 10) {
414
- this.nextUserTypes = ['enterprise'];
415
- this.nextUserTabs = { enterprise: { param: { filid: 'other' } } };
416
- this.multiple = true;
417
- } else if (val == 11 || val == 12) {
418
- this.nextUserTypes = ['department', 'enterprise'];
419
- this.nextUserTabs = {
420
- enterprise: { param: { filid: 'other' } },
421
- department: {
422
- param: {
423
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
424
- }
425
- }
426
- };
427
- this.multiple = true;
428
- }
429
- }
430
- if (val == 7 || val == 9 || val == 11) {
431
- this.multiple = false;
432
- }
433
- },
434
- // 分阅是否多选
435
- isReadMultiple(nextReadUserSelectType) {
436
- if (nextReadUserSelectType == 1) {
437
- this.readMultiple = false;
438
- } else if (nextReadUserSelectType == 2) {
439
- this.readMultiple = true;
440
- } else if (nextReadUserSelectType == 3) {
441
- this.readMultiple = false;
442
- } else if (nextReadUserSelectType == 4) {
443
- this.readMultiple = true;
444
- } else if (nextReadUserSelectType == 5) {
445
- this.readMultiple = false;
446
- } else if (nextReadUserSelectType == 6) {
447
- this.readMultiple = true;
448
- }
449
- },
450
- changeSelectReadUser(val, type) {
451
- const { nextUser, mixList } = val;
452
- this.nextNode[type] = nextUser;
453
- if (type === 'presetReadUserId') {
454
- this.mixPresetList = mixList;
455
- } else {
456
- this.mixReadList = mixList;
457
- }
458
- },
459
- changeSelectUser(val, type) {
460
- const { nextUser, options, mixList } = val;
461
- this.nextNode[type] = nextUser;
462
- this.mixOrgIdList = mixList;
463
- },
464
- getNodeType() {
465
- util
466
- .ajax({
467
- url: findCodeValues,
468
- params: {
469
- ccCode: 'notification_type',
470
- userId: util.getStorage('userId')
471
- }
472
- })
473
- .then((res) => {
474
- const { status, data } = res;
475
- if (status === 'success') {
476
- this.nextNode.noticeList = data;
477
- this.getFind();
478
- }
479
- })
480
- .catch((err) => {
481
- this.loading = false;
482
- if (err.message && err.message !== 'canceled') {
483
- this.$message.error(err.message);
484
- }
485
- });
486
- },
487
- //获取通知信息
488
- getMessage() {
489
- let params = {
490
- processDefinitionId: this.processDefinitionId,
491
- nodeId: this.nextNode.nextNode,
492
- businessId: this.taskExamine.businessId
493
- };
494
- util
495
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
496
- .then((res) => {
497
- if (res.status === 'success') {
498
- this.nextNode.noticeInfo = res.message;
499
- }
500
- })
501
- .catch((err) => {
502
- this.loading = false;
503
- if (err.message && err.message !== 'canceled') {
504
- this.$message.error(err.message);
505
- }
506
- });
507
- },
508
- // 提交表单
509
- subProcess(formName) {
510
- this.saveProcess(formName);
511
- },
512
- saveProcess(formName) {
513
- this.$refs[formName].validate((valid) => {
514
- if (valid) {
515
- const {
516
- nextNode,
517
- nextUser,
518
- noticeInfo,
519
- noticeType,
520
- handleExplain,
521
- presetReadUserId,
522
- nextReadUserId,
523
- nextOrgId,
524
- nextRoleId,
525
- nextOperate,
526
- newOpinion
527
- } = this.nextNode;
528
- if (noticeType.length === 0) {
529
- return this.$message.warning('请选择通知方式');
530
- }
531
- if (
532
- this.nodeInfoExtAttr.nodeType != 1 &&
533
- this.nodeInfoExtAttr.nodeType != 2 &&
534
- !this.showRoleUser
535
- ) {
536
- if (this.isShowNextUser) {
537
- if (nextUser == '' || (this.multiple && nextUser.length == 0)) {
538
- return this.$message.warning('请选择下步办理人');
539
- }
540
- } else {
541
- if (nextOrgId == '' || (this.multiple && nextOrgId.length == 0)) {
542
- return this.$message.warning('请选择办理对象');
543
- }
544
- }
545
- }
546
- if (
547
- (this.showRoleUser && nextRoleId == '') ||
548
- (this.multiple && nextUser.length == 0)
549
- ) {
550
- return this.$message.warning('请选择办理角色');
551
- }
552
- if (this.isOpinionRequired && !this.newOpinion && !newOpinion) {
553
- return this.$message.warning('请选择输入审批意见');
554
- }
555
- this.loading = true;
556
- let newNextUser = [];
557
- if (this.multiple) {
558
- nextUser && nextUser.map((item) => newNextUser.push(item));
559
- }
560
- let newNoticeType = '';
561
- if (noticeType) {
562
- newNoticeType = noticeType.join(',');
563
- }
564
- let params = {
565
- processDefinitionId: this.processDefinitionId,
566
- nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
567
- nextNodeId: nextNode,
568
- appId:this.appId,
569
- nextOperate: nextOperate,
570
- businessId: this.taskExamine.businessId,
571
- pendingId: this.taskExamine.pendingId,
572
- notificationType: newNoticeType,
573
- userId: util.getStorage('userId'),
574
- notificationMsg: noticeInfo,
575
- customPresetUserJson: JSON.stringify(this.presetList),
576
- presetUserJson: JSON.stringify(this.presetUserJson),
577
- nextReadUserId: this.readMultiple
578
- ? this.mixReadList && this.mixReadList.join('|')
579
- : nextReadUserId,
580
- nextOrgId: !this.isShowNextUser
581
- ? this.multiple
582
- ? this.mixOrgIdList && this.mixOrgIdList.join('|')
583
- : nextOrgId
584
- : '',
585
- handleExplain: handleExplain,
586
- presetReadUserId:
587
- this.mixPresetList && this.mixPresetList.length > 0
588
- ? this.mixPresetList.join('|')
589
- : presetReadUserId.join(','),
590
- opinion: this.newOpinion || newOpinion,
591
- ...this.subParams
592
- };
593
- if (this.activeNames != '1') delete params.customPresetUserJson;
594
- util
595
- .ajax({
596
- url: this.type == 'reset' ? resetProcess : taskContinuation,
597
- method: 'post',
598
- data: params
599
- })
600
- .then((res) => {
601
- const { status, message } = res;
602
- this.loading = false;
603
- if (status === 'success') {
604
- this.quit(true);
605
- this.$message.success('操作成功');
606
- } else {
607
- this.$message.error(message || '系统错误,请联系管理员!');
608
- }
609
- })
610
- .catch((err) => {
611
- this.loading = false;
612
- if (err.message && err.message !== 'canceled') {
613
- this.$message.error(err.message);
614
- }
615
- });
616
- } else {
617
- return false;
618
- }
619
- });
620
- },
621
- getNodeInfos(nodeId, index) {
622
- let params = {
623
- processDefinitionId: this.processDefinitionId,
624
- nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
625
- businessId: this.taskExamine.businessId,
626
- pendingId: this.taskExamine.pendingId
627
- };
628
- util
629
- .ajax({ url: getNodeInfo, params })
630
- .then((res) => {
631
- const {
632
- status,
633
- message,
634
- data: {
635
- nextUserList,
636
- nodeExtAttr,
637
- countersignaturetypeText,
638
- countersignaturetypeCode
639
- }
640
- } = res;
641
- this.loading = false;
642
- if (status === 'success') {
643
- this.nextNode.userInfo = nextUserList;
644
- this.countersignaturetypeCode = countersignaturetypeCode;
645
- this.nextNode.countersignaturetypeText = countersignaturetypeText;
646
- this.isTaskread = nodeExtAttr.isTaskread;
647
- this.isHandleExplain = nodeExtAttr.isHandleExplain;
648
- this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
649
- this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
650
- this.nodeInfoExtAttr = nodeExtAttr;
651
- this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
652
-
653
- if (
654
- nodeExtAttr.userSelectionType == 7 ||
655
- nodeExtAttr.userSelectionType == 8 ||
656
- nodeExtAttr.userSelectionType == 9 ||
657
- nodeExtAttr.userSelectionType == 10 ||
658
- nodeExtAttr.userSelectionType == 11 ||
659
- nodeExtAttr.userSelectionType == 12
660
- ) {
661
- this.getIsShowNextUser(
662
- nodeExtAttr && nodeExtAttr.userSelectionType
663
- );
664
- } else if (
665
- nodeExtAttr.userSelectionType == 13 ||
666
- nodeExtAttr.userSelectionType == 14
667
- ) {
668
- this.showRoleUser = true;
669
- if (data.nextRole) {
670
- this.radioList = [
671
- { showid: data.nextRole.id, showname: data.nextRole.rolename }
672
- ];
673
- if (this.isDefSelectedObj == 1) {
674
- this.nextNode.nextRoleId.push(data.nextRole.id);
675
- this.selectUserList.push({
676
- showname: data.nextRole.rolename,
677
- showid: data.nextRole.id
678
- });
679
- }
680
- }
681
- } else {
682
- const { multiple, params } = this.isMultiple(
683
- nodeExtAttr.userSelectionType
684
- );
685
- this.multiple = multiple;
686
- this.params = params;
687
- }
688
- // this.isReadMultiple(nodeExtAttr.userSelectionType);
689
-
690
- nextUserList.map((item) => {
691
- if (
692
- this.multiple &&
693
- nodeExtAttr.isDefSelectedObj == 1 &&
694
- nextUserList !== undefined
695
- ) {
696
- this.nextNode.nextUser.push(item.userId);
697
- this.selectUserList.push({
698
- showname: item.username,
699
- showid: item.userId
700
- });
701
- }
702
-
703
- this.options.push({
704
- showname: item.username,
705
- showid: item.userId
706
- });
707
- });
708
- if (this.multiple) {
709
- this.nextNode.nextReadUserId = [];
710
- } else {
711
- this.nextNode.nextReadUserId = '';
712
- }
713
- if (
714
- nextUserList.length > 0 &&
715
- nodeExtAttr.isDefSelectedObj == 1 &&
716
- !this.multiple
717
- ) {
718
- this.nextNode.nextUser = nextUserList[0].userId;
719
- this.selectUserList.push({
720
- showname: nextUserList[0].username,
721
- showid: nextUserList[0].userId
722
- });
723
- }
724
- this.radioList = this.options;
725
- } else {
726
- this.$message.error(message || '系统错误,请联系管理员!');
727
- }
728
- nodeId && this.$refs.selectUser[index].changeInfo();
729
- })
730
- .catch((err) => {
731
- this.loading = false;
732
- if (err.message && err.message !== 'canceled') {
733
- this.$message.error(err.message);
734
- }
735
- });
736
- },
737
- changeSel(val) {
738
- this.nextNode.nextUser = [];
739
- this.options = [];
740
- this.selectUserList = [];
741
- this.radioList = [];
742
- this.loading = true;
743
- this.getNodeInfos();
744
- },
745
- // 取消
746
- quit(val) {
747
- if (val === true) return this.$emit('cancel', val);
748
- this.$emit('cancel', false);
749
- },
750
- getFind() {
751
- util
752
- .ajax({
753
- url: findSysCodes
754
- })
755
- .then((res) => {
756
- const { status, message } = res;
757
- if (status === 'success') {
758
- this.nextNode.noticeType = message.split(',');
759
- let arr = [];
760
- this.nextNode.noticeList.map((item) => {
761
- this.nextNode.noticeType.map((x) => {
762
- if (x == item.cciValue) {
763
- arr.push(x);
764
- }
765
- });
766
- });
767
- this.nextNode.noticeType = arr;
768
- this.showNoticeType = true;
769
- } else {
770
- this.$message.error(message || '系统错误,请联系管理员!');
771
- }
772
- })
773
- .catch((err) => {
774
- this.loading = false;
775
- if (err.message && err.message !== 'canceled') {
776
- this.$message.error(err.message);
777
- }
778
- });
779
- },
780
- /**
781
- * isMultiple
782
- * @desc:是否多选
783
- * @author liufan
784
- * @date 2022年9月13日
785
- **/
786
- isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
787
- let multiple = false;
788
- let params = {};
789
- if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
790
- multiple = true;
791
- }
792
- if (val == 1 || val == 2 || val == 5) {
793
- params.filid = this.userModel.orgId;
794
- params.only_filid = true;
795
- if (choiceOrgId) {
796
- params.filid = choiceOrgId;
797
- }
798
- }
799
- if (val == 5 || val == 6) {
800
- params.filid = this.userModel.orgId;
801
- params.deptid = this.userModel.orgId;
802
- if (choiceDeptId) {
803
- params.deptid = choiceDeptId;
804
- }
805
- if (choiceOrgId) {
806
- params.filid = choiceOrgId;
807
- }
808
- }
809
- if (val == 15 || val == 16) {
810
- params.filid = this.userModel.orgId;
811
- if (pOrgId) {
812
- params.filid = pOrgId;
813
- }
814
- }
815
- return { multiple, params };
816
- },
817
- getResetFlow() {
818
- let params = {
819
- url:
820
- this.type == 'continuation'
821
- ? toTaskContinuationIndex
822
- : toResetProcessIndex,
823
- params: {
824
- appId: this.appId,
825
- ...this.flowParams
826
- }
827
- };
828
- this.loading = true;
829
- // 获取节点
830
- util
831
- .ajax(params)
832
- .then((res) => {
833
- //pc接口返回数据处理
834
- this.loading = false;
835
- const { status, message, data } = res;
836
- if (status == 'success') {
837
- data.nextNodeCheckType &&
838
- (this.nextNodeCheckType = data.nextNodeCheckType);
839
- this.pendtitle = data.pendtitle || data.taskExamine.businessName;
840
- this.customPresetHintMessage = data.customPresetHintMessage;
841
- this.readOnlyNotificationType = data.readOnlyNotificationType;
842
- this.notificationMessageReadOnly =
843
- data.notificationMessageReadOnly == 'true';
844
- let flowList = [];
845
- if (data.taskNodeList && data.taskNodeList.length > 0) {
846
- for (let key in data.taskNodeList[0]) {
847
- flowList.push({
848
- nodeName: data.taskNodeList[0][key],
849
- nodeId: key
850
- });
851
- }
852
- } else {
853
- for (let key in data.taskNodeMap) {
854
- flowList.push({
855
- nodeName: data.taskNodeMap[key],
856
- nodeId: key
857
- });
858
- }
859
- }
860
-
861
- this.nextNode.nodeInfo = flowList;
862
- this.nextNode.nextNode = flowList[0].nodeId;
863
- this.taskExamine = data.taskExamine;
864
- this.processDefinitionId = data.taskExamine.processDefinitionId;
865
- this.isOpinionRequired =
866
- data.nodeInfoMap.nodeExtAttr.isOpinionRequired;
867
- this.isHideDefaultOperation =
868
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
869
- this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
870
- this.isChooseNextNode =
871
- data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
872
- this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
873
- this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
874
- this.presetTaskNodeMap = data.presetTaskNodeMap;
875
- this.isSinglePage = data.taskExamine.isSinglePage;
876
- this.isSinglePage &&
877
- (this.nextNode.opinion = data.taskExamine.opinion);
878
- // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
879
- this.nextNode.nodeName = data.taskExamine.nodeName;
880
- this.canPresetRead = data.canPresetRead;
881
- if (data.canPresetRead) {
882
- let ids =
883
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
884
- let names =
885
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
886
- ','
887
- );
888
- ids.map((item, index) => {
889
- this.presetReadUserId.push({
890
- showid: item,
891
- showname: names[index]
892
- });
893
- this.selectPresetUserList.push({
894
- showid: item,
895
- showname: names[index]
896
- });
897
- this.nextNode.presetReadUserId.push(item);
898
- });
899
- }
900
- this.getNodeInfos();
901
- // this.getPresetFlowInfo();
902
-
903
- this.getNodeType();
904
- this.getMessage();
905
- } else {
906
- this.$message.error(message || '系统错误,请联系管理员!');
907
- }
908
- })
909
- .catch((err) => {
910
- this.loading = false;
911
- if (err.message && err.message !== 'canceled') {
912
- this.$message.error(err.message);
913
- }
914
- });
915
- }
916
- }
917
- };
918
- </script>
1
+ <template>
2
+ <div
3
+ v-loading="loading"
4
+ class="es-flow-form"
5
+ element-loading-text="加载中..."
6
+ element-loading-spinner="el-icon-loading"
7
+ element-loading-background="rgba(255, 255,255, 0.8)"
8
+ style="height: 100%"
9
+ >
10
+ <el-form
11
+ ref="nextNode"
12
+ :model="nextNode"
13
+ class="es-reset-flow demo-dynamic"
14
+ label-width="100px"
15
+ label-position="left"
16
+ >
17
+ <div class="es-reset-flow-form-box">
18
+ <el-form-item prop="nodeName" label="标题">
19
+ <el-input v-model="pendtitle" disabled />
20
+ </el-form-item>
21
+ <el-form-item prop="nodeName" label="当前步骤">
22
+ <el-input v-model="nextNode.nodeName" disabled />
23
+ </el-form-item>
24
+ <el-form-item prop="newOpinion" label="意见">
25
+ <CommonOpinions class="opinions" :rows="3" @change="changeOpinion" />
26
+ </el-form-item>
27
+ <el-form-item
28
+ prop="nextNode"
29
+ label="下步节点"
30
+ :rules="[
31
+ { required: true, message: `请选择下步节点`, trigger: 'blur' }
32
+ ]"
33
+ >
34
+ <el-select
35
+ v-if="nextNodeCheckType == 'select'"
36
+ v-model="nextNode.nextNode"
37
+ :placeholder="`请选择下步节点`"
38
+ @change="changeSel"
39
+ >
40
+ <el-option
41
+ v-for="items in nextNode.nodeInfo"
42
+ :key="items.nodeId"
43
+ :label="items.nodeName"
44
+ :value="items.nodeId"
45
+ ></el-option>
46
+ </el-select>
47
+ <es-radio-group
48
+ v-else-if="nextNodeCheckType == 'radio'"
49
+ v-model="nextNode.nextNode"
50
+ :data="nextNode.nodeInfo"
51
+ @change="changeSel"
52
+ value-key="nodeId"
53
+ label-key="nodeName"
54
+ ></es-radio-group>
55
+ </el-form-item>
56
+ <el-form-item
57
+ v-if="countersignaturetypeCode != 0"
58
+ prop="countersignaturetypeText"
59
+ label="处理方式"
60
+ >
61
+ <el-input
62
+ v-model="nextNode.countersignaturetypeText"
63
+ placeholder="请输入内容"
64
+ disabled
65
+ />
66
+ </el-form-item>
67
+ <el-form-item prop="nextNode" label="办理角色" v-if="showRoleUser">
68
+ <SelectUser
69
+ :nextUser="nextNode.nextRoleId"
70
+ :radioList="radioList"
71
+ :multiple="multiple"
72
+ :isCustomUser="isCustomUser"
73
+ :options="options"
74
+ :presetEdit="presetEdit"
75
+ :isDefSelectedObj="isDefSelectedObj"
76
+ :selectUserList="selectUserList"
77
+ @change="changeSelectUser"
78
+ :types="nextUserTypes"
79
+ :params="params"
80
+ />
81
+ </el-form-item>
82
+ <!-- showRoleUser -->
83
+ <el-form-item
84
+ v-if="
85
+ !showRoleUser &&
86
+ nodeInfoExtAttr.nodeType != 1 &&
87
+ nodeInfoExtAttr.nodeType != 2
88
+ "
89
+ :prop="isShowNextUser ? 'nextUser' : 'nextOrgId'"
90
+ :label="isShowNextUser ? '下步办理人' : '办理对象'"
91
+ >
92
+ <SelectUser
93
+ :nextUser="isShowNextUser ? nextNode.nextUser : nextNode.nextOrgId"
94
+ :radioList="radioList"
95
+ :multiple="multiple"
96
+ :isCustomUser="!isShowNextUser ? 1 : isCustomUser"
97
+ :options="options"
98
+ :presetEdit="presetEdit"
99
+ :mix="multiple"
100
+ :isDefSelectedObj="isDefSelectedObj"
101
+ :selectUserList="selectUserList"
102
+ @change="
103
+ changeSelectUser(
104
+ $event,
105
+ isShowNextUser ? 'nextUser' : 'nextOrgId'
106
+ )
107
+ "
108
+ :types="
109
+ !isShowNextUser
110
+ ? nextUserTypes
111
+ : isCdjxjTaskHandle != 'true'
112
+ ? ['employee', 'persongroup']
113
+ : ['employee']
114
+ "
115
+ :params="isShowNextUser ? params : {}"
116
+ :tabs="nextUserTabs"
117
+ />
118
+ </el-form-item>
119
+ <el-form-item
120
+ prop="nextReadUserId"
121
+ v-if="isTaskread == 1"
122
+ label="
123
+ 分阅用户
124
+ "
125
+ >
126
+ <SelectUser
127
+ :nextUser="nextNode.nextReadUserId"
128
+ :multiple="true"
129
+ :selectUserList="selectReadUserList"
130
+ :options="userOptions"
131
+ title="分阅用户"
132
+ :mix="true"
133
+ :types="types"
134
+ @change="changeSelectReadUser($event, 'nextReadUserId')"
135
+ :tabs="tabs"
136
+ />
137
+ </el-form-item>
138
+ <el-form-item
139
+ prop="presetReadUserId"
140
+ v-if="canPresetRead"
141
+ label="
142
+ 自动分阅
143
+ "
144
+ >
145
+ <SelectUser
146
+ :nextUser="nextNode.presetReadUserId"
147
+ :multiple="true"
148
+ :selectUserList="selectPresetUserList"
149
+ :options="presetOptions"
150
+ title="分阅用户"
151
+ :radioList="presetReadUserId"
152
+ :presetEdit="1"
153
+ :mix="true"
154
+ :types="types"
155
+ @change="changeSelectReadUser($event, 'presetReadUserId')"
156
+ :tabs="tabs"
157
+ />
158
+ </el-form-item>
159
+ <el-form-item
160
+ v-if="isHandleExplain == 1"
161
+ prop="handleExplain"
162
+ label="办理说明"
163
+ >
164
+ <el-input
165
+ placeholder="请输入办理说明"
166
+ v-model="nextNode.handleExplain"
167
+ />
168
+ </el-form-item>
169
+ <el-form-item prop="noticeType" label="通知方式">
170
+ <el-checkbox-group
171
+ v-if="showNoticeType"
172
+ v-model="nextNode.noticeType"
173
+ >
174
+ <el-checkbox
175
+ v-for="item of nextNode.noticeList"
176
+ :key="item.cciValue"
177
+ :label="item.cciValue"
178
+ :disabled="
179
+ readOnlyNotificationType
180
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
181
+ : false
182
+ "
183
+ >
184
+ {{ item.shortName }}
185
+ </el-checkbox>
186
+ </el-checkbox-group>
187
+ </el-form-item>
188
+ <el-form-item
189
+ v-show="nextNode.noticeType.length != 0"
190
+ prop="nextNode"
191
+ label="通知消息"
192
+ >
193
+ <es-input
194
+ style="
195
+ border-color: #ccc;
196
+ padding: 5px;
197
+ border-radius: 5px;
198
+ font-size: 13px;
199
+ "
200
+ type="textarea"
201
+ v-model="nextNode.noticeInfo"
202
+ :readonly="notificationMessageReadOnly"
203
+ />
204
+ </el-form-item>
205
+ </div>
206
+ <el-form-item style="margin-bottom: 0px">
207
+ <div style="text-align: right">
208
+ <el-button
209
+ type="primary"
210
+ size="small"
211
+ @click="subProcess('nextNode')"
212
+ >
213
+ 确认
214
+ </el-button>
215
+ <el-button size="small" @click="quit"> 取消 </el-button>
216
+ </div>
217
+ </el-form-item>
218
+ </el-form>
219
+ </div>
220
+ </template>
221
+
222
+ <script>
223
+ import {
224
+ toResetProcessIndex,
225
+ toTaskContinuationIndex,
226
+ taskContinuation,
227
+ getNodeInfo,
228
+ findSysCodes,
229
+ getNotificationMsg,
230
+ findCodeValues,
231
+ loginUserInfo,
232
+ resetProcess
233
+ } from 'eoss-ui/src/config/api';
234
+ import util from 'eoss-ui/src/utils/util';
235
+ import SelectUser from './selectUser.vue';
236
+ import CommonOpinions from './component/CommonOpinions.vue';
237
+ export default {
238
+ name: 'resetForm',
239
+
240
+ components: {
241
+ [Option.name]: Option,
242
+ [SelectUser.name]: SelectUser,
243
+ [CommonOpinions.name]: CommonOpinions
244
+ },
245
+ props: {
246
+ flowParams: {
247
+ type: Object,
248
+ default: () => {}
249
+ },
250
+ subParams: {
251
+ type: Object,
252
+ default: () => {}
253
+ },
254
+ appId: {
255
+ type: String,
256
+ default: ''
257
+ },
258
+ type: { type: String }
259
+ },
260
+ data() {
261
+ return {
262
+ loading: false,
263
+ isCustomUser: 0,
264
+ selectUser: false,
265
+ nextNodeCheckType: 'select',
266
+ multiple: false,
267
+ showNoticeType: false,
268
+ readMultiple: true,
269
+ customPresetHintMessage: '', //流程预设标题
270
+ notificationMessageReadOnly: false,
271
+ readOnlyNotificationType: '',
272
+ show: true,
273
+ radioList: [],
274
+ activeNames: '',
275
+ selectUserList: [],
276
+ defaultNextNode: '',
277
+ presetUserJson: [],
278
+ isTaskread: 0, //是否显示分阅用户
279
+ isHandleExplain: 0, //是否展示办理说明
280
+ isOpinionRequired: 0,
281
+ options: [],
282
+ presetList: [],
283
+ presetReadUserId: [], //自动分阅
284
+ canPresetRead: false, //是否展示自动分阅
285
+ nextUserTypes: ['employee', 'persongroup'],
286
+ isSinglePage: false,
287
+ presetEdit: 0,
288
+ taskExamine: {},
289
+ isDefSelectedObj: 0,
290
+ isChooseNextNode: 0,
291
+ isHideDefaultOperation: 0,
292
+ countersignaturetypeCode: 0,
293
+ presetTaskNodeKeyStr: '', //预设办理人顺序
294
+ presetTaskNodeMap: {}, //预设办理人
295
+ params: {
296
+ filid: 'all', //选择范围(my:本单位/ "" or all:全部)
297
+ selectmix: 'true1',
298
+ deptid: '' //指定部门(my:本部门)
299
+ },
300
+ newOpinion: '',
301
+ operationList: [],
302
+ tabs: {
303
+ employee: {
304
+ param: {
305
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel
306
+ .orgId,
307
+ name: '本单位用户'
308
+ }
309
+ },
310
+ department: {
311
+ param: {
312
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel
313
+ .orgId
314
+ }
315
+ }
316
+ },
317
+ userModel: {},
318
+ nextUserTabs: {},
319
+ selectPresetUserList: [],
320
+ presetOptions: [],
321
+ selectReadUserList: [],
322
+ userOptions: [],
323
+ mixReadList: [],
324
+ mixPresetList: [],
325
+ nodeInfoExtAttr: {},
326
+ isCdjxjTaskHandle: '',
327
+ isShowNextUser: true,
328
+ showRoleUser: false,
329
+ pendtitle: '',
330
+ mixOrgIdList: [], //办理对象混选
331
+ nextNode: {
332
+ nodeName: '',
333
+ newOpinion: '',
334
+ countersignaturetypeText: '',
335
+ nextNode: '',
336
+ nextReadUserId: [],
337
+ nextOrgId: [],
338
+ noticeType: [],
339
+ nextOperate: '1',
340
+ nextUser: [],
341
+ presetReadUserId: [], //自动分阅
342
+ noticeInfo: '',
343
+ nodeInfo: [],
344
+ userInfo: [],
345
+ handleExplain: '',
346
+ noticeList: []
347
+ }
348
+ };
349
+ },
350
+ computed: {
351
+ types() {
352
+ if (this.isCdjxjTaskHandle == 'true') {
353
+ return ['employee', 'enterprise', 'department'];
354
+ } else {
355
+ return ['employee', 'enterprise', 'department', 'persongroup'];
356
+ }
357
+ }
358
+ },
359
+ created() {
360
+ this.getUserInfo();
361
+ this.getResetFlow();
362
+ },
363
+ mounted() {},
364
+ methods: {
365
+ changeOpinion(val) {
366
+ this.nextNode.newOpinion = val;
367
+ },
368
+ getUserInfo() {
369
+ let mainConfig = util.getStorage('mainConfig');
370
+ if (mainConfig) {
371
+ this.userModel = JSON.parse(mainConfig).userModel;
372
+ } else {
373
+ util
374
+ .ajax({ url: loginUserInfo })
375
+ .then((res) => {
376
+ const { status, data } = res;
377
+ if (status == 'success') {
378
+ this.userModel = data;
379
+ } else {
380
+ let msg = res.msg || '系统错误,请联系管理员!';
381
+ this.$message.error(msg);
382
+ }
383
+ })
384
+ .catch((err) => {
385
+ if (err.message && err.message !== 'canceled') {
386
+ this.$message.error(err.message);
387
+ }
388
+ });
389
+ }
390
+ },
391
+ getIsShowNextUser(val) {
392
+ if (
393
+ val == 7 ||
394
+ val == 8 ||
395
+ val == 9 ||
396
+ val == 10 ||
397
+ val == 11 ||
398
+ val == 12
399
+ ) {
400
+ this.isShowNextUser = false;
401
+ //设置办理角色
402
+ // $("#orgRoleCode").val(handleRoleId);
403
+ if (val == 7 || val == 8) {
404
+ this.nextUserTypes = ['department'];
405
+ this.nextUserTabs = {
406
+ department: {
407
+ param: {
408
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
409
+ }
410
+ }
411
+ };
412
+ this.multiple = true;
413
+ } else if (val == 9 || val == 10) {
414
+ this.nextUserTypes = ['enterprise'];
415
+ this.nextUserTabs = { enterprise: { param: { filid: 'other' } } };
416
+ this.multiple = true;
417
+ } else if (val == 11 || val == 12) {
418
+ this.nextUserTypes = ['department', 'enterprise'];
419
+ this.nextUserTabs = {
420
+ enterprise: { param: { filid: 'other' } },
421
+ department: {
422
+ param: {
423
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
424
+ }
425
+ }
426
+ };
427
+ this.multiple = true;
428
+ }
429
+ }
430
+ if (val == 7 || val == 9 || val == 11) {
431
+ this.multiple = false;
432
+ }
433
+ },
434
+ // 分阅是否多选
435
+ isReadMultiple(nextReadUserSelectType) {
436
+ if (nextReadUserSelectType == 1) {
437
+ this.readMultiple = false;
438
+ } else if (nextReadUserSelectType == 2) {
439
+ this.readMultiple = true;
440
+ } else if (nextReadUserSelectType == 3) {
441
+ this.readMultiple = false;
442
+ } else if (nextReadUserSelectType == 4) {
443
+ this.readMultiple = true;
444
+ } else if (nextReadUserSelectType == 5) {
445
+ this.readMultiple = false;
446
+ } else if (nextReadUserSelectType == 6) {
447
+ this.readMultiple = true;
448
+ }
449
+ },
450
+ changeSelectReadUser(val, type) {
451
+ const { nextUser, mixList } = val;
452
+ this.nextNode[type] = nextUser;
453
+ if (type === 'presetReadUserId') {
454
+ this.mixPresetList = mixList;
455
+ } else {
456
+ this.mixReadList = mixList;
457
+ }
458
+ },
459
+ changeSelectUser(val, type) {
460
+ const { nextUser, options, mixList } = val;
461
+ this.nextNode[type] = nextUser;
462
+ this.mixOrgIdList = mixList;
463
+ },
464
+ getNodeType() {
465
+ util
466
+ .ajax({
467
+ url: findCodeValues,
468
+ params: {
469
+ ccCode: 'notification_type',
470
+ userId: util.getStorage('userId')
471
+ }
472
+ })
473
+ .then((res) => {
474
+ const { status, data } = res;
475
+ if (status === 'success') {
476
+ this.nextNode.noticeList = data;
477
+ this.getFind();
478
+ }
479
+ })
480
+ .catch((err) => {
481
+ this.loading = false;
482
+ if (err.message && err.message !== 'canceled') {
483
+ this.$message.error(err.message);
484
+ }
485
+ });
486
+ },
487
+ //获取通知信息
488
+ getMessage() {
489
+ let params = {
490
+ processDefinitionId: this.processDefinitionId,
491
+ nodeId: this.nextNode.nextNode,
492
+ businessId: this.taskExamine.businessId
493
+ };
494
+ util
495
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
496
+ .then((res) => {
497
+ if (res.status === 'success') {
498
+ this.nextNode.noticeInfo = res.message;
499
+ }
500
+ })
501
+ .catch((err) => {
502
+ this.loading = false;
503
+ if (err.message && err.message !== 'canceled') {
504
+ this.$message.error(err.message);
505
+ }
506
+ });
507
+ },
508
+ // 提交表单
509
+ subProcess(formName) {
510
+ this.saveProcess(formName);
511
+ },
512
+ saveProcess(formName) {
513
+ this.$refs[formName].validate((valid) => {
514
+ if (valid) {
515
+ const {
516
+ nextNode,
517
+ nextUser,
518
+ noticeInfo,
519
+ noticeType,
520
+ handleExplain,
521
+ presetReadUserId,
522
+ nextReadUserId,
523
+ nextOrgId,
524
+ nextRoleId,
525
+ nextOperate,
526
+ newOpinion
527
+ } = this.nextNode;
528
+ if (noticeType.length === 0) {
529
+ return this.$message.warning('请选择通知方式');
530
+ }
531
+ if (
532
+ this.nodeInfoExtAttr.nodeType != 1 &&
533
+ this.nodeInfoExtAttr.nodeType != 2 &&
534
+ !this.showRoleUser
535
+ ) {
536
+ if (this.isShowNextUser) {
537
+ if (nextUser == '' || (this.multiple && nextUser.length == 0)) {
538
+ return this.$message.warning('请选择下步办理人');
539
+ }
540
+ } else {
541
+ if (nextOrgId == '' || (this.multiple && nextOrgId.length == 0)) {
542
+ return this.$message.warning('请选择办理对象');
543
+ }
544
+ }
545
+ }
546
+ if (
547
+ (this.showRoleUser && nextRoleId == '') ||
548
+ (this.multiple && nextUser.length == 0)
549
+ ) {
550
+ return this.$message.warning('请选择办理角色');
551
+ }
552
+ if (this.isOpinionRequired && !this.newOpinion && !newOpinion) {
553
+ return this.$message.warning('请选择输入审批意见');
554
+ }
555
+ this.loading = true;
556
+ let newNextUser = [];
557
+ if (this.multiple) {
558
+ nextUser && nextUser.map((item) => newNextUser.push(item));
559
+ }
560
+ let newNoticeType = '';
561
+ if (noticeType) {
562
+ newNoticeType = noticeType.join(',');
563
+ }
564
+ let params = {
565
+ processDefinitionId: this.processDefinitionId,
566
+ nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
567
+ nextNodeId: nextNode,
568
+ appId:this.appId,
569
+ nextOperate: nextOperate,
570
+ businessId: this.taskExamine.businessId,
571
+ pendingId: this.taskExamine.pendingId,
572
+ notificationType: newNoticeType,
573
+ userId: util.getStorage('userId'),
574
+ notificationMsg: noticeInfo,
575
+ customPresetUserJson: JSON.stringify(this.presetList),
576
+ presetUserJson: JSON.stringify(this.presetUserJson),
577
+ nextReadUserId: this.readMultiple
578
+ ? this.mixReadList && this.mixReadList.join('|')
579
+ : nextReadUserId,
580
+ nextOrgId: !this.isShowNextUser
581
+ ? this.multiple
582
+ ? this.mixOrgIdList && this.mixOrgIdList.join('|')
583
+ : nextOrgId
584
+ : '',
585
+ handleExplain: handleExplain,
586
+ presetReadUserId:
587
+ this.mixPresetList && this.mixPresetList.length > 0
588
+ ? this.mixPresetList.join('|')
589
+ : presetReadUserId.join(','),
590
+ opinion: this.newOpinion || newOpinion,
591
+ ...this.subParams
592
+ };
593
+ if (this.activeNames != '1') delete params.customPresetUserJson;
594
+ util
595
+ .ajax({
596
+ url: this.type == 'reset' ? resetProcess : taskContinuation,
597
+ method: 'post',
598
+ data: params
599
+ })
600
+ .then((res) => {
601
+ const { status, message } = res;
602
+ this.loading = false;
603
+ if (status === 'success') {
604
+ this.quit(true);
605
+ this.$message.success('操作成功');
606
+ } else {
607
+ this.$message.error(message || '系统错误,请联系管理员!');
608
+ }
609
+ })
610
+ .catch((err) => {
611
+ this.loading = false;
612
+ if (err.message && err.message !== 'canceled') {
613
+ this.$message.error(err.message);
614
+ }
615
+ });
616
+ } else {
617
+ return false;
618
+ }
619
+ });
620
+ },
621
+ getNodeInfos(nodeId, index) {
622
+ let params = {
623
+ processDefinitionId: this.processDefinitionId,
624
+ nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
625
+ businessId: this.taskExamine.businessId,
626
+ pendingId: this.taskExamine.pendingId
627
+ };
628
+ util
629
+ .ajax({ url: getNodeInfo, params })
630
+ .then((res) => {
631
+ const {
632
+ status,
633
+ message,
634
+ data: {
635
+ nextUserList,
636
+ nodeExtAttr,
637
+ countersignaturetypeText,
638
+ countersignaturetypeCode
639
+ }
640
+ } = res;
641
+ this.loading = false;
642
+ if (status === 'success') {
643
+ this.nextNode.userInfo = nextUserList;
644
+ this.countersignaturetypeCode = countersignaturetypeCode;
645
+ this.nextNode.countersignaturetypeText = countersignaturetypeText;
646
+ this.isTaskread = nodeExtAttr.isTaskread;
647
+ this.isHandleExplain = nodeExtAttr.isHandleExplain;
648
+ this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
649
+ this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
650
+ this.nodeInfoExtAttr = nodeExtAttr;
651
+ this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
652
+
653
+ if (
654
+ nodeExtAttr.userSelectionType == 7 ||
655
+ nodeExtAttr.userSelectionType == 8 ||
656
+ nodeExtAttr.userSelectionType == 9 ||
657
+ nodeExtAttr.userSelectionType == 10 ||
658
+ nodeExtAttr.userSelectionType == 11 ||
659
+ nodeExtAttr.userSelectionType == 12
660
+ ) {
661
+ this.getIsShowNextUser(
662
+ nodeExtAttr && nodeExtAttr.userSelectionType
663
+ );
664
+ } else if (
665
+ nodeExtAttr.userSelectionType == 13 ||
666
+ nodeExtAttr.userSelectionType == 14
667
+ ) {
668
+ this.showRoleUser = true;
669
+ if (data.nextRole) {
670
+ this.radioList = [
671
+ { showid: data.nextRole.id, showname: data.nextRole.rolename }
672
+ ];
673
+ if (this.isDefSelectedObj == 1) {
674
+ this.nextNode.nextRoleId.push(data.nextRole.id);
675
+ this.selectUserList.push({
676
+ showname: data.nextRole.rolename,
677
+ showid: data.nextRole.id
678
+ });
679
+ }
680
+ }
681
+ } else {
682
+ const { multiple, params } = this.isMultiple(
683
+ nodeExtAttr.userSelectionType
684
+ );
685
+ this.multiple = multiple;
686
+ this.params = params;
687
+ }
688
+ // this.isReadMultiple(nodeExtAttr.userSelectionType);
689
+
690
+ nextUserList.map((item) => {
691
+ if (
692
+ this.multiple &&
693
+ nodeExtAttr.isDefSelectedObj == 1 &&
694
+ nextUserList !== undefined
695
+ ) {
696
+ this.nextNode.nextUser.push(item.userId);
697
+ this.selectUserList.push({
698
+ showname: item.username,
699
+ showid: item.userId
700
+ });
701
+ }
702
+
703
+ this.options.push({
704
+ showname: item.username,
705
+ showid: item.userId
706
+ });
707
+ });
708
+ if (this.multiple) {
709
+ this.nextNode.nextReadUserId = [];
710
+ } else {
711
+ this.nextNode.nextReadUserId = '';
712
+ }
713
+ if (
714
+ nextUserList.length > 0 &&
715
+ nodeExtAttr.isDefSelectedObj == 1 &&
716
+ !this.multiple
717
+ ) {
718
+ this.nextNode.nextUser = nextUserList[0].userId;
719
+ this.selectUserList.push({
720
+ showname: nextUserList[0].username,
721
+ showid: nextUserList[0].userId
722
+ });
723
+ }
724
+ this.radioList = this.options;
725
+ } else {
726
+ this.$message.error(message || '系统错误,请联系管理员!');
727
+ }
728
+ nodeId && this.$refs.selectUser[index].changeInfo();
729
+ })
730
+ .catch((err) => {
731
+ this.loading = false;
732
+ if (err.message && err.message !== 'canceled') {
733
+ this.$message.error(err.message);
734
+ }
735
+ });
736
+ },
737
+ changeSel(val) {
738
+ this.nextNode.nextUser = [];
739
+ this.options = [];
740
+ this.selectUserList = [];
741
+ this.radioList = [];
742
+ this.loading = true;
743
+ this.getNodeInfos();
744
+ },
745
+ // 取消
746
+ quit(val) {
747
+ if (val === true) return this.$emit('cancel', val);
748
+ this.$emit('cancel', false);
749
+ },
750
+ getFind() {
751
+ util
752
+ .ajax({
753
+ url: findSysCodes
754
+ })
755
+ .then((res) => {
756
+ const { status, message } = res;
757
+ if (status === 'success') {
758
+ this.nextNode.noticeType = message.split(',');
759
+ let arr = [];
760
+ this.nextNode.noticeList.map((item) => {
761
+ this.nextNode.noticeType.map((x) => {
762
+ if (x == item.cciValue) {
763
+ arr.push(x);
764
+ }
765
+ });
766
+ });
767
+ this.nextNode.noticeType = arr;
768
+ this.showNoticeType = true;
769
+ } else {
770
+ this.$message.error(message || '系统错误,请联系管理员!');
771
+ }
772
+ })
773
+ .catch((err) => {
774
+ this.loading = false;
775
+ if (err.message && err.message !== 'canceled') {
776
+ this.$message.error(err.message);
777
+ }
778
+ });
779
+ },
780
+ /**
781
+ * isMultiple
782
+ * @desc:是否多选
783
+ * @author liufan
784
+ * @date 2022年9月13日
785
+ **/
786
+ isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
787
+ let multiple = false;
788
+ let params = {};
789
+ if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
790
+ multiple = true;
791
+ }
792
+ if (val == 1 || val == 2 || val == 5) {
793
+ params.filid = this.userModel.orgId;
794
+ params.only_filid = true;
795
+ if (choiceOrgId) {
796
+ params.filid = choiceOrgId;
797
+ }
798
+ }
799
+ if (val == 5 || val == 6) {
800
+ params.filid = this.userModel.orgId;
801
+ params.deptid = this.userModel.orgId;
802
+ if (choiceDeptId) {
803
+ params.deptid = choiceDeptId;
804
+ }
805
+ if (choiceOrgId) {
806
+ params.filid = choiceOrgId;
807
+ }
808
+ }
809
+ if (val == 15 || val == 16) {
810
+ params.filid = this.userModel.orgId;
811
+ if (pOrgId) {
812
+ params.filid = pOrgId;
813
+ }
814
+ }
815
+ return { multiple, params };
816
+ },
817
+ getResetFlow() {
818
+ let params = {
819
+ url:
820
+ this.type == 'continuation'
821
+ ? toTaskContinuationIndex
822
+ : toResetProcessIndex,
823
+ params: {
824
+ appId: this.appId,
825
+ ...this.flowParams
826
+ }
827
+ };
828
+ this.loading = true;
829
+ // 获取节点
830
+ util
831
+ .ajax(params)
832
+ .then((res) => {
833
+ //pc接口返回数据处理
834
+ this.loading = false;
835
+ const { status, message, data } = res;
836
+ if (status == 'success') {
837
+ data.nextNodeCheckType &&
838
+ (this.nextNodeCheckType = data.nextNodeCheckType);
839
+ this.pendtitle = data.pendtitle || data.taskExamine.businessName;
840
+ this.customPresetHintMessage = data.customPresetHintMessage;
841
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
842
+ this.notificationMessageReadOnly =
843
+ data.notificationMessageReadOnly == 'true';
844
+ let flowList = [];
845
+ if (data.taskNodeList && data.taskNodeList.length > 0) {
846
+ for (let key in data.taskNodeList[0]) {
847
+ flowList.push({
848
+ nodeName: data.taskNodeList[0][key],
849
+ nodeId: key
850
+ });
851
+ }
852
+ } else {
853
+ for (let key in data.taskNodeMap) {
854
+ flowList.push({
855
+ nodeName: data.taskNodeMap[key],
856
+ nodeId: key
857
+ });
858
+ }
859
+ }
860
+
861
+ this.nextNode.nodeInfo = flowList;
862
+ this.nextNode.nextNode = flowList[0].nodeId;
863
+ this.taskExamine = data.taskExamine;
864
+ this.processDefinitionId = data.taskExamine.processDefinitionId;
865
+ this.isOpinionRequired =
866
+ data.nodeInfoMap.nodeExtAttr.isOpinionRequired;
867
+ this.isHideDefaultOperation =
868
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
869
+ this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
870
+ this.isChooseNextNode =
871
+ data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
872
+ this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
873
+ this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
874
+ this.presetTaskNodeMap = data.presetTaskNodeMap;
875
+ this.isSinglePage = data.taskExamine.isSinglePage;
876
+ this.isSinglePage &&
877
+ (this.nextNode.opinion = data.taskExamine.opinion);
878
+ // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
879
+ this.nextNode.nodeName = data.taskExamine.nodeName;
880
+ this.canPresetRead = data.canPresetRead;
881
+ if (data.canPresetRead) {
882
+ let ids =
883
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
884
+ let names =
885
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
886
+ ','
887
+ );
888
+ ids.map((item, index) => {
889
+ this.presetReadUserId.push({
890
+ showid: item,
891
+ showname: names[index]
892
+ });
893
+ this.selectPresetUserList.push({
894
+ showid: item,
895
+ showname: names[index]
896
+ });
897
+ this.nextNode.presetReadUserId.push(item);
898
+ });
899
+ }
900
+ this.getNodeInfos();
901
+ // this.getPresetFlowInfo();
902
+
903
+ this.getNodeType();
904
+ this.getMessage();
905
+ } else {
906
+ this.$message.error(message || '系统错误,请联系管理员!');
907
+ }
908
+ })
909
+ .catch((err) => {
910
+ this.loading = false;
911
+ if (err.message && err.message !== 'canceled') {
912
+ this.$message.error(err.message);
913
+ }
914
+ });
915
+ }
916
+ }
917
+ };
918
+ </script>