eoss-ui 0.7.95 → 0.7.96

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 (152) hide show
  1. package/lib/cascader.js +1 -1
  2. package/lib/data-table-form.js +8 -8
  3. package/lib/data-table.js +8 -7
  4. package/lib/eoss-ui.common.js +282 -281
  5. package/lib/flow-list.js +96 -96
  6. package/lib/flow.js +162 -162
  7. package/lib/index.js +1 -1
  8. package/lib/main.js +5 -5
  9. package/lib/select.js +1 -1
  10. package/lib/theme-chalk/index.css +1 -1
  11. package/lib/theme-chalk/login.css +1 -1
  12. package/package.json +1 -1
  13. package/packages/button-group/src/main.vue +346 -346
  14. package/packages/calogin/src/main.vue +412 -412
  15. package/packages/cascader/src/main.vue +1 -1
  16. package/packages/clients/src/main.vue +151 -151
  17. package/packages/data-table/src/column.vue +1 -0
  18. package/packages/data-table-form/src/tbody.vue +1 -1
  19. package/packages/flow/src/component/Circulate.vue +417 -417
  20. package/packages/flow/src/component/CommonOpinions.vue +376 -376
  21. package/packages/flow/src/component/CustomPreset.vue +324 -324
  22. package/packages/flow/src/component/FileList.vue +97 -97
  23. package/packages/flow/src/component/FreeCirculation.vue +244 -244
  24. package/packages/flow/src/component/Preset.vue +257 -257
  25. package/packages/flow/src/component/SendMsg.vue +242 -242
  26. package/packages/flow/src/component/SortFlow.vue +110 -110
  27. package/packages/flow/src/component/taskUnionExamine.vue +761 -761
  28. package/packages/flow/src/form.vue +123 -123
  29. package/packages/flow/src/freeStartFlow.vue +2855 -2855
  30. package/packages/flow/src/processForm.vue +1680 -1680
  31. package/packages/flow/src/processReject.vue +309 -309
  32. package/packages/flow/src/reset.vue +946 -946
  33. package/packages/flow/src/startTaskRead.vue +695 -695
  34. package/packages/flow/src/supervise.vue +159 -159
  35. package/packages/flow/src/table.vue +58 -58
  36. package/packages/flow-list/src/main.vue +2337 -2337
  37. package/packages/form/src/main.vue +3901 -3901
  38. package/packages/form/src/table.vue +1512 -1512
  39. package/packages/icon/src/main.vue +104 -104
  40. package/packages/login/src/resetPassword.vue +557 -557
  41. package/packages/main/src/public/online.vue +89 -89
  42. package/packages/main/src/public/search.vue +464 -464
  43. package/packages/main/src/public/settings.vue +273 -273
  44. package/packages/main/src/simplicity/apps.vue +388 -388
  45. package/packages/main/src/simplicity/avatar.vue +82 -82
  46. package/packages/main/src/simplicity/handler.vue +158 -158
  47. package/packages/main/src/simplicity/menu-list.vue +135 -135
  48. package/packages/main/src/simplicity/message.vue +293 -293
  49. package/packages/main/src/simplicity/notice.vue +222 -222
  50. package/packages/main/src/simplicity/sub-menu.vue +276 -276
  51. package/packages/main/src/simplicity/user.vue +259 -259
  52. package/packages/main/src/simplicityTop/apps.vue +388 -388
  53. package/packages/main/src/simplicityTop/avatar.vue +82 -82
  54. package/packages/main/src/simplicityTop/handler.vue +215 -215
  55. package/packages/main/src/simplicityTop/lists.vue +84 -84
  56. package/packages/main/src/simplicityTop/menu-list.vue +135 -135
  57. package/packages/main/src/simplicityTop/message.vue +293 -293
  58. package/packages/main/src/simplicityTop/notice.vue +222 -222
  59. package/packages/main/src/simplicityTop/router-page.vue +45 -45
  60. package/packages/main/src/simplicityTop/sub-menu.vue +274 -274
  61. package/packages/main/src/simplicityTop/user.vue +259 -259
  62. package/packages/menu/src/main.vue +595 -595
  63. package/packages/nav/src/main.vue +351 -351
  64. package/packages/select/src/main.vue +1 -1
  65. package/packages/selector/src/main.vue +761 -761
  66. package/packages/selector-panel/src/main.vue +1036 -1036
  67. package/packages/selector-panel/src/selection.vue +174 -174
  68. package/packages/switch/src/main.vue +170 -170
  69. package/packages/theme-chalk/gulpfile.js +25 -0
  70. package/packages/theme-chalk/src/data-table.scss +297 -297
  71. package/packages/theme-chalk/src/flow-list.scss +55 -55
  72. package/packages/theme-chalk/src/flow.scss +373 -373
  73. package/packages/theme-chalk/src/form.scss +501 -501
  74. package/packages/theme-chalk/src/handler.scss +148 -148
  75. package/packages/theme-chalk/src/icon.scss +3452 -3452
  76. package/packages/theme-chalk/src/login.scss +1006 -1006
  77. package/packages/theme-chalk/src/main.scss +664 -664
  78. package/packages/theme-chalk/src/menu.scss +224 -224
  79. package/packages/theme-chalk/src/selector.scss +114 -114
  80. package/packages/theme-chalk/src/simplicity-top.scss +1845 -1845
  81. package/packages/theme-chalk/src/simplicity.scss +1403 -1403
  82. package/packages/theme-chalk/src/tree.scss +165 -165
  83. package/packages/theme-chalk/src/upload.scss +172 -172
  84. package/packages/tips/src/main.vue +141 -141
  85. package/packages/toolbar/src/main.vue +430 -430
  86. package/packages/upload/src/main.vue +1344 -1344
  87. package/packages/wujie/src/main.vue +146 -146
  88. package/src/config/api.js +348 -348
  89. package/src/index.js +163 -163
  90. package/src/utils/rules.js +18 -18
  91. package/packages/theme-chalk/lib/base.css +0 -1
  92. package/packages/theme-chalk/lib/button-group.css +0 -1
  93. package/packages/theme-chalk/lib/button.css +0 -1
  94. package/packages/theme-chalk/lib/calendar.css +0 -1
  95. package/packages/theme-chalk/lib/calogin.css +0 -0
  96. package/packages/theme-chalk/lib/card.css +0 -1
  97. package/packages/theme-chalk/lib/cascader.css +0 -0
  98. package/packages/theme-chalk/lib/checkbox-group.css +0 -1
  99. package/packages/theme-chalk/lib/clients.css +0 -1
  100. package/packages/theme-chalk/lib/data-table-form.css +0 -1
  101. package/packages/theme-chalk/lib/data-table.css +0 -1
  102. package/packages/theme-chalk/lib/date-picker.css +0 -1
  103. package/packages/theme-chalk/lib/dialog.css +0 -1
  104. package/packages/theme-chalk/lib/enable-drag.css +0 -1
  105. package/packages/theme-chalk/lib/enterprise.css +0 -1
  106. package/packages/theme-chalk/lib/error-page.css +0 -1
  107. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  108. package/packages/theme-chalk/lib/flow-group.css +0 -1
  109. package/packages/theme-chalk/lib/flow-list.css +0 -1
  110. package/packages/theme-chalk/lib/flow.css +0 -1
  111. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  112. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  113. package/packages/theme-chalk/lib/form.css +0 -1
  114. package/packages/theme-chalk/lib/handle-user.css +0 -1
  115. package/packages/theme-chalk/lib/handler.css +0 -1
  116. package/packages/theme-chalk/lib/icon.css +0 -1
  117. package/packages/theme-chalk/lib/icons.css +0 -1
  118. package/packages/theme-chalk/lib/index.css +0 -1
  119. package/packages/theme-chalk/lib/input-number.css +0 -0
  120. package/packages/theme-chalk/lib/input.css +0 -1
  121. package/packages/theme-chalk/lib/label.css +0 -1
  122. package/packages/theme-chalk/lib/layout.css +0 -1
  123. package/packages/theme-chalk/lib/login.css +0 -1
  124. package/packages/theme-chalk/lib/main.css +0 -1
  125. package/packages/theme-chalk/lib/menu.css +0 -1
  126. package/packages/theme-chalk/lib/nav.css +0 -1
  127. package/packages/theme-chalk/lib/notify.css +0 -0
  128. package/packages/theme-chalk/lib/page.css +0 -1
  129. package/packages/theme-chalk/lib/pagination.css +0 -1
  130. package/packages/theme-chalk/lib/player.css +0 -1
  131. package/packages/theme-chalk/lib/qr-code.css +0 -1
  132. package/packages/theme-chalk/lib/radio-group.css +0 -1
  133. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  134. package/packages/theme-chalk/lib/select-ganged.css +0 -1
  135. package/packages/theme-chalk/lib/select.css +0 -1
  136. package/packages/theme-chalk/lib/selector-panel.css +0 -1
  137. package/packages/theme-chalk/lib/selector.css +0 -1
  138. package/packages/theme-chalk/lib/simplicity-top.css +0 -1
  139. package/packages/theme-chalk/lib/simplicity.css +0 -1
  140. package/packages/theme-chalk/lib/sizer.css +0 -1
  141. package/packages/theme-chalk/lib/steps.css +0 -1
  142. package/packages/theme-chalk/lib/switch.css +0 -1
  143. package/packages/theme-chalk/lib/table-form.css +0 -0
  144. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  145. package/packages/theme-chalk/lib/tabs.css +0 -1
  146. package/packages/theme-chalk/lib/tips.css +0 -1
  147. package/packages/theme-chalk/lib/toolbar.css +0 -1
  148. package/packages/theme-chalk/lib/tree-group.css +0 -1
  149. package/packages/theme-chalk/lib/tree.css +0 -1
  150. package/packages/theme-chalk/lib/upload.css +0 -1
  151. package/packages/theme-chalk/lib/wujie.css +0 -0
  152. package/packages/theme-chalk/lib/wxlogin.css +0 -1
@@ -1,1680 +1,1680 @@
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
- nodeMoreInfo,
1333
- countersignaturetypeText,
1334
- countersignaturetypeCode
1335
- }
1336
- } = res;
1337
- if (this.showBtn) {
1338
- this.loading = false;
1339
- } else {
1340
- this.allLoading.close();
1341
- }
1342
- if (status === 'success') {
1343
- this.isCurrentNodeForbiddenChangeCandidate =
1344
- nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
1345
- this.nextNode.userInfo = nextUserList;
1346
- this.countersignaturetypeCode = countersignaturetypeCode;
1347
- this.nextNode.countersignaturetypeText = countersignaturetypeText;
1348
- this.enableCustomLimitTimeSetting =
1349
- nodeExtAttr.enableCustomLimitTimeSetting == 1;
1350
- if (
1351
- this.enableCustomLimitTimeSetting &&
1352
- nodeMoreInfo.defaultCustomLimitDays
1353
- ) {
1354
- this.nextNode.customLimitTime =
1355
- this.nextNode.customLimitTimeText =
1356
- nodeMoreInfo.defaultCustomLimitDays + '';
1357
- }
1358
- this.isTaskread = nodeExtAttr.isTaskread;
1359
- this.isHandleExplain = nodeExtAttr.isHandleExplain;
1360
- this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
1361
- this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
1362
- this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
1363
- if (
1364
- nodeExtAttr.userSelectionType == 7 ||
1365
- nodeExtAttr.userSelectionType == 8 ||
1366
- nodeExtAttr.userSelectionType == 9 ||
1367
- nodeExtAttr.userSelectionType == 10 ||
1368
- nodeExtAttr.userSelectionType == 11 ||
1369
- nodeExtAttr.userSelectionType == 12
1370
- ) {
1371
- this.getIsShowNextUser(
1372
- nodeExtAttr && nodeExtAttr.userSelectionType
1373
- );
1374
- } else {
1375
- const { multiple, params } = this.isMultiple(
1376
- nodeExtAttr.userSelectionType
1377
- );
1378
- this.multiple = multiple;
1379
- this.params = params;
1380
- }
1381
- // this.isReadMultiple(nodeExtAttr.userSelectionType);
1382
- if (nodeExtAttr.nodeType === 1 || nodeExtAttr.nodeType === 2) {
1383
-
1384
- this.isHideCurrentOrg =
1385
- nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
1386
- this.isHideOtherOrg = nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
1387
- } else {
1388
- this.isHideCurrentOrg = false;
1389
- this.isHideOtherOrg = false;
1390
- }
1391
- nextUserList.map((item) => {
1392
- if (
1393
- this.multiple &&
1394
- nodeExtAttr.isDefSelectedObj == 1 &&
1395
- nextUserList !== undefined
1396
- ) {
1397
- this.nextNode.nextUser.push(item.userId);
1398
- this.selectUserList.push({
1399
- showname: item.username,
1400
- showid: item.userId
1401
- });
1402
- }
1403
-
1404
- this.options.push({
1405
- showname: item.username,
1406
- showid: item.userId
1407
- });
1408
- });
1409
- if (this.multiple) {
1410
- this.nextNode.nextReadUserId = [];
1411
- } else {
1412
- this.nextNode.nextReadUserId = '';
1413
- }
1414
- if (
1415
- nextUserList.length > 0 &&
1416
- nodeExtAttr.isDefSelectedObj == 1 &&
1417
- !this.multiple
1418
- ) {
1419
- this.nextNode.nextUser = nextUserList[0].userId;
1420
- this.selectUserList.push({
1421
- showname: nextUserList[0].username,
1422
- showid: nextUserList[0].userId
1423
- });
1424
- }
1425
- this.radioList = this.options;
1426
- } else {
1427
- this.$message.error(message || '系统错误,请联系管理员!');
1428
- }
1429
- nodeId && this.$refs.selectUser[index].changeInfo();
1430
- })
1431
- .catch((err) => {
1432
- if (this.showBtn) {
1433
- this.loading = false;
1434
- } else {
1435
- this.allLoading.close();
1436
- }
1437
- if (err.message && err.message !== 'canceled') {
1438
- this.$message.error(err.message);
1439
- }
1440
- });
1441
- },
1442
- changeSel(val) {
1443
- this.nextNode.nextUser = [];
1444
- this.options = [];
1445
- this.selectUserList = [];
1446
- this.radioList = [];
1447
- if (this.showBtn) {
1448
- this.loading = true;
1449
- } else {
1450
- this.allLoading = util.loading(this.$loading, '加载中...');
1451
- }
1452
- this.getNodeInfos();
1453
- },
1454
- // 取消
1455
- quit(val) {
1456
- if (val === true) return this.$emit('cancel', val);
1457
- this.$emit('cancel', false);
1458
- },
1459
- getFind() {
1460
- util
1461
- .ajax({
1462
- url: findSysCodes
1463
- })
1464
- .then((res) => {
1465
- const { status, message } = res;
1466
- if (status === 'success') {
1467
- this.nextNode.noticeType = message.split(',');
1468
- let arr = [];
1469
- this.nextNode.noticeList.map((item) => {
1470
- this.nextNode.noticeType.map((x) => {
1471
- if (x == item.cciValue) {
1472
- arr.push(x);
1473
- }
1474
- });
1475
- });
1476
- this.nextNode.noticeType = arr;
1477
- } else {
1478
- this.$message.error(message || '系统错误,请联系管理员!');
1479
- }
1480
- })
1481
- .catch((err) => {
1482
- if (this.showBtn) {
1483
- this.loading = false;
1484
- } else {
1485
- this.allLoading.close();
1486
- }
1487
- if (err.message && err.message !== 'canceled') {
1488
- this.$message.error(err.message);
1489
- }
1490
- });
1491
- },
1492
- /**
1493
- * isMultiple
1494
- * @desc:是否多选
1495
- * @author liufan
1496
- * @date 2022年9月13日
1497
- **/
1498
- isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
1499
- let multiple = false;
1500
- let params = {};
1501
- if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
1502
- multiple = true;
1503
- }
1504
- if (val == 1 || val == 2 || val == 5) {
1505
- params.filid = this.userModel.orgId;
1506
- params.only_filid = true;
1507
- if (choiceOrgId) {
1508
- params.filid = choiceOrgId;
1509
- }
1510
- }
1511
- if (val == 5 || val == 6) {
1512
- params.filid = this.userModel.orgId;
1513
- params.deptid = this.userModel.orgId;
1514
- if (choiceDeptId) {
1515
- params.deptid = choiceDeptId;
1516
- }
1517
- if (choiceOrgId) {
1518
- params.filid = choiceOrgId;
1519
- }
1520
- }
1521
- if (val == 15 || val == 16) {
1522
- params.filid = this.userModel.orgId;
1523
- if (pOrgId) {
1524
- params.filid = pOrgId;
1525
- }
1526
- }
1527
- return { multiple, params };
1528
- },
1529
- getStartFlow(processId) {
1530
- if (!processId) {
1531
- return false;
1532
- }
1533
- if (this.showBtn) {
1534
- this.loading = true;
1535
- } else {
1536
- this.allLoading = util.loading(this.$loading, '加载中...');
1537
- }
1538
- this.businessId = this.id;
1539
- let params = {
1540
- processDefinitionId: processId, // processId || this.processDefinitionId,
1541
- userId: util.getStorage('userId'),
1542
- businessId: this.businessId
1543
- };
1544
- if(!this.shwowBtn){
1545
- params.taskAction = "toStartFlowWithoutTempSave"
1546
- }
1547
- // 获取节点
1548
- util
1549
- .ajax({ url: toStartFlow, params })
1550
- .then((res) => {
1551
- //pc接口返回数据处理
1552
- const { status, message, data } = res;
1553
- if (status == 'success') {
1554
- data.nodeInfoMap.nodeExtAttr.submitTipsMsg &&
1555
- this.$confirm(
1556
- data.nodeInfoMap.nodeExtAttr.submitTipsMsg,
1557
- '提示',
1558
- {
1559
- confirmButtonText: '确定',
1560
- cancelButtonText: '取消',
1561
- type: 'warning'
1562
- }
1563
- )
1564
- .then(() => {})
1565
- .catch(() => {
1566
- this.quit();
1567
- });
1568
- data.nextNodeCheckType &&
1569
- (this.nextNodeCheckType = data.nextNodeCheckType);
1570
- data.nextOperateCheckType &&
1571
- (this.nextOperateCheckType = data.nextOperateCheckType);
1572
- this.customPresetHintMessage = data.customPresetHintMessage;
1573
- this.readOnlyNotificationType = data.readOnlyNotificationType;
1574
- this.notificationMessageReadOnly =
1575
- data.notificationMessageReadOnly == 'true';
1576
- this.nextNode.nodeInfo = data.nextNodeList;
1577
- this.nextNode.nextNode = data.nextNodeList[0].nodeId;
1578
- this.isPreset = data.isPreset;
1579
- this.isHideDefaultOperation =
1580
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
1581
- this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
1582
- this.isChooseNextNode =
1583
- data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
1584
- this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
1585
- if (this.isChooseNextNode == 1) {
1586
- this.operationList = [
1587
- // { key: 0, value: '默认', list: [] },
1588
- { key: 1, value: '自定义', list: [] }
1589
- ];
1590
- if(data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1){
1591
- this.operationList.unshift({ key: 0, value: '默认', list: [] });
1592
- }
1593
- let arr = [];
1594
- for (let key in data.taskNodeMap) {
1595
- arr.push({ nodeName: data.taskNodeMap[key], nodeId: key });
1596
- }
1597
- // this.operationList[0].list = data.nextNodeList;
1598
- this.operationList[0].list = arr;
1599
- if (this.isHideDefaultOperation != 1) {
1600
- this.nextNode.nextOperate = 0;
1601
- this.nextNode.nodeInfo = this.operationList[0].list;
1602
- if (this.nextNode.nodeInfo.length > 0) {
1603
- let defaultNodeData = data.nextNodeList.filter(
1604
- (x) => x.nodeId == this.defaultNextNode
1605
- );
1606
- this.nextNode.nextNode =
1607
- defaultNodeData.length > 0
1608
- ? this.defaultNextNode
1609
- : data.nextNodeList[0].nodeId;
1610
- }
1611
- } else if (
1612
- data.nodeInfoMap.nodeExtAttr.defaultNextOperate == 1 ||
1613
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation == 1
1614
- ) {
1615
- // this.nextNode.nodeInfo = data.nextNodeList
1616
- this.nextNode.nextOperate = 1;
1617
- this.nextNode.nodeInfo = this.operationList[0].list;
1618
- if (this.nextNode.nodeInfo.length > 0) {
1619
- let defaultNodeData = data.nextNodeList.filter(
1620
- (x) => x.nodeId == this.defaultNextNode
1621
- );
1622
- this.nextNode.nextNode =
1623
- defaultNodeData.length > 0
1624
- ? this.defaultNextNode
1625
- : data.nextNodeList[0].nodeId;
1626
- }
1627
- }
1628
- }
1629
- this.isCustomPreset = data.isCustomPreset;
1630
- this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
1631
- this.presetTaskNodeMap = data.presetTaskNodeMap;
1632
- this.isSinglePage = data.taskExamine.isSinglePage;
1633
- this.isSinglePage &&
1634
- (this.nextNode.opinion = data.taskExamine.opinion);
1635
- // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
1636
- this.nextNode.nodeName = data.taskExamine.nodeName;
1637
- this.canPresetRead = data.canPresetRead;
1638
- if (data.canPresetRead) {
1639
- let ids =
1640
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
1641
- let names =
1642
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
1643
- ','
1644
- );
1645
- ids.map((item, index) => {
1646
- this.presetReadUserId.push({
1647
- showid: item,
1648
- showname: names[index]
1649
- });
1650
- this.selectPresetUserList.push({
1651
- showid: item,
1652
- showname: names[index]
1653
- });
1654
- this.nextNode.presetReadUserId.push(item);
1655
- });
1656
- }
1657
- this.getNodeInfos();
1658
- // this.getPresetFlowInfo();
1659
- this.isCustomPreset &&
1660
- this.$refs.customPreset.getPresetFlowInfo(this.nextNode.nextNode);
1661
- this.getFind();
1662
- this.getMessage();
1663
- } else {
1664
- this.$message.error(message || '系统错误,请联系管理员!');
1665
- }
1666
- })
1667
- .catch((err) => {
1668
- if (this.showBtn) {
1669
- this.loading = false;
1670
- } else {
1671
- this.allLoading.close();
1672
- }
1673
- if (err.message && err.message !== 'canceled') {
1674
- this.$message.error(err.message);
1675
- }
1676
- });
1677
- }
1678
- }
1679
- };
1680
- </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
+ nodeMoreInfo,
1333
+ countersignaturetypeText,
1334
+ countersignaturetypeCode
1335
+ }
1336
+ } = res;
1337
+ if (this.showBtn) {
1338
+ this.loading = false;
1339
+ } else {
1340
+ this.allLoading.close();
1341
+ }
1342
+ if (status === 'success') {
1343
+ this.isCurrentNodeForbiddenChangeCandidate =
1344
+ nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
1345
+ this.nextNode.userInfo = nextUserList;
1346
+ this.countersignaturetypeCode = countersignaturetypeCode;
1347
+ this.nextNode.countersignaturetypeText = countersignaturetypeText;
1348
+ this.enableCustomLimitTimeSetting =
1349
+ nodeExtAttr.enableCustomLimitTimeSetting == 1;
1350
+ if (
1351
+ this.enableCustomLimitTimeSetting &&
1352
+ nodeMoreInfo.defaultCustomLimitDays
1353
+ ) {
1354
+ this.nextNode.customLimitTime =
1355
+ this.nextNode.customLimitTimeText =
1356
+ nodeMoreInfo.defaultCustomLimitDays + '';
1357
+ }
1358
+ this.isTaskread = nodeExtAttr.isTaskread;
1359
+ this.isHandleExplain = nodeExtAttr.isHandleExplain;
1360
+ this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
1361
+ this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
1362
+ this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
1363
+ if (
1364
+ nodeExtAttr.userSelectionType == 7 ||
1365
+ nodeExtAttr.userSelectionType == 8 ||
1366
+ nodeExtAttr.userSelectionType == 9 ||
1367
+ nodeExtAttr.userSelectionType == 10 ||
1368
+ nodeExtAttr.userSelectionType == 11 ||
1369
+ nodeExtAttr.userSelectionType == 12
1370
+ ) {
1371
+ this.getIsShowNextUser(
1372
+ nodeExtAttr && nodeExtAttr.userSelectionType
1373
+ );
1374
+ } else {
1375
+ const { multiple, params } = this.isMultiple(
1376
+ nodeExtAttr.userSelectionType
1377
+ );
1378
+ this.multiple = multiple;
1379
+ this.params = params;
1380
+ }
1381
+ // this.isReadMultiple(nodeExtAttr.userSelectionType);
1382
+ if (nodeExtAttr.nodeType === 1 || nodeExtAttr.nodeType === 2) {
1383
+
1384
+ this.isHideCurrentOrg =
1385
+ nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
1386
+ this.isHideOtherOrg = nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
1387
+ } else {
1388
+ this.isHideCurrentOrg = false;
1389
+ this.isHideOtherOrg = false;
1390
+ }
1391
+ nextUserList.map((item) => {
1392
+ if (
1393
+ this.multiple &&
1394
+ nodeExtAttr.isDefSelectedObj == 1 &&
1395
+ nextUserList !== undefined
1396
+ ) {
1397
+ this.nextNode.nextUser.push(item.userId);
1398
+ this.selectUserList.push({
1399
+ showname: item.username,
1400
+ showid: item.userId
1401
+ });
1402
+ }
1403
+
1404
+ this.options.push({
1405
+ showname: item.username,
1406
+ showid: item.userId
1407
+ });
1408
+ });
1409
+ if (this.multiple) {
1410
+ this.nextNode.nextReadUserId = [];
1411
+ } else {
1412
+ this.nextNode.nextReadUserId = '';
1413
+ }
1414
+ if (
1415
+ nextUserList.length > 0 &&
1416
+ nodeExtAttr.isDefSelectedObj == 1 &&
1417
+ !this.multiple
1418
+ ) {
1419
+ this.nextNode.nextUser = nextUserList[0].userId;
1420
+ this.selectUserList.push({
1421
+ showname: nextUserList[0].username,
1422
+ showid: nextUserList[0].userId
1423
+ });
1424
+ }
1425
+ this.radioList = this.options;
1426
+ } else {
1427
+ this.$message.error(message || '系统错误,请联系管理员!');
1428
+ }
1429
+ nodeId && this.$refs.selectUser[index].changeInfo();
1430
+ })
1431
+ .catch((err) => {
1432
+ if (this.showBtn) {
1433
+ this.loading = false;
1434
+ } else {
1435
+ this.allLoading.close();
1436
+ }
1437
+ if (err.message && err.message !== 'canceled') {
1438
+ this.$message.error(err.message);
1439
+ }
1440
+ });
1441
+ },
1442
+ changeSel(val) {
1443
+ this.nextNode.nextUser = [];
1444
+ this.options = [];
1445
+ this.selectUserList = [];
1446
+ this.radioList = [];
1447
+ if (this.showBtn) {
1448
+ this.loading = true;
1449
+ } else {
1450
+ this.allLoading = util.loading(this.$loading, '加载中...');
1451
+ }
1452
+ this.getNodeInfos();
1453
+ },
1454
+ // 取消
1455
+ quit(val) {
1456
+ if (val === true) return this.$emit('cancel', val);
1457
+ this.$emit('cancel', false);
1458
+ },
1459
+ getFind() {
1460
+ util
1461
+ .ajax({
1462
+ url: findSysCodes
1463
+ })
1464
+ .then((res) => {
1465
+ const { status, message } = res;
1466
+ if (status === 'success') {
1467
+ this.nextNode.noticeType = message.split(',');
1468
+ let arr = [];
1469
+ this.nextNode.noticeList.map((item) => {
1470
+ this.nextNode.noticeType.map((x) => {
1471
+ if (x == item.cciValue) {
1472
+ arr.push(x);
1473
+ }
1474
+ });
1475
+ });
1476
+ this.nextNode.noticeType = arr;
1477
+ } else {
1478
+ this.$message.error(message || '系统错误,请联系管理员!');
1479
+ }
1480
+ })
1481
+ .catch((err) => {
1482
+ if (this.showBtn) {
1483
+ this.loading = false;
1484
+ } else {
1485
+ this.allLoading.close();
1486
+ }
1487
+ if (err.message && err.message !== 'canceled') {
1488
+ this.$message.error(err.message);
1489
+ }
1490
+ });
1491
+ },
1492
+ /**
1493
+ * isMultiple
1494
+ * @desc:是否多选
1495
+ * @author liufan
1496
+ * @date 2022年9月13日
1497
+ **/
1498
+ isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
1499
+ let multiple = false;
1500
+ let params = {};
1501
+ if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
1502
+ multiple = true;
1503
+ }
1504
+ if (val == 1 || val == 2 || val == 5) {
1505
+ params.filid = this.userModel.orgId;
1506
+ params.only_filid = true;
1507
+ if (choiceOrgId) {
1508
+ params.filid = choiceOrgId;
1509
+ }
1510
+ }
1511
+ if (val == 5 || val == 6) {
1512
+ params.filid = this.userModel.orgId;
1513
+ params.deptid = this.userModel.orgId;
1514
+ if (choiceDeptId) {
1515
+ params.deptid = choiceDeptId;
1516
+ }
1517
+ if (choiceOrgId) {
1518
+ params.filid = choiceOrgId;
1519
+ }
1520
+ }
1521
+ if (val == 15 || val == 16) {
1522
+ params.filid = this.userModel.orgId;
1523
+ if (pOrgId) {
1524
+ params.filid = pOrgId;
1525
+ }
1526
+ }
1527
+ return { multiple, params };
1528
+ },
1529
+ getStartFlow(processId) {
1530
+ if (!processId) {
1531
+ return false;
1532
+ }
1533
+ if (this.showBtn) {
1534
+ this.loading = true;
1535
+ } else {
1536
+ this.allLoading = util.loading(this.$loading, '加载中...');
1537
+ }
1538
+ this.businessId = this.id;
1539
+ let params = {
1540
+ processDefinitionId: processId, // processId || this.processDefinitionId,
1541
+ userId: util.getStorage('userId'),
1542
+ businessId: this.businessId
1543
+ };
1544
+ if(!this.shwowBtn){
1545
+ params.taskAction = "toStartFlowWithoutTempSave"
1546
+ }
1547
+ // 获取节点
1548
+ util
1549
+ .ajax({ url: toStartFlow, params })
1550
+ .then((res) => {
1551
+ //pc接口返回数据处理
1552
+ const { status, message, data } = res;
1553
+ if (status == 'success') {
1554
+ data.nodeInfoMap.nodeExtAttr.submitTipsMsg &&
1555
+ this.$confirm(
1556
+ data.nodeInfoMap.nodeExtAttr.submitTipsMsg,
1557
+ '提示',
1558
+ {
1559
+ confirmButtonText: '确定',
1560
+ cancelButtonText: '取消',
1561
+ type: 'warning'
1562
+ }
1563
+ )
1564
+ .then(() => {})
1565
+ .catch(() => {
1566
+ this.quit();
1567
+ });
1568
+ data.nextNodeCheckType &&
1569
+ (this.nextNodeCheckType = data.nextNodeCheckType);
1570
+ data.nextOperateCheckType &&
1571
+ (this.nextOperateCheckType = data.nextOperateCheckType);
1572
+ this.customPresetHintMessage = data.customPresetHintMessage;
1573
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
1574
+ this.notificationMessageReadOnly =
1575
+ data.notificationMessageReadOnly == 'true';
1576
+ this.nextNode.nodeInfo = data.nextNodeList;
1577
+ this.nextNode.nextNode = data.nextNodeList[0].nodeId;
1578
+ this.isPreset = data.isPreset;
1579
+ this.isHideDefaultOperation =
1580
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
1581
+ this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
1582
+ this.isChooseNextNode =
1583
+ data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
1584
+ this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
1585
+ if (this.isChooseNextNode == 1) {
1586
+ this.operationList = [
1587
+ // { key: 0, value: '默认', list: [] },
1588
+ { key: 1, value: '自定义', list: [] }
1589
+ ];
1590
+ if(data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1){
1591
+ this.operationList.unshift({ key: 0, value: '默认', list: [] });
1592
+ }
1593
+ let arr = [];
1594
+ for (let key in data.taskNodeMap) {
1595
+ arr.push({ nodeName: data.taskNodeMap[key], nodeId: key });
1596
+ }
1597
+ // this.operationList[0].list = data.nextNodeList;
1598
+ this.operationList[0].list = arr;
1599
+ if (this.isHideDefaultOperation != 1) {
1600
+ this.nextNode.nextOperate = 0;
1601
+ this.nextNode.nodeInfo = this.operationList[0].list;
1602
+ if (this.nextNode.nodeInfo.length > 0) {
1603
+ let defaultNodeData = data.nextNodeList.filter(
1604
+ (x) => x.nodeId == this.defaultNextNode
1605
+ );
1606
+ this.nextNode.nextNode =
1607
+ defaultNodeData.length > 0
1608
+ ? this.defaultNextNode
1609
+ : data.nextNodeList[0].nodeId;
1610
+ }
1611
+ } else if (
1612
+ data.nodeInfoMap.nodeExtAttr.defaultNextOperate == 1 ||
1613
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation == 1
1614
+ ) {
1615
+ // this.nextNode.nodeInfo = data.nextNodeList
1616
+ this.nextNode.nextOperate = 1;
1617
+ this.nextNode.nodeInfo = this.operationList[0].list;
1618
+ if (this.nextNode.nodeInfo.length > 0) {
1619
+ let defaultNodeData = data.nextNodeList.filter(
1620
+ (x) => x.nodeId == this.defaultNextNode
1621
+ );
1622
+ this.nextNode.nextNode =
1623
+ defaultNodeData.length > 0
1624
+ ? this.defaultNextNode
1625
+ : data.nextNodeList[0].nodeId;
1626
+ }
1627
+ }
1628
+ }
1629
+ this.isCustomPreset = data.isCustomPreset;
1630
+ this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
1631
+ this.presetTaskNodeMap = data.presetTaskNodeMap;
1632
+ this.isSinglePage = data.taskExamine.isSinglePage;
1633
+ this.isSinglePage &&
1634
+ (this.nextNode.opinion = data.taskExamine.opinion);
1635
+ // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
1636
+ this.nextNode.nodeName = data.taskExamine.nodeName;
1637
+ this.canPresetRead = data.canPresetRead;
1638
+ if (data.canPresetRead) {
1639
+ let ids =
1640
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
1641
+ let names =
1642
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
1643
+ ','
1644
+ );
1645
+ ids.map((item, index) => {
1646
+ this.presetReadUserId.push({
1647
+ showid: item,
1648
+ showname: names[index]
1649
+ });
1650
+ this.selectPresetUserList.push({
1651
+ showid: item,
1652
+ showname: names[index]
1653
+ });
1654
+ this.nextNode.presetReadUserId.push(item);
1655
+ });
1656
+ }
1657
+ this.getNodeInfos();
1658
+ // this.getPresetFlowInfo();
1659
+ this.isCustomPreset &&
1660
+ this.$refs.customPreset.getPresetFlowInfo(this.nextNode.nextNode);
1661
+ this.getFind();
1662
+ this.getMessage();
1663
+ } else {
1664
+ this.$message.error(message || '系统错误,请联系管理员!');
1665
+ }
1666
+ })
1667
+ .catch((err) => {
1668
+ if (this.showBtn) {
1669
+ this.loading = false;
1670
+ } else {
1671
+ this.allLoading.close();
1672
+ }
1673
+ if (err.message && err.message !== 'canceled') {
1674
+ this.$message.error(err.message);
1675
+ }
1676
+ });
1677
+ }
1678
+ }
1679
+ };
1680
+ </script>