eoss-ui 0.8.36 → 0.8.37

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.
@@ -1,2001 +1,2019 @@
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
- multiple: false,
603
- readMultiple: true,
604
- showOpinion: true,
605
- isOpinionRequired: 0,
606
- currentOrgSelectorTabs: ['employee', 'persongroup'],
607
- customPresetHintMessage: '', //流程预设标题
608
- nextNodeCheckType: 'select',
609
- nextOperateCheckType: 'select',
610
- showNews: false, // 是否展示通知信息
611
- notificationMessageReadOnly: false,
612
- isChangeMessage: false,
613
- readOnlyNotificationType: '',
614
- show: true,
615
- enableCustomLimitTimeSetting: false,
616
- radioList: [],
617
- nextCurrentOrgselectUserList: [],
618
- showCustomLimitTimeText: false,
619
- activeNames: '1',
620
- selectUserList: [],
621
- defaultNextNode: '',
622
- presetUserJson: [],
623
- businessId: '',
624
- optionsKey: 0,
625
- isTaskread: 0, //是否显示分阅用户
626
- isHandleExplain: 0, //是否展示办理说明
627
- options: [],
628
- presetList: [],
629
- presetReadUserId: [], //自动分阅
630
- canPresetRead: false, //是否展示自动分阅
631
- nextUserTypes: ['employee', 'persongroup'],
632
- isCustomPreset: false, //是否展示预设节点
633
- isPreset: false, //是否展示预设办理人
634
- isSinglePage: false,
635
- presetEdit: 0,
636
- isDefSelectedObj: 0,
637
- isChooseNextNode: 0,
638
- isHideDefaultOperation: 0,
639
- countersignaturetypeCode: 0,
640
- presetTaskNodeKeyStr: '', //预设办理人顺序
641
- presetTaskNodeMap: {}, //预设办理人
642
- params: {
643
- filid: 'all', //选择范围(my:本单位/ "" or all:全部)
644
- selectmix: 'true1',
645
- deptid: '' //指定部门(my:本部门)
646
- },
647
- newOpinion: '',
648
- operationList: [],
649
- tabs: {
650
- employee: {
651
- param: {
652
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId,
653
- name: '本单位用户'
654
- }
655
- },
656
- department: {
657
- param: {
658
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
659
- }
660
- }
661
- },
662
- activitiDefinitionSort: false,
663
- userModel: {},
664
- nextUserTabs: {},
665
- selectPresetUserList: [],
666
- presetOptions: [],
667
- selectReadUserList: [],
668
- userOptions: [],
669
- mixReadList: [],
670
- mixPresetList: [],
671
- isCdjxjTaskHandle: '',
672
- isShowNextUser: true,
673
- oldMessage: '',
674
- mixOrgIdList: [], //办理对象混选
675
- subProcessColumns: [],
676
- nextOtherOrgObjSelect: [],
677
- nextCurrentOrgObjSelect: [],
678
- isHideCurrentOrg: false,
679
- isHideOtherOrg: false,
680
- currentOrgSelectorParams: {
681
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId,
682
- only_filid: true
683
- },
684
- foreignOrgSelectorParams: { filid: 'all', nofilid: 1 },
685
- nextNode: {
686
- nodeName: '',
687
- customLimitTime: '',
688
- customLimitTimeText: '',
689
- newOpinion: '',
690
- countersignaturetypeText: '',
691
- nextNode: '',
692
- nextReadUserId: [],
693
- nextOrgId: [],
694
- noticeType: [],
695
- nextOperate: '',
696
- nextUser: [],
697
- presetReadUserId: [], //自动分阅
698
- noticeInfo: '',
699
- nodeInfo: [],
700
- userInfo: [],
701
- handleExplain: '',
702
- noticeList: [],
703
- msgTypeCount: 0
704
- }
705
- };
706
- },
707
- watch: {
708
- messageType: {
709
- handler(val) {
710
- if (this.urgencyLevel) {
711
- this.nextNode.noticeList = val;
712
- let arr = [];
713
- this.nextNode.noticeList.map((item) => {
714
- this.nextNode.noticeType.map((x) => {
715
- if (x == item.cciValue) {
716
- arr.push(x);
717
- }
718
- });
719
- });
720
- this.nextNode.noticeType = arr;
721
- } else {
722
- this.msgTypeCount++;
723
- }
724
- }
725
- },
726
- processDefinitionId(val) {
727
- const savedNodeInfo = { ...this.currentNodeInfo };
728
- Object.assign(this.$data, this.$options.data());
729
- this.currentNodeInfo = savedNodeInfo;
730
- this.getUserInfo();
731
- this.getNodeType();
732
- this.getStartFlow(val);
733
- if (this.copyHistory) {
734
- this.nextNode.newOpinion = this.opinion;
735
- } else if (this.formType != 'readTransfer') {
736
- this.newOpinion = this.opinion;
737
- }
738
- // this.getStartFlow(val);
739
- },
740
- opinion(val) {
741
- this.newOpinion = this.opinion;
742
- },
743
- formTitle: {
744
- handler(val) {
745
- if (!this.showBtn && !this.isChangeMessage) {
746
- this.nextNode.noticeInfo = this.oldMessage.replace('{title}', val);
747
- }
748
- },
749
- deep: true,
750
- immediate: true
751
- }
752
- },
753
- computed: {
754
- rules() {
755
- return {
756
- customLimitTime: [
757
- {
758
- required: this.enableCustomLimitTimeSetting,
759
- message: this.showCustomLimitTimeText
760
- ? '请输入限时办理天数'
761
- : '请选择限时办理天数',
762
- trigger: 'blur'
763
- },
764
- {
765
- required: this.enableCustomLimitTimeSetting,
766
- validator: this.checkCustomLimitTime,
767
- trigger: 'blur'
768
- }
769
- ]
770
- };
771
- },
772
- types() {
773
- if (this.isCdjxjTaskHandle == 'true') {
774
- return ['employee', 'enterprise', 'department'];
775
- } else {
776
- return ['employee', 'enterprise', 'department', 'persongroup'];
777
- }
778
- },
779
- fyParams() {
780
- let orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
781
- let params = {};
782
- if (this.configInfo.selectPersonValue == 1) {
783
- params.filid = orgId;
784
- } else if (this.configInfo.selectPersonValue == 2) {
785
- params.filid = orgId;
786
- } else if (this.configInfo.selectPersonValue == 3) {
787
- params.filid = 'all';
788
- } else if (this.configInfo.selectPersonValue == 4) {
789
- params.filid = 'all';
790
- } else if (this.configInfo.selectPersonValue == 5) {
791
- params.filid = '';
792
- } else if (this.configInfo.selectPersonValue == 6) {
793
- params.filid = '';
794
- } else if (this.configInfo.selectPersonValue == 7) {
795
- params.filid = orgId;
796
- } else if (this.configInfo.selectPersonValue == 8) {
797
- params.filid = orgId;
798
- }
799
- return params;
800
- }
801
- },
802
- created() {
803
- this.getUserInfo();
804
- },
805
- mounted() {
806
- if (!this.urgencyLevel) {
807
- this.getNodeType();
808
- }
809
- this.getStartFlow(this.processDefinitionId);
810
- if (this.copyHistory) {
811
- this.nextNode.newOpinion = this.opinion;
812
- } else if (this.formType != 'readTransfer') {
813
- this.newOpinion = this.opinion;
814
- }
815
- if (this.isCanReadTransferHandle && this.readTransferHandleFlowTypeCode) {
816
- this.getProcess(this.readTransferHandleFlowTypeCode);
817
- }
818
- },
819
- methods: {
820
- /**
821
- * getProcess
822
- * @desc:获取选择流程
823
- * @author liufan
824
- * @date 2022年5月25日
825
- **/
826
- getProcess(val) {
827
- let params = {
828
- businessId: this.businessId,
829
- flowTypeCode: val || this.flowTypeCode,
830
- // defaultProcessKey: this.defaultProcessKey,
831
- isOnly: true,
832
- hideTempSave: true
833
- };
834
- const loading = util.loading(this.$loading, '加载中...');
835
- util
836
- .ajax({ url: getProcessDefList, params })
837
- .then((res) => {
838
- const { status, message, data } = res;
839
- loading.close();
840
- if (status === 'success') {
841
- this.isStartFlowChartView = data.isStartFlowChartView;
842
- if (
843
- !Object.keys(data).length ||
844
- (data.definitionList && !data.definitionList.length)
845
- ) {
846
- this.$message.error('流程不存在或未关联对应流程!');
847
- } else {
848
- this.activitiDefinitionSort = data.activitiDefinitionSort;
849
- this.currentNodeInfo.option = data.definitionList;
850
- this.currentNodeInfo.nextNode = data.definitionList.filter(
851
- (item) => item.processDefKey == this.defaultProcessKey
852
- );
853
- if (this.currentNodeInfo.nextNode.length) {
854
- this.currentNodeInfo.nextNode =
855
- this.currentNodeInfo.nextNode[0].processDefId;
856
- } else {
857
- if (data.definitionList.length != 0) {
858
- this.currentNodeInfo.nextNode =
859
- data.definitionList[0].processDefId;
860
- } else {
861
- this.currentNodeInfo.nextNode = '';
862
- }
863
- }
864
- if (this.currentNodeInfo.nextNode) {
865
- this.handleFlowChange(this.currentNodeInfo.nextNode, true);
866
- }
867
- }
868
- } else {
869
- this.$message.error(message || '系统错误,请联系管理员!');
870
- }
871
- })
872
- .catch((err) => {
873
- loading.close();
874
- if (err.message && err.message !== 'canceled') {
875
- this.$message.error(err.message);
876
- }
877
- });
878
- },
879
- handleChangeTime(val) {
880
- this.nextNode.customLimitTime = val;
881
- },
882
- limitTimevalidate() {
883
- let validSate = true;
884
- this.$refs.nextNode.validate((valid) => {
885
- if (valid) {
886
- validSate = true;
887
- } else {
888
- validSate = false;
889
- }
890
- });
891
- return validSate;
892
- },
893
- checkCustomLimitTime(rule, value, callback) {
894
- if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
895
- callback(new Error('请输入正确的天数'));
896
- this.nextNode.customLimitTime = '';
897
- } else {
898
- callback();
899
- }
900
- },
901
- handleFlowChange(val) {
902
- this.getNodeInfoForStartFlow(val);
903
- this.$parent.$emit('flowChange', val);
904
- },
905
- getNodeInfoForStartFlow(processDefinitionId) {
906
- let params = {
907
- url: getNodeInfoForStart,
908
- params: { processDefinitionId }
909
- };
910
- util.ajax(params).then((res) => {
911
- if (res.status == 'success') {
912
- this.isOpinionRequired = res.data.nodeExtAttr.isOpinionRequired;
913
- this.showOpinion = false;
914
- setTimeout(() => {
915
- this.showOpinion = true;
916
- }, 0);
917
- this.processDefinitionId = processDefinitionId;
918
- // this.getStartFlow(processDefinitionId);
919
- // this.getNodeInfos(undefined, undefined, processDefinitionId);
920
- }
921
- });
922
- },
923
- handleChange() {
924
- this.isChangeMessage = true;
925
- },
926
- changeCustomLimitTime(val) {
927
- if (!Number(val) || val.indexOf('.') != -1 || Number(val) < 0) {
928
- this.$message.warning('请输入正确的天数');
929
- this.nextNode.customLimitTime = '';
930
- }
931
- },
932
- getUserInfo() {
933
- let mainConfig = util.getStorage('mainConfig');
934
- if (mainConfig) {
935
- this.userModel = JSON.parse(mainConfig).userModel;
936
- this.foreignOrgSelectorParams.nofilid = this.userModel.orgId;
937
- this.foreignOrgSelectorParams.roleid =
938
- this.currentOrgSelectorParams.roleid = this.selectorParams.roleid;
939
- } else {
940
- util
941
- .ajax({ url: loginUserInfo })
942
- .then((res) => {
943
- const { status, data } = res;
944
- if (status == 'success') {
945
- this.userModel = data;
946
- this.foreignOrgSelectorParams.nofilid = this.userModel.orgId;
947
- this.foreignOrgSelectorParams.roleid =
948
- tthis.currentOrgSelectorParams.roleid =
949
- this.selectorParams.roleid;
950
- } else {
951
- let msg = res.msg || '系统错误,请联系管理员!';
952
- this.$message.error(msg);
953
- }
954
- })
955
- .catch((err) => {
956
- if (err.message && err.message !== 'canceled') {
957
- this.$message.error(err.message);
958
- }
959
- });
960
- }
961
- },
962
- getIsShowNextUser(val) {
963
- if (
964
- val == 7 ||
965
- val == 8 ||
966
- val == 9 ||
967
- val == 10 ||
968
- val == 11 ||
969
- val == 12
970
- ) {
971
- this.isShowNextUser = false;
972
- //设置办理角色
973
- // $("#orgRoleCode").val(handleRoleId);
974
- if (val == 7 || val == 8) {
975
- this.nextUserTypes = ['department'];
976
- this.nextUserTabs = {
977
- department: {
978
- param: {
979
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
980
- }
981
- }
982
- };
983
- this.multiple = true;
984
- } else if (val == 9 || val == 10) {
985
- this.nextUserTypes = ['enterprise'];
986
- this.nextUserTabs = { enterprise: { param: { filid: 'other' } } };
987
- this.multiple = true;
988
- } else if (val == 11 || val == 12) {
989
- this.nextUserTypes = ['department', 'enterprise'];
990
- this.nextUserTabs = {
991
- enterprise: { param: { filid: 'other' } },
992
- department: {
993
- param: {
994
- filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
995
- }
996
- }
997
- };
998
- this.multiple = true;
999
- }
1000
- }
1001
- if (val == 7 || val == 9 || val == 11) {
1002
- this.multiple = false;
1003
- }
1004
- },
1005
- // 分阅是否多选
1006
- isReadMultiple(nextReadUserSelectType) {
1007
- if (nextReadUserSelectType == 1) {
1008
- this.readMultiple = false;
1009
- } else if (nextReadUserSelectType == 2) {
1010
- this.readMultiple = true;
1011
- } else if (nextReadUserSelectType == 3) {
1012
- this.readMultiple = false;
1013
- } else if (nextReadUserSelectType == 4) {
1014
- this.readMultiple = true;
1015
- } else if (nextReadUserSelectType == 5) {
1016
- this.readMultiple = false;
1017
- } else if (nextReadUserSelectType == 6) {
1018
- this.readMultiple = true;
1019
- }
1020
- },
1021
- changeSelectReadUser(val, type) {
1022
- const { nextUser, mixList } = val;
1023
- this.nextNode[type] = nextUser;
1024
- if (type === 'presetReadUserId') {
1025
- this.mixPresetList = mixList;
1026
- } else {
1027
- this.mixReadList = mixList;
1028
- }
1029
- },
1030
- selecNext(val) {
1031
- this.nextNode.nextUser = [];
1032
- this.options = [];
1033
- this.selectUserList = [];
1034
- this.radioList = [];
1035
- if (this.showBtn) {
1036
- this.loading = true;
1037
- } else {
1038
- this.allLoading = util.loading(this.$loading, '加载中...');
1039
- }
1040
- this.nextNode.nodeInfo = this.operationList[val].list;
1041
- if (this.nextNode.nodeInfo.length > 0) {
1042
- let defaultNodeData = this.nextNode.nodeInfo.filter(
1043
- (x) => x.nodeId == this.defaultNextNode
1044
- );
1045
- length;
1046
- this.nextNode.nextNode =
1047
- defaultNodeData.length > 0
1048
- ? this.defaultNextNode
1049
- : this.nextNode.nodeInfo[0].nodeId;
1050
- }
1051
- this.getNodeInfos();
1052
- },
1053
- changeSelectUser(val, type) {
1054
- const { nextUser, options, mixList } = val;
1055
- this.nextNode[type] = nextUser;
1056
- this.mixOrgIdList = mixList;
1057
- },
1058
- getsubProcessColumns() {
1059
- let data = [];
1060
- let obj = { name: '[部门员工]-' };
1061
- if (this.nextCurrentOrgObjSelect.length > 0) {
1062
- this.nextCurrentOrgObjSelect.map((x) => {
1063
- if (x.stype == 'employee') {
1064
- obj.name = !obj.value
1065
- ? obj.name + x.showname
1066
- : obj.name + ',' + x.showname;
1067
- obj.value = obj.value
1068
- ? obj.value + ',' + x.showid
1069
- : 'employee-' + x.showid;
1070
- } else {
1071
- data.push({
1072
- name: '[部门]' + x.showname,
1073
- value: 'department-' + x.showid
1074
- });
1075
- }
1076
- });
1077
- }
1078
- obj.value && data.push(obj);
1079
- if (this.nextOtherOrgObjSelect.length > 0) {
1080
- this.nextOtherOrgObjSelect.map((x) => {
1081
- data.push({
1082
- name: '[企业]' + x.showname,
1083
- value: 'enterprise-' + x.showid
1084
- });
1085
- });
1086
- }
1087
- this.subProcessColumns = data;
1088
- // return data;
1089
- },
1090
- // 单位选择完回调
1091
- disposeAppUnit(res, type) {
1092
- let label = type.substring(0, type.lastIndexOf('Select'));
1093
- this.nextNode[label + 'Name'] = '';
1094
- res.options && (this[type] = res.options);
1095
- let obj = {};
1096
- // if (typeof res.mixList == 'array')
1097
- res.mixList && (this.nextNode[label] = res.mixList.join('|'));
1098
- res.options.map((item) => {
1099
- if (obj[item.stype]) {
1100
- obj[item.stype].push(item.showname);
1101
- } else {
1102
- obj[item.stype] = [item.showname];
1103
- }
1104
- });
1105
- for (let key in obj) {
1106
- if (
1107
- key === 'enterprise' &&
1108
- this.nextNode[label + 'Name'].indexOf('[企业]') == -1
1109
- ) {
1110
- this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
1111
- ? this.nextNode[label + 'Name'] +
1112
- '|' +
1113
- '[企业]-' +
1114
- obj[key].join(',')
1115
- : '' + '[企业]-' + obj[key].join(',');
1116
- }
1117
- if (
1118
- key === 'department' &&
1119
- this.nextNode[label + 'Name'].indexOf('[部门]') == -1
1120
- ) {
1121
- this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
1122
- ? this.nextNode[label + 'Name'] +
1123
- '|' +
1124
- '[部门]-' +
1125
- obj[key].join(',')
1126
- : '' + '[部门]-' + obj[key].join(',');
1127
- }
1128
- if (
1129
- key === 'employee' &&
1130
- this.nextNode[label + 'Name'].indexOf('[部门员工]') == -1
1131
- ) {
1132
- this.nextNode[label + 'Name'] = this.nextNode[label + 'Name']
1133
- ? this.nextNode[label + 'Name'] +
1134
- '|' +
1135
- '[部门员工]-' +
1136
- obj[key].join(',')
1137
- : '' + '[部门员工]-' + obj[key].join(',');
1138
- }
1139
- }
1140
- // this.nextNode[label + 'Name'] = obj.enterprise?;
1141
- if (!this.currentNodeIsCircularReadNode) {
1142
- this.nextNode[label + 'SerialId'] = res.nextUser.join(',');
1143
- this.nextNode[label + 'Json'] = JSON.stringify(res.options);
1144
- }
1145
- this.getsubProcessColumns();
1146
- },
1147
- getNodeType() {
1148
- util
1149
- .ajax({
1150
- url: findCodeValues,
1151
- params: {
1152
- ccCode: 'notification_type',
1153
- userId: util.getStorage('userId')
1154
- }
1155
- })
1156
- .then((res) => {
1157
- const { status, data } = res;
1158
- if (status === 'success') {
1159
- this.nextNode.noticeList = data;
1160
- }
1161
- })
1162
- .catch((err) => {
1163
- if (this.showBtn) {
1164
- this.loading = false;
1165
- } else {
1166
- this.allLoading.close();
1167
- }
1168
- if (err.message && err.message !== 'canceled') {
1169
- this.$message.error(err.message);
1170
- }
1171
- });
1172
- },
1173
- //获取通知信息
1174
- getMessage() {
1175
- let params = {
1176
- processDefinitionId: this.processDefinitionId,
1177
- nodeId: this.nextNode.nextNode,
1178
- businessId: this.id
1179
- };
1180
- if (!this.showBtn) {
1181
- params.openMode = 'samepage';
1182
- }
1183
- util
1184
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
1185
- .then((res) => {
1186
- if (res.status === 'success') {
1187
- if (!this.showBtn) {
1188
- this.oldMessage = res.message;
1189
- this.nextNode.noticeInfo = res.message.replace(
1190
- '{title}',
1191
- this.formTitle
1192
- );
1193
- } else {
1194
- this.nextNode.noticeInfo = res.message;
1195
- }
1196
- }
1197
- })
1198
- .catch((err) => {
1199
- if (this.showBtn) {
1200
- this.loading = false;
1201
- } else {
1202
- this.allLoading.close();
1203
- }
1204
- if (err.message && err.message !== 'canceled') {
1205
- this.$message.error(err.message);
1206
- }
1207
- });
1208
- },
1209
- // 提交表单
1210
- subProcess(formName) {
1211
- this.saveProcess(formName);
1212
- },
1213
- saveProcess(formName) {
1214
- this.$refs[formName].validate((valid) => {
1215
- if (valid) {
1216
- const {
1217
- nextNode,
1218
- nextUser,
1219
- noticeInfo,
1220
- noticeType,
1221
- handleExplain,
1222
- presetReadUserId,
1223
- nextReadUserId,
1224
- nextOrgId,
1225
- newOpinion,
1226
- customLimitTime,
1227
- nextOtherOrgObj,
1228
- nextCurrentOrgObj
1229
- } = this.nextNode;
1230
- // if (noticeType.length === 0) {
1231
- // return this.$message.warning('请选择通知方式');
1232
- // }
1233
- if (this.isShowNextUser) {
1234
- if (
1235
- (nextUser == '' || (this.multiple && nextUser.length == 0)) &&
1236
- !this.isHideCurrentOrg &&
1237
- !this.isHideOtherOrg
1238
- ) {
1239
- return this.$message.warning(
1240
- `请选择${this.flowLabelConfig.nextUser || '下步办理人'}`
1241
- );
1242
- }
1243
- } else {
1244
- if (nextOrgId == '' || (this.multiple && nextOrgId.length == 0)) {
1245
- return this.$message.warning('请选择办理对象');
1246
- }
1247
- }
1248
- if (
1249
- (this.isHideOtherOrg || this.isHideCurrentOrg) &&
1250
- !nextCurrentOrgObj &&
1251
- !nextOtherOrgObj
1252
- ) {
1253
- return this.$message.warning('请选择办理对象');
1254
- }
1255
- if (this.isCancelSecondConfirmationType) {
1256
- this.$confirm('确认提交吗?', '提示', {
1257
- confirmButtonText: '确定',
1258
- cancelButtonText: '取消',
1259
- type: 'warning'
1260
- }).then(() => {
1261
- if (this.showBtn) {
1262
- this.loading = true;
1263
- } else {
1264
- this.allLoading = util.loading(this.$loading, '加载中...');
1265
- }
1266
- let newNextUser = [];
1267
- if (this.multiple) {
1268
- nextUser && nextUser.map((item) => newNextUser.push(item));
1269
- }
1270
- let newNoticeType = '';
1271
- if (noticeType) {
1272
- newNoticeType = noticeType.join(',');
1273
- }
1274
- let params = {
1275
- processDefinitionId: this.processDefinitionId,
1276
- nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1277
- nextNodeId: nextNode,
1278
- businessId: this.businessId,
1279
- notificationType: newNoticeType,
1280
- userId: util.getStorage('userId'),
1281
- notificationMsg: noticeInfo,
1282
- customPresetUserJson: JSON.stringify(this.presetList),
1283
- presetUserJson: JSON.stringify(this.presetUserJson),
1284
- nextReadUserId: this.readMultiple
1285
- ? this.mixReadList && this.mixReadList.join('|')
1286
- : nextReadUserId,
1287
- nextOrgId: !this.isShowNextUser
1288
- ? this.multiple
1289
- ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1290
- : nextOrgId
1291
- : '',
1292
- handleExplain: handleExplain,
1293
- presetReadUserId:
1294
- this.mixPresetList && this.mixPresetList.length > 0
1295
- ? this.mixPresetList.join('|')
1296
- : presetReadUserId.join(','),
1297
- opinion: this.newOpinion || newOpinion
1298
- };
1299
- if (this.enableCustomLimitTimeSetting) {
1300
- params.customLimitTime = customLimitTime;
1301
- if (!customLimitTime) {
1302
- this.$message.warning('请选择或输入限时办理的天数');
1303
- this.nextNode.customLimitTime = '';
1304
- return;
1305
- } else if (
1306
- !Number(customLimitTime) ||
1307
- customLimitTime.indexOf('.') != -1 ||
1308
- Number(customLimitTime) < 0
1309
- ) {
1310
- this.$message.warning('请输入正确的天数');
1311
- this.nextNode.customLimitTime = '';
1312
- return;
1313
- }
1314
- }
1315
- if (this.isHideCurrentOrg) {
1316
- params.nextCurrentOrgObj = nextCurrentOrgObj;
1317
- }
1318
- if (this.isHideOtherOrg) {
1319
- params.nextOtherOrgObj = nextOtherOrgObj;
1320
- }
1321
- if (this.activeNames != '1' || !this.isCustomPreset)
1322
- delete params.customPresetUserJson;
1323
- if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1324
- let newParm = {};
1325
- newParm.copyHistory =
1326
- this.copyHistory === 'needCopyPendedHistory';
1327
- newParm.startFlowParamJson = params;
1328
- // newParm.startFlowParamJson.businessId = this.id; //this.id
1329
- newParm.startFlowParamJson.taskExamineParam = {
1330
- startFlowFirstNodeName: this.taskExamineParam
1331
- };
1332
- newParm.startFlowParamJson = JSON.stringify(
1333
- newParm.startFlowParamJson
1334
- );
1335
- for (let key in this.taskParams) {
1336
- if (Array.isArray(this.taskParams[key])) {
1337
- this.taskParams[key] =
1338
- this.taskParams[key].length > 0
1339
- ? this.taskParams[key].join(',')
1340
- : '';
1341
- }
1342
- }
1343
-
1344
- newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1345
- if (this.formType == 'readTransfer') {
1346
- newParm.readTransferHandleStartFlowParamJson =
1347
- JSON.stringify(params);
1348
- newParm.taskReadEndParamJson = JSON.stringify(
1349
- this.taskParams
1350
- );
1351
- delete newParm.copyHistory;
1352
- delete newParm.startFlowParamJson;
1353
- delete newParm.submitTaskParamJson;
1354
- }
1355
- params = newParm;
1356
- }
1357
- if (this.copyHistory && !this.isFreeStartFlow) {
1358
- params.pendingId = this.pendingId;
1359
- delete params.businessId;
1360
- }
1361
- util
1362
- .ajax({
1363
- url: this.isFreeStartFlow
1364
- ? freeStartFlowWithSubmitTask
1365
- : this.formType == 'readTransfer'
1366
- ? startReadTransferHandleFlowWithTaskReadEnd
1367
- : this.copyHistory
1368
- ? freeStartFlow
1369
- : register,
1370
- method: 'post',
1371
- data: params
1372
- })
1373
- .then((res) => {
1374
- const { status, message } = res;
1375
- if (this.showBtn) {
1376
- this.loading = false;
1377
- } else {
1378
- this.allLoading.close();
1379
- }
1380
- if (status === 'success' || res.rCode == 0) {
1381
- this.quit(true);
1382
- this.simpleTips && this.$message.success('操作成功');
1383
- } else {
1384
- this.$message.error(message || '系统错误,请联系管理员!');
1385
- }
1386
- })
1387
- .catch((err) => {
1388
- if (this.showBtn) {
1389
- this.loading = false;
1390
- } else {
1391
- this.allLoading.close();
1392
- }
1393
- if (err.message && err.message !== 'canceled') {
1394
- this.$message.error(err.message);
1395
- }
1396
- });
1397
- });
1398
- return;
1399
- }
1400
- if (this.showBtn) {
1401
- this.loading = true;
1402
- } else {
1403
- this.allLoading = util.loading(this.$loading, '加载中...');
1404
- }
1405
- let newNextUser = [];
1406
- if (this.multiple) {
1407
- nextUser && nextUser.map((item) => newNextUser.push(item));
1408
- }
1409
- let newNoticeType = '';
1410
- if (noticeType) {
1411
- newNoticeType = noticeType.join(',');
1412
- }
1413
- let params = {
1414
- processDefinitionId: this.processDefinitionId,
1415
- nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1416
- nextNodeId: nextNode,
1417
- businessId: this.businessId,
1418
- notificationType: newNoticeType,
1419
- userId: util.getStorage('userId'),
1420
- notificationMsg: noticeInfo,
1421
- customPresetUserJson: JSON.stringify(this.presetList),
1422
- presetUserJson: JSON.stringify(this.presetUserJson),
1423
- nextReadUserId: this.readMultiple
1424
- ? this.mixReadList && this.mixReadList.join('|')
1425
- : nextReadUserId,
1426
- nextOrgId: !this.isShowNextUser
1427
- ? this.multiple
1428
- ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1429
- : nextOrgId
1430
- : '',
1431
- handleExplain: handleExplain,
1432
- presetReadUserId:
1433
- this.mixPresetList && this.mixPresetList.length > 0
1434
- ? this.mixPresetList.join('|')
1435
- : presetReadUserId.join(','),
1436
- opinion: this.newOpinion || newOpinion
1437
- };
1438
- if (this.enableCustomLimitTimeSetting) {
1439
- params.customLimitTime = customLimitTime;
1440
- if (!customLimitTime) {
1441
- this.$message.warning('请选择或输入限时办理的天数');
1442
- this.nextNode.customLimitTime = '';
1443
- return;
1444
- } else if (
1445
- !Number(customLimitTime) ||
1446
- customLimitTime.indexOf('.') != -1 ||
1447
- Number(customLimitTime) < 0
1448
- ) {
1449
- this.$message.warning('请输入正确的天数');
1450
- this.nextNode.customLimitTime = '';
1451
- return;
1452
- }
1453
- }
1454
- if (this.isHideCurrentOrg) {
1455
- params.nextCurrentOrgObj = nextCurrentOrgObj;
1456
- }
1457
- if (this.isHideOtherOrg) {
1458
- params.nextOtherOrgObj = nextOtherOrgObj;
1459
- }
1460
- if (this.activeNames != '1' || !this.isCustomPreset)
1461
- delete params.customPresetUserJson;
1462
- if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1463
- let newParm = {};
1464
- newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
1465
- newParm.startFlowParamJson = params;
1466
- // newParm.startFlowParamJson.businessId = this.id; //this.id
1467
- newParm.startFlowParamJson.taskExamineParam = {
1468
- startFlowFirstNodeName: this.taskExamineParam
1469
- };
1470
- newParm.startFlowParamJson = JSON.stringify(
1471
- newParm.startFlowParamJson
1472
- );
1473
- for (let key in this.taskParams) {
1474
- if (Array.isArray(this.taskParams[key])) {
1475
- this.taskParams[key] =
1476
- this.taskParams[key].length > 0
1477
- ? this.taskParams[key].join(',')
1478
- : '';
1479
- }
1480
- }
1481
-
1482
- newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1483
- if (this.formType == 'readTransfer') {
1484
- newParm.readTransferHandleStartFlowParamJson =
1485
- JSON.stringify(params);
1486
- newParm.taskReadEndParamJson = JSON.stringify(this.taskParams);
1487
- delete newParm.copyHistory;
1488
- delete newParm.startFlowParamJson;
1489
- delete newParm.submitTaskParamJson;
1490
- }
1491
- params = newParm;
1492
- }
1493
- if (this.copyHistory && !this.isFreeStartFlow) {
1494
- params.pendingId = this.pendingId;
1495
- delete params.businessId;
1496
- }
1497
- util
1498
- .ajax({
1499
- url: this.isFreeStartFlow
1500
- ? freeStartFlowWithSubmitTask
1501
- : this.formType == 'readTransfer'
1502
- ? startReadTransferHandleFlowWithTaskReadEnd
1503
- : this.copyHistory
1504
- ? freeStartFlow
1505
- : register,
1506
- method: 'post',
1507
- data: params
1508
- })
1509
- .then((res) => {
1510
- const { status, message } = res;
1511
- if (this.showBtn) {
1512
- this.loading = false;
1513
- } else {
1514
- this.allLoading.close();
1515
- }
1516
- if (status === 'success' || res.rCode == 0) {
1517
- this.quit(true);
1518
- this.simpleTips && this.$message.success('操作成功');
1519
- } else {
1520
- this.$message.error(message || '系统错误,请联系管理员!');
1521
- }
1522
- })
1523
- .catch((err) => {
1524
- if (this.showBtn) {
1525
- this.loading = false;
1526
- } else {
1527
- this.allLoading.close();
1528
- }
1529
- if (err.message && err.message !== 'canceled') {
1530
- this.$message.error(err.message);
1531
- }
1532
- });
1533
- } else {
1534
- return false;
1535
- }
1536
- });
1537
- },
1538
- getNodeInfos(nodeId, index, processDefinitionId) {
1539
- let params = {
1540
- processDefinitionId: processDefinitionId || this.processDefinitionId,
1541
- nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
1542
- businessId: this.id,
1543
- userId: util.getStorage('userId')
1544
- };
1545
- util
1546
- .ajax({ url: getNodeInfo, params })
1547
- .then((res) => {
1548
- const {
1549
- status,
1550
- message,
1551
- data: {
1552
- nextUserList,
1553
- nodeExtAttr,
1554
- nodeMoreInfo,
1555
- countersignaturetypeText,
1556
- countersignaturetypeCode
1557
- }
1558
- } = res;
1559
- if (this.showBtn) {
1560
- this.loading = false;
1561
- } else {
1562
- this.allLoading.close();
1563
- }
1564
- if (status === 'success') {
1565
- if (
1566
- this.currentOrgSelectorParams.department &&
1567
- !this.currentOrgSelectorParams.department.roleid &&
1568
- this.selectorParams.roleid &&
1569
- nodeExtAttr.deptRoleCode
1570
- ) {
1571
- this.currentOrgSelectorParams.department.roleid =
1572
- nodeExtAttr.deptRoleCode;
1573
- }
1574
- this.isCurrentNodeForbiddenChangeCandidate =
1575
- nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
1576
- this.nextNode.userInfo = nextUserList;
1577
- this.countersignaturetypeCode = countersignaturetypeCode;
1578
- this.nextNode.countersignaturetypeText = countersignaturetypeText;
1579
- this.enableCustomLimitTimeSetting =
1580
- nodeExtAttr.enableCustomLimitTimeSetting == 1;
1581
- if (nodeMoreInfo.currentOrgDefaultSelectObjectItems) {
1582
- this.nextCurrentOrgselectUserList = [];
1583
- if (
1584
- nodeMoreInfo.currentOrgDefaultSelectObjectItems.deptIds.length >
1585
- 0
1586
- ) {
1587
- nodeMoreInfo.currentOrgDefaultSelectObjectItems.deptIds.map(
1588
- (x, i) => {
1589
- this.nextCurrentOrgselectUserList.push({
1590
- showname:
1591
- nodeMoreInfo.currentOrgDefaultSelectObjectItems
1592
- .deptNames[i],
1593
- showid: x,
1594
- stype: 'department'
1595
- });
1596
- }
1597
- );
1598
- }
1599
- if (
1600
- nodeMoreInfo.currentOrgDefaultSelectObjectItems.userIds.length >
1601
- 0
1602
- ) {
1603
- nodeMoreInfo.currentOrgDefaultSelectObjectItems.userIds.map(
1604
- (x, i) => {
1605
- this.nextCurrentOrgselectUserList.push({
1606
- showname:
1607
- nodeMoreInfo.currentOrgDefaultSelectObjectItems
1608
- .userNames[i],
1609
- showid: x,
1610
- stype: 'employee'
1611
- });
1612
- }
1613
- );
1614
- }
1615
- if (
1616
- nodeMoreInfo.currentOrgDefaultSelectObjectItems.orgIds.length >
1617
- 0
1618
- ) {
1619
- nodeMoreInfo.currentOrgDefaultSelectObjectItems.orgIds.map(
1620
- (x, i) => {
1621
- this.nextCurrentOrgselectUserList.push({
1622
- showname:
1623
- nodeMoreInfo.currentOrgDefaultSelectObjectItems
1624
- .orgNames[i],
1625
- showid: x,
1626
- stype: 'enterprise'
1627
- });
1628
- }
1629
- );
1630
- }
1631
- this.nextNode.nextCurrentOrgObj =
1632
- nodeMoreInfo.currentOrgDefaultSelectObjects;
1633
- }
1634
- if (
1635
- this.enableCustomLimitTimeSetting &&
1636
- nodeMoreInfo.defaultCustomLimitDays
1637
- ) {
1638
- this.nextNode.customLimitTime =
1639
- this.nextNode.customLimitTimeText =
1640
- nodeMoreInfo.defaultCustomLimitDays + '';
1641
- }
1642
- this.isTaskread = nodeExtAttr.isTaskread;
1643
- this.isHandleExplain = nodeExtAttr.isHandleExplain;
1644
- this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
1645
- this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
1646
- this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
1647
- if (
1648
- nodeExtAttr.userSelectionType == 7 ||
1649
- nodeExtAttr.userSelectionType == 8 ||
1650
- nodeExtAttr.userSelectionType == 9 ||
1651
- nodeExtAttr.userSelectionType == 10 ||
1652
- nodeExtAttr.userSelectionType == 11 ||
1653
- nodeExtAttr.userSelectionType == 12
1654
- ) {
1655
- this.getIsShowNextUser(
1656
- nodeExtAttr && nodeExtAttr.userSelectionType
1657
- );
1658
- } else {
1659
- const { multiple, params } = this.isMultiple(
1660
- nodeExtAttr.userSelectionType
1661
- );
1662
- this.multiple = multiple;
1663
- this.params = params;
1664
- }
1665
- // this.isReadMultiple(nodeExtAttr.userSelectionType);
1666
- if (nodeExtAttr.nodeType === 1 || nodeExtAttr.nodeType === 2) {
1667
- this.isHideCurrentOrg =
1668
- nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
1669
- this.isHideOtherOrg =
1670
- nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
1671
- } else {
1672
- this.isHideCurrentOrg = false;
1673
- this.isHideOtherOrg = false;
1674
- }
1675
- nextUserList.map((item) => {
1676
- if (
1677
- this.multiple &&
1678
- nodeExtAttr.isDefSelectedObj == 1 &&
1679
- nextUserList !== undefined
1680
- ) {
1681
- this.nextNode.nextUser.push(item.userId);
1682
- this.selectUserList.push({
1683
- showname: item.username,
1684
- showid: item.userId
1685
- });
1686
- }
1687
-
1688
- this.options.push({
1689
- showname: item.username,
1690
- showid: item.userId
1691
- });
1692
- });
1693
- if (this.multiple) {
1694
- this.nextNode.nextReadUserId = [];
1695
- } else {
1696
- this.nextNode.nextReadUserId = '';
1697
- }
1698
- if (
1699
- nextUserList.length > 0 &&
1700
- nodeExtAttr.isDefSelectedObj == 1 &&
1701
- !this.multiple
1702
- ) {
1703
- this.nextNode.nextUser = nextUserList[0].userId;
1704
- this.selectUserList.push({
1705
- showname: nextUserList[0].username,
1706
- showid: nextUserList[0].userId
1707
- });
1708
- }
1709
- this.radioList = this.options;
1710
- } else {
1711
- this.$message.error(message || '系统错误,请联系管理员!');
1712
- }
1713
- nodeId && this.$refs.selectUser[index].changeInfo();
1714
- })
1715
- .catch((err) => {
1716
- if (this.showBtn) {
1717
- this.loading = false;
1718
- } else {
1719
- this.allLoading.close();
1720
- }
1721
- if (err.message && err.message !== 'canceled') {
1722
- this.$message.error(err.message);
1723
- }
1724
- });
1725
- },
1726
- changeSel(val) {
1727
- this.nextNode.nextUser = [];
1728
- this.options = [];
1729
- this.selectUserList = [];
1730
- this.radioList = [];
1731
- if (this.showBtn) {
1732
- this.loading = true;
1733
- } else {
1734
- this.allLoading = util.loading(this.$loading, '加载中...');
1735
- }
1736
- this.getNodeInfos();
1737
- },
1738
- // 取消
1739
- quit(val) {
1740
- if (val === true) return this.$emit('cancel', val);
1741
- this.$emit('cancel', false);
1742
- },
1743
- getFind() {
1744
- util
1745
- .ajax({
1746
- url: findSysCodes
1747
- })
1748
- .then((res) => {
1749
- const { status, message } = res;
1750
- if (status === 'success') {
1751
- if (this.hideMessage) return;
1752
- this.nextNode.noticeType = message.split(',');
1753
- let arr = [];
1754
- this.nextNode.noticeList.map((item) => {
1755
- this.nextNode.noticeType.map((x) => {
1756
- if (x == item.cciValue) {
1757
- arr.push(x);
1758
- }
1759
- });
1760
- });
1761
- this.nextNode.noticeType = arr;
1762
- } else {
1763
- this.$message.error(message || '系统错误,请联系管理员!');
1764
- }
1765
- })
1766
- .catch((err) => {
1767
- if (this.showBtn) {
1768
- this.loading = false;
1769
- } else {
1770
- this.allLoading.close();
1771
- }
1772
- if (err.message && err.message !== 'canceled') {
1773
- this.$message.error(err.message);
1774
- }
1775
- });
1776
- },
1777
- /**
1778
- * isMultiple
1779
- * @desc:是否多选
1780
- * @author liufan
1781
- * @date 2022年9月13日
1782
- **/
1783
- isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
1784
- let multiple = false;
1785
- let params = {};
1786
- if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
1787
- multiple = true;
1788
- }
1789
- if (val == 1 || val == 2 || val == 5) {
1790
- params.filid = this.userModel.orgId;
1791
- params.only_filid = true;
1792
- if (choiceOrgId) {
1793
- params.filid = choiceOrgId;
1794
- }
1795
- }
1796
- if (val == 5 || val == 6) {
1797
- params.filid = this.userModel.orgId;
1798
- params.mydeptid = this.userModel.depId;
1799
- if (choiceDeptId) {
1800
- params.mydeptid = choiceDeptId;
1801
- }
1802
- if (choiceOrgId) {
1803
- params.filid = choiceOrgId;
1804
- }
1805
- }
1806
- if (val == 15 || val == 16) {
1807
- params.filid = this.userModel.orgId;
1808
- if (pOrgId) {
1809
- params.filid = pOrgId;
1810
- }
1811
- }
1812
- return { multiple, params };
1813
- },
1814
- getStartFlow(processId) {
1815
- if (!processId) {
1816
- return false;
1817
- }
1818
- if (this.showBtn) {
1819
- this.loading = true;
1820
- } else {
1821
- this.allLoading = util.loading(this.$loading, '加载中...');
1822
- }
1823
- this.businessId = this.id;
1824
- let params = {
1825
- processDefinitionId: processId, // processId || this.processDefinitionId,
1826
- userId: util.getStorage('userId'),
1827
- businessId: this.businessId
1828
- };
1829
- if (!this.shwowBtn) {
1830
- params.taskAction = 'toStartFlowWithoutTempSave';
1831
- }
1832
- // 获取节点
1833
- util
1834
- .ajax({ url: toStartFlow, params })
1835
- .then((res) => {
1836
- //pc接口返回数据处理
1837
- const { status, message, data } = res;
1838
- if (status == 'success') {
1839
- data.nodeInfoMap.nodeExtAttr.submitTipsMsg &&
1840
- this.$confirm(
1841
- data.nodeInfoMap.nodeExtAttr.submitTipsMsg,
1842
- '提示',
1843
- {
1844
- confirmButtonText: '确定',
1845
- cancelButtonText: '取消',
1846
- type: 'warning'
1847
- }
1848
- )
1849
- .then(() => {})
1850
- .catch(() => {
1851
- this.quit();
1852
- });
1853
- data.nextNodeCheckType &&
1854
- (this.nextNodeCheckType = data.nextNodeCheckType);
1855
- data.nextOperateCheckType &&
1856
- (this.nextOperateCheckType = data.nextOperateCheckType);
1857
- if (data.currentOrgSelectorParams) {
1858
- if (
1859
- data.currentOrgSelectorParams.enableCurrentOrgConfig == 'true'
1860
- ) {
1861
- this.currentOrgSelectorTabs =
1862
- data.currentOrgSelectorParams.currentOrgType.split(',');
1863
- let currentOrgparams =
1864
- data.currentOrgSelectorParams.currentOrgRange.split(',');
1865
- this.currentOrgSelectorTabs.map((x, i) => {
1866
- this.currentOrgSelectorParams[x] = {
1867
- filid:
1868
- currentOrgparams[i] == 'my'
1869
- ? JSON.parse(util.getStorage('mainConfig')).userModel
1870
- .orgId
1871
- : currentOrgparams[i],
1872
- only_filid: true
1873
- };
1874
- });
1875
- }
1876
- }
1877
- this.configInfo = res.data;
1878
- this.customPresetHintMessage = data.customPresetHintMessage;
1879
- this.readOnlyNotificationType = data.readOnlyNotificationType;
1880
- this.notificationMessageReadOnly =
1881
- data.notificationMessageReadOnly == 'true';
1882
- this.nextNode.nodeInfo = data.nextNodeList;
1883
- this.nextNode.nextNode = data.nextNodeList[0].nodeId;
1884
- this.isPreset = data.isPreset;
1885
- this.isHideDefaultOperation =
1886
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
1887
- this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
1888
- this.isChooseNextNode =
1889
- data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
1890
- this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
1891
- if (this.isChooseNextNode == 1) {
1892
- this.operationList = [
1893
- // { key: 0, value: '默认', list: [] },
1894
- { key: 1, value: '自定义', list: [] }
1895
- ];
1896
- if (data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1) {
1897
- this.operationList.unshift({
1898
- key: 0,
1899
- value: '默认',
1900
- list: data.nextNodeList
1901
- });
1902
- }
1903
- let arr = [];
1904
- for (let key in data.taskNodeMap) {
1905
- arr.push({ nodeName: data.taskNodeMap[key], nodeId: key });
1906
- }
1907
- // this.operationList[0].list = data.nextNodeList;
1908
- this.operationList[
1909
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1 ? 1 : 0
1910
- ].list = arr;
1911
- if (this.isHideDefaultOperation != 1) {
1912
- this.nextNode.nextOperate = 0;
1913
- this.nextNode.nodeInfo = this.operationList[0].list;
1914
- if (this.nextNode.nodeInfo.length > 0) {
1915
- let defaultNodeData = data.nextNodeList.filter(
1916
- (x) => x.nodeId == this.defaultNextNode
1917
- );
1918
- this.nextNode.nextNode =
1919
- defaultNodeData.length > 0
1920
- ? this.defaultNextNode
1921
- : data.nextNodeList[0].nodeId;
1922
- }
1923
- }
1924
- if (
1925
- data.nodeInfoMap.nodeExtAttr.defaultNextOperate == 1 ||
1926
- data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation == 1
1927
- ) {
1928
- // this.nextNode.nodeInfo = data.nextNodeList
1929
- this.nextNode.nextOperate = 1;
1930
- this.nextNode.nodeInfo =
1931
- this.operationList[
1932
- this.isHideDefaultOperation != 1 ? 1 : 0
1933
- ].list;
1934
-
1935
- if (this.nextNode.nodeInfo.length > 0) {
1936
- let defaultNodeData = this.nextNode.nodeInfo.filter(
1937
- (x) => x.nodeId == this.defaultNextNode
1938
- );
1939
- this.nextNode.nextNode =
1940
- defaultNodeData.length > 0
1941
- ? this.defaultNextNode
1942
- : this.nextNode.nodeInfo[0].nodeId;
1943
- }
1944
- }
1945
- }
1946
- this.isCustomPreset = data.isCustomPreset;
1947
- this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
1948
- this.presetTaskNodeMap = data.presetTaskNodeMap;
1949
- this.isSinglePage = data.taskExamine.isSinglePage;
1950
- this.isSinglePage &&
1951
- (this.nextNode.opinion = data.taskExamine.opinion);
1952
- // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
1953
- this.nextNode.nodeName = data.taskExamine.nodeName;
1954
- this.canPresetRead = data.canPresetRead;
1955
- if (data.canPresetRead) {
1956
- let ids =
1957
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
1958
- let names =
1959
- data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
1960
- ','
1961
- );
1962
- ids.map((item, index) => {
1963
- this.presetReadUserId.push({
1964
- showid: item,
1965
- showname: names[index]
1966
- });
1967
- this.selectPresetUserList.push({
1968
- showid: item,
1969
- showname: names[index]
1970
- });
1971
- this.nextNode.presetReadUserId.push(item);
1972
- });
1973
- }
1974
- this.getNodeInfos(undefined, undefined, processId);
1975
- // this.getPresetFlowInfo();
1976
- this.isCustomPreset &&
1977
- this.$refs.customPreset.getPresetFlowInfo(
1978
- this.nextNode.nextNode,
1979
- undefined,
1980
- true
1981
- );
1982
- this.getFind();
1983
- this.getMessage();
1984
- } else {
1985
- this.$message.error(message || '系统错误,请联系管理员!');
1986
- }
1987
- })
1988
- .catch((err) => {
1989
- if (this.showBtn) {
1990
- this.loading = false;
1991
- } else {
1992
- this.allLoading.close();
1993
- }
1994
- if (err.message && err.message !== 'canceled') {
1995
- this.$message.error(err.message);
1996
- }
1997
- });
1998
- }
1999
- }
2000
- };
2001
- </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(this.presetList[i].name && this.presetList[i].name != '1' && this.presetList[i].name != 'endEvent' &&( !this.presetList[i].value || this.presetList[i].value.length == 0)){
1259
+
1260
+ return this.$message.warning(`预设节点<节点${this.presetList[i].sequence}-${this.presetList[i].label}>必须选择办理人!`);
1261
+ }else{
1262
+ delete this.presetList[i].label;
1263
+ }
1264
+ }
1265
+ }
1266
+
1267
+ if (this.isCancelSecondConfirmationType) {
1268
+ this.$confirm('确认提交吗?', '提示', {
1269
+ confirmButtonText: '确定',
1270
+ cancelButtonText: '取消',
1271
+ type: 'warning'
1272
+ }).then(() => {
1273
+ if (this.showBtn) {
1274
+ this.loading = true;
1275
+ } else {
1276
+ this.allLoading = util.loading(this.$loading, '加载中...');
1277
+ }
1278
+ let newNextUser = [];
1279
+ if (this.multiple) {
1280
+ nextUser && nextUser.map((item) => newNextUser.push(item));
1281
+ }
1282
+ let newNoticeType = '';
1283
+ if (noticeType) {
1284
+ newNoticeType = noticeType.join(',');
1285
+ }
1286
+ let params = {
1287
+ processDefinitionId: this.processDefinitionId,
1288
+ nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1289
+ nextNodeId: nextNode,
1290
+ businessId: this.businessId,
1291
+ notificationType: newNoticeType,
1292
+ userId: util.getStorage('userId'),
1293
+ notificationMsg: noticeInfo,
1294
+ customPresetUserJson: JSON.stringify(this.presetList),
1295
+ presetUserJson: JSON.stringify(this.presetUserJson),
1296
+ nextReadUserId: this.readMultiple
1297
+ ? this.mixReadList && this.mixReadList.join('|')
1298
+ : nextReadUserId,
1299
+ nextOrgId: !this.isShowNextUser
1300
+ ? this.multiple
1301
+ ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1302
+ : nextOrgId
1303
+ : '',
1304
+ handleExplain: handleExplain,
1305
+ presetReadUserId:
1306
+ this.mixPresetList && this.mixPresetList.length > 0
1307
+ ? this.mixPresetList.join('|')
1308
+ : presetReadUserId.join(','),
1309
+ opinion: this.newOpinion || newOpinion
1310
+ };
1311
+ if (this.enableCustomLimitTimeSetting) {
1312
+ params.customLimitTime = customLimitTime;
1313
+ if (!customLimitTime) {
1314
+ this.$message.warning('请选择或输入限时办理的天数');
1315
+ this.nextNode.customLimitTime = '';
1316
+ return;
1317
+ } else if (
1318
+ !Number(customLimitTime) ||
1319
+ customLimitTime.indexOf('.') != -1 ||
1320
+ Number(customLimitTime) < 0
1321
+ ) {
1322
+ this.$message.warning('请输入正确的天数');
1323
+ this.nextNode.customLimitTime = '';
1324
+ return;
1325
+ }
1326
+ }
1327
+ if (this.isHideCurrentOrg) {
1328
+ params.nextCurrentOrgObj = nextCurrentOrgObj;
1329
+ }
1330
+ if (this.isHideOtherOrg) {
1331
+ params.nextOtherOrgObj = nextOtherOrgObj;
1332
+ }
1333
+ if (this.activeNames != '1' || !this.isCustomPreset)
1334
+ delete params.customPresetUserJson;
1335
+ if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1336
+ let newParm = {};
1337
+ newParm.copyHistory =
1338
+ this.copyHistory === 'needCopyPendedHistory';
1339
+ newParm.startFlowParamJson = params;
1340
+ // newParm.startFlowParamJson.businessId = this.id; //this.id
1341
+ newParm.startFlowParamJson.taskExamineParam = {
1342
+ startFlowFirstNodeName: this.taskExamineParam
1343
+ };
1344
+ newParm.startFlowParamJson = JSON.stringify(
1345
+ newParm.startFlowParamJson
1346
+ );
1347
+ for (let key in this.taskParams) {
1348
+ if (Array.isArray(this.taskParams[key])) {
1349
+ this.taskParams[key] =
1350
+ this.taskParams[key].length > 0
1351
+ ? this.taskParams[key].join(',')
1352
+ : '';
1353
+ }
1354
+ }
1355
+
1356
+ newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1357
+ if (this.formType == 'readTransfer') {
1358
+ newParm.readTransferHandleStartFlowParamJson =
1359
+ JSON.stringify(params);
1360
+ newParm.taskReadEndParamJson = JSON.stringify(
1361
+ this.taskParams
1362
+ );
1363
+ delete newParm.copyHistory;
1364
+ delete newParm.startFlowParamJson;
1365
+ delete newParm.submitTaskParamJson;
1366
+ }
1367
+ params = newParm;
1368
+ }
1369
+ if (this.copyHistory && !this.isFreeStartFlow) {
1370
+ params.pendingId = this.pendingId;
1371
+ delete params.businessId;
1372
+ }
1373
+ util
1374
+ .ajax({
1375
+ url: this.isFreeStartFlow
1376
+ ? freeStartFlowWithSubmitTask
1377
+ : this.formType == 'readTransfer'
1378
+ ? startReadTransferHandleFlowWithTaskReadEnd
1379
+ : this.copyHistory
1380
+ ? freeStartFlow
1381
+ : register,
1382
+ method: 'post',
1383
+ data: params
1384
+ })
1385
+ .then((res) => {
1386
+ const { status, message } = res;
1387
+ if (this.showBtn) {
1388
+ this.loading = false;
1389
+ } else {
1390
+ this.allLoading.close();
1391
+ }
1392
+ if (status === 'success' || res.rCode == 0) {
1393
+ this.quit(true);
1394
+ this.simpleTips && this.$message.success('操作成功');
1395
+ } else {
1396
+ this.$message.error(message || '系统错误,请联系管理员!');
1397
+ }
1398
+ })
1399
+ .catch((err) => {
1400
+ if (this.showBtn) {
1401
+ this.loading = false;
1402
+ } else {
1403
+ this.allLoading.close();
1404
+ }
1405
+ if (err.message && err.message !== 'canceled') {
1406
+ this.$message.error(err.message);
1407
+ }
1408
+ });
1409
+ });
1410
+ return;
1411
+ }
1412
+ if (this.showBtn) {
1413
+ this.loading = true;
1414
+ } else {
1415
+ this.allLoading = util.loading(this.$loading, '加载中...');
1416
+ }
1417
+ let newNextUser = [];
1418
+ if (this.multiple) {
1419
+ nextUser && nextUser.map((item) => newNextUser.push(item));
1420
+ }
1421
+ let newNoticeType = '';
1422
+ if (noticeType) {
1423
+ newNoticeType = noticeType.join(',');
1424
+ }
1425
+ let params = {
1426
+ processDefinitionId: this.processDefinitionId,
1427
+ nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
1428
+ nextNodeId: nextNode,
1429
+ businessId: this.businessId,
1430
+ notificationType: newNoticeType,
1431
+ userId: util.getStorage('userId'),
1432
+ notificationMsg: noticeInfo,
1433
+ customPresetUserJson: JSON.stringify(this.presetList),
1434
+ presetUserJson: JSON.stringify(this.presetUserJson),
1435
+ nextReadUserId: this.readMultiple
1436
+ ? this.mixReadList && this.mixReadList.join('|')
1437
+ : nextReadUserId,
1438
+ nextOrgId: !this.isShowNextUser
1439
+ ? this.multiple
1440
+ ? this.mixOrgIdList && this.mixOrgIdList.join('|')
1441
+ : nextOrgId
1442
+ : '',
1443
+ handleExplain: handleExplain,
1444
+ presetReadUserId:
1445
+ this.mixPresetList && this.mixPresetList.length > 0
1446
+ ? this.mixPresetList.join('|')
1447
+ : presetReadUserId.join(','),
1448
+ opinion: this.newOpinion || newOpinion
1449
+ };
1450
+ if (this.enableCustomLimitTimeSetting) {
1451
+ params.customLimitTime = customLimitTime;
1452
+ if (!customLimitTime) {
1453
+ this.$message.warning('请选择或输入限时办理的天数');
1454
+ this.nextNode.customLimitTime = '';
1455
+ return;
1456
+ } else if (
1457
+ !Number(customLimitTime) ||
1458
+ customLimitTime.indexOf('.') != -1 ||
1459
+ Number(customLimitTime) < 0
1460
+ ) {
1461
+ this.$message.warning('请输入正确的天数');
1462
+ this.nextNode.customLimitTime = '';
1463
+ return;
1464
+ }
1465
+ }
1466
+ if (this.isHideCurrentOrg) {
1467
+ params.nextCurrentOrgObj = nextCurrentOrgObj;
1468
+ }
1469
+ if (this.isHideOtherOrg) {
1470
+ params.nextOtherOrgObj = nextOtherOrgObj;
1471
+ }
1472
+ if (this.activeNames != '1' || !this.isCustomPreset)
1473
+ delete params.customPresetUserJson;
1474
+ if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1475
+ let newParm = {};
1476
+ newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
1477
+ newParm.startFlowParamJson = params;
1478
+ // newParm.startFlowParamJson.businessId = this.id; //this.id
1479
+ newParm.startFlowParamJson.taskExamineParam = {
1480
+ startFlowFirstNodeName: this.taskExamineParam
1481
+ };
1482
+ newParm.startFlowParamJson = JSON.stringify(
1483
+ newParm.startFlowParamJson
1484
+ );
1485
+ for (let key in this.taskParams) {
1486
+ if (Array.isArray(this.taskParams[key])) {
1487
+ this.taskParams[key] =
1488
+ this.taskParams[key].length > 0
1489
+ ? this.taskParams[key].join(',')
1490
+ : '';
1491
+ }
1492
+ }
1493
+
1494
+ newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
1495
+ if (this.formType == 'readTransfer') {
1496
+ newParm.readTransferHandleStartFlowParamJson =
1497
+ JSON.stringify(params);
1498
+ newParm.taskReadEndParamJson = JSON.stringify(this.taskParams);
1499
+ delete newParm.copyHistory;
1500
+ delete newParm.startFlowParamJson;
1501
+ delete newParm.submitTaskParamJson;
1502
+ }
1503
+ params = newParm;
1504
+ }
1505
+ if (this.copyHistory && !this.isFreeStartFlow) {
1506
+ params.pendingId = this.pendingId;
1507
+ delete params.businessId;
1508
+ }
1509
+ util
1510
+ .ajax({
1511
+ url: this.isFreeStartFlow
1512
+ ? freeStartFlowWithSubmitTask
1513
+ : this.formType == 'readTransfer'
1514
+ ? startReadTransferHandleFlowWithTaskReadEnd
1515
+ : this.copyHistory
1516
+ ? freeStartFlow
1517
+ : register,
1518
+ method: 'post',
1519
+ data: params
1520
+ })
1521
+ .then((res) => {
1522
+ const { status, message } = res;
1523
+ if (this.showBtn) {
1524
+ this.loading = false;
1525
+ } else {
1526
+ this.allLoading.close();
1527
+ }
1528
+ if (status === 'success' || res.rCode == 0) {
1529
+ this.quit(true);
1530
+ this.simpleTips && this.$message.success('操作成功');
1531
+ } else {
1532
+ this.$message.error(message || '系统错误,请联系管理员!');
1533
+ }
1534
+ })
1535
+ .catch((err) => {
1536
+ if (this.showBtn) {
1537
+ this.loading = false;
1538
+ } else {
1539
+ this.allLoading.close();
1540
+ }
1541
+ if (err.message && err.message !== 'canceled') {
1542
+ this.$message.error(err.message);
1543
+ }
1544
+ });
1545
+ } else {
1546
+ return false;
1547
+ }
1548
+ });
1549
+ },
1550
+ getNodeInfos(nodeId, index, processDefinitionId) {
1551
+ let params = {
1552
+ processDefinitionId: processDefinitionId || this.processDefinitionId,
1553
+ nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
1554
+ businessId: this.id,
1555
+ userId: util.getStorage('userId')
1556
+ };
1557
+ util
1558
+ .ajax({ url: getNodeInfo, params })
1559
+ .then((res) => {
1560
+ const {
1561
+ status,
1562
+ message,
1563
+ data: {
1564
+ nextUserList,
1565
+ nodeExtAttr,
1566
+ nodeMoreInfo,
1567
+ countersignaturetypeText,
1568
+ countersignaturetypeCode
1569
+ }
1570
+ } = res;
1571
+ if (this.showBtn) {
1572
+ this.loading = false;
1573
+ } else {
1574
+ this.allLoading.close();
1575
+ }
1576
+ if (status === 'success') {
1577
+ if (
1578
+ this.currentOrgSelectorParams.department &&
1579
+ !this.currentOrgSelectorParams.department.roleid &&
1580
+ this.selectorParams.roleid &&
1581
+ nodeExtAttr.deptRoleCode
1582
+ ) {
1583
+ this.currentOrgSelectorParams.department.roleid =
1584
+ nodeExtAttr.deptRoleCode;
1585
+ }
1586
+ this.isCurrentNodeForbiddenChangeCandidate =
1587
+ nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
1588
+ this.nextNode.userInfo = nextUserList;
1589
+ this.countersignaturetypeCode = countersignaturetypeCode;
1590
+ this.nextNode.countersignaturetypeText = countersignaturetypeText;
1591
+ this.enableCustomLimitTimeSetting =
1592
+ nodeExtAttr.enableCustomLimitTimeSetting == 1;
1593
+ if (nodeMoreInfo.currentOrgDefaultSelectObjectItems) {
1594
+ this.nextCurrentOrgselectUserList = [];
1595
+ if (
1596
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems.deptIds.length >
1597
+ 0
1598
+ ) {
1599
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems.deptIds.map(
1600
+ (x, i) => {
1601
+ this.nextCurrentOrgselectUserList.push({
1602
+ showname:
1603
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems
1604
+ .deptNames[i],
1605
+ showid: x,
1606
+ stype: 'department'
1607
+ });
1608
+ }
1609
+ );
1610
+ }
1611
+ if (
1612
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems.userIds.length >
1613
+ 0
1614
+ ) {
1615
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems.userIds.map(
1616
+ (x, i) => {
1617
+ this.nextCurrentOrgselectUserList.push({
1618
+ showname:
1619
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems
1620
+ .userNames[i],
1621
+ showid: x,
1622
+ stype: 'employee'
1623
+ });
1624
+ }
1625
+ );
1626
+ }
1627
+ if (
1628
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems.orgIds.length >
1629
+ 0
1630
+ ) {
1631
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems.orgIds.map(
1632
+ (x, i) => {
1633
+ this.nextCurrentOrgselectUserList.push({
1634
+ showname:
1635
+ nodeMoreInfo.currentOrgDefaultSelectObjectItems
1636
+ .orgNames[i],
1637
+ showid: x,
1638
+ stype: 'enterprise'
1639
+ });
1640
+ }
1641
+ );
1642
+ }
1643
+ this.nextNode.nextCurrentOrgObj =
1644
+ nodeMoreInfo.currentOrgDefaultSelectObjects;
1645
+ }
1646
+ if (
1647
+ this.enableCustomLimitTimeSetting &&
1648
+ nodeMoreInfo.defaultCustomLimitDays
1649
+ ) {
1650
+ this.nextNode.customLimitTime =
1651
+ this.nextNode.customLimitTimeText =
1652
+ nodeMoreInfo.defaultCustomLimitDays + '';
1653
+ }
1654
+ this.isTaskread = nodeExtAttr.isTaskread;
1655
+ this.isHandleExplain = nodeExtAttr.isHandleExplain;
1656
+ this.isCustomUser = nodeExtAttr.isCustomUser; //是否展示选人组件按钮
1657
+ this.presetEdit = nodeExtAttr.presetEdit; //是否展示备选人
1658
+ this.isDefSelectedObj = nodeExtAttr.isDefSelectedObj; //是否默认选中
1659
+ if (
1660
+ nodeExtAttr.userSelectionType == 7 ||
1661
+ nodeExtAttr.userSelectionType == 8 ||
1662
+ nodeExtAttr.userSelectionType == 9 ||
1663
+ nodeExtAttr.userSelectionType == 10 ||
1664
+ nodeExtAttr.userSelectionType == 11 ||
1665
+ nodeExtAttr.userSelectionType == 12
1666
+ ) {
1667
+ this.getIsShowNextUser(
1668
+ nodeExtAttr && nodeExtAttr.userSelectionType
1669
+ );
1670
+ } else {
1671
+ const { multiple, params } = this.isMultiple(
1672
+ nodeExtAttr.userSelectionType
1673
+ );
1674
+ this.multiple = multiple;
1675
+ this.params = params;
1676
+ }
1677
+ // this.isReadMultiple(nodeExtAttr.userSelectionType);
1678
+ if (nodeExtAttr.nodeType === 1 || nodeExtAttr.nodeType === 2) {
1679
+ this.isHideCurrentOrg =
1680
+ nodeExtAttr.isHideCurrentOrg == 1 ? false : true; //判断是否隐藏本单位
1681
+ this.isHideOtherOrg =
1682
+ nodeExtAttr.isHideOtherOrg == 1 ? false : true; //判断是否隐藏外单位
1683
+ } else {
1684
+ this.isHideCurrentOrg = false;
1685
+ this.isHideOtherOrg = false;
1686
+ }
1687
+ nextUserList.map((item) => {
1688
+ if (
1689
+ this.multiple &&
1690
+ nodeExtAttr.isDefSelectedObj == 1 &&
1691
+ nextUserList !== undefined
1692
+ ) {
1693
+ this.nextNode.nextUser.push(item.userId);
1694
+ this.selectUserList.push({
1695
+ showname: item.username,
1696
+ showid: item.userId
1697
+ });
1698
+ }
1699
+
1700
+ this.options.push({
1701
+ showname: item.username,
1702
+ showid: item.userId
1703
+ });
1704
+ });
1705
+ if (this.multiple) {
1706
+ this.nextNode.nextReadUserId = [];
1707
+ } else {
1708
+ this.nextNode.nextReadUserId = '';
1709
+ }
1710
+ if (
1711
+ nextUserList.length > 0 &&
1712
+ nodeExtAttr.isDefSelectedObj == 1 &&
1713
+ !this.multiple
1714
+ ) {
1715
+ this.nextNode.nextUser = nextUserList[0].userId;
1716
+ this.selectUserList.push({
1717
+ showname: nextUserList[0].username,
1718
+ showid: nextUserList[0].userId
1719
+ });
1720
+ }
1721
+ this.radioList = this.options;
1722
+ } else {
1723
+ this.$message.error(message || '系统错误,请联系管理员!');
1724
+ }
1725
+ nodeId && this.$refs.selectUser[index].changeInfo();
1726
+ })
1727
+ .catch((err) => {
1728
+ if (this.showBtn) {
1729
+ this.loading = false;
1730
+ } else {
1731
+ this.allLoading.close();
1732
+ }
1733
+ if (err.message && err.message !== 'canceled') {
1734
+ this.$message.error(err.message);
1735
+ }
1736
+ });
1737
+ },
1738
+ changeSel(val) {
1739
+ this.nextNode.nextUser = [];
1740
+ this.options = [];
1741
+ this.selectUserList = [];
1742
+ this.radioList = [];
1743
+ if (this.showBtn) {
1744
+ this.loading = true;
1745
+ } else {
1746
+ this.allLoading = util.loading(this.$loading, '加载中...');
1747
+ }
1748
+ this.getNodeInfos();
1749
+ },
1750
+ // 取消
1751
+ quit(val) {
1752
+ if (val === true) return this.$emit('cancel', val);
1753
+ this.$emit('cancel', false);
1754
+ },
1755
+ getFind() {
1756
+ util
1757
+ .ajax({
1758
+ url: findSysCodes
1759
+ })
1760
+ .then((res) => {
1761
+ const { status, message } = res;
1762
+ if (status === 'success') {
1763
+ if (this.hideMessage) return;
1764
+ this.nextNode.noticeType = message.split(',');
1765
+ let arr = [];
1766
+ this.nextNode.noticeList.map((item) => {
1767
+ this.nextNode.noticeType.map((x) => {
1768
+ if (x == item.cciValue) {
1769
+ arr.push(x);
1770
+ }
1771
+ });
1772
+ });
1773
+ this.nextNode.noticeType = arr;
1774
+ } else {
1775
+ this.$message.error(message || '系统错误,请联系管理员!');
1776
+ }
1777
+ })
1778
+ .catch((err) => {
1779
+ if (this.showBtn) {
1780
+ this.loading = false;
1781
+ } else {
1782
+ this.allLoading.close();
1783
+ }
1784
+ if (err.message && err.message !== 'canceled') {
1785
+ this.$message.error(err.message);
1786
+ }
1787
+ });
1788
+ },
1789
+ /**
1790
+ * isMultiple
1791
+ * @desc:是否多选
1792
+ * @author liufan
1793
+ * @date 2022年9月13日
1794
+ **/
1795
+ isMultiple(val, choiceOrgId, choiceDeptId, pOrgId) {
1796
+ let multiple = false;
1797
+ let params = {};
1798
+ if (val == 2 || val == 4 || val == 6 || val == 16 || val == 12) {
1799
+ multiple = true;
1800
+ }
1801
+ if (val == 1 || val == 2 || val == 5) {
1802
+ params.filid = this.userModel.orgId;
1803
+ params.only_filid = true;
1804
+ if (choiceOrgId) {
1805
+ params.filid = choiceOrgId;
1806
+ }
1807
+ }
1808
+ if (val == 5 || val == 6) {
1809
+ params.filid = this.userModel.orgId;
1810
+ params.mydeptid = this.userModel.depId;
1811
+ if (choiceDeptId) {
1812
+ params.mydeptid = choiceDeptId;
1813
+ }
1814
+ if (choiceOrgId) {
1815
+ params.filid = choiceOrgId;
1816
+ }
1817
+ }
1818
+ if (val == 15 || val == 16) {
1819
+ params.filid = this.pOrgId;
1820
+ if (pOrgId) {
1821
+ params.filid = pOrgId;
1822
+ }
1823
+
1824
+ }
1825
+ return { multiple, params };
1826
+ },
1827
+ getStartFlow(processId) {
1828
+ if (!processId) {
1829
+ return false;
1830
+ }
1831
+ if (this.showBtn) {
1832
+ this.loading = true;
1833
+ } else {
1834
+ this.allLoading = util.loading(this.$loading, '加载中...');
1835
+ }
1836
+ this.businessId = this.id;
1837
+ let params = {
1838
+ processDefinitionId: processId, // processId || this.processDefinitionId,
1839
+ userId: util.getStorage('userId'),
1840
+ businessId: this.businessId
1841
+ };
1842
+ if (!this.shwowBtn) {
1843
+ params.taskAction = 'toStartFlowWithoutTempSave';
1844
+ }
1845
+ // 获取节点
1846
+ util
1847
+ .ajax({ url: toStartFlow, params })
1848
+ .then((res) => {
1849
+ //pc接口返回数据处理
1850
+ const { status, message, data } = res;
1851
+ if (status == 'success') {
1852
+ data.nodeInfoMap.nodeExtAttr.submitTipsMsg &&
1853
+ this.$confirm(
1854
+ data.nodeInfoMap.nodeExtAttr.submitTipsMsg,
1855
+ '提示',
1856
+ {
1857
+ confirmButtonText: '确定',
1858
+ cancelButtonText: '取消',
1859
+ type: 'warning'
1860
+ }
1861
+ )
1862
+ .then(() => {})
1863
+ .catch(() => {
1864
+ this.quit();
1865
+ });
1866
+ data.nextNodeCheckType &&
1867
+ (this.nextNodeCheckType = data.nextNodeCheckType);
1868
+ data.nextOperateCheckType &&
1869
+ (this.nextOperateCheckType = data.nextOperateCheckType);
1870
+ if (data.currentOrgSelectorParams) {
1871
+ if (
1872
+ data.currentOrgSelectorParams.enableCurrentOrgConfig == 'true'
1873
+ ) {
1874
+ this.currentOrgSelectorTabs =
1875
+ data.currentOrgSelectorParams.currentOrgType.split(',');
1876
+ let currentOrgparams =
1877
+ data.currentOrgSelectorParams.currentOrgRange.split(',');
1878
+ this.currentOrgSelectorTabs.map((x, i) => {
1879
+ this.currentOrgSelectorParams[x] = {
1880
+ filid:
1881
+ currentOrgparams[i] == 'my'
1882
+ ? JSON.parse(util.getStorage('mainConfig')).userModel
1883
+ .orgId
1884
+ : currentOrgparams[i],
1885
+ only_filid: true
1886
+ };
1887
+ });
1888
+ }
1889
+ }
1890
+ this.configInfo = res.data;
1891
+ this.customPresetHintMessage = data.customPresetHintMessage;
1892
+ this.readOnlyNotificationType = data.readOnlyNotificationType;
1893
+ this.notificationMessageReadOnly =
1894
+ data.notificationMessageReadOnly == 'true';
1895
+ this.nextNode.nodeInfo = data.nextNodeList;
1896
+ this.nextNode.nextNode = data.nextNodeList[0].nodeId;
1897
+ this.isPreset = data.isPreset;
1898
+ this.isHideDefaultOperation =
1899
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation;
1900
+ this.defaultNextNode = data.nodeInfoMap.nodeExtAttr.defaultNextNode;
1901
+ this.isChooseNextNode =
1902
+ data.nodeInfoMap.nodeExtAttr.isChooseNextNode;
1903
+ this.isCdjxjTaskHandle = data.isCdjxjTaskHandle;
1904
+ if (this.isChooseNextNode == 1) {
1905
+ this.operationList = [
1906
+ // { key: 0, value: '默认', list: [] },
1907
+ { key: 1, value: '自定义', list: [] }
1908
+ ];
1909
+ if (data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1) {
1910
+ this.operationList.unshift({
1911
+ key: 0,
1912
+ value: '默认',
1913
+ list: data.nextNodeList
1914
+ });
1915
+ }
1916
+ let arr = [];
1917
+ for (let key in data.taskNodeMap) {
1918
+ arr.push({ nodeName: data.taskNodeMap[key], nodeId: key });
1919
+ }
1920
+ // this.operationList[0].list = data.nextNodeList;
1921
+ this.operationList[
1922
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation != 1 ? 1 : 0
1923
+ ].list = arr;
1924
+ if (this.isHideDefaultOperation != 1) {
1925
+ this.nextNode.nextOperate = 0;
1926
+ this.nextNode.nodeInfo = this.operationList[0].list;
1927
+ if (this.nextNode.nodeInfo.length > 0) {
1928
+ let defaultNodeData = data.nextNodeList.filter(
1929
+ (x) => x.nodeId == this.defaultNextNode
1930
+ );
1931
+ this.nextNode.nextNode =
1932
+ defaultNodeData.length > 0
1933
+ ? this.defaultNextNode
1934
+ : data.nextNodeList[0].nodeId;
1935
+ }
1936
+ }
1937
+ if (
1938
+ data.nodeInfoMap.nodeExtAttr.defaultNextOperate == 1 ||
1939
+ data.nodeInfoMap.nodeExtAttr.isHideDefaultOperation == 1
1940
+ ) {
1941
+ // this.nextNode.nodeInfo = data.nextNodeList
1942
+ this.nextNode.nextOperate = 1;
1943
+ this.nextNode.nodeInfo =
1944
+ this.operationList[
1945
+ this.isHideDefaultOperation != 1 ? 1 : 0
1946
+ ].list;
1947
+
1948
+ if (this.nextNode.nodeInfo.length > 0) {
1949
+ let defaultNodeData = this.nextNode.nodeInfo.filter(
1950
+ (x) => x.nodeId == this.defaultNextNode
1951
+ );
1952
+ this.nextNode.nextNode =
1953
+ defaultNodeData.length > 0
1954
+ ? this.defaultNextNode
1955
+ : this.nextNode.nodeInfo[0].nodeId;
1956
+ }
1957
+ }
1958
+ }
1959
+ this.isCustomPreset = data.isCustomPreset;
1960
+ this.presetTaskNodeKeyStr = data.presetTaskNodeKeyStr;
1961
+ this.presetTaskNodeMap = data.presetTaskNodeMap;
1962
+ this.isSinglePage = data.taskExamine.isSinglePage;
1963
+ this.pOrgId = data.pOrgId;
1964
+ this.isSinglePage &&
1965
+ (this.nextNode.opinion = data.taskExamine.opinion);
1966
+ // this.nextNode.noticeInfo = data.taskExamine.notificationMsg;
1967
+ this.nextNode.nodeName = data.taskExamine.nodeName;
1968
+ this.canPresetRead = data.canPresetRead;
1969
+ if (data.canPresetRead) {
1970
+ let ids =
1971
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateIds.split(',');
1972
+ let names =
1973
+ data.nodeInfoMap.nodeExtAttr.presetReadCandinateNames.split(
1974
+ ','
1975
+ );
1976
+ ids.map((item, index) => {
1977
+ this.presetReadUserId.push({
1978
+ showid: item,
1979
+ showname: names[index]
1980
+ });
1981
+ this.selectPresetUserList.push({
1982
+ showid: item,
1983
+ showname: names[index]
1984
+ });
1985
+ this.nextNode.presetReadUserId.push(item);
1986
+ });
1987
+ }
1988
+ this.getNodeInfos(undefined, undefined, processId);
1989
+ // this.getPresetFlowInfo();
1990
+ if (this.isCustomPreset) {
1991
+ this.$nextTick(() => {
1992
+ this.$refs.customPreset &&
1993
+ this.$refs.customPreset.getPresetFlowInfo(
1994
+ this.nextNode.nextNode,
1995
+ undefined,
1996
+ true
1997
+ );
1998
+ });
1999
+ }
2000
+ this.getFind();
2001
+ this.getMessage();
2002
+ } else {
2003
+ this.$message.error(message || '系统错误,请联系管理员!');
2004
+ }
2005
+ })
2006
+ .catch((err) => {
2007
+ if (this.showBtn) {
2008
+ this.loading = false;
2009
+ } else {
2010
+ this.allLoading.close();
2011
+ }
2012
+ if (err.message && err.message !== 'canceled') {
2013
+ this.$message.error(err.message);
2014
+ }
2015
+ });
2016
+ }
2017
+ }
2018
+ };
2019
+ </script>