eoss-ui 0.8.41 → 0.8.42

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