eoss-ui 0.7.83 → 0.7.85

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 (196) hide show
  1. package/lib/button-group.js +144 -120
  2. package/lib/button.js +143 -120
  3. package/lib/calendar.js +2 -2
  4. package/lib/calogin.js +144 -120
  5. package/lib/card.js +2 -2
  6. package/lib/cascader.js +2 -2
  7. package/lib/checkbox-group.js +144 -120
  8. package/lib/clients.js +2 -2
  9. package/lib/config/api.js +7 -1
  10. package/lib/data-table-form.js +144 -120
  11. package/lib/data-table.js +144 -120
  12. package/lib/date-picker.js +143 -120
  13. package/lib/dialog.js +219 -214
  14. package/lib/enable-drag.js +2 -2
  15. package/lib/enterprise.js +2 -2
  16. package/lib/eoss-ui.common.js +2118 -1493
  17. package/lib/error-page.js +2 -2
  18. package/lib/flow-group.js +147 -124
  19. package/lib/flow-list.js +243 -218
  20. package/lib/flow.js +1561 -937
  21. package/lib/form.js +243 -239
  22. package/lib/handle-user.js +144 -121
  23. package/lib/handler.js +148 -125
  24. package/lib/icon.js +144 -121
  25. package/lib/icons.js +5 -5
  26. package/lib/index.js +1 -1
  27. package/lib/input-number.js +143 -120
  28. package/lib/input.js +143 -120
  29. package/lib/label.js +2 -2
  30. package/lib/layout.js +2 -2
  31. package/lib/login.js +154 -130
  32. package/lib/main.js +505 -481
  33. package/lib/menu.js +2 -2
  34. package/lib/nav.js +150 -127
  35. package/lib/notify.js +86 -77
  36. package/lib/page.js +143 -120
  37. package/lib/pagination.js +143 -120
  38. package/lib/player.js +147 -124
  39. package/lib/qr-code.js +145 -122
  40. package/lib/radio-group.js +143 -120
  41. package/lib/retrial-auth.js +144 -121
  42. package/lib/select-ganged.js +143 -120
  43. package/lib/select.js +143 -120
  44. package/lib/selector-panel.js +147 -123
  45. package/lib/selector.js +145 -122
  46. package/lib/sizer.js +143 -120
  47. package/lib/steps.js +150 -127
  48. package/lib/switch.js +143 -120
  49. package/lib/table-form.js +143 -120
  50. package/lib/tabs-panel.js +2 -2
  51. package/lib/tabs.js +143 -120
  52. package/lib/theme-chalk/base.css +1 -1
  53. package/lib/theme-chalk/flow.css +1 -1
  54. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  55. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  56. package/lib/theme-chalk/icon.css +1 -1
  57. package/lib/theme-chalk/index.css +1 -1
  58. package/lib/theme-chalk/login.css +1 -1
  59. package/lib/theme-chalk/main.css +1 -1
  60. package/lib/theme-chalk/menu.css +1 -1
  61. package/lib/theme-chalk/simplicity-top.css +1 -1
  62. package/lib/theme-chalk/simplicity.css +1 -1
  63. package/lib/theme-chalk/sizer.css +1 -1
  64. package/lib/theme-chalk/upload.css +1 -1
  65. package/lib/tips.js +143 -120
  66. package/lib/toolbar.js +2 -2
  67. package/lib/tree-group.js +143 -120
  68. package/lib/tree.js +143 -120
  69. package/lib/upload.js +154 -130
  70. package/lib/utils/util.js +60 -46
  71. package/lib/wujie.js +156 -122
  72. package/lib/wxlogin.js +143 -120
  73. package/package.json +161 -160
  74. package/packages/.DS_Store +0 -0
  75. package/packages/button-group/src/main.vue +346 -346
  76. package/packages/calogin/.DS_Store +0 -0
  77. package/packages/calogin/src/main.vue +412 -412
  78. package/packages/clients/src/main.vue +151 -151
  79. package/packages/data-table/src/column.vue +992 -992
  80. package/packages/data-table/src/main.vue +1840 -1840
  81. package/packages/date-picker/.DS_Store +0 -0
  82. package/packages/date-picker/src/.DS_Store +0 -0
  83. package/packages/dialog/.DS_Store +0 -0
  84. package/packages/flow/.DS_Store +0 -0
  85. package/packages/flow/src/.DS_Store +0 -0
  86. package/packages/flow/src/component/Circulate.vue +417 -417
  87. package/packages/flow/src/component/CommonOpinions.vue +376 -376
  88. package/packages/flow/src/component/CustomPreset.vue +324 -324
  89. package/packages/flow/src/component/FileList.vue +97 -97
  90. package/packages/flow/src/component/FreeCirculation.vue +244 -244
  91. package/packages/flow/src/component/Preset.vue +257 -257
  92. package/packages/flow/src/component/SendMsg.vue +242 -242
  93. package/packages/flow/src/component/SortFlow.vue +110 -0
  94. package/packages/flow/src/component/taskUnionExamine.vue +761 -761
  95. package/packages/flow/src/form.vue +123 -123
  96. package/packages/flow/src/freeStartFlow.vue +2855 -2855
  97. package/packages/flow/src/main.vue +4135 -3948
  98. package/packages/flow/src/processForm.vue +1671 -1523
  99. package/packages/flow/src/processReject.vue +309 -309
  100. package/packages/flow/src/reset.vue +946 -946
  101. package/packages/flow/src/startTaskRead.vue +695 -695
  102. package/packages/flow/src/supervise.vue +159 -159
  103. package/packages/flow/src/table.vue +58 -58
  104. package/packages/flow-group/src/main.vue +727 -727
  105. package/packages/flow-list/.DS_Store +0 -0
  106. package/packages/flow-list/src/main.vue +1803 -1801
  107. package/packages/form/.DS_Store +0 -0
  108. package/packages/form/src/main.vue +3901 -3901
  109. package/packages/form/src/table.vue +1512 -1512
  110. package/packages/handle-user/src/main.vue +137 -137
  111. package/packages/handler/src/main.vue +496 -496
  112. package/packages/icon/.DS_Store +0 -0
  113. package/packages/icon/src/main.vue +104 -104
  114. package/packages/icons/src/icon.json +1 -1
  115. package/packages/login/.DS_Store +0 -0
  116. package/packages/login/src/main.vue +2087 -2087
  117. package/packages/login/src/resetPassword.vue +557 -557
  118. package/packages/main/.DS_Store +0 -0
  119. package/packages/main/src/.DS_Store +0 -0
  120. package/packages/main/src/default/userinfo.vue +503 -503
  121. package/packages/main/src/public/online.vue +89 -89
  122. package/packages/main/src/public/search.vue +464 -464
  123. package/packages/main/src/public/settings.vue +273 -273
  124. package/packages/main/src/simplicity/apps.vue +388 -388
  125. package/packages/main/src/simplicity/avatar.vue +82 -82
  126. package/packages/main/src/simplicity/handler.vue +158 -158
  127. package/packages/main/src/simplicity/index.vue +2328 -2328
  128. package/packages/main/src/simplicity/menu-list.vue +135 -135
  129. package/packages/main/src/simplicity/message.vue +293 -293
  130. package/packages/main/src/simplicity/notice.vue +222 -222
  131. package/packages/main/src/simplicity/sub-menu.vue +276 -276
  132. package/packages/main/src/simplicity/user.vue +259 -259
  133. package/packages/main/src/simplicity/userinfo.vue +401 -401
  134. package/packages/main/src/simplicityTop/apps.vue +388 -388
  135. package/packages/main/src/simplicityTop/avatar.vue +82 -82
  136. package/packages/main/src/simplicityTop/handler.vue +215 -215
  137. package/packages/main/src/simplicityTop/index.vue +2618 -2618
  138. package/packages/main/src/simplicityTop/lists.vue +84 -84
  139. package/packages/main/src/simplicityTop/menu-list.vue +135 -135
  140. package/packages/main/src/simplicityTop/message.vue +293 -293
  141. package/packages/main/src/simplicityTop/notice.vue +222 -222
  142. package/packages/main/src/simplicityTop/router-page.vue +45 -45
  143. package/packages/main/src/simplicityTop/sub-menu.vue +274 -274
  144. package/packages/main/src/simplicityTop/user.vue +259 -259
  145. package/packages/main/src/simplicityTop/userinfo.vue +401 -401
  146. package/packages/menu/.DS_Store +0 -0
  147. package/packages/menu/src/main.vue +595 -595
  148. package/packages/nav/src/main.vue +351 -351
  149. package/packages/select/.DS_Store +0 -0
  150. package/packages/select/src/main.vue +782 -782
  151. package/packages/selector/.DS_Store +0 -0
  152. package/packages/selector/src/main.vue +761 -761
  153. package/packages/selector-panel/.DS_Store +0 -0
  154. package/packages/selector-panel/src/main.vue +1036 -1036
  155. package/packages/selector-panel/src/selection.vue +174 -174
  156. package/packages/switch/src/main.vue +170 -170
  157. package/packages/theme-chalk/lib/base.css +1 -1
  158. package/packages/theme-chalk/lib/flow.css +1 -1
  159. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  160. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  161. package/packages/theme-chalk/lib/icon.css +1 -1
  162. package/packages/theme-chalk/lib/index.css +1 -1
  163. package/packages/theme-chalk/lib/login.css +1 -1
  164. package/packages/theme-chalk/lib/main.css +1 -1
  165. package/packages/theme-chalk/lib/menu.css +1 -1
  166. package/packages/theme-chalk/lib/simplicity-top.css +1 -1
  167. package/packages/theme-chalk/lib/simplicity.css +1 -1
  168. package/packages/theme-chalk/lib/sizer.css +1 -1
  169. package/packages/theme-chalk/lib/upload.css +1 -1
  170. package/packages/theme-chalk/src/.DS_Store +0 -0
  171. package/packages/theme-chalk/src/data-table.scss +297 -297
  172. package/packages/theme-chalk/src/flow.scss +373 -359
  173. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  174. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  175. package/packages/theme-chalk/src/form.scss +501 -501
  176. package/packages/theme-chalk/src/handler.scss +148 -148
  177. package/packages/theme-chalk/src/icon.scss +3452 -1612
  178. package/packages/theme-chalk/src/login.scss +1006 -1006
  179. package/packages/theme-chalk/src/main.scss +664 -664
  180. package/packages/theme-chalk/src/menu.scss +224 -224
  181. package/packages/theme-chalk/src/selector.scss +114 -114
  182. package/packages/theme-chalk/src/simplicity-top.scss +1845 -1845
  183. package/packages/theme-chalk/src/simplicity.scss +1403 -1403
  184. package/packages/theme-chalk/src/tree.scss +165 -165
  185. package/packages/theme-chalk/src/upload.scss +172 -172
  186. package/packages/tips/src/main.vue +141 -141
  187. package/packages/toolbar/src/main.vue +430 -430
  188. package/packages/upload/.DS_Store +0 -0
  189. package/packages/upload/src/main.vue +1344 -1344
  190. package/packages/wujie/src/main.vue +1 -0
  191. package/src/.DS_Store +0 -0
  192. package/src/config/api.js +340 -334
  193. package/src/index.js +163 -163
  194. package/src/utils/.DS_Store +0 -0
  195. package/src/utils/rules.js +18 -18
  196. package/src/utils/util.js +42 -26
@@ -1,1523 +1,1671 @@
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
- >
9
- <el-form
10
- ref="nextNode"
11
- :model="nextNode"
12
- class="demo-dynamic"
13
- label-width="100px"
14
- :rules="rules"
15
- :label-position="labelPosition"
16
- >
17
- <div
18
- :style="`height:${
19
- showBtn ? '430px' : 'auto'
20
- }; overflow-y:${showBtn ? 'auto' : 'hidden'} ; margin-bottom: 10px`"
21
- >
22
- <el-form-item
23
- v-show="showBtn"
24
- prop="nodeName"
25
- label="当前节点"
26
- :rules="[
27
- { required: true, message: `请选择下步节点`, trigger: 'blur' }
28
- ]"
29
- >
30
- <el-input v-model="nextNode.nodeName" disabled />
31
- </el-form-item>
32
- <el-form-item
33
- v-if="isSinglePage || copyHistory || formType == 'readTransfer'"
34
- prop="newOpinion"
35
- :label="
36
- copyHistory || formType == 'readTransfer' ? '填写意见' : '意见'
37
- "
38
- >
39
- <CommonOpinions
40
- class="opinions"
41
- :opinion="nextNode.newOpinion"
42
- :rows="copyHistory || formType == 'readTransfer' ? 2 : 5"
43
- @change="(val) => (nextNode.newOpinion = val)"
44
- />
45
- </el-form-item>
46
- <el-form-item
47
- prop="nextOperate"
48
- label="下步操作"
49
- v-if="isChooseNextNode == 1"
50
- :rules="[
51
- { required: true, message: `请选择下步操作`, trigger: 'blur' }
52
- ]"
53
- >
54
- <el-select
55
- v-if="nextOperateCheckType == 'select'"
56
- v-model="nextNode.nextOperate"
57
- :placeholder="`请选择下步操作`"
58
- @change="selecNext"
59
- >
60
- <el-option
61
- v-for="items in operationList"
62
- :key="items.key"
63
- :label="items.value"
64
- :value="items.key"
65
- ></el-option>
66
- </el-select>
67
- <es-radio-group
68
- v-else-if="nextOperateCheckType == 'radio'"
69
- v-model="nextNode.nextOperate"
70
- :data="operationList"
71
- @change="selecNext($event, true)"
72
- value-key="key"
73
- label-key="value"
74
- ></es-radio-group>
75
- </el-form-item>
76
- <el-form-item
77
- prop="nextNode"
78
- label="下步节点"
79
- :rules="[
80
- { required: false, message: `请选择下步节点`, trigger: 'blur' }
81
- ]"
82
- >
83
- <el-select
84
- v-if="nextNodeCheckType == 'select'"
85
- v-model="nextNode.nextNode"
86
- :placeholder="`请选择下步节点`"
87
- @change="changeSel"
88
- >
89
- <el-option
90
- v-for="items in nextNode.nodeInfo"
91
- :key="items.id"
92
- :label="items.nodeName"
93
- :value="items.nodeId"
94
- ></el-option>
95
- </el-select>
96
- <es-radio-group
97
- v-else-if="nextNodeCheckType == 'radio'"
98
- v-model="nextNode.nextNode"
99
- :data="nextNode.nodeInfo"
100
- @change="changeSel"
101
- value-key="nodeId"
102
- label-key="nodeName"
103
- ></es-radio-group>
104
- </el-form-item>
105
- <el-form-item
106
- v-if="countersignaturetypeCode != 0"
107
- prop="countersignaturetypeText"
108
- label="处理方式"
109
- >
110
- <el-input
111
- v-model="nextNode.countersignaturetypeText"
112
- placeholder="请输入内容"
113
- disabled
114
- />
115
- </el-form-item>
116
- <!-- <el-form-item
117
- prop="nextNode"
118
- label="下步办理人"
119
- v-if="isShowNextUser"
120
- :rules="[
121
- { required: true, message: `请选择下步办理人`, trigger: 'blur' }
122
- ]"
123
- >
124
- <SelectUser
125
- :nextUser="nextNode.nextUser"
126
- :radioList="radioList"
127
- :multiple="multiple"
128
- :showTooltip="showTooltip"
129
- :isCustomUser="isCustomUser"
130
- :options="options"
131
- :presetEdit="presetEdit"
132
- :isDefSelectedObj="isDefSelectedObj"
133
- :selectUserList="selectUserList"
134
- @change="changeSelectUser"
135
- :types="nextUserTypes"
136
- :params="params"
137
- />
138
- </el-form-item> -->
139
- <el-form-item
140
- v-if="isHideCurrentOrg"
141
- prop="nextCurrentOrgObj"
142
- label="本单位"
143
- >
144
- <SelectUser
145
- :nextUser="nextCurrentOrgObjSelect"
146
- multiple
147
- mix
148
- @change="disposeAppUnit($event, 'nextCurrentOrgObjSelect')"
149
- :showTooltip="showTooltip"
150
- :types="['employee', 'persongroup']"
151
- :params="currentOrgSelectorParams"
152
- />
153
- </el-form-item>
154
- <el-form-item
155
- v-if="isHideOtherOrg"
156
- label="外单位"
157
- >
158
- <SelectUser
159
- :nextUser="nextOtherOrgObjSelect"
160
- multiple
161
- :showTooltip="showTooltip"
162
- mix
163
- :where="{ filid: 'other' }"
164
- @change="disposeAppUnit($event, 'nextOtherOrgObjSelect')"
165
- :types="['enterprise', 'filgroup']"
166
- :params="foreignOrgSelectorParams"
167
- />
168
- </el-form-item>
169
- <el-form-item
170
- v-if="!isHideOtherOrg && !isHideCurrentOrg"
171
- :prop="isShowNextUser ? 'nextUser' : 'nextOrgId'"
172
- :label="isShowNextUser ? '下步办理人' : '办理对象'"
173
- >
174
- <SelectUser
175
- :nextUser="isShowNextUser ? nextNode.nextUser : nextNode.nextOrgId"
176
- :radioList="radioList"
177
- :multiple="multiple"
178
- :isCustomUser="!isShowNextUser ? 1 : isCustomUser"
179
- :showTooltip="showTooltip"
180
- :isCurrentNodeForbiddenChangeCandidate="isCurrentNodeForbiddenChangeCandidate"
181
- :options="options"
182
- :presetEdit="presetEdit"
183
- :mix="multiple"
184
- :isDefSelectedObj="isDefSelectedObj"
185
- :selectUserList="selectUserList"
186
- @change="
187
- changeSelectUser(
188
- $event,
189
- isShowNextUser ? 'nextUser' : 'nextOrgId'
190
- )
191
- "
192
- :types="
193
- !isShowNextUser
194
- ? nextUserTypes
195
- : isCdjxjTaskHandle != 'true'
196
- ? ['employee', 'persongroup']
197
- : ['employee']
198
- "
199
- :params="isShowNextUser ? params : {}"
200
- :tabs="nextUserTabs"
201
- />
202
- </el-form-item>
203
- <el-form-item
204
- prop="nextReadUserId"
205
- v-if="isTaskread == 1"
206
- label="
207
- 分阅用户
208
- "
209
- >
210
- <SelectUser
211
- :nextUser="nextNode.nextReadUserId"
212
- :multiple="true"
213
- :selectUserList="selectReadUserList"
214
- :showTooltip="showTooltip"
215
- :options="userOptions"
216
- title="分阅用户"
217
- :mix="true"
218
- :types="types"
219
- @change="changeSelectReadUser($event, 'nextReadUserId')"
220
- :tabs="tabs"
221
- />
222
- </el-form-item>
223
- <el-form-item
224
- prop="presetReadUserId"
225
- v-if="canPresetRead"
226
- label="
227
- 自动分阅
228
- "
229
- >
230
- <SelectUser
231
- :nextUser="nextNode.presetReadUserId"
232
- :multiple="true"
233
- :selectUserList="selectPresetUserList"
234
- :showTooltip="showTooltip"
235
- :options="presetOptions"
236
- title="分阅用户"
237
- :radioList="presetReadUserId"
238
- :presetEdit="1"
239
- :mix="true"
240
- :types="types"
241
- @change="changeSelectReadUser($event, 'presetReadUserId')"
242
- :tabs="tabs"
243
- />
244
- </el-form-item>
245
- <el-form-item
246
- v-if="enableCustomLimitTimeSetting"
247
- prop="customLimitTime"
248
- label="限时办理"
249
- :rules="[
250
- {
251
- required: enableCustomLimitTimeSetting,
252
- message: showCustomLimitTimeText
253
- ? '请输入限时办理天数'
254
- : '请选择限时办理天数',
255
- trigger: 'blur'
256
- },
257
- {
258
- required: enableCustomLimitTimeSetting,
259
- validator: checkCustomLimitTime,
260
- trigger: 'blur'
261
- }
262
- ]"
263
- >
264
- <div style="display: flex;">
265
- <es-select
266
- v-model="nextNode.customLimitTimeText"
267
- placeholder="请选择"
268
- @change="handleChangeTime"
269
- :style="`flex:${showBtn?'unset' : '1'};width: ${showBtn?'20%' : 'unset'} !important; display: inline-block;`"
270
- sysCode="bpm_custom_limit_time"
271
- ></es-select>
272
- <el-input
273
- v-model="nextNode.customLimitTime"
274
- :style="`flex:${showBtn?'unset' : '1'};width: ${showBtn?'20%' : 'unset'} !important; display: inline-block;`"
275
- placeholder="请输入限时办理的天数"
276
- class="input-with-select custom-limit-time"
277
- @change="changeCustomLimitTime"
278
- >
279
- </el-input>
280
- <span style="margin-left:5px">天</span>
281
- </div>
282
- </el-form-item>
283
- <el-form-item
284
- v-if="isHandleExplain == 1"
285
- prop="handleExplain"
286
- label="办理说明"
287
- >
288
- <el-input
289
- placeholder="请输入办理说明"
290
- v-model="nextNode.handleExplain"
291
- />
292
- </el-form-item>
293
- <el-form-item
294
- prop="noticeType"
295
- label="通知方式"
296
- v-show="showBtn && nextNode.noticeList.length > 0"
297
- >
298
- <el-checkbox-group v-model="nextNode.noticeType">
299
- <el-checkbox
300
- v-for="item of nextNode.noticeList"
301
- :key="item.cciValue"
302
- :label="item.cciValue"
303
- :disabled="
304
- readOnlyNotificationType
305
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
306
- : false
307
- "
308
- >
309
- {{ item.shortName }}
310
- </el-checkbox>
311
- </el-checkbox-group>
312
- </el-form-item>
313
- <el-form-item
314
- v-show="nextNode.noticeType.length != 0 && showBtn"
315
- prop="nextNode"
316
- label="通知消息"
317
- >
318
- <es-input
319
- style="
320
- border-color: #ccc;
321
- padding: 5px;
322
- border-radius: 5px;
323
- font-size: 13px;
324
- "
325
- type="textarea"
326
- v-model="nextNode.noticeInfo"
327
- :readonly="notificationMessageReadOnly"
328
- />
329
- </el-form-item>
330
- <CustomPreset
331
- v-show="isCustomPreset"
332
- ref="customPreset"
333
- @changeCustom="
334
- (data) => {
335
- presetList = data;
336
- }
337
- "
338
- :customPresetHintMessage="customPresetHintMessage"
339
- @changeActiveNames="(val) => (activeNames = val)"
340
- @loadingEnd="loading = false"
341
- @loadingStart="loading = true"
342
- :nextNode="nextNode.nextNode"
343
- :id="id"
344
- :processDefinitionId="processDefinitionId"
345
- />
346
- <Preset
347
- v-show="isPreset"
348
- @changePreset="
349
- (data) => {
350
- presetUserJson = data;
351
- }
352
- "
353
- @loadingEnd="loading = false"
354
- @loadingStart="loading = true"
355
- :customPresetHintMessage="customPresetHintMessage"
356
- :nodeId="nextNode.nextNode"
357
- :businessId="id"
358
- :processDefinitionId="processDefinitionId"
359
- :presetTaskNodeMap="presetTaskNodeMap"
360
- :presetTaskNodeKeyStr="presetTaskNodeKeyStr"
361
- />
362
- </div>
363
- <el-form-item style="margin-bottom: 0px" v-show="showBtn">
364
- <div style="text-align: right">
365
- <el-button
366
- type="primary"
367
- @click="subProcess('nextNode')"
368
- >
369
- 确认
370
- </el-button>
371
- <el-button @click="quit"> 取消 </el-button>
372
- </div>
373
- </el-form-item>
374
- </el-form>
375
- <div
376
- v-if="!showBtn && nextNode.noticeList.length > 0"
377
- style="padding: 5px; background: #fff"
378
- >
379
- <div class="news" @click="showNews = !showNews">
380
- <span class="news-item">消息通知</span>
381
- <span :class="showNews ? 'show' : 'sj'"></span>
382
- </div>
383
- <div v-if="showNews" ref="messagebox" style="transition: 1s">
384
- <el-checkbox-group v-model="nextNode.noticeType">
385
- <el-checkbox
386
- v-for="item of nextNode.noticeList"
387
- :key="item.cciValue"
388
- :label="item.cciValue"
389
- :disabled="
390
- readOnlyNotificationType
391
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
392
- : false
393
- "
394
- >
395
- {{ item.shortName }}
396
- </el-checkbox>
397
- </el-checkbox-group>
398
- <es-input
399
- style="
400
- border-color: #ccc;
401
- padding: 5px;
402
- border-radius: 5px;
403
- font-size: 13px;
404
- "
405
- autosize
406
- v-show="showNews"
407
- type="textarea"
408
- v-model="nextNode.noticeInfo"
409
- @change="handleChange"
410
- :readonly="notificationMessageReadOnly"
411
- />
412
- </div>
413
- </div>
414
- </div>
415
- </template>
416
-
417
- <script>
418
- import {
419
- toStartFlow,
420
- getNodeInfo,
421
- findSysCodes,
422
- getNotificationMsg,
423
- findCodeValues,
424
- loginUserInfo,
425
- register,
426
- freeStartFlow,
427
- freeStartFlowWithSubmitTask,
428
- startReadTransferHandleFlowWithTaskReadEnd
429
- } from 'eoss-ui/src/config/api';
430
- import util from 'eoss-ui/src/utils/util';
431
- import SelectUser from './selectUser.vue';
432
- import CommonOpinions from './component/CommonOpinions.vue';
433
- import CustomPreset from './component/CustomPreset.vue';
434
- import Preset from './component/Preset.vue';
435
- export default {
436
- name: 'ProcessForm',
437
-
438
- components: {
439
- [Option.name]: Option,
440
- [SelectUser.name]: SelectUser,
441
- [CustomPreset.name]: CustomPreset,
442
- [CommonOpinions.name]: CommonOpinions,
443
- Preset
444
- },
445
- props: {
446
- processDefinitionId: {
447
- type: String,
448
- default: ''
449
- },
450
- showTooltip: { type: Boolean, default: true },
451
- copyHistory: {
452
- type: String,
453
- default: ''
454
- },
455
- simpleTips: {
456
- type: Boolean,
457
- default: true
458
- },
459
- formType: {
460
- type: String,
461
- default: 'freeStart'
462
- },
463
- id: {
464
- type: String,
465
- default: ''
466
- },
467
- pendingId: {
468
- type: String,
469
- default: ''
470
- },
471
- opinion: {
472
- type: String,
473
- default: ''
474
- },
475
- isFreeStartFlow: {
476
- type: Boolean,
477
- default: false
478
- },
479
- taskParams: {
480
- type: Object,
481
- default: () => {}
482
- },
483
- taskExamineParam: {
484
- type: String,
485
- default: ''
486
- },
487
- labelPosition: {
488
- type: String,
489
- default: 'right'
490
- },
491
- formTitle: {
492
- type: String,
493
- default: ''
494
- },
495
- showBtn: { type: Boolean, default: true },
496
- messageType: {
497
- type: Array,
498
- default: () => []
499
- },
500
- urgencyLevel: {
501
- type: [Number, String],
502
- default: ''
503
- },
504
- keyCount: {
505
- type: [Number, String],
506
- default: 0
507
- },
508
- selectorParams:{type:Object,default:()=>{}}
509
- },
510
- data() {
511
- return {
512
- loading: false,
513
- isCustomUser: 0,
514
- isCurrentNodeForbiddenChangeCandidate:0,
515
- allLoading: null,
516
- selectUser: false,
517
- multiple: false,
518
- readMultiple: true,
519
- customPresetHintMessage: '', //流程预设标题
520
- nextNodeCheckType: 'select',
521
- nextOperateCheckType: 'select',
522
- showNews: false, // 是否展示通知信息
523
- notificationMessageReadOnly: false,
524
- isChangeMessage: false,
525
- readOnlyNotificationType: '',
526
- show: true,
527
- enableCustomLimitTimeSetting: false,
528
- radioList: [],
529
- showCustomLimitTimeText: false,
530
- activeNames: '',
531
- selectUserList: [],
532
- defaultNextNode: '',
533
- presetUserJson: [],
534
- businessId: '',
535
- isTaskread: 0, //是否显示分阅用户
536
- isHandleExplain: 0, //是否展示办理说明
537
- options: [],
538
- presetList: [],
539
- presetReadUserId: [], //自动分阅
540
- canPresetRead: false, //是否展示自动分阅
541
- nextUserTypes: ['employee', 'persongroup'],
542
- isCustomPreset: false, //是否展示预设节点
543
- isPreset: false, //是否展示预设办理人
544
- isSinglePage: false,
545
- presetEdit: 0,
546
- isDefSelectedObj: 0,
547
- isChooseNextNode: 0,
548
- isHideDefaultOperation: 0,
549
- countersignaturetypeCode: 0,
550
- presetTaskNodeKeyStr: '', //预设办理人顺序
551
- presetTaskNodeMap: {}, //预设办理人
552
- params: {
553
- filid: 'all', //选择范围(my:本单位/ "" or all:全部)
554
- selectmix: 'true1',
555
- deptid: '' //指定部门(my:本部门)
556
- },
557
- newOpinion: '',
558
- operationList: [],
559
- tabs: {
560
- employee: {
561
- param: {
562
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId,
563
- name: '本单位用户'
564
- }
565
- },
566
- department: {
567
- param: {
568
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
569
- }
570
- }
571
- },
572
- userModel: {},
573
- nextUserTabs: {},
574
- selectPresetUserList: [],
575
- presetOptions: [],
576
- selectReadUserList: [],
577
- userOptions: [],
578
- mixReadList: [],
579
- mixPresetList: [],
580
- isCdjxjTaskHandle: '',
581
- isShowNextUser: true,
582
- oldMessage: '',
583
- mixOrgIdList: [], //办理对象混选
584
- subProcessColumns: [],
585
- nextOtherOrgObjSelect: [],
586
- nextCurrentOrgObjSelect: [],
587
- isHideCurrentOrg:false,
588
- isHideOtherOrg:false,
589
- currentOrgSelectorParams:{filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId,only_filid:true},
590
- foreignOrgSelectorParams:{filid: 'all', nofilid: 1},
591
- nextNode: {
592
- nodeName: '',
593
- customLimitTime: '',
594
- customLimitTimeText: '',
595
- newOpinion: '',
596
- countersignaturetypeText: '',
597
- nextNode: '',
598
- nextReadUserId: [],
599
- nextOrgId: [],
600
- noticeType: [],
601
- nextOperate: '',
602
- nextUser: [],
603
- presetReadUserId: [], //自动分阅
604
- noticeInfo: '',
605
- nodeInfo: [],
606
- userInfo: [],
607
- handleExplain: '',
608
- noticeList: [],
609
- msgTypeCount: 0
610
- }
611
- };
612
- },
613
- watch: {
614
- messageType: {
615
- handler(val) {
616
- if (this.urgencyLevel) {
617
- this.nextNode.noticeList = val;
618
- let arr = [];
619
- this.nextNode.noticeList.map((item) => {
620
- this.nextNode.noticeType.map((x) => {
621
- if (x == item.cciValue) {
622
- arr.push(x);
623
- }
624
- });
625
- });
626
- this.nextNode.noticeType = arr;
627
- } else {
628
- this.msgTypeCount++;
629
- }
630
- }
631
- },
632
- processDefinitionId(val) {
633
- Object.assign(this.$data, this.$options.data());
634
- this.getUserInfo();
635
- this.getNodeType();
636
- this.getStartFlow(val);
637
- if (this.copyHistory) {
638
- this.nextNode.newOpinion = this.opinion;
639
- } else if (this.formType != 'readTransfer') {
640
- this.newOpinion = this.opinion;
641
- }
642
- // this.getStartFlow(val);
643
- },
644
- opinion(val) {
645
- this.newOpinion = this.opinion;
646
- },
647
- formTitle: {
648
- handler(val) {
649
- if (!this.showBtn && !this.isChangeMessage) {
650
- this.nextNode.noticeInfo = this.oldMessage.replace('{title}', val);
651
- }
652
- },
653
- deep: true,
654
- immediate: true
655
- }
656
- },
657
- computed: {
658
- rules() {
659
- return {
660
- customLimitTime: [
661
- {
662
- required: this.enableCustomLimitTimeSetting,
663
- message: this.showCustomLimitTimeText
664
- ? '请输入限时办理天数'
665
- : '请选择限时办理天数',
666
- trigger: 'blur'
667
- },
668
- {
669
- required: this.enableCustomLimitTimeSetting,
670
- validator: this.checkCustomLimitTime,
671
- trigger: 'blur'
672
- }
673
- ]
674
- };
675
- },
676
- types() {
677
- if (this.isCdjxjTaskHandle == 'true') {
678
- return ['employee', 'enterprise', 'department'];
679
- } else {
680
- return ['employee', 'enterprise', 'department', 'persongroup'];
681
- }
682
- }
683
- },
684
- created() {
685
- this.getUserInfo();
686
- },
687
- mounted() {
688
- if (!this.urgencyLevel) {
689
- this.getNodeType();
690
- }
691
- this.getStartFlow(this.processDefinitionId);
692
- if (this.copyHistory) {
693
- this.nextNode.newOpinion = this.opinion;
694
- } else if (this.formType != 'readTransfer') {
695
- this.newOpinion = this.opinion;
696
- }
697
- },
698
- methods: {
699
- handleChangeTime(val){
700
- this.nextNode.customLimitTime = val;
701
- },
702
- limitTimevalidate() {
703
- let validSate = true;
704
- this.$refs.nextNode.validate((valid) => {
705
- if (valid) {
706
- validSate = true;
707
- } else {
708
- validSate = false;
709
- }
710
- });
711
- return validSate;
712
- },
713
- checkCustomLimitTime(rule, value, callback) {
714
- if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
715
- callback(new Error('请输入正确的天数'));
716
- this.nextNode.customLimitTime = '';
717
- } else {
718
- callback();
719
- }
720
- },
721
- handleChange() {
722
- this.isChangeMessage = true;
723
- },
724
- changeCustomLimitTime(val) {
725
- if (!Number(val) || val.indexOf('.') != -1 || Number(val) < 0) {
726
- this.$message.warning('请输入正确的天数');
727
- this.nextNode.customLimitTime = '';
728
- }
729
- },
730
- getUserInfo() {
731
- let mainConfig = util.getStorage('mainConfig');
732
- if (mainConfig) {
733
- this.userModel = JSON.parse(mainConfig).userModel;
734
- this.foreignOrgSelectorParams.nofilid = this.userModel.orgId
735
- this.foreignOrgSelectorParams.roleid = this.currentOrgSelectorParams.roleid = this.selectorParams.roleid
736
- } else {
737
- util
738
- .ajax({ url: loginUserInfo })
739
- .then((res) => {
740
- const { status, data } = res;
741
- if (status == 'success') {
742
- this.userModel = data;
743
- this.foreignOrgSelectorParams.nofilid = this.userModel.orgId
744
- this.foreignOrgSelectorParams.roleid = tthis.currentOrgSelectorParams.roleid = this.selectorParams.roleid
745
- } else {
746
- let msg = res.msg || '系统错误,请联系管理员!';
747
- this.$message.error(msg);
748
- }
749
- })
750
- .catch((err) => {
751
- if (err.message && err.message !== 'canceled') {
752
- this.$message.error(err.message);
753
- }
754
- });
755
- }
756
- },
757
- getIsShowNextUser(val) {
758
- if (
759
- val == 7 ||
760
- val == 8 ||
761
- val == 9 ||
762
- val == 10 ||
763
- val == 11 ||
764
- val == 12
765
- ) {
766
- this.isShowNextUser = false;
767
- //设置办理角色
768
- // $("#orgRoleCode").val(handleRoleId);
769
- if (val == 7 || val == 8) {
770
- this.nextUserTypes = ['department'];
771
- this.nextUserTabs = {
772
- department: {
773
- param: {
774
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
775
- }
776
- }
777
- };
778
- this.multiple = true;
779
- } else if (val == 9 || val == 10) {
780
- this.nextUserTypes = ['enterprise'];
781
- this.nextUserTabs = { enterprise: { param: { filid: 'other' } } };
782
- this.multiple = true;
783
- } else if (val == 11 || val == 12) {
784
- this.nextUserTypes = ['department', 'enterprise'];
785
- this.nextUserTabs = {
786
- enterprise: { param: { filid: 'other' } },
787
- department: {
788
- param: {
789
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
790
- }
791
- }
792
- };
793
- this.multiple = true;
794
- }
795
- }
796
- if (val == 7 || val == 9 || val == 11) {
797
- this.multiple = false;
798
- }
799
- },
800
- // 分阅是否多选
801
- isReadMultiple(nextReadUserSelectType) {
802
- if (nextReadUserSelectType == 1) {
803
- this.readMultiple = false;
804
- } else if (nextReadUserSelectType == 2) {
805
- this.readMultiple = true;
806
- } else if (nextReadUserSelectType == 3) {
807
- this.readMultiple = false;
808
- } else if (nextReadUserSelectType == 4) {
809
- this.readMultiple = true;
810
- } else if (nextReadUserSelectType == 5) {
811
- this.readMultiple = false;
812
- } else if (nextReadUserSelectType == 6) {
813
- this.readMultiple = true;
814
- }
815
- },
816
- changeSelectReadUser(val, type) {
817
- const { nextUser, mixList } = val;
818
- this.nextNode[type] = nextUser;
819
- if (type === 'presetReadUserId') {
820
- this.mixPresetList = mixList;
821
- } else {
822
- this.mixReadList = mixList;
823
- }
824
- },
825
- selecNext(val) {
826
- this.nextNode.nextUser = [];
827
- this.options = [];
828
- this.selectUserList = [];
829
- this.radioList = [];
830
- if (this.showBtn) {
831
- this.loading = true;
832
- } else {
833
- this.allLoading = util.loading(this.$loading, '加载中...');
834
- }
835
- this.nextNode.nodeInfo = this.operationList[val].list;
836
- if (this.nextNode.nodeInfo.length > 0) {
837
- this.nextNode.nextNode =
838
- this.defaultNextNode || this.nextNode.nodeInfo[0].nodeId;
839
- }
840
- this.getNodeInfos();
841
- },
842
- changeSelectUser(val, type) {
843
- const { nextUser, options, mixList } = val;
844
- this.nextNode[type] = nextUser;
845
- this.mixOrgIdList = mixList;
846
- },
847
- getsubProcessColumns() {
848
- let data = [];
849
- let obj = { name: '[部门员工]-' };
850
- if (this.nextCurrentOrgObjSelect.length > 0) {
851
- this.nextCurrentOrgObjSelect.map((x) => {
852
- if (x.stype == 'employee') {
853
- obj.name = !obj.value
854
- ? obj.name + x.showname
855
- : obj.name + ',' + x.showname;
856
- obj.value = obj.value
857
- ? obj.value + ',' + x.showid
858
- : 'employee-' + x.showid;
859
- } else {
860
- data.push({
861
- name: '[部门]' + x.showname,
862
- value: 'department-' + x.showid
863
- });
864
- }
865
- });
866
- }
867
- obj.value && data.push(obj);
868
- if (this.nextOtherOrgObjSelect.length > 0) {
869
- this.nextOtherOrgObjSelect.map((x) => {
870
- data.push({
871
- name: '[企业]' + x.showname,
872
- value: 'enterprise-' + x.showid
873
- });
874
- });
875
- }
876
- this.subProcessColumns = data;
877
- // return data;
878
- },
879
- // 单位选择完回调
880
- disposeAppUnit(res, type) {
881
- let label = type.substring(0, type.lastIndexOf('Select'));
882
- this.nextNode[label + 'Name'] = '';
883
- res.options && (this[type] = res.options);
884
- let obj = {};
885
- // if (typeof res.mixList == 'array')
886
- res.mixList && (this.nextNode[label] = res.mixList.join('|'));
887
- res.options.map((item) => {
888
- if (obj[item.stype]) {
889
- obj[item.stype].push(item.showname);
890
- } else {
891
- obj[item.stype] = [item.showname];
892
- }
893
- });
894
- for (let key in obj) {
895
- if (
896
- key === 'enterprise' &&
897
- this.nextNode[label + 'Name'].indexOf('[企业]') == -1
898
- ) {
899
- this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
900
- ? this.nextNode[label + 'Name'] +
901
- '|' +
902
- '[企业]-' +
903
- obj[key].join(',')
904
- : '' + '[企业]-' + obj[key].join(',');
905
- }
906
- if (
907
- key === 'department' &&
908
- this.nextNode[label + 'Name'].indexOf('[部门]') == -1
909
- ) {
910
- this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
911
- ? this.nextNode[label + 'Name'] +
912
- '|' +
913
- '[部门]-' +
914
- obj[key].join(',')
915
- : '' + '[部门]-' + obj[key].join(',');
916
- }
917
- if (
918
- key === 'employee' &&
919
- this.nextNode[label + 'Name'].indexOf('[部门员工]') == -1
920
- ) {
921
- this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
922
- ? this.nextNode[label + 'Name'] +
923
- '|' +
924
- '[部门员工]-' +
925
- obj[key].join(',')
926
- : '' + '[部门员工]-' + obj[key].join(',');
927
- }
928
- }
929
- // this.nextNode[label + 'Name'] = obj.enterprise?;
930
- if (!this.currentNodeIsCircularReadNode) {
931
- this.nextNode[label + 'SerialId'] = res.nextUser.join(',');
932
- this.nextNode[label + 'Json'] = JSON.stringify(res.options);
933
- }
934
- this.getsubProcessColumns();
935
- },
936
- getNodeType() {
937
- util
938
- .ajax({
939
- url: findCodeValues,
940
- params: {
941
- ccCode: 'notification_type',
942
- userId: util.getStorage('userId')
943
- }
944
- })
945
- .then((res) => {
946
- const { status, data } = res;
947
- if (status === 'success') {
948
- this.nextNode.noticeList = data;
949
- }
950
- })
951
- .catch((err) => {
952
- if (this.showBtn) {
953
- this.loading = false;
954
- } else {
955
- this.allLoading.close();
956
- }
957
- if (err.message && err.message !== 'canceled') {
958
- this.$message.error(err.message);
959
- }
960
- });
961
- },
962
- //获取通知信息
963
- getMessage() {
964
- let params = {
965
- processDefinitionId: this.processDefinitionId,
966
- nodeId: this.nextNode.nextNode,
967
- businessId: this.id
968
- };
969
- if (!this.showBtn) {
970
- params.openMode = 'samepage';
971
- }
972
- util
973
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
974
- .then((res) => {
975
- if (res.status === 'success') {
976
- if (!this.showBtn) {
977
- this.oldMessage = res.message;
978
- this.nextNode.noticeInfo = res.message.replace(
979
- '{title}',
980
- this.formTitle
981
- );
982
- } else {
983
- this.nextNode.noticeInfo = res.message;
984
- }
985
- }
986
- })
987
- .catch((err) => {
988
- if (this.showBtn) {
989
- this.loading = false;
990
- } else {
991
- this.allLoading.close();
992
- }
993
- if (err.message && err.message !== 'canceled') {
994
- this.$message.error(err.message);
995
- }
996
- });
997
- },
998
- // 提交表单
999
- subProcess(formName) {
1000
- this.saveProcess(formName);
1001
- },
1002
- saveProcess(formName) {
1003
- this.$refs[formName].validate((valid) => {
1004
- if (valid) {
1005
- const {
1006
- nextNode,
1007
- nextUser,
1008
- noticeInfo,
1009
- noticeType,
1010
- handleExplain,
1011
- presetReadUserId,
1012
- nextReadUserId,
1013
- nextOrgId,
1014
- newOpinion,
1015
- customLimitTime,
1016
- nextOtherOrgObj,
1017
- nextCurrentOrgObj
1018
- } = this.nextNode;
1019
- // if (noticeType.length === 0) {
1020
- // return this.$message.warning('请选择通知方式');
1021
- // }
1022
- if (this.isShowNextUser) {
1023
- if ((nextUser == '' || (this.multiple && nextUser.length == 0)) && !this.isHideCurrentOrg && !this.isHideOtherOrg) {
1024
- return this.$message.warning('请选择下步办理人');
1025
- }
1026
- } else {
1027
- if (nextOrgId == '' || (this.multiple && nextOrgId.length == 0)) {
1028
- return this.$message.warning('请选择办理对象');
1029
- }
1030
- }
1031
- if((this.isHideOtherOrg || this.isHideCurrentOrg) && !nextCurrentOrgObj && !nextOtherOrgObj){
1032
- return this.$message.warning('请选择办理对象');
1033
- }
1034
- if (this.showBtn) {
1035
- this.loading = true;
1036
- } else {
1037
- this.allLoading = util.loading(this.$loading, '加载中...');
1038
- }
1039
- let newNextUser = [];
1040
- if (this.multiple) {
1041
- nextUser && nextUser.map((item) => newNextUser.push(item));
1042
- }
1043
- let newNoticeType = '';
1044
- if (noticeType) {
1045
- newNoticeType = noticeType.join(',');
1046
- }
1047
- let params = {
1048
- processDefinitionId: this.processDefinitionId,
1049
- nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1050
- nextNodeId: nextNode,
1051
- businessId: this.businessId,
1052
- notificationType: newNoticeType,
1053
- userId: util.getStorage('userId'),
1054
- notificationMsg: noticeInfo,
1055
- customPresetUserJson: JSON.stringify(this.presetList),
1056
- presetUserJson: JSON.stringify(this.presetUserJson),
1057
- nextReadUserId: this.readMultiple
1058
- ? this.mixReadList && this.mixReadList.join('|')
1059
- : nextReadUserId,
1060
- nextOrgId: !this.isShowNextUser
1061
- ? this.multiple
1062
- ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1063
- : nextOrgId
1064
- : '',
1065
- handleExplain: handleExplain,
1066
- presetReadUserId:
1067
- this.mixPresetList && this.mixPresetList.length > 0
1068
- ? this.mixPresetList.join('|')
1069
- : presetReadUserId.join(','),
1070
- opinion: this.newOpinion || newOpinion
1071
- };
1072
- if (this.enableCustomLimitTimeSetting) {
1073
- params.customLimitTime = customLimitTime;
1074
- if (!customLimitTime) {
1075
- this.$message.warning('请选择或输入限时办理的天数');
1076
- this.nextNode.customLimitTime = '';
1077
- return;
1078
- } else if (
1079
- !Number(customLimitTime) ||
1080
- customLimitTime.indexOf('.') != -1 ||
1081
- Number(customLimitTime) < 0
1082
- ) {
1083
- this.$message.warning('请输入正确的天数');
1084
- this.nextNode.customLimitTime = '';
1085
- return;
1086
- }
1087
- }
1088
- if(this.isHideCurrentOrg){
1089
- params.nextCurrentOrgObj = nextCurrentOrgObj
1090
- }
1091
- if(this.isHideOtherOrg){
1092
- params.nextOtherOrgObj = nextOtherOrgObj
1093
- }
1094
- if (this.activeNames != '1') delete params.customPresetUserJson;
1095
- if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1096
- let newParm = {};
1097
- newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
1098
- newParm.startFlowParamJson = params;
1099
- // newParm.startFlowParamJson.businessId = this.id; //this.id
1100
- newParm.startFlowParamJson.taskExamineParam = {
1101
- startFlowFirstNodeName: this.taskExamineParam
1102
- };
1103
- newParm.startFlowParamJson = JSON.stringify(
1104
- newParm.startFlowParamJson
1105
- );
1106
- for (let key in this.taskParams) {
1107
- if (Array.isArray(this.taskParams[key])) {
1108
- this.taskParams[key] =
1109
- this.taskParams[key].length > 0
1110
- ? this.taskParams[key].join(',')
1111
- : '';
1112
- }
1113
- }
1114
-
1115
- newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1116
- if (this.formType == 'readTransfer') {
1117
- newParm.readTransferHandleStartFlowParamJson =
1118
- JSON.stringify(params);
1119
- newParm.taskReadEndParamJson = JSON.stringify(this.taskParams);
1120
- delete newParm.copyHistory;
1121
- delete newParm.startFlowParamJson;
1122
- delete newParm.submitTaskParamJson;
1123
- }
1124
- params = newParm;
1125
- }
1126
- if (this.copyHistory && !this.isFreeStartFlow) {
1127
- params.pendingId = this.pendingId;
1128
- delete params.businessId;
1129
- }
1130
- util
1131
- .ajax({
1132
- url: this.isFreeStartFlow
1133
- ? freeStartFlowWithSubmitTask
1134
- : this.formType == 'readTransfer'
1135
- ? startReadTransferHandleFlowWithTaskReadEnd
1136
- : this.copyHistory
1137
- ? freeStartFlow
1138
- : register,
1139
- method: 'post',
1140
- data: params
1141
- })
1142
- .then((res) => {
1143
- const { status, message } = res;
1144
- if (this.showBtn) {
1145
- this.loading = false;
1146
- } else {
1147
- this.allLoading.close();
1148
- }
1149
- if (status === 'success' || res.rCode == 0) {
1150
- this.quit(true);
1151
- this.simpleTips && this.$message.success('操作成功');
1152
- } else {
1153
- this.$message.error(message || '系统错误,请联系管理员!');
1154
- }
1155
- })
1156
- .catch((err) => {
1157
- if (this.showBtn) {
1158
- this.loading = false;
1159
- } else {
1160
- this.allLoading.close();
1161
- }
1162
- if (err.message && err.message !== 'canceled') {
1163
- this.$message.error(err.message);
1164
- }
1165
- });
1166
- } else {
1167
- return false;
1168
- }
1169
- });
1170
- },
1171
- getNodeInfos(nodeId, index) {
1172
- let params = {
1173
- processDefinitionId: this.processDefinitionId,
1174
- nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
1175
- businessId: this.id,
1176
- userId: util.getStorage('userId')
1177
- };
1178
- util
1179
- .ajax({ url: getNodeInfo, params })
1180
- .then((res) => {
1181
- const {
1182
- status,
1183
- message,
1184
- data: {
1185
- nextUserList,
1186
- nodeExtAttr,
1187
- countersignaturetypeText,
1188
- countersignaturetypeCode
1189
- }
1190
- } = res;
1191
- if (this.showBtn) {
1192
- this.loading = false;
1193
- } else {
1194
- this.allLoading.close();
1195
- }
1196
- if (status === 'success') {
1197
- this.isCurrentNodeForbiddenChangeCandidate =
1198
- nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
1199
- this.nextNode.userInfo = nextUserList;
1200
- this.countersignaturetypeCode = countersignaturetypeCode;
1201
- this.nextNode.countersignaturetypeText = countersignaturetypeText;
1202
- this.enableCustomLimitTimeSetting =
1203
- nodeExtAttr.enableCustomLimitTimeSetting == 1;
1204
- this.isTaskread = nodeExtAttr.isTaskread;
1205
- this.isHandleExplain = nodeExtAttr.isHandleExplain;
1206
- this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
1207
- this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
1208
- this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
1209
- if (
1210
- nodeExtAttr.userSelectionType == 7 ||
1211
- nodeExtAttr.userSelectionType == 8 ||
1212
- nodeExtAttr.userSelectionType == 9 ||
1213
- nodeExtAttr.userSelectionType == 10 ||
1214
- nodeExtAttr.userSelectionType == 11 ||
1215
- nodeExtAttr.userSelectionType == 12
1216
- ) {
1217
- this.getIsShowNextUser(
1218
- nodeExtAttr && nodeExtAttr.userSelectionType
1219
- );
1220
- } else {
1221
- const { multiple, params } = this.isMultiple(
1222
- nodeExtAttr.userSelectionType
1223
- );
1224
- this.multiple = multiple;
1225
- this.params = params;
1226
- }
1227
- // this.isReadMultiple(nodeExtAttr.userSelectionType);
1228
- if (nodeExtAttr.nodeType === 1 || nodeExtAttr.nodeType === 2) {
1229
-
1230
- this.isHideCurrentOrg =
1231
- nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
1232
- this.isHideOtherOrg = nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
1233
- } else {
1234
- this.isHideCurrentOrg = false;
1235
- this.isHideOtherOrg = false;
1236
- }
1237
- nextUserList.map((item) => {
1238
- if (
1239
- this.multiple &&
1240
- nodeExtAttr.isDefSelectedObj == 1 &&
1241
- nextUserList !== undefined
1242
- ) {
1243
- this.nextNode.nextUser.push(item.userId);
1244
- this.selectUserList.push({
1245
- showname: item.username,
1246
- showid: item.userId
1247
- });
1248
- }
1249
-
1250
- this.options.push({
1251
- showname: item.username,
1252
- showid: item.userId
1253
- });
1254
- });
1255
- if (this.multiple) {
1256
- this.nextNode.nextReadUserId = [];
1257
- } else {
1258
- this.nextNode.nextReadUserId = '';
1259
- }
1260
- if (
1261
- nextUserList.length > 0 &&
1262
- nodeExtAttr.isDefSelectedObj == 1 &&
1263
- !this.multiple
1264
- ) {
1265
- this.nextNode.nextUser = nextUserList[0].userId;
1266
- this.selectUserList.push({
1267
- showname: nextUserList[0].username,
1268
- showid: nextUserList[0].userId
1269
- });
1270
- }
1271
- this.radioList = this.options;
1272
- } else {
1273
- this.$message.error(message || '系统错误,请联系管理员!');
1274
- }
1275
- nodeId && this.$refs.selectUser[index].changeInfo();
1276
- })
1277
- .catch((err) => {
1278
- if (this.showBtn) {
1279
- this.loading = false;
1280
- } else {
1281
- this.allLoading.close();
1282
- }
1283
- if (err.message && err.message !== 'canceled') {
1284
- this.$message.error(err.message);
1285
- }
1286
- });
1287
- },
1288
- changeSel(val) {
1289
- this.nextNode.nextUser = [];
1290
- this.options = [];
1291
- this.selectUserList = [];
1292
- this.radioList = [];
1293
- if (this.showBtn) {
1294
- this.loading = true;
1295
- } else {
1296
- this.allLoading = util.loading(this.$loading, '加载中...');
1297
- }
1298
- this.getNodeInfos();
1299
- },
1300
- // 取消
1301
- quit(val) {
1302
- if (val === true) return this.$emit('cancel', val);
1303
- this.$emit('cancel', false);
1304
- },
1305
- getFind() {
1306
- util
1307
- .ajax({
1308
- url: findSysCodes
1309
- })
1310
- .then((res) => {
1311
- const { status, message } = res;
1312
- if (status === 'success') {
1313
- this.nextNode.noticeType = message.split(',');
1314
- let arr = [];
1315
- this.nextNode.noticeList.map((item) => {
1316
- this.nextNode.noticeType.map((x) => {
1317
- if (x == item.cciValue) {
1318
- arr.push(x);
1319
- }
1320
- });
1321
- });
1322
- this.nextNode.noticeType = arr;
1323
- } else {
1324
- this.$message.error(message || '系统错误,请联系管理员!');
1325
- }
1326
- })
1327
- .catch((err) => {
1328
- if (this.showBtn) {
1329
- this.loading = false;
1330
- } else {
1331
- this.allLoading.close();
1332
- }
1333
- if (err.message && err.message !== 'canceled') {
1334
- this.$message.error(err.message);
1335
- }
1336
- });
1337
- },
1338
- /**
1339
- * isMultiple
1340
- * @desc:是否多选
1341
- * @author liufan
1342
- * @date 2022年9月13日
1343
- **/
1344
- isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
1345
- let multiple = false;
1346
- let params = {};
1347
- if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
1348
- multiple = true;
1349
- }
1350
- if (val == 1 || val == 2 || val == 5) {
1351
- params.filid = this.userModel.orgId;
1352
- params.only_filid = true;
1353
- if (choiceOrgId) {
1354
- params.filid = choiceOrgId;
1355
- }
1356
- }
1357
- if (val == 5 || val == 6) {
1358
- params.filid = this.userModel.orgId;
1359
- params.deptid = this.userModel.orgId;
1360
- if (choiceDeptId) {
1361
- params.deptid = choiceDeptId;
1362
- }
1363
- if (choiceOrgId) {
1364
- params.filid = choiceOrgId;
1365
- }
1366
- }
1367
- if (val == 15 || val == 16) {
1368
- params.filid = this.userModel.orgId;
1369
- if (pOrgId) {
1370
- params.filid = pOrgId;
1371
- }
1372
- }
1373
- return { multiple, params };
1374
- },
1375
- getStartFlow(processId) {
1376
- if (!processId) {
1377
- return false;
1378
- }
1379
- if (this.showBtn) {
1380
- this.loading = true;
1381
- } else {
1382
- this.allLoading = util.loading(this.$loading, '加载中...');
1383
- }
1384
- this.businessId = this.id;
1385
- let params = {
1386
- processDefinitionId: processId, // processId || this.processDefinitionId,
1387
- userId: util.getStorage('userId'),
1388
- businessId: this.businessId
1389
- };
1390
- if(!this.shwowBtn){
1391
- params.taskAction = "toStartFlowWithoutTempSave"
1392
- }
1393
- // 获取节点
1394
- util
1395
- .ajax({ url: toStartFlow, params })
1396
- .then((res) => {
1397
- //pc接口返回数据处理
1398
- const { status, message, data } = res;
1399
- if (status == 'success') {
1400
- data.nodeInfoMap.nodeExtAttr.submitTipsMsg &&
1401
- this.$confirm(
1402
- data.nodeInfoMap.nodeExtAttr.submitTipsMsg,
1403
- '提示',
1404
- {
1405
- confirmButtonText: '确定',
1406
- cancelButtonText: '取消',
1407
- type: 'warning'
1408
- }
1409
- )
1410
- .then(() => {})
1411
- .catch(() => {
1412
- this.quit();
1413
- });
1414
- data.nextNodeCheckType &&
1415
- (this.nextNodeCheckType = data.nextNodeCheckType);
1416
- data.nextOperateCheckType &&
1417
- (this.nextOperateCheckType = data.nextOperateCheckType);
1418
- this.customPresetHintMessage = data.customPresetHintMessage;
1419
- this.readOnlyNotificationType = data.readOnlyNotificationType;
1420
- this.notificationMessageReadOnly =
1421
- data.notificationMessageReadOnly == 'true';
1422
- this.nextNode.nodeInfo = data.nextNodeList;
1423
- this.nextNode.nextNode = data.nextNodeList[0].nodeId;
1424
- this.isPreset = data.isPreset;
1425
- this.isHideDefaultOperation =
1426
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
1427
- this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
1428
- this.isChooseNextNode =
1429
- data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
1430
- this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
1431
- if (this.isChooseNextNode == 1) {
1432
- this.operationList = [
1433
- { key: 0, value: '默认', list: [] },
1434
- { key: 1, value: '自定义', list: [] }
1435
- ];
1436
- let arr = [];
1437
- for (let key in data.taskNodeMap) {
1438
- arr.push({ nodeName: data.taskNodeMap[key], nodeId: key });
1439
- }
1440
- this.operationList[0].list = data.nextNodeList;
1441
- this.operationList[1].list = arr;
1442
- if (this.isHideDefaultOperation != 1) {
1443
- this.nextNode.nextOperate = 0;
1444
- this.nextNode.nodeInfo = this.operationList[0].list;
1445
- if (this.nextNode.nodeInfo.length > 0) {
1446
- let defaultNodeData = data.nextNodeList.filter(
1447
- (x) => x.nodeId == this.defaultNextNode
1448
- );
1449
- this.nextNode.nextNode =
1450
- defaultNodeData.length > 0
1451
- ? this.defaultNextNode
1452
- : data.nextNodeList[0].nodeId;
1453
- }
1454
- } else if (
1455
- data.nodeInfoMap.nodeExtAttr.defaultNextOperate == 1 ||
1456
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation == 1
1457
- ) {
1458
- // this.nextNode.nodeInfo = data.nextNodeList
1459
- this.nextNode.nextOperate = 1;
1460
- this.nextNode.nodeInfo = this.operationList[1].list;
1461
- if (this.nextNode.nodeInfo.length > 0) {
1462
- let defaultNodeData = data.nextNodeList.filter(
1463
- (x) => x.nodeId == this.defaultNextNode
1464
- );
1465
- this.nextNode.nextNode =
1466
- defaultNodeData.length > 0
1467
- ? this.defaultNextNode
1468
- : data.nextNodeList[0].nodeId;
1469
- }
1470
- }
1471
- }
1472
- this.isCustomPreset = data.isCustomPreset;
1473
- this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
1474
- this.presetTaskNodeMap = data.presetTaskNodeMap;
1475
- this.isSinglePage = data.taskExamine.isSinglePage;
1476
- this.isSinglePage &&
1477
- (this.nextNode.opinion = data.taskExamine.opinion);
1478
- // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
1479
- this.nextNode.nodeName = data.taskExamine.nodeName;
1480
- this.canPresetRead = data.canPresetRead;
1481
- if (data.canPresetRead) {
1482
- let ids =
1483
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
1484
- let names =
1485
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
1486
- ','
1487
- );
1488
- ids.map((item, index) => {
1489
- this.presetReadUserId.push({
1490
- showid: item,
1491
- showname: names[index]
1492
- });
1493
- this.selectPresetUserList.push({
1494
- showid: item,
1495
- showname: names[index]
1496
- });
1497
- this.nextNode.presetReadUserId.push(item);
1498
- });
1499
- }
1500
- this.getNodeInfos();
1501
- // this.getPresetFlowInfo();
1502
- this.isCustomPreset &&
1503
- this.$refs.customPreset.getPresetFlowInfo(this.nextNode.nextNode);
1504
- this.getFind();
1505
- this.getMessage();
1506
- } else {
1507
- this.$message.error(message || '系统错误,请联系管理员!');
1508
- }
1509
- })
1510
- .catch((err) => {
1511
- if (this.showBtn) {
1512
- this.loading = false;
1513
- } else {
1514
- this.allLoading.close();
1515
- }
1516
- if (err.message && err.message !== 'canceled') {
1517
- this.$message.error(err.message);
1518
- }
1519
- });
1520
- }
1521
- }
1522
- };
1523
- </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
+ >
9
+ <el-form
10
+ ref="nextNode"
11
+ :model="nextNode"
12
+ class="demo-dynamic"
13
+ label-width="100px"
14
+ :rules="rules"
15
+ :label-position="labelPosition"
16
+ >
17
+ <div
18
+ :style="`height:${
19
+ showBtn ? '430px' : 'auto'
20
+ }; overflow-y:${showBtn ? 'auto' : 'hidden'} ; margin-bottom: 10px;overflow-x: hidden;`"
21
+ >
22
+ <el-form-item
23
+ v-show="showBtn"
24
+ prop="nodeName"
25
+ label="当前节点"
26
+ :rules="[
27
+ { required: true, message: `请选择下步节点`, trigger: 'blur' }
28
+ ]"
29
+ >
30
+ <el-input v-model="nextNode.nodeName" disabled />
31
+ </el-form-item>
32
+ <el-form-item
33
+ v-if="isSinglePage || copyHistory || formType == 'readTransfer'"
34
+ prop="newOpinion"
35
+ :label="
36
+ copyHistory || formType == 'readTransfer' ? '填写意见' : '意见'
37
+ "
38
+ >
39
+ <CommonOpinions
40
+ class="opinions"
41
+ :opinion="nextNode.newOpinion"
42
+ :rows="copyHistory || formType == 'readTransfer' ? 2 : 5"
43
+ @change="(val) => (nextNode.newOpinion = val)"
44
+ />
45
+ </el-form-item>
46
+ <el-form-item
47
+ prop="nextOperate"
48
+ label="下步操作"
49
+ v-if="isChooseNextNode == 1"
50
+ :rules="[
51
+ { required: true, message: `请选择下步操作`, trigger: 'blur' }
52
+ ]"
53
+ >
54
+ <el-select
55
+ v-if="nextOperateCheckType == 'select'"
56
+ v-model="nextNode.nextOperate"
57
+ :placeholder="`请选择下步操作`"
58
+ @change="selecNext"
59
+ >
60
+ <el-option
61
+ v-for="items in operationList"
62
+ :key="items.key"
63
+ :label="items.value"
64
+ :value="items.key"
65
+ ></el-option>
66
+ </el-select>
67
+ <es-radio-group
68
+ v-else-if="nextOperateCheckType == 'radio'"
69
+ v-model="nextNode.nextOperate"
70
+ :data="operationList"
71
+ @change="selecNext($event, true)"
72
+ value-key="key"
73
+ label-key="value"
74
+ ></es-radio-group>
75
+ </el-form-item>
76
+ <el-form-item
77
+ prop="nextNode"
78
+ label="下步节点"
79
+ :rules="[
80
+ { required: false, message: `请选择下步节点`, trigger: 'blur' }
81
+ ]"
82
+ >
83
+ <el-select
84
+ v-if="nextNodeCheckType == 'select'"
85
+ v-model="nextNode.nextNode"
86
+ :placeholder="`请选择下步节点`"
87
+ @change="changeSel"
88
+ >
89
+ <el-option
90
+ v-for="items in nextNode.nodeInfo"
91
+ :key="items.id"
92
+ :label="items.nodeName"
93
+ :value="items.nodeId"
94
+ ></el-option>
95
+ </el-select>
96
+ <es-radio-group
97
+ v-else-if="nextNodeCheckType == 'radio'"
98
+ v-model="nextNode.nextNode"
99
+ :data="nextNode.nodeInfo"
100
+ @change="changeSel"
101
+ value-key="nodeId"
102
+ label-key="nodeName"
103
+ ></es-radio-group>
104
+ </el-form-item>
105
+ <el-form-item
106
+ v-if="countersignaturetypeCode != 0"
107
+ prop="countersignaturetypeText"
108
+ label="处理方式"
109
+ >
110
+ <el-input
111
+ v-model="nextNode.countersignaturetypeText"
112
+ placeholder="请输入内容"
113
+ disabled
114
+ />
115
+ </el-form-item>
116
+ <!-- <el-form-item
117
+ prop="nextNode"
118
+ label="下步办理人"
119
+ v-if="isShowNextUser"
120
+ :rules="[
121
+ { required: true, message: `请选择下步办理人`, trigger: 'blur' }
122
+ ]"
123
+ >
124
+ <SelectUser
125
+ :nextUser="nextNode.nextUser"
126
+ :radioList="radioList"
127
+ :multiple="multiple"
128
+ :showTooltip="showTooltip"
129
+ :isCustomUser="isCustomUser"
130
+ :options="options"
131
+ :presetEdit="presetEdit"
132
+ :isDefSelectedObj="isDefSelectedObj"
133
+ :selectUserList="selectUserList"
134
+ @change="changeSelectUser"
135
+ :types="nextUserTypes"
136
+ :params="params"
137
+ />
138
+ </el-form-item> -->
139
+ <el-form-item
140
+ v-if="isHideCurrentOrg"
141
+ prop="nextCurrentOrgObj"
142
+ label="本单位"
143
+ >
144
+ <SelectUser
145
+ :nextUser="nextCurrentOrgObjSelect"
146
+ multiple
147
+ mix
148
+ @change="disposeAppUnit($event, 'nextCurrentOrgObjSelect')"
149
+ :showTooltip="showTooltip"
150
+ :types="['employee', 'persongroup']"
151
+ :params="currentOrgSelectorParams"
152
+ />
153
+ </el-form-item>
154
+ <el-form-item
155
+ v-if="isHideOtherOrg"
156
+ label="外单位"
157
+ >
158
+ <SelectUser
159
+ :nextUser="nextOtherOrgObjSelect"
160
+ multiple
161
+ :showTooltip="showTooltip"
162
+ mix
163
+ :where="{ filid: 'other' }"
164
+ @change="disposeAppUnit($event, 'nextOtherOrgObjSelect')"
165
+ :types="['enterprise', 'filgroup']"
166
+ :params="foreignOrgSelectorParams"
167
+ />
168
+ </el-form-item>
169
+ <el-form-item
170
+ v-if="!isHideOtherOrg && !isHideCurrentOrg"
171
+ :prop="isShowNextUser ? 'nextUser' : 'nextOrgId'"
172
+ :label="isShowNextUser ? '下步办理人' : '办理对象'"
173
+ >
174
+ <SelectUser
175
+ :nextUser="isShowNextUser ? nextNode.nextUser : nextNode.nextOrgId"
176
+ :radioList="radioList"
177
+ :multiple="multiple"
178
+ :isCustomUser="!isShowNextUser ? 1 : isCustomUser"
179
+ :showTooltip="showTooltip"
180
+ :isCurrentNodeForbiddenChangeCandidate="isCurrentNodeForbiddenChangeCandidate"
181
+ :options="options"
182
+ :presetEdit="presetEdit"
183
+ :mix="multiple"
184
+ :isDefSelectedObj="isDefSelectedObj"
185
+ :selectUserList="selectUserList"
186
+ @change="
187
+ changeSelectUser(
188
+ $event,
189
+ isShowNextUser ? 'nextUser' : 'nextOrgId'
190
+ )
191
+ "
192
+ :types="
193
+ !isShowNextUser
194
+ ? nextUserTypes
195
+ : isCdjxjTaskHandle != 'true'
196
+ ? ['employee', 'persongroup']
197
+ : ['employee']
198
+ "
199
+ :params="isShowNextUser ? params : {}"
200
+ :tabs="nextUserTabs"
201
+ />
202
+ </el-form-item>
203
+ <el-form-item
204
+ prop="nextReadUserId"
205
+ v-if="isTaskread == 1"
206
+ label="
207
+ 分阅用户
208
+ "
209
+ >
210
+ <SelectUser
211
+ :nextUser="nextNode.nextReadUserId"
212
+ :multiple="true"
213
+ :selectUserList="selectReadUserList"
214
+ :showTooltip="showTooltip"
215
+ :options="userOptions"
216
+ title="分阅用户"
217
+ :mix="true"
218
+ :types="types"
219
+ @change="changeSelectReadUser($event, 'nextReadUserId')"
220
+ :tabs="tabs"
221
+ />
222
+ </el-form-item>
223
+ <el-form-item
224
+ prop="presetReadUserId"
225
+ v-if="canPresetRead"
226
+ label="
227
+ 自动分阅
228
+ "
229
+ >
230
+ <SelectUser
231
+ :nextUser="nextNode.presetReadUserId"
232
+ :multiple="true"
233
+ :selectUserList="selectPresetUserList"
234
+ :showTooltip="showTooltip"
235
+ :options="presetOptions"
236
+ title="分阅用户"
237
+ :radioList="presetReadUserId"
238
+ :presetEdit="1"
239
+ :mix="true"
240
+ :types="types"
241
+ @change="changeSelectReadUser($event, 'presetReadUserId')"
242
+ :tabs="tabs"
243
+ />
244
+ </el-form-item>
245
+ <el-form-item
246
+ v-if="enableCustomLimitTimeSetting"
247
+ prop="customLimitTime"
248
+ label="限时办理"
249
+ :rules="[
250
+ {
251
+ required: enableCustomLimitTimeSetting,
252
+ message: showCustomLimitTimeText
253
+ ? '请输入限时办理天数'
254
+ : '请选择限时办理天数',
255
+ trigger: 'blur'
256
+ },
257
+ {
258
+ required: enableCustomLimitTimeSetting,
259
+ validator: checkCustomLimitTime,
260
+ trigger: 'blur'
261
+ }
262
+ ]"
263
+ >
264
+ <div style="display: flex;">
265
+ <es-select
266
+ v-model="nextNode.customLimitTimeText"
267
+ placeholder="请选择"
268
+ @change="handleChangeTime"
269
+ :style="`flex:${showBtn?'unset' : '1'};width: ${showBtn?'20%' : 'unset'} !important; display: inline-block;`"
270
+ sysCode="bpm_custom_limit_time"
271
+ ></es-select>
272
+ <el-input
273
+ v-model="nextNode.customLimitTime"
274
+ :style="`flex:${showBtn?'unset' : '1'};width: ${showBtn?'20%' : 'unset'} !important; display: inline-block;`"
275
+ placeholder="请输入限时办理的天数"
276
+ class="input-with-select custom-limit-time"
277
+ @change="changeCustomLimitTime"
278
+ >
279
+ </el-input>
280
+ <span style="margin-left:5px">天</span>
281
+ </div>
282
+ </el-form-item>
283
+ <el-form-item
284
+ v-if="isHandleExplain == 1"
285
+ prop="handleExplain"
286
+ label="办理说明"
287
+ >
288
+ <el-input
289
+ placeholder="请输入办理说明"
290
+ v-model="nextNode.handleExplain"
291
+ />
292
+ </el-form-item>
293
+ <el-form-item
294
+ prop="noticeType"
295
+ label="通知方式"
296
+ v-show="showBtn && nextNode.noticeList.length > 0"
297
+ >
298
+ <el-checkbox-group v-model="nextNode.noticeType">
299
+ <el-checkbox
300
+ v-for="item of nextNode.noticeList"
301
+ :key="item.cciValue"
302
+ :label="item.cciValue"
303
+ :disabled="
304
+ readOnlyNotificationType
305
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
306
+ : false
307
+ "
308
+ >
309
+ {{ item.shortName }}
310
+ </el-checkbox>
311
+ </el-checkbox-group>
312
+ </el-form-item>
313
+ <el-form-item
314
+ v-show="nextNode.noticeType.length != 0 && showBtn"
315
+ prop="nextNode"
316
+ label="通知消息"
317
+ >
318
+ <es-input
319
+ style="
320
+ border-color: #ccc;
321
+ padding: 5px;
322
+ border-radius: 5px;
323
+ font-size: 13px;
324
+ "
325
+ type="textarea"
326
+ v-model="nextNode.noticeInfo"
327
+ :readonly="notificationMessageReadOnly"
328
+ />
329
+ </el-form-item>
330
+ <CustomPreset
331
+ v-show="isCustomPreset"
332
+ ref="customPreset"
333
+ @changeCustom="
334
+ (data) => {
335
+ presetList = data;
336
+ }
337
+ "
338
+ :customPresetHintMessage="customPresetHintMessage"
339
+ @changeActiveNames="(val) => (activeNames = val)"
340
+ @loadingEnd="loading = false"
341
+ @loadingStart="loading = true"
342
+ :nextNode="nextNode.nextNode"
343
+ :id="id"
344
+ :processDefinitionId="processDefinitionId"
345
+ />
346
+ <Preset
347
+ v-show="isPreset"
348
+ @changePreset="
349
+ (data) => {
350
+ presetUserJson = data;
351
+ }
352
+ "
353
+ @loadingEnd="loading = false"
354
+ @loadingStart="loading = true"
355
+ :customPresetHintMessage="customPresetHintMessage"
356
+ :nodeId="nextNode.nextNode"
357
+ :businessId="id"
358
+ :processDefinitionId="processDefinitionId"
359
+ :presetTaskNodeMap="presetTaskNodeMap"
360
+ :presetTaskNodeKeyStr="presetTaskNodeKeyStr"
361
+ />
362
+ </div>
363
+ <el-form-item style="margin-bottom: 0px" v-show="showBtn">
364
+ <div style="text-align: right">
365
+ <el-button
366
+ type="primary"
367
+ @click="subProcess('nextNode')"
368
+ >
369
+ 确认
370
+ </el-button>
371
+ <el-button @click="quit"> 取消 </el-button>
372
+ </div>
373
+ </el-form-item>
374
+ </el-form>
375
+ <div
376
+ v-if="!showBtn && nextNode.noticeList.length > 0"
377
+ style="padding: 5px; background: #fff"
378
+ >
379
+ <div class="news" @click="showNews = !showNews">
380
+ <span class="news-item">消息通知</span>
381
+ <span :class="showNews ? 'show' : 'sj'"></span>
382
+ </div>
383
+ <div v-if="showNews" ref="messagebox" style="transition: 1s">
384
+ <el-checkbox-group v-model="nextNode.noticeType">
385
+ <el-checkbox
386
+ v-for="item of nextNode.noticeList"
387
+ :key="item.cciValue"
388
+ :label="item.cciValue"
389
+ :disabled="
390
+ readOnlyNotificationType
391
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
392
+ : false
393
+ "
394
+ >
395
+ {{ item.shortName }}
396
+ </el-checkbox>
397
+ </el-checkbox-group>
398
+ <es-input
399
+ style="
400
+ border-color: #ccc;
401
+ padding: 5px;
402
+ border-radius: 5px;
403
+ font-size: 13px;
404
+ "
405
+ autosize
406
+ v-show="showNews"
407
+ type="textarea"
408
+ v-model="nextNode.noticeInfo"
409
+ @change="handleChange"
410
+ :readonly="notificationMessageReadOnly"
411
+ />
412
+ </div>
413
+ </div>
414
+ </div>
415
+ </template>
416
+
417
+ <script>
418
+ import {
419
+ toStartFlow,
420
+ getNodeInfo,
421
+ findSysCodes,
422
+ getNotificationMsg,
423
+ findCodeValues,
424
+ loginUserInfo,
425
+ register,
426
+ freeStartFlow,
427
+ freeStartFlowWithSubmitTask,
428
+ startReadTransferHandleFlowWithTaskReadEnd
429
+ } from 'eoss-ui/src/config/api';
430
+ import util from 'eoss-ui/src/utils/util';
431
+ import SelectUser from './selectUser.vue';
432
+ import CommonOpinions from './component/CommonOpinions.vue';
433
+ import CustomPreset from './component/CustomPreset.vue';
434
+ import Preset from './component/Preset.vue';
435
+ export default {
436
+ name: 'ProcessForm',
437
+
438
+ components: {
439
+ [Option.name]: Option,
440
+ [SelectUser.name]: SelectUser,
441
+ [CustomPreset.name]: CustomPreset,
442
+ [CommonOpinions.name]: CommonOpinions,
443
+ Preset
444
+ },
445
+ props: {
446
+ processDefinitionId: {
447
+ type: String,
448
+ default: ''
449
+ },
450
+ showTooltip: { type: Boolean, default: true },
451
+ copyHistory: {
452
+ type: String,
453
+ default: ''
454
+ },
455
+ simpleTips: {
456
+ type: Boolean,
457
+ default: true
458
+ },
459
+ formType: {
460
+ type: String,
461
+ default: 'freeStart'
462
+ },
463
+ id: {
464
+ type: String,
465
+ default: ''
466
+ },
467
+ pendingId: {
468
+ type: String,
469
+ default: ''
470
+ },
471
+ opinion: {
472
+ type: String,
473
+ default: ''
474
+ },
475
+ isCancelSecondConfirmationType:{
476
+ type: Boolean,
477
+ default: false
478
+ },
479
+ isFreeStartFlow: {
480
+ type: Boolean,
481
+ default: false
482
+ },
483
+ taskParams: {
484
+ type: Object,
485
+ default: () => {}
486
+ },
487
+ taskExamineParam: {
488
+ type: String,
489
+ default: ''
490
+ },
491
+ labelPosition: {
492
+ type: String,
493
+ default: 'right'
494
+ },
495
+ formTitle: {
496
+ type: String,
497
+ default: ''
498
+ },
499
+ showBtn: { type: Boolean, default: true },
500
+ messageType: {
501
+ type: Array,
502
+ default: () => []
503
+ },
504
+ urgencyLevel: {
505
+ type: [Number, String],
506
+ default: ''
507
+ },
508
+ keyCount: {
509
+ type: [Number, String],
510
+ default: 0
511
+ },
512
+ selectorParams:{type:Object,default:()=>{}}
513
+ },
514
+ data() {
515
+ return {
516
+ loading: false,
517
+ isCustomUser: 0,
518
+ isCurrentNodeForbiddenChangeCandidate:0,
519
+ allLoading: null,
520
+ selectUser: false,
521
+ multiple: false,
522
+ readMultiple: true,
523
+ customPresetHintMessage: '', //流程预设标题
524
+ nextNodeCheckType: 'select',
525
+ nextOperateCheckType: 'select',
526
+ showNews: false, // 是否展示通知信息
527
+ notificationMessageReadOnly: false,
528
+ isChangeMessage: false,
529
+ readOnlyNotificationType: '',
530
+ show: true,
531
+ enableCustomLimitTimeSetting: false,
532
+ radioList: [],
533
+ showCustomLimitTimeText: false,
534
+ activeNames: '',
535
+ selectUserList: [],
536
+ defaultNextNode: '',
537
+ presetUserJson: [],
538
+ businessId: '',
539
+ isTaskread: 0, //是否显示分阅用户
540
+ isHandleExplain: 0, //是否展示办理说明
541
+ options: [],
542
+ presetList: [],
543
+ presetReadUserId: [], //自动分阅
544
+ canPresetRead: false, //是否展示自动分阅
545
+ nextUserTypes: ['employee', 'persongroup'],
546
+ isCustomPreset: false, //是否展示预设节点
547
+ isPreset: false, //是否展示预设办理人
548
+ isSinglePage: false,
549
+ presetEdit: 0,
550
+ isDefSelectedObj: 0,
551
+ isChooseNextNode: 0,
552
+ isHideDefaultOperation: 0,
553
+ countersignaturetypeCode: 0,
554
+ presetTaskNodeKeyStr: '', //预设办理人顺序
555
+ presetTaskNodeMap: {}, //预设办理人
556
+ params: {
557
+ filid: 'all', //选择范围(my:本单位/ "" or all:全部)
558
+ selectmix: 'true1',
559
+ deptid: '' //指定部门(my:本部门)
560
+ },
561
+ newOpinion: '',
562
+ operationList: [],
563
+ tabs: {
564
+ employee: {
565
+ param: {
566
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId,
567
+ name: '本单位用户'
568
+ }
569
+ },
570
+ department: {
571
+ param: {
572
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
573
+ }
574
+ }
575
+ },
576
+ userModel: {},
577
+ nextUserTabs: {},
578
+ selectPresetUserList: [],
579
+ presetOptions: [],
580
+ selectReadUserList: [],
581
+ userOptions: [],
582
+ mixReadList: [],
583
+ mixPresetList: [],
584
+ isCdjxjTaskHandle: '',
585
+ isShowNextUser: true,
586
+ oldMessage: '',
587
+ mixOrgIdList: [], //办理对象混选
588
+ subProcessColumns: [],
589
+ nextOtherOrgObjSelect: [],
590
+ nextCurrentOrgObjSelect: [],
591
+ isHideCurrentOrg:false,
592
+ isHideOtherOrg:false,
593
+ currentOrgSelectorParams:{filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId,only_filid:true},
594
+ foreignOrgSelectorParams:{filid: 'all', nofilid: 1},
595
+ nextNode: {
596
+ nodeName: '',
597
+ customLimitTime: '',
598
+ customLimitTimeText: '',
599
+ newOpinion: '',
600
+ countersignaturetypeText: '',
601
+ nextNode: '',
602
+ nextReadUserId: [],
603
+ nextOrgId: [],
604
+ noticeType: [],
605
+ nextOperate: '',
606
+ nextUser: [],
607
+ presetReadUserId: [], //自动分阅
608
+ noticeInfo: '',
609
+ nodeInfo: [],
610
+ userInfo: [],
611
+ handleExplain: '',
612
+ noticeList: [],
613
+ msgTypeCount: 0
614
+ }
615
+ };
616
+ },
617
+ watch: {
618
+ messageType: {
619
+ handler(val) {
620
+ if (this.urgencyLevel) {
621
+ this.nextNode.noticeList = val;
622
+ let arr = [];
623
+ this.nextNode.noticeList.map((item) => {
624
+ this.nextNode.noticeType.map((x) => {
625
+ if (x == item.cciValue) {
626
+ arr.push(x);
627
+ }
628
+ });
629
+ });
630
+ this.nextNode.noticeType = arr;
631
+ } else {
632
+ this.msgTypeCount++;
633
+ }
634
+ }
635
+ },
636
+ processDefinitionId(val) {
637
+ Object.assign(this.$data, this.$options.data());
638
+ this.getUserInfo();
639
+ this.getNodeType();
640
+ this.getStartFlow(val);
641
+ if (this.copyHistory) {
642
+ this.nextNode.newOpinion = this.opinion;
643
+ } else if (this.formType != 'readTransfer') {
644
+ this.newOpinion = this.opinion;
645
+ }
646
+ // this.getStartFlow(val);
647
+ },
648
+ opinion(val) {
649
+ this.newOpinion = this.opinion;
650
+ },
651
+ formTitle: {
652
+ handler(val) {
653
+ if (!this.showBtn && !this.isChangeMessage) {
654
+ this.nextNode.noticeInfo = this.oldMessage.replace('{title}', val);
655
+ }
656
+ },
657
+ deep: true,
658
+ immediate: true
659
+ }
660
+ },
661
+ computed: {
662
+ rules() {
663
+ return {
664
+ customLimitTime: [
665
+ {
666
+ required: this.enableCustomLimitTimeSetting,
667
+ message: this.showCustomLimitTimeText
668
+ ? '请输入限时办理天数'
669
+ : '请选择限时办理天数',
670
+ trigger: 'blur'
671
+ },
672
+ {
673
+ required: this.enableCustomLimitTimeSetting,
674
+ validator: this.checkCustomLimitTime,
675
+ trigger: 'blur'
676
+ }
677
+ ]
678
+ };
679
+ },
680
+ types() {
681
+ if (this.isCdjxjTaskHandle == 'true') {
682
+ return ['employee', 'enterprise', 'department'];
683
+ } else {
684
+ return ['employee', 'enterprise', 'department', 'persongroup'];
685
+ }
686
+ }
687
+ },
688
+ created() {
689
+ this.getUserInfo();
690
+ },
691
+ mounted() {
692
+ if (!this.urgencyLevel) {
693
+ this.getNodeType();
694
+ }
695
+ this.getStartFlow(this.processDefinitionId);
696
+ if (this.copyHistory) {
697
+ this.nextNode.newOpinion = this.opinion;
698
+ } else if (this.formType != 'readTransfer') {
699
+ this.newOpinion = this.opinion;
700
+ }
701
+ },
702
+ methods: {
703
+ handleChangeTime(val){
704
+ this.nextNode.customLimitTime = val;
705
+ },
706
+ limitTimevalidate() {
707
+ let validSate = true;
708
+ this.$refs.nextNode.validate((valid) => {
709
+ if (valid) {
710
+ validSate = true;
711
+ } else {
712
+ validSate = false;
713
+ }
714
+ });
715
+ return validSate;
716
+ },
717
+ checkCustomLimitTime(rule, value, callback) {
718
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
719
+ callback(new Error('请输入正确的天数'));
720
+ this.nextNode.customLimitTime = '';
721
+ } else {
722
+ callback();
723
+ }
724
+ },
725
+ handleChange() {
726
+ this.isChangeMessage = true;
727
+ },
728
+ changeCustomLimitTime(val) {
729
+ if (!Number(val) || val.indexOf('.') != -1 || Number(val) < 0) {
730
+ this.$message.warning('请输入正确的天数');
731
+ this.nextNode.customLimitTime = '';
732
+ }
733
+ },
734
+ getUserInfo() {
735
+ let mainConfig = util.getStorage('mainConfig');
736
+ if (mainConfig) {
737
+ this.userModel = JSON.parse(mainConfig).userModel;
738
+ this.foreignOrgSelectorParams.nofilid = this.userModel.orgId
739
+ this.foreignOrgSelectorParams.roleid = this.currentOrgSelectorParams.roleid = this.selectorParams.roleid
740
+ } else {
741
+ util
742
+ .ajax({ url: loginUserInfo })
743
+ .then((res) => {
744
+ const { status, data } = res;
745
+ if (status == 'success') {
746
+ this.userModel = data;
747
+ this.foreignOrgSelectorParams.nofilid = this.userModel.orgId
748
+ this.foreignOrgSelectorParams.roleid = tthis.currentOrgSelectorParams.roleid = this.selectorParams.roleid
749
+ } else {
750
+ let msg = res.msg || '系统错误,请联系管理员!';
751
+ this.$message.error(msg);
752
+ }
753
+ })
754
+ .catch((err) => {
755
+ if (err.message && err.message !== 'canceled') {
756
+ this.$message.error(err.message);
757
+ }
758
+ });
759
+ }
760
+ },
761
+ getIsShowNextUser(val) {
762
+ if (
763
+ val == 7 ||
764
+ val == 8 ||
765
+ val == 9 ||
766
+ val == 10 ||
767
+ val == 11 ||
768
+ val == 12
769
+ ) {
770
+ this.isShowNextUser = false;
771
+ //设置办理角色
772
+ // $("#orgRoleCode").val(handleRoleId);
773
+ if (val == 7 || val == 8) {
774
+ this.nextUserTypes = ['department'];
775
+ this.nextUserTabs = {
776
+ department: {
777
+ param: {
778
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
779
+ }
780
+ }
781
+ };
782
+ this.multiple = true;
783
+ } else if (val == 9 || val == 10) {
784
+ this.nextUserTypes = ['enterprise'];
785
+ this.nextUserTabs = { enterprise: { param: { filid: 'other' } } };
786
+ this.multiple = true;
787
+ } else if (val == 11 || val == 12) {
788
+ this.nextUserTypes = ['department', 'enterprise'];
789
+ this.nextUserTabs = {
790
+ enterprise: { param: { filid: 'other' } },
791
+ department: {
792
+ param: {
793
+ filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
794
+ }
795
+ }
796
+ };
797
+ this.multiple = true;
798
+ }
799
+ }
800
+ if (val == 7 || val == 9 || val == 11) {
801
+ this.multiple = false;
802
+ }
803
+ },
804
+ // 分阅是否多选
805
+ isReadMultiple(nextReadUserSelectType) {
806
+ if (nextReadUserSelectType == 1) {
807
+ this.readMultiple = false;
808
+ } else if (nextReadUserSelectType == 2) {
809
+ this.readMultiple = true;
810
+ } else if (nextReadUserSelectType == 3) {
811
+ this.readMultiple = false;
812
+ } else if (nextReadUserSelectType == 4) {
813
+ this.readMultiple = true;
814
+ } else if (nextReadUserSelectType == 5) {
815
+ this.readMultiple = false;
816
+ } else if (nextReadUserSelectType == 6) {
817
+ this.readMultiple = true;
818
+ }
819
+ },
820
+ changeSelectReadUser(val, type) {
821
+ const { nextUser, mixList } = val;
822
+ this.nextNode[type] = nextUser;
823
+ if (type === 'presetReadUserId') {
824
+ this.mixPresetList = mixList;
825
+ } else {
826
+ this.mixReadList = mixList;
827
+ }
828
+ },
829
+ selecNext(val) {
830
+ this.nextNode.nextUser = [];
831
+ this.options = [];
832
+ this.selectUserList = [];
833
+ this.radioList = [];
834
+ if (this.showBtn) {
835
+ this.loading = true;
836
+ } else {
837
+ this.allLoading = util.loading(this.$loading, '加载中...');
838
+ }
839
+ this.nextNode.nodeInfo = this.operationList[val].list;
840
+ if (this.nextNode.nodeInfo.length > 0) {
841
+ this.nextNode.nextNode =
842
+ this.defaultNextNode || this.nextNode.nodeInfo[0].nodeId;
843
+ }
844
+ this.getNodeInfos();
845
+ },
846
+ changeSelectUser(val, type) {
847
+ const { nextUser, options, mixList } = val;
848
+ this.nextNode[type] = nextUser;
849
+ this.mixOrgIdList = mixList;
850
+ },
851
+ getsubProcessColumns() {
852
+ let data = [];
853
+ let obj = { name: '[部门员工]-' };
854
+ if (this.nextCurrentOrgObjSelect.length > 0) {
855
+ this.nextCurrentOrgObjSelect.map((x) => {
856
+ if (x.stype == 'employee') {
857
+ obj.name = !obj.value
858
+ ? obj.name + x.showname
859
+ : obj.name + ',' + x.showname;
860
+ obj.value = obj.value
861
+ ? obj.value + ',' + x.showid
862
+ : 'employee-' + x.showid;
863
+ } else {
864
+ data.push({
865
+ name: '[部门]' + x.showname,
866
+ value: 'department-' + x.showid
867
+ });
868
+ }
869
+ });
870
+ }
871
+ obj.value && data.push(obj);
872
+ if (this.nextOtherOrgObjSelect.length > 0) {
873
+ this.nextOtherOrgObjSelect.map((x) => {
874
+ data.push({
875
+ name: '[企业]' + x.showname,
876
+ value: 'enterprise-' + x.showid
877
+ });
878
+ });
879
+ }
880
+ this.subProcessColumns = data;
881
+ // return data;
882
+ },
883
+ // 单位选择完回调
884
+ disposeAppUnit(res, type) {
885
+ let label = type.substring(0, type.lastIndexOf('Select'));
886
+ this.nextNode[label + 'Name'] = '';
887
+ res.options && (this[type] = res.options);
888
+ let obj = {};
889
+ // if (typeof res.mixList == 'array')
890
+ res.mixList && (this.nextNode[label] = res.mixList.join('|'));
891
+ res.options.map((item) => {
892
+ if (obj[item.stype]) {
893
+ obj[item.stype].push(item.showname);
894
+ } else {
895
+ obj[item.stype] = [item.showname];
896
+ }
897
+ });
898
+ for (let key in obj) {
899
+ if (
900
+ key === 'enterprise' &&
901
+ this.nextNode[label + 'Name'].indexOf('[企业]') == -1
902
+ ) {
903
+ this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
904
+ ? this.nextNode[label + 'Name'] +
905
+ '|' +
906
+ '[企业]-' +
907
+ obj[key].join(',')
908
+ : '' + '[企业]-' + obj[key].join(',');
909
+ }
910
+ if (
911
+ key === 'department' &&
912
+ this.nextNode[label + 'Name'].indexOf('[部门]') == -1
913
+ ) {
914
+ this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
915
+ ? this.nextNode[label + 'Name'] +
916
+ '|' +
917
+ '[部门]-' +
918
+ obj[key].join(',')
919
+ : '' + '[部门]-' + obj[key].join(',');
920
+ }
921
+ if (
922
+ key === 'employee' &&
923
+ this.nextNode[label + 'Name'].indexOf('[部门员工]') == -1
924
+ ) {
925
+ this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
926
+ ? this.nextNode[label + 'Name'] +
927
+ '|' +
928
+ '[部门员工]-' +
929
+ obj[key].join(',')
930
+ : '' + '[部门员工]-' + obj[key].join(',');
931
+ }
932
+ }
933
+ // this.nextNode[label + 'Name'] = obj.enterprise?;
934
+ if (!this.currentNodeIsCircularReadNode) {
935
+ this.nextNode[label + 'SerialId'] = res.nextUser.join(',');
936
+ this.nextNode[label + 'Json'] = JSON.stringify(res.options);
937
+ }
938
+ this.getsubProcessColumns();
939
+ },
940
+ getNodeType() {
941
+ util
942
+ .ajax({
943
+ url: findCodeValues,
944
+ params: {
945
+ ccCode: 'notification_type',
946
+ userId: util.getStorage('userId')
947
+ }
948
+ })
949
+ .then((res) => {
950
+ const { status, data } = res;
951
+ if (status === 'success') {
952
+ this.nextNode.noticeList = data;
953
+ }
954
+ })
955
+ .catch((err) => {
956
+ if (this.showBtn) {
957
+ this.loading = false;
958
+ } else {
959
+ this.allLoading.close();
960
+ }
961
+ if (err.message && err.message !== 'canceled') {
962
+ this.$message.error(err.message);
963
+ }
964
+ });
965
+ },
966
+ //获取通知信息
967
+ getMessage() {
968
+ let params = {
969
+ processDefinitionId: this.processDefinitionId,
970
+ nodeId: this.nextNode.nextNode,
971
+ businessId: this.id
972
+ };
973
+ if (!this.showBtn) {
974
+ params.openMode = 'samepage';
975
+ }
976
+ util
977
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
978
+ .then((res) => {
979
+ if (res.status === 'success') {
980
+ if (!this.showBtn) {
981
+ this.oldMessage = res.message;
982
+ this.nextNode.noticeInfo = res.message.replace(
983
+ '{title}',
984
+ this.formTitle
985
+ );
986
+ } else {
987
+ this.nextNode.noticeInfo = res.message;
988
+ }
989
+ }
990
+ })
991
+ .catch((err) => {
992
+ if (this.showBtn) {
993
+ this.loading = false;
994
+ } else {
995
+ this.allLoading.close();
996
+ }
997
+ if (err.message && err.message !== 'canceled') {
998
+ this.$message.error(err.message);
999
+ }
1000
+ });
1001
+ },
1002
+ // 提交表单
1003
+ subProcess(formName) {
1004
+ this.saveProcess(formName);
1005
+ },
1006
+ saveProcess(formName) {
1007
+ this.$refs[formName].validate((valid) => {
1008
+ if (valid) {
1009
+ const {
1010
+ nextNode,
1011
+ nextUser,
1012
+ noticeInfo,
1013
+ noticeType,
1014
+ handleExplain,
1015
+ presetReadUserId,
1016
+ nextReadUserId,
1017
+ nextOrgId,
1018
+ newOpinion,
1019
+ customLimitTime,
1020
+ nextOtherOrgObj,
1021
+ nextCurrentOrgObj
1022
+ } = this.nextNode;
1023
+ // if (noticeType.length === 0) {
1024
+ // return this.$message.warning('请选择通知方式');
1025
+ // }
1026
+ if (this.isShowNextUser) {
1027
+ if ((nextUser == '' || (this.multiple && nextUser.length == 0)) && !this.isHideCurrentOrg && !this.isHideOtherOrg) {
1028
+ return this.$message.warning('请选择下步办理人');
1029
+ }
1030
+ } else {
1031
+ if (nextOrgId == '' || (this.multiple && nextOrgId.length == 0)) {
1032
+ return this.$message.warning('请选择办理对象');
1033
+ }
1034
+ }
1035
+ if((this.isHideOtherOrg || this.isHideCurrentOrg) && !nextCurrentOrgObj && !nextOtherOrgObj){
1036
+ return this.$message.warning('请选择办理对象');
1037
+ }
1038
+ if(this.isCancelSecondConfirmationType){
1039
+ this.$confirm('确认提交吗?', '提示', {
1040
+ confirmButtonText: '确定',
1041
+ cancelButtonText: '取消',
1042
+ type: 'warning'
1043
+ }).then( () => {
1044
+ if (this.showBtn) {
1045
+ this.loading = true;
1046
+ } else {
1047
+ this.allLoading = util.loading(this.$loading, '加载中...');
1048
+ }
1049
+ let newNextUser = [];
1050
+ if (this.multiple) {
1051
+ nextUser && nextUser.map((item) => newNextUser.push(item));
1052
+ }
1053
+ let newNoticeType = '';
1054
+ if (noticeType) {
1055
+ newNoticeType = noticeType.join(',');
1056
+ }
1057
+ let params = {
1058
+ processDefinitionId: this.processDefinitionId,
1059
+ nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1060
+ nextNodeId: nextNode,
1061
+ businessId: this.businessId,
1062
+ notificationType: newNoticeType,
1063
+ userId: util.getStorage('userId'),
1064
+ notificationMsg: noticeInfo,
1065
+ customPresetUserJson: JSON.stringify(this.presetList),
1066
+ presetUserJson: JSON.stringify(this.presetUserJson),
1067
+ nextReadUserId: this.readMultiple
1068
+ ? this.mixReadList && this.mixReadList.join('|')
1069
+ : nextReadUserId,
1070
+ nextOrgId: !this.isShowNextUser
1071
+ ? this.multiple
1072
+ ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1073
+ : nextOrgId
1074
+ : '',
1075
+ handleExplain: handleExplain,
1076
+ presetReadUserId:
1077
+ this.mixPresetList && this.mixPresetList.length > 0
1078
+ ? this.mixPresetList.join('|')
1079
+ : presetReadUserId.join(','),
1080
+ opinion: this.newOpinion || newOpinion
1081
+ };
1082
+ if (this.enableCustomLimitTimeSetting) {
1083
+ params.customLimitTime = customLimitTime;
1084
+ if (!customLimitTime) {
1085
+ this.$message.warning('请选择或输入限时办理的天数');
1086
+ this.nextNode.customLimitTime = '';
1087
+ return;
1088
+ } else if (
1089
+ !Number(customLimitTime) ||
1090
+ customLimitTime.indexOf('.') != -1 ||
1091
+ Number(customLimitTime) < 0
1092
+ ) {
1093
+ this.$message.warning('请输入正确的天数');
1094
+ this.nextNode.customLimitTime = '';
1095
+ return;
1096
+ }
1097
+ }
1098
+ if(this.isHideCurrentOrg){
1099
+ params.nextCurrentOrgObj = nextCurrentOrgObj
1100
+ }
1101
+ if(this.isHideOtherOrg){
1102
+ params.nextOtherOrgObj = nextOtherOrgObj
1103
+ }
1104
+ if (this.activeNames != '1') delete params.customPresetUserJson;
1105
+ if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1106
+ let newParm = {};
1107
+ newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
1108
+ newParm.startFlowParamJson = params;
1109
+ // newParm.startFlowParamJson.businessId = this.id; //this.id
1110
+ newParm.startFlowParamJson.taskExamineParam = {
1111
+ startFlowFirstNodeName: this.taskExamineParam
1112
+ };
1113
+ newParm.startFlowParamJson = JSON.stringify(
1114
+ newParm.startFlowParamJson
1115
+ );
1116
+ for (let key in this.taskParams) {
1117
+ if (Array.isArray(this.taskParams[key])) {
1118
+ this.taskParams[key] =
1119
+ this.taskParams[key].length > 0
1120
+ ? this.taskParams[key].join(',')
1121
+ : '';
1122
+ }
1123
+ }
1124
+
1125
+ newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1126
+ if (this.formType == 'readTransfer') {
1127
+ newParm.readTransferHandleStartFlowParamJson =
1128
+ JSON.stringify(params);
1129
+ newParm.taskReadEndParamJson = JSON.stringify(this.taskParams);
1130
+ delete newParm.copyHistory;
1131
+ delete newParm.startFlowParamJson;
1132
+ delete newParm.submitTaskParamJson;
1133
+ }
1134
+ params = newParm;
1135
+ }
1136
+ if (this.copyHistory && !this.isFreeStartFlow) {
1137
+ params.pendingId = this.pendingId;
1138
+ delete params.businessId;
1139
+ }
1140
+ util
1141
+ .ajax({
1142
+ url: this.isFreeStartFlow
1143
+ ? freeStartFlowWithSubmitTask
1144
+ : this.formType == 'readTransfer'
1145
+ ? startReadTransferHandleFlowWithTaskReadEnd
1146
+ : this.copyHistory
1147
+ ? freeStartFlow
1148
+ : register,
1149
+ method: 'post',
1150
+ data: params
1151
+ })
1152
+ .then((res) => {
1153
+ const { status, message } = res;
1154
+ if (this.showBtn) {
1155
+ this.loading = false;
1156
+ } else {
1157
+ this.allLoading.close();
1158
+ }
1159
+ if (status === 'success' || res.rCode == 0) {
1160
+ this.quit(true);
1161
+ this.simpleTips && this.$message.success('操作成功');
1162
+ } else {
1163
+ this.$message.error(message || '系统错误,请联系管理员!');
1164
+ }
1165
+ })
1166
+ .catch((err) => {
1167
+ if (this.showBtn) {
1168
+ this.loading = false;
1169
+ } else {
1170
+ this.allLoading.close();
1171
+ }
1172
+ if (err.message && err.message !== 'canceled') {
1173
+ this.$message.error(err.message);
1174
+ }
1175
+ });
1176
+ })
1177
+ return
1178
+ }
1179
+ if (this.showBtn) {
1180
+ this.loading = true;
1181
+ } else {
1182
+ this.allLoading = util.loading(this.$loading, '加载中...');
1183
+ }
1184
+ let newNextUser = [];
1185
+ if (this.multiple) {
1186
+ nextUser && nextUser.map((item) => newNextUser.push(item));
1187
+ }
1188
+ let newNoticeType = '';
1189
+ if (noticeType) {
1190
+ newNoticeType = noticeType.join(',');
1191
+ }
1192
+ let params = {
1193
+ processDefinitionId: this.processDefinitionId,
1194
+ nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1195
+ nextNodeId: nextNode,
1196
+ businessId: this.businessId,
1197
+ notificationType: newNoticeType,
1198
+ userId: util.getStorage('userId'),
1199
+ notificationMsg: noticeInfo,
1200
+ customPresetUserJson: JSON.stringify(this.presetList),
1201
+ presetUserJson: JSON.stringify(this.presetUserJson),
1202
+ nextReadUserId: this.readMultiple
1203
+ ? this.mixReadList && this.mixReadList.join('|')
1204
+ : nextReadUserId,
1205
+ nextOrgId: !this.isShowNextUser
1206
+ ? this.multiple
1207
+ ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1208
+ : nextOrgId
1209
+ : '',
1210
+ handleExplain: handleExplain,
1211
+ presetReadUserId:
1212
+ this.mixPresetList && this.mixPresetList.length > 0
1213
+ ? this.mixPresetList.join('|')
1214
+ : presetReadUserId.join(','),
1215
+ opinion: this.newOpinion || newOpinion
1216
+ };
1217
+ if (this.enableCustomLimitTimeSetting) {
1218
+ params.customLimitTime = customLimitTime;
1219
+ if (!customLimitTime) {
1220
+ this.$message.warning('请选择或输入限时办理的天数');
1221
+ this.nextNode.customLimitTime = '';
1222
+ return;
1223
+ } else if (
1224
+ !Number(customLimitTime) ||
1225
+ customLimitTime.indexOf('.') != -1 ||
1226
+ Number(customLimitTime) < 0
1227
+ ) {
1228
+ this.$message.warning('请输入正确的天数');
1229
+ this.nextNode.customLimitTime = '';
1230
+ return;
1231
+ }
1232
+ }
1233
+ if(this.isHideCurrentOrg){
1234
+ params.nextCurrentOrgObj = nextCurrentOrgObj
1235
+ }
1236
+ if(this.isHideOtherOrg){
1237
+ params.nextOtherOrgObj = nextOtherOrgObj
1238
+ }
1239
+ if (this.activeNames != '1') delete params.customPresetUserJson;
1240
+ if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1241
+ let newParm = {};
1242
+ newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
1243
+ newParm.startFlowParamJson = params;
1244
+ // newParm.startFlowParamJson.businessId = this.id; //this.id
1245
+ newParm.startFlowParamJson.taskExamineParam = {
1246
+ startFlowFirstNodeName: this.taskExamineParam
1247
+ };
1248
+ newParm.startFlowParamJson = JSON.stringify(
1249
+ newParm.startFlowParamJson
1250
+ );
1251
+ for (let key in this.taskParams) {
1252
+ if (Array.isArray(this.taskParams[key])) {
1253
+ this.taskParams[key] =
1254
+ this.taskParams[key].length > 0
1255
+ ? this.taskParams[key].join(',')
1256
+ : '';
1257
+ }
1258
+ }
1259
+
1260
+ newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1261
+ if (this.formType == 'readTransfer') {
1262
+ newParm.readTransferHandleStartFlowParamJson =
1263
+ JSON.stringify(params);
1264
+ newParm.taskReadEndParamJson = JSON.stringify(this.taskParams);
1265
+ delete newParm.copyHistory;
1266
+ delete newParm.startFlowParamJson;
1267
+ delete newParm.submitTaskParamJson;
1268
+ }
1269
+ params = newParm;
1270
+ }
1271
+ if (this.copyHistory && !this.isFreeStartFlow) {
1272
+ params.pendingId = this.pendingId;
1273
+ delete params.businessId;
1274
+ }
1275
+ util
1276
+ .ajax({
1277
+ url: this.isFreeStartFlow
1278
+ ? freeStartFlowWithSubmitTask
1279
+ : this.formType == 'readTransfer'
1280
+ ? startReadTransferHandleFlowWithTaskReadEnd
1281
+ : this.copyHistory
1282
+ ? freeStartFlow
1283
+ : register,
1284
+ method: 'post',
1285
+ data: params
1286
+ })
1287
+ .then((res) => {
1288
+ const { status, message } = res;
1289
+ if (this.showBtn) {
1290
+ this.loading = false;
1291
+ } else {
1292
+ this.allLoading.close();
1293
+ }
1294
+ if (status === 'success' || res.rCode == 0) {
1295
+ this.quit(true);
1296
+ this.simpleTips && this.$message.success('操作成功');
1297
+ } else {
1298
+ this.$message.error(message || '系统错误,请联系管理员!');
1299
+ }
1300
+ })
1301
+ .catch((err) => {
1302
+ if (this.showBtn) {
1303
+ this.loading = false;
1304
+ } else {
1305
+ this.allLoading.close();
1306
+ }
1307
+ if (err.message && err.message !== 'canceled') {
1308
+ this.$message.error(err.message);
1309
+ }
1310
+ });
1311
+ } else {
1312
+ return false;
1313
+ }
1314
+ });
1315
+ },
1316
+ getNodeInfos(nodeId, index) {
1317
+ let params = {
1318
+ processDefinitionId: this.processDefinitionId,
1319
+ nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
1320
+ businessId: this.id,
1321
+ userId: util.getStorage('userId')
1322
+ };
1323
+ util
1324
+ .ajax({ url: getNodeInfo, params })
1325
+ .then((res) => {
1326
+ const {
1327
+ status,
1328
+ message,
1329
+ data: {
1330
+ nextUserList,
1331
+ nodeExtAttr,
1332
+ countersignaturetypeText,
1333
+ countersignaturetypeCode
1334
+ }
1335
+ } = res;
1336
+ if (this.showBtn) {
1337
+ this.loading = false;
1338
+ } else {
1339
+ this.allLoading.close();
1340
+ }
1341
+ if (status === 'success') {
1342
+ this.isCurrentNodeForbiddenChangeCandidate =
1343
+ nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
1344
+ this.nextNode.userInfo = nextUserList;
1345
+ this.countersignaturetypeCode = countersignaturetypeCode;
1346
+ this.nextNode.countersignaturetypeText = countersignaturetypeText;
1347
+ this.enableCustomLimitTimeSetting =
1348
+ nodeExtAttr.enableCustomLimitTimeSetting == 1;
1349
+ this.isTaskread = nodeExtAttr.isTaskread;
1350
+ this.isHandleExplain = nodeExtAttr.isHandleExplain;
1351
+ this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
1352
+ this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
1353
+ this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
1354
+ if (
1355
+ nodeExtAttr.userSelectionType == 7 ||
1356
+ nodeExtAttr.userSelectionType == 8 ||
1357
+ nodeExtAttr.userSelectionType == 9 ||
1358
+ nodeExtAttr.userSelectionType == 10 ||
1359
+ nodeExtAttr.userSelectionType == 11 ||
1360
+ nodeExtAttr.userSelectionType == 12
1361
+ ) {
1362
+ this.getIsShowNextUser(
1363
+ nodeExtAttr && nodeExtAttr.userSelectionType
1364
+ );
1365
+ } else {
1366
+ const { multiple, params } = this.isMultiple(
1367
+ nodeExtAttr.userSelectionType
1368
+ );
1369
+ this.multiple = multiple;
1370
+ this.params = params;
1371
+ }
1372
+ // this.isReadMultiple(nodeExtAttr.userSelectionType);
1373
+ if (nodeExtAttr.nodeType === 1 || nodeExtAttr.nodeType === 2) {
1374
+
1375
+ this.isHideCurrentOrg =
1376
+ nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
1377
+ this.isHideOtherOrg = nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
1378
+ } else {
1379
+ this.isHideCurrentOrg = false;
1380
+ this.isHideOtherOrg = false;
1381
+ }
1382
+ nextUserList.map((item) => {
1383
+ if (
1384
+ this.multiple &&
1385
+ nodeExtAttr.isDefSelectedObj == 1 &&
1386
+ nextUserList !== undefined
1387
+ ) {
1388
+ this.nextNode.nextUser.push(item.userId);
1389
+ this.selectUserList.push({
1390
+ showname: item.username,
1391
+ showid: item.userId
1392
+ });
1393
+ }
1394
+
1395
+ this.options.push({
1396
+ showname: item.username,
1397
+ showid: item.userId
1398
+ });
1399
+ });
1400
+ if (this.multiple) {
1401
+ this.nextNode.nextReadUserId = [];
1402
+ } else {
1403
+ this.nextNode.nextReadUserId = '';
1404
+ }
1405
+ if (
1406
+ nextUserList.length > 0 &&
1407
+ nodeExtAttr.isDefSelectedObj == 1 &&
1408
+ !this.multiple
1409
+ ) {
1410
+ this.nextNode.nextUser = nextUserList[0].userId;
1411
+ this.selectUserList.push({
1412
+ showname: nextUserList[0].username,
1413
+ showid: nextUserList[0].userId
1414
+ });
1415
+ }
1416
+ this.radioList = this.options;
1417
+ } else {
1418
+ this.$message.error(message || '系统错误,请联系管理员!');
1419
+ }
1420
+ nodeId && this.$refs.selectUser[index].changeInfo();
1421
+ })
1422
+ .catch((err) => {
1423
+ if (this.showBtn) {
1424
+ this.loading = false;
1425
+ } else {
1426
+ this.allLoading.close();
1427
+ }
1428
+ if (err.message && err.message !== 'canceled') {
1429
+ this.$message.error(err.message);
1430
+ }
1431
+ });
1432
+ },
1433
+ changeSel(val) {
1434
+ this.nextNode.nextUser = [];
1435
+ this.options = [];
1436
+ this.selectUserList = [];
1437
+ this.radioList = [];
1438
+ if (this.showBtn) {
1439
+ this.loading = true;
1440
+ } else {
1441
+ this.allLoading = util.loading(this.$loading, '加载中...');
1442
+ }
1443
+ this.getNodeInfos();
1444
+ },
1445
+ // 取消
1446
+ quit(val) {
1447
+ if (val === true) return this.$emit('cancel', val);
1448
+ this.$emit('cancel', false);
1449
+ },
1450
+ getFind() {
1451
+ util
1452
+ .ajax({
1453
+ url: findSysCodes
1454
+ })
1455
+ .then((res) => {
1456
+ const { status, message } = res;
1457
+ if (status === 'success') {
1458
+ this.nextNode.noticeType = message.split(',');
1459
+ let arr = [];
1460
+ this.nextNode.noticeList.map((item) => {
1461
+ this.nextNode.noticeType.map((x) => {
1462
+ if (x == item.cciValue) {
1463
+ arr.push(x);
1464
+ }
1465
+ });
1466
+ });
1467
+ this.nextNode.noticeType = arr;
1468
+ } else {
1469
+ this.$message.error(message || '系统错误,请联系管理员!');
1470
+ }
1471
+ })
1472
+ .catch((err) => {
1473
+ if (this.showBtn) {
1474
+ this.loading = false;
1475
+ } else {
1476
+ this.allLoading.close();
1477
+ }
1478
+ if (err.message && err.message !== 'canceled') {
1479
+ this.$message.error(err.message);
1480
+ }
1481
+ });
1482
+ },
1483
+ /**
1484
+ * isMultiple
1485
+ * @desc:是否多选
1486
+ * @author liufan
1487
+ * @date 2022年9月13日
1488
+ **/
1489
+ isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
1490
+ let multiple = false;
1491
+ let params = {};
1492
+ if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
1493
+ multiple = true;
1494
+ }
1495
+ if (val == 1 || val == 2 || val == 5) {
1496
+ params.filid = this.userModel.orgId;
1497
+ params.only_filid = true;
1498
+ if (choiceOrgId) {
1499
+ params.filid = choiceOrgId;
1500
+ }
1501
+ }
1502
+ if (val == 5 || val == 6) {
1503
+ params.filid = this.userModel.orgId;
1504
+ params.deptid = this.userModel.orgId;
1505
+ if (choiceDeptId) {
1506
+ params.deptid = choiceDeptId;
1507
+ }
1508
+ if (choiceOrgId) {
1509
+ params.filid = choiceOrgId;
1510
+ }
1511
+ }
1512
+ if (val == 15 || val == 16) {
1513
+ params.filid = this.userModel.orgId;
1514
+ if (pOrgId) {
1515
+ params.filid = pOrgId;
1516
+ }
1517
+ }
1518
+ return { multiple, params };
1519
+ },
1520
+ getStartFlow(processId) {
1521
+ if (!processId) {
1522
+ return false;
1523
+ }
1524
+ if (this.showBtn) {
1525
+ this.loading = true;
1526
+ } else {
1527
+ this.allLoading = util.loading(this.$loading, '加载中...');
1528
+ }
1529
+ this.businessId = this.id;
1530
+ let params = {
1531
+ processDefinitionId: processId, // processId || this.processDefinitionId,
1532
+ userId: util.getStorage('userId'),
1533
+ businessId: this.businessId
1534
+ };
1535
+ if(!this.shwowBtn){
1536
+ params.taskAction = "toStartFlowWithoutTempSave"
1537
+ }
1538
+ // 获取节点
1539
+ util
1540
+ .ajax({ url: toStartFlow, params })
1541
+ .then((res) => {
1542
+ //pc接口返回数据处理
1543
+ const { status, message, data } = res;
1544
+ if (status == 'success') {
1545
+ data.nodeInfoMap.nodeExtAttr.submitTipsMsg &&
1546
+ this.$confirm(
1547
+ data.nodeInfoMap.nodeExtAttr.submitTipsMsg,
1548
+ '提示',
1549
+ {
1550
+ confirmButtonText: '确定',
1551
+ cancelButtonText: '取消',
1552
+ type: 'warning'
1553
+ }
1554
+ )
1555
+ .then(() => {})
1556
+ .catch(() => {
1557
+ this.quit();
1558
+ });
1559
+ data.nextNodeCheckType &&
1560
+ (this.nextNodeCheckType = data.nextNodeCheckType);
1561
+ data.nextOperateCheckType &&
1562
+ (this.nextOperateCheckType = data.nextOperateCheckType);
1563
+ this.customPresetHintMessage = data.customPresetHintMessage;
1564
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
1565
+ this.notificationMessageReadOnly =
1566
+ data.notificationMessageReadOnly == 'true';
1567
+ this.nextNode.nodeInfo = data.nextNodeList;
1568
+ this.nextNode.nextNode = data.nextNodeList[0].nodeId;
1569
+ this.isPreset = data.isPreset;
1570
+ this.isHideDefaultOperation =
1571
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
1572
+ this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
1573
+ this.isChooseNextNode =
1574
+ data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
1575
+ this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
1576
+ if (this.isChooseNextNode == 1) {
1577
+ this.operationList = [
1578
+ // { key: 0, value: '默认', list: [] },
1579
+ { key: 1, value: '自定义', list: [] }
1580
+ ];
1581
+ if(data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1){
1582
+ this.operationList.unshift({ key: 0, value: '默认', list: [] });
1583
+ }
1584
+ let arr = [];
1585
+ for (let key in data.taskNodeMap) {
1586
+ arr.push({ nodeName: data.taskNodeMap[key], nodeId: key });
1587
+ }
1588
+ // this.operationList[0].list = data.nextNodeList;
1589
+ this.operationList[0].list = arr;
1590
+ if (this.isHideDefaultOperation != 1) {
1591
+ this.nextNode.nextOperate = 0;
1592
+ this.nextNode.nodeInfo = this.operationList[0].list;
1593
+ if (this.nextNode.nodeInfo.length > 0) {
1594
+ let defaultNodeData = data.nextNodeList.filter(
1595
+ (x) => x.nodeId == this.defaultNextNode
1596
+ );
1597
+ this.nextNode.nextNode =
1598
+ defaultNodeData.length > 0
1599
+ ? this.defaultNextNode
1600
+ : data.nextNodeList[0].nodeId;
1601
+ }
1602
+ } else if (
1603
+ data.nodeInfoMap.nodeExtAttr.defaultNextOperate == 1 ||
1604
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation == 1
1605
+ ) {
1606
+ // this.nextNode.nodeInfo = data.nextNodeList
1607
+ this.nextNode.nextOperate = 1;
1608
+ this.nextNode.nodeInfo = this.operationList[0].list;
1609
+ if (this.nextNode.nodeInfo.length > 0) {
1610
+ let defaultNodeData = data.nextNodeList.filter(
1611
+ (x) => x.nodeId == this.defaultNextNode
1612
+ );
1613
+ this.nextNode.nextNode =
1614
+ defaultNodeData.length > 0
1615
+ ? this.defaultNextNode
1616
+ : data.nextNodeList[0].nodeId;
1617
+ }
1618
+ }
1619
+ }
1620
+ this.isCustomPreset = data.isCustomPreset;
1621
+ this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
1622
+ this.presetTaskNodeMap = data.presetTaskNodeMap;
1623
+ this.isSinglePage = data.taskExamine.isSinglePage;
1624
+ this.isSinglePage &&
1625
+ (this.nextNode.opinion = data.taskExamine.opinion);
1626
+ // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
1627
+ this.nextNode.nodeName = data.taskExamine.nodeName;
1628
+ this.canPresetRead = data.canPresetRead;
1629
+ if (data.canPresetRead) {
1630
+ let ids =
1631
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
1632
+ let names =
1633
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
1634
+ ','
1635
+ );
1636
+ ids.map((item, index) => {
1637
+ this.presetReadUserId.push({
1638
+ showid: item,
1639
+ showname: names[index]
1640
+ });
1641
+ this.selectPresetUserList.push({
1642
+ showid: item,
1643
+ showname: names[index]
1644
+ });
1645
+ this.nextNode.presetReadUserId.push(item);
1646
+ });
1647
+ }
1648
+ this.getNodeInfos();
1649
+ // this.getPresetFlowInfo();
1650
+ this.isCustomPreset &&
1651
+ this.$refs.customPreset.getPresetFlowInfo(this.nextNode.nextNode);
1652
+ this.getFind();
1653
+ this.getMessage();
1654
+ } else {
1655
+ this.$message.error(message || '系统错误,请联系管理员!');
1656
+ }
1657
+ })
1658
+ .catch((err) => {
1659
+ if (this.showBtn) {
1660
+ this.loading = false;
1661
+ } else {
1662
+ this.allLoading.close();
1663
+ }
1664
+ if (err.message && err.message !== 'canceled') {
1665
+ this.$message.error(err.message);
1666
+ }
1667
+ });
1668
+ }
1669
+ }
1670
+ };
1671
+ </script>