eoss-ui 0.8.4 → 0.8.6

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