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,770 +1,771 @@
1
- <template>
2
- <div class="task-union-examine" v-loading="loading">
3
- <el-form
4
- ref="infoList"
5
- :model="infoList"
6
- class="demo-dynamic"
7
- :rules="rules"
8
- label-width="120px"
9
- >
10
- <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
11
- <CommonOpinions @change="(val) => (opinion = val)" />
12
- </el-form-item>
13
- <el-form-item
14
- v-if="isHideCurrentOrg == 0"
15
- :prop="type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'"
16
- :label="
17
- type == 'takeAdvice'
18
- ? currentOrgName
19
- ? currentOrgName
20
- : '本单位'
21
- : type == 'startDraf'
22
- ? '呈送单位/对象'
23
- : type === 'taskReview'
24
- ? '复核人'
25
- : type === 'twoOfficesDispatch'
26
- ? '报送单位'
27
- : '联合单位'
28
- "
29
- >
30
- <SelectUser
31
- :nextUser="
32
- type != 'takeAdvice'
33
- ? infoList.nextOtherOrgObj
34
- : infoList.nextCurrentOrgObj
35
- "
36
- :multiple="newMultiple"
37
- :selectorTags="4"
38
- :showTooltip="showTooltip"
39
- :mix="currentMix"
40
- :isUnionSeal="type == 'unionSeal'"
41
- :selectUserList="unionSealData || []"
42
- @change="
43
- changeSelectUser(
44
- $event,
45
- type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'
46
- )
47
- "
48
- :types="
49
- type == 'takeAdvice'
50
- ? currentOrgTabs.length > 0
51
- ? currentOrgTabs
52
- : ['department', 'employee']
53
- : type == 'startDraf'
54
- ? ['employee', 'enterprise']
55
- : ['enterprise']
56
- "
57
- :params="
58
- type == 'startDraf' || type == 'unionExamine' ? otherParams : params
59
- "
60
- :tabs="currentOrgTabsParam"
61
- :disabled="disabled"
62
- :onlyName="onlyName"
63
- />
64
- </el-form-item>
65
- <el-form-item
66
- prop="nextOtherOrgObj"
67
- v-if="isHideOtherOrg == 0 && type == 'takeAdvice'"
68
- :label="otherOrgName ? otherOrgName : '外单位'"
69
- >
70
- <SelectUser
71
- :nextUser="infoList.nextOtherOrgObj"
72
- :where="{ filid: 'all', roleid: selectorParams.roleid }"
73
- :showTooltip="showTooltip"
74
- :multiple="newMultiple"
75
- @change="changeSelectUser($event, 'nextOtherOrgObj')"
76
- :mix="otherMix"
77
- :selectorTags="4"
78
- :disableds="otherOrgDisabledObjId"
79
- :types="
80
- foreignOrgTabs.length > 0
81
- ? foreignOrgTabs
82
- : isChoiceOtherOrgDept == 'true'
83
- ? ['enterprise', 'department']
84
- : ['enterprise']
85
- "
86
- :params="otherParams"
87
- :tabs="foreignOrgTabsParam"
88
- />
89
- </el-form-item>
90
- <el-form-item
91
- v-if="enableCustomLimitTimeSetting"
92
- prop="customLimitTime"
93
- label="限时办理"
94
- >
95
- <!-- style="width: 49%; display: inline-block;" -->
96
- <es-select
97
- style="width: 20% !important; display: inline-block"
98
- v-model="infoList.customLimitTimeText"
99
- placeholder="请选择"
100
- @change="handleChangeTime"
101
- sysCode="bpm_custom_limit_time"
102
- ></es-select>
103
- <el-input
104
- style="width: 20%; display: inline-block"
105
- v-model="infoList.customLimitTime"
106
- placeholder="请输入限时办理的天数"
107
- class="input-with-select custom-limit-time"
108
- >
109
- </el-input>
110
- <span style="margin-left: 5px">天</span>
111
- <!-- <es-button
112
- type="primary"
113
- slot="append"
114
- @click="
115
- () => {
116
- infoList.customLimitTime = '';
117
- showCustomLimitTimeText = !showCustomLimitTimeText;
118
- }
119
- "
120
- >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
121
- > -->
122
- </el-form-item>
123
- <!-- :rules="[
124
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
125
- ]" -->
126
- <el-form-item
127
- prop="noticeType"
128
- label="通知方式"
129
- v-show="infoList.noticeList.length != 0 && !hideMessage"
130
- >
131
- <el-checkbox-group
132
- v-model="infoList.noticeType"
133
- style="display: contents"
134
- >
135
- <el-checkbox
136
- v-for="item of infoList.noticeList"
137
- :key="item.cciValue"
138
- :label="item.cciValue"
139
- :disabled="
140
- readOnlyNotificationType
141
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
142
- : false
143
- "
144
- >
145
- {{ item.shortName }}
146
- </el-checkbox>
147
- </el-checkbox-group>
148
- </el-form-item>
149
- <el-form-item
150
- v-show="infoList.noticeType.length != 0"
151
- prop="noticeInfo"
152
- label="通知消息"
153
- >
154
- <es-input
155
- style="
156
- border-color: #ccc;
157
- padding: 5px;
158
- border-radius: 5px;
159
- font-size: 13px;
160
- "
161
- type="textarea"
162
- v-model="infoList.noticeInfo"
163
- :readonly="notificationMessageReadOnly"
164
- />
165
- <!-- <span>{{ infoList.noticeInfo }}</span> -->
166
- </el-form-item>
167
- </el-form>
168
- <div style="text-align: right" v-show="!hideBtn">
169
- <el-button type="primary" @click="subMit"> 确定 </el-button>
170
- <el-button @click="quit" > 取消 </el-button>
171
- </div>
172
- </div>
173
- </template>
174
-
175
- <script>
176
- import CommonOpinions from './CommonOpinions.vue';
177
- import SelectUser from '../selectUser.vue';
178
- import {
179
- findSysCodes,
180
- getNotificationMsg,
181
- toTaskTakeAdvice,
182
- findCodeValues,
183
- toTaskStartDraft,
184
- toTaskReview,
185
- taskStartDraft,
186
- toTaskUnionSeal,
187
- taskReview,
188
- toTwoOfficesDispatch,
189
- taskUnionSeal,
190
- twoOfficesDispatch,
191
- taskUnionExamine,
192
- taskTakeAdvice,
193
- toTaskUnionExamine
194
- } from 'eoss-ui/src/config/api';
195
- import util from 'eoss-ui/src/utils/util.js';
196
- export default {
197
- name: 'TaskUnionExamine',
198
- components: {
199
- [CommonOpinions.name]: CommonOpinions,
200
- [SelectUser.name]: SelectUser
201
- },
202
- props: {
203
- pendingId: { type: String, default: '' },
204
- showTooltip: { type: Boolean, default: true },
205
- type: { type: String, default: '' },
206
- defaultOpinion: { type: String, default: '' },
207
- oldOption: { type: String, default: '' },
208
- disabled: { type: Boolean, default: false },
209
- simpleTips: { type: Boolean, default: true },
210
- multiple: { type: Boolean, default: true },
211
- hideBtn: { type: Boolean, default: false },
212
- selectorParams: {
213
- type: Object,
214
- default: () => {
215
- return {};
216
- }
217
- },
218
- hideMessage: { type: Boolean, default: false },
219
- },
220
- inheritAttrs: false,
221
- data() {
222
- return {
223
- opinion: '', //办理意见
224
- readOnlyNotificationType: '',
225
- notificationMessageReadOnly: false,
226
- otherMix: false,
227
- enableCustomLimitTimeSetting: false,
228
- showCustomLimitTimeText: false,
229
- currentMix: false,
230
- infoList: {
231
- nextOtherOrgObj: [],
232
- nextCurrentOrgObj: [],
233
- noticeType: [],
234
- noticeList: [],
235
- noticeInfo: '',
236
- opinion: '',
237
- customLimitTime: '',
238
- customLimitTimeText: ''
239
- },
240
- onlyName: '',
241
- unionSealData: [],
242
- currentOrgTabs: [],
243
- foreignOrgTabs: [],
244
- foreignOrgTabsParam: {},
245
- currentOrgTabsParam: {},
246
- currentOrgProcessKey: '',
247
- otherOrgDisabledObjId: [],
248
- isSubFlow: true,
249
- choiceDeptId: '',
250
- choiceOrgId: '',
251
- isSinglePage: false,
252
- isChoiceOtherOrgDept: '',
253
- currentOrgName: '',
254
- otherOrgName: '',
255
- newMultiple: true,
256
- params: { filid: 'all',only_filid:true },
257
- isHideOtherOrg: '',
258
- isHideCurrentOrg: 0,
259
- isOpinionRequired: 0,
260
- otherParams: { filid: 'all', roleid: '', nofilid: sessionStorage.getItem('orgId') },
261
- loading: false
262
- };
263
- },
264
- computed: {
265
- rules() {
266
- return {
267
- customLimitTime: [
268
- {
269
- required: this.enableCustomLimitTimeSetting,
270
- message: this.showCustomLimitTimeText
271
- ? '请输入限时办理天数'
272
- : '请选择限时办理天数',
273
- trigger: 'blur'
274
- },
275
- {
276
- required: this.enableCustomLimitTimeSetting,
277
- validator: this.checkCustomLimitTime,
278
- trigger: 'change'
279
- }
280
- ]
281
- };
282
- }
283
- },
284
- mounted() {
285
- this.loading = true;
286
- this.newMultiple = this.multiple;
287
- this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
288
- if(this.type == 'startDraf'){
289
- this.otherParams.nofilid = sessionStorage.getItem('orgId')
290
- }
291
- this.opinion = this.oldOption;
292
- this.getNodeType();
293
- if (this.type === 'taskReview') return this.getTaskReview();
294
- this.getInfo();
295
- },
296
- methods: {
297
- handleChangeTime(val) {
298
- this.infoList.customLimitTime = val;
299
- },
300
- validate() {
301
- let validSate = true;
302
- this.$refs.infoList.validate((valid) => {
303
- if (valid) {
304
- validSate = true;
305
- } else {
306
- validSate = false;
307
- }
308
- });
309
- return validSate;
310
- },
311
- checkCustomLimitTime(rule, value, callback) {
312
- if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
313
- callback(new Error('请输入正确的天数'));
314
- this.infoList.customLimitTime = '';
315
- } else {
316
- callback();
317
- }
318
- },
319
- isMultiple(val) {
320
- if (val == 7 || val == 9 || val == 11) {
321
- this.newMultiple = false;
322
- }
323
- },
324
- subTaskReview() {
325
- let {
326
- infoList: { nextOtherOrgObj, noticeType, noticeInfo },
327
- businessId,
328
- opinion,
329
- isSubFlow,
330
- currentOrgProcessKey,
331
- pendingId
332
- } = this;
333
- let params = {
334
- url: taskReview,
335
- data: {
336
- nextUserId: nextOtherOrgObj.join(','),
337
- notificationType: noticeType.join(','),
338
- notificationMsg: noticeInfo,
339
- opinion:this.isSinglePage?opinion : this.oldOption,
340
- isSubFlow,
341
- businessId,
342
- currentOrgProcessKey,
343
- pendingId
344
- },
345
- method: 'POST'
346
- };
347
- this.loading = true;
348
- util
349
- .ajax(params)
350
- .then((res) => {
351
- const { message, status } = res;
352
- this.loading = false;
353
- if (status === 'success') {
354
- this.simpleTips && this.$message.success('提交成功');
355
- this.quit(true);
356
- } else {
357
- this.$message.error(message || '系统错误,请联系管理员!');
358
- }
359
- })
360
- .catch((err) => {
361
- this.loading = false;
362
- if (err.message && err.message !== 'canceled') {
363
- this.$message.error(err.message);
364
- }
365
- });
366
- },
367
- getTaskReview() {
368
- let params = {
369
- url: toTaskReview,
370
- params: { pendingId: this.pendingId }
371
- };
372
- util
373
- .ajax(params)
374
- .then((res) => {
375
- const { status, message } = res;
376
- this.loading = false;
377
- if (status === 'success') {
378
- const {
379
- data: { initiatorUser, taskExamine }
380
- } = res;
381
- if (taskExamine.opinion) {
382
- this.opinion = taskExamine.opinion;
383
- }
384
- this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
385
- this.onlyName = initiatorUser.username;
386
- this.isSubFlow = taskExamine.isSubFlow;
387
- this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
388
- this.getFind();
389
- this.getMessage();
390
- } else {
391
- this.$message.error(message || '系统错误,请联系管理员!');
392
- }
393
- })
394
- .catch((err) => {
395
- this.loading = false;
396
- if (err.message && err.message !== 'canceled') {
397
- this.$message.error(err.message);
398
- }
399
- });
400
- },
401
- getInfo() {
402
- let params = {
403
- url:
404
- this.type == 'takeAdvice'
405
- ? toTaskTakeAdvice
406
- : this.type === 'startDraf'
407
- ? toTaskStartDraft
408
- : this.type == 'unionSeal'
409
- ? toTaskUnionSeal
410
- : this.type == 'twoOfficesDispatch'
411
- ? toTwoOfficesDispatch
412
- : toTaskUnionExamine,
413
- params: { pendingId: this.pendingId },
414
- headers: { Accept: 'application/json,text/plain' }
415
- };
416
- util
417
- .ajax(params)
418
- .then((res) => {
419
- const { message, status } = res;
420
- this.loading = false;
421
- if (status == 'success') {
422
- const {
423
- data: {
424
- choiceDeptId,
425
- choiceOrgId,
426
- taskExamine,
427
- unionDispatchOrgName,
428
- readOnlyNotificationType,
429
- notificationMessageReadOnly,
430
- unionDispatchOrgId,
431
- otherOrgDisabledObjId,
432
- orgNames,
433
- enableCustomLimitTimeSetting,
434
- defaultCustomLimitDays,
435
- nodeInfoMap: {
436
- nodeExtAttr: {
437
- userSelectionType,
438
- isHideOtherOrg,
439
- isHideCurrentOrg,
440
- isOpinionRequired
441
- }
442
- }
443
- }
444
- } = res;
445
- if (otherOrgDisabledObjId) {
446
- this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
447
- }
448
- this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
449
- if (this.enableCustomLimitTimeSetting && defaultCustomLimitDays) {
450
- this.infoList.customLimitTime =
451
- this.infoList.customLimitTimeText = defaultCustomLimitDays + '';
452
- }
453
- if (res.data.customizedConfig) {
454
- if (res.data.customizedConfig.currentOrgSelectorCustomized) {
455
- this.currentMix =
456
- res.data.customizedConfig.currentOrgSelectorSelectMix ==
457
- 'true';
458
- this.currentOrgTabs =
459
- res.data.customizedConfig.currentOrgSelectorItemList.split(
460
- ','
461
- );
462
- let param =
463
- res.data.customizedConfig.currentOrgSelectorRangeList.split(
464
- ','
465
- );
466
- this.currentOrgTabs.map((x, i) => {
467
- this.params[x] = {
468
- filid:
469
- param[i] == 'my'
470
- ? (this.params.filid = JSON.parse(
471
- util.getStorage('mainConfig')
472
- ).userModel.orgId)
473
- : param[i],
474
- only_filid:true
475
- };
476
- });
477
- } else {
478
- if (this.type == 'takeAdvice') {
479
- this.params.filid = JSON.parse(
480
- util.getStorage('mainConfig')
481
- ).userModel.orgId;
482
- }
483
- }
484
-
485
- if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
486
- this.otherMix =
487
- res.data.customizedConfig.foreignOrgSelectorSelectMix ==
488
- 'true';
489
- this.foreignOrgTabs =
490
- res.data.customizedConfig.foreignOrgSelectorItemList.split(
491
- ','
492
- );
493
- let param =
494
- res.data.customizedConfig.foreignOrgSelectorRangeList.split(
495
- ','
496
- );
497
- this.foreignOrgTabs.map((x, i) => {
498
- this.otherParams[x] = {
499
- filid: 'all',
500
- roleid: this.selectorParams.roleid,
501
- nofilid: sessionStorage.getItem('orgId')
502
- };
503
- });
504
- }
505
- }
506
- this.readOnlyNotificationType = readOnlyNotificationType;
507
- this.notificationMessageReadOnly =
508
- notificationMessageReadOnly == 'true';
509
- this.isSinglePage = taskExamine.isSinglePage;
510
- this.isSubFlow = taskExamine.isSubFlow;
511
- if (taskExamine.opinion) {
512
- this.opinion = taskExamine.opinion;
513
- }
514
- this.choiceDeptId = choiceDeptId;
515
- this.choiceOrgId = choiceOrgId;
516
- if (this.type == 'takeAdvice' || this.type == 'startDraf') {
517
- this.currentOrgName = res.data.currentOrgName;
518
- this.otherOrgName = res.data.otherOrgName;
519
- this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
520
- this.isHideOtherOrg = isHideOtherOrg;
521
- this.isHideCurrentOrg = isHideCurrentOrg;
522
- }
523
- this.isOpinionRequired = isOpinionRequired;
524
- if (this.type == 'unionSeal') {
525
- let names = unionDispatchOrgName.split(',');
526
- let ids = unionDispatchOrgId.split(',');
527
- names.map((x, i) => {
528
- if (x) {
529
- this.unionSealData.push({
530
- showname: x,
531
- showid: ids[i]
532
- });
533
- }
534
- });
535
- // this.onlyName = unionDispatchOrgName;
536
- // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
537
- }
538
- if (this.type == 'twoOfficesDispatch') {
539
- this.onlyName = orgNames;
540
- this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
541
- }
542
- this.isMultiple(userSelectionType);
543
- this.getFind();
544
- this.getMessage();
545
- } else {
546
- this.$message.error(message || '系统错误,请联系管理员!');
547
- }
548
- })
549
- .catch((err) => {
550
- this.loading = false;
551
- if (err.message && err.message !== 'canceled') {
552
- this.$message.error(err.message);
553
- }
554
- });
555
- },
556
- subProcess() {
557
- this.subMit();
558
- },
559
- subMit() {
560
- // if (
561
- // this.infoList.nextOtherOrgObjName == '' ||
562
- // this.infoList.nextOtherOrgObjName.length == 0
563
- // )
564
- // return this.$message.warning('请选择联合单位');
565
- if (this.type === 'taskReview') return this.subTaskReview();
566
- let {
567
- infoList: {
568
- nextCurrentOrgObj,
569
- nextOtherOrgObj,
570
- noticeType,
571
- customLimitTime,
572
- noticeInfo
573
- },
574
- isOpinionRequired,
575
- opinion,
576
- type,
577
- isHideOtherOrg,
578
- choiceDeptId,
579
- choiceOrgId,
580
- isHideCurrentOrg,
581
- isSubFlow,
582
- pendingId
583
- } = this;
584
- console.log(nextCurrentOrgObj);
585
- console.log(nextOtherOrgObj);
586
- if (
587
- type == 'takeAdvice' &&
588
- !nextCurrentOrgObj &&
589
- isHideCurrentOrg == 0 &&
590
- nextCurrentOrgObj.length == 0 &&
591
- isHideOtherOrg == 0 &&
592
- (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
593
- ) {
594
- return this.$message.warning('请选择处理对象!');
595
- } else if (
596
- isHideCurrentOrg == 0 &&
597
- (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
598
- (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
599
- ) {
600
- return this.$message.warning('请选择处理对象!');
601
- }
602
-
603
- if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
604
- return this.$message.warning('当前步骤必须输入意见!');
605
- }
606
- // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
607
- // return this.$message.warning('暂未开放,敬请期待!');
608
- const param = {
609
- url:
610
- this.type === 'startDraf'
611
- ? taskStartDraft
612
- : this.type == 'unionSeal'
613
- ? taskUnionSeal
614
- : this.type === 'twoOfficesDispatch'
615
- ? twoOfficesDispatch
616
- : this.type == 'takeAdvice'
617
- ? taskTakeAdvice
618
- : taskUnionExamine,
619
- data: {
620
- opinion:this.hideBtn?this.oldOption:opinion,
621
- pendingId,
622
-
623
- nextOtherOrgObj:
624
- this.type == 'unionSeal'
625
- ? this.unionSealData.map((x) => x.showid).join(',')
626
- : Array.isArray(nextOtherOrgObj)
627
- ? nextOtherOrgObj.join(',')
628
- : nextOtherOrgObj,
629
- nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
630
- ? nextCurrentOrgObj.join(',')
631
- : nextCurrentOrgObj,
632
- notificationMsg: noticeInfo,
633
- notificationType: noticeType.join(','),
634
- choiceDeptId,
635
- isSubFlow,
636
- choiceOrgId
637
- },
638
- headers: { Accept: 'application/json,text/plain' },
639
- method: 'POST'
640
- };
641
- if (this.enableCustomLimitTimeSetting) {
642
- param.data.customLimitTime = customLimitTime;
643
- console.log(this.validate(), 'this.validate()');
644
- if (!this.validate()) return;
645
- }
646
- this.loading = true;
647
- util
648
- .ajax(param)
649
- .then((res) => {
650
- const { message, status } = res;
651
- this.loading = false;
652
- if (status == 'success') {
653
- this.simpleTips && this.$message.success('提交成功');
654
- this.quit(true);
655
- } else {
656
- this.$message.error(message || '系统错误,请联系管理员!');
657
- }
658
- })
659
- .catch((err) => {
660
- this.loading = false;
661
- if (err.message && err.message !== 'canceled') {
662
- this.$message.error(err.message);
663
- }
664
- });
665
- },
666
- quit(val) {
667
- if (val === true) return this.$emit('cancel', val);
668
- this.$emit('cancel');
669
- },
670
- changeSelectUser(val, type) {
671
- const { nextUser, options } = val;
672
- let newNextUser = [];
673
- let obj = {};
674
- options.map((item) => {
675
- if (obj[item.stype]) {
676
- obj[item.stype].push(item.id);
677
- } else {
678
- obj[item.stype] = [item.id];
679
- }
680
- // if (newNextUser) {
681
- // newNextUser += `,${item.stype}-${item.id}`;
682
- // } else {
683
- // newNextUser = `${item.stype}-${item.id}`;
684
- // }
685
- });
686
- for (let key in obj) {
687
- newNextUser.push(`${key}-${obj[key].join(',')}`);
688
- }
689
-
690
- this.infoList[type] = newNextUser.join('|');
691
- },
692
- getNodeType() {
693
- util
694
- .ajax({
695
- url: findCodeValues,
696
- params: {
697
- ccCode: 'notification_type',
698
- userId: util.getStorage('userId'),
699
- pendingId: this.pendingId
700
- }
701
- })
702
- .then((res) => {
703
- const { status, data } = res;
704
- this.loading = false;
705
- if (status === 'success') {
706
- this.infoList.noticeList = data;
707
- }
708
- })
709
- .catch((err) => {
710
- this.loading = false;
711
- if (err.message && err.message !== 'canceled') {
712
- this.$message.error(err.message);
713
- }
714
- });
715
- },
716
- //获取通知信息
717
- getMessage() {
718
- let params = {
719
- pendingId: this.pendingId
720
- };
721
- util
722
- .ajax({ url: getNotificationMsg, params, methods: 'post' })
723
- .then((res) => {
724
- if (res.status === 'success') {
725
- this.infoList.noticeInfo = res.message;
726
- }
727
- this.loading = false;
728
- })
729
- .catch((err) => {
730
- this.loading = false;
731
- if (err.message && err.message !== 'canceled') {
732
- this.$message.error(err.message);
733
- }
734
- });
735
- },
736
- getFind() {
737
- util
738
- .ajax({
739
- url: findSysCodes
740
- })
741
- .then((res) => {
742
- const { status, message } = res;
743
- if (status === 'success') {
744
- if(this.hideMessage) return;
745
- this.infoList.noticeType = message.split(',');
746
- let arr = [];
747
- this.infoList.noticeList.map((item) => {
748
- this.infoList.noticeType.map((x) => {
749
- if (x == item.cciValue) {
750
- arr.push(x);
751
- }
752
- });
753
- });
754
- this.infoList.noticeType = arr;
755
- } else {
756
- this.$message.error(message || '系统错误,请联系管理员!');
757
- }
758
- })
759
- .catch((err) => {
760
- this.loading = false;
761
- if (err.message && err.message !== 'canceled') {
762
- this.$message.error(err.message);
763
- }
764
- });
765
- }
766
- }
767
- };
768
- </script>
769
-
770
- <style></style>
1
+ <template>
2
+ <div class="task-union-examine" v-loading="loading">
3
+ <el-form
4
+ ref="infoList"
5
+ :model="infoList"
6
+ class="demo-dynamic"
7
+ :rules="rules"
8
+ :label-width="type != 'startDraf'?'80px' :'120px'"
9
+ >
10
+ <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
11
+ <CommonOpinions @change="(val) => (opinion = val)" />
12
+ </el-form-item>
13
+ <el-form-item
14
+ v-if="isHideCurrentOrg == 0"
15
+ :prop="type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'"
16
+ :label="
17
+ type == 'takeAdvice'
18
+ ? currentOrgName
19
+ ? currentOrgName
20
+ : '本单位'
21
+ : type == 'startDraf'
22
+ ? '呈送单位/对象'
23
+ : type === 'taskReview'
24
+ ? '复核人'
25
+ : type === 'twoOfficesDispatch'
26
+ ? '报送单位'
27
+ : '联合单位'
28
+ "
29
+ >
30
+ <SelectUser
31
+ :nextUser="
32
+ type != 'takeAdvice'
33
+ ? infoList.nextOtherOrgObj
34
+ : infoList.nextCurrentOrgObj
35
+ "
36
+ :multiple="newMultiple"
37
+ :selectorTags="4"
38
+ :showTooltip="showTooltip"
39
+ :mix="currentMix"
40
+ title="选择对象"
41
+ :isUnionSeal="type == 'unionSeal'"
42
+ :selectUserList="unionSealData || []"
43
+ @change="
44
+ changeSelectUser(
45
+ $event,
46
+ type != 'takeAdvice' ? 'nextOtherOrgObj' : 'nextCurrentOrgObj'
47
+ )
48
+ "
49
+ :types="
50
+ type == 'takeAdvice'
51
+ ? currentOrgTabs.length > 0
52
+ ? currentOrgTabs
53
+ : ['department', 'employee']
54
+ : type == 'startDraf'
55
+ ? ['employee', 'enterprise']
56
+ : ['enterprise']
57
+ "
58
+ :params="
59
+ type == 'startDraf' || type == 'unionExamine' ? otherParams : params
60
+ "
61
+ :tabs="currentOrgTabsParam"
62
+ :disabled="disabled"
63
+ :onlyName="onlyName"
64
+ />
65
+ </el-form-item>
66
+ <el-form-item
67
+ prop="nextOtherOrgObj"
68
+ v-if="isHideOtherOrg == 0 && type == 'takeAdvice'"
69
+ :label="otherOrgName ? otherOrgName : '外单位'"
70
+ >
71
+ <SelectUser
72
+ :nextUser="infoList.nextOtherOrgObj"
73
+ :where="{ filid: 'all', roleid: selectorParams.roleid }"
74
+ :showTooltip="showTooltip"
75
+ :multiple="newMultiple"
76
+ @change="changeSelectUser($event, 'nextOtherOrgObj')"
77
+ :mix="otherMix"
78
+ :selectorTags="4"
79
+ :disableds="otherOrgDisabledObjId"
80
+ :types="
81
+ foreignOrgTabs.length > 0
82
+ ? foreignOrgTabs
83
+ : isChoiceOtherOrgDept == 'true'
84
+ ? ['enterprise', 'department']
85
+ : ['enterprise']
86
+ "
87
+ :params="otherParams"
88
+ :tabs="foreignOrgTabsParam"
89
+ />
90
+ </el-form-item>
91
+ <el-form-item
92
+ v-if="enableCustomLimitTimeSetting"
93
+ prop="customLimitTime"
94
+ label="限时办理"
95
+ >
96
+ <!-- style="width: 49%; display: inline-block;" -->
97
+ <es-select
98
+ style="width: 20% !important; display: inline-block"
99
+ v-model="infoList.customLimitTimeText"
100
+ placeholder="请选择"
101
+ @change="handleChangeTime"
102
+ sysCode="bpm_custom_limit_time"
103
+ ></es-select>
104
+ <el-input
105
+ style="width: 20%; display: inline-block"
106
+ v-model="infoList.customLimitTime"
107
+ placeholder="请输入限时办理的天数"
108
+ class="input-with-select custom-limit-time"
109
+ >
110
+ </el-input>
111
+ <span style="margin-left: 5px">天</span>
112
+ <!-- <es-button
113
+ type="primary"
114
+ slot="append"
115
+ @click="
116
+ () => {
117
+ infoList.customLimitTime = '';
118
+ showCustomLimitTimeText = !showCustomLimitTimeText;
119
+ }
120
+ "
121
+ >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
122
+ > -->
123
+ </el-form-item>
124
+ <!-- :rules="[
125
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
126
+ ]" -->
127
+ <el-form-item
128
+ prop="noticeType"
129
+ label="通知方式"
130
+ v-show="infoList.noticeList.length != 0 && !hideMessage"
131
+ >
132
+ <el-checkbox-group
133
+ v-model="infoList.noticeType"
134
+ style="display: contents"
135
+ >
136
+ <el-checkbox
137
+ v-for="item of infoList.noticeList"
138
+ :key="item.cciValue"
139
+ :label="item.cciValue"
140
+ :disabled="
141
+ readOnlyNotificationType
142
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
143
+ : false
144
+ "
145
+ >
146
+ {{ item.shortName }}
147
+ </el-checkbox>
148
+ </el-checkbox-group>
149
+ </el-form-item>
150
+ <el-form-item
151
+ v-show="infoList.noticeType.length != 0"
152
+ prop="noticeInfo"
153
+ label="通知消息"
154
+ >
155
+ <es-input
156
+ style="
157
+ border-color: #ccc;
158
+ padding: 5px;
159
+ border-radius: 5px;
160
+ font-size: 13px;
161
+ "
162
+ type="textarea"
163
+ v-model="infoList.noticeInfo"
164
+ :readonly="notificationMessageReadOnly"
165
+ />
166
+ <!-- <span>{{ infoList.noticeInfo }}</span> -->
167
+ </el-form-item>
168
+ </el-form>
169
+ <div style="text-align: right" v-show="!hideBtn">
170
+ <el-button type="primary" @click="subMit"> 确定 </el-button>
171
+ <el-button @click="quit" > 取消 </el-button>
172
+ </div>
173
+ </div>
174
+ </template>
175
+
176
+ <script>
177
+ import CommonOpinions from './CommonOpinions.vue';
178
+ import SelectUser from '../selectUser.vue';
179
+ import {
180
+ findSysCodes,
181
+ getNotificationMsg,
182
+ toTaskTakeAdvice,
183
+ findCodeValues,
184
+ toTaskStartDraft,
185
+ toTaskReview,
186
+ taskStartDraft,
187
+ toTaskUnionSeal,
188
+ taskReview,
189
+ toTwoOfficesDispatch,
190
+ taskUnionSeal,
191
+ twoOfficesDispatch,
192
+ taskUnionExamine,
193
+ taskTakeAdvice,
194
+ toTaskUnionExamine
195
+ } from 'eoss-ui/src/config/api';
196
+ import util from 'eoss-ui/src/utils/util.js';
197
+ export default {
198
+ name: 'TaskUnionExamine',
199
+ components: {
200
+ [CommonOpinions.name]: CommonOpinions,
201
+ [SelectUser.name]: SelectUser
202
+ },
203
+ props: {
204
+ pendingId: { type: String, default: '' },
205
+ showTooltip: { type: Boolean, default: true },
206
+ type: { type: String, default: '' },
207
+ defaultOpinion: { type: String, default: '' },
208
+ oldOption: { type: String, default: '' },
209
+ disabled: { type: Boolean, default: false },
210
+ simpleTips: { type: Boolean, default: true },
211
+ multiple: { type: Boolean, default: true },
212
+ hideBtn: { type: Boolean, default: false },
213
+ selectorParams: {
214
+ type: Object,
215
+ default: () => {
216
+ return {};
217
+ }
218
+ },
219
+ hideMessage: { type: Boolean, default: false },
220
+ },
221
+ inheritAttrs: false,
222
+ data() {
223
+ return {
224
+ opinion: '', //办理意见
225
+ readOnlyNotificationType: '',
226
+ notificationMessageReadOnly: false,
227
+ otherMix: false,
228
+ enableCustomLimitTimeSetting: false,
229
+ showCustomLimitTimeText: false,
230
+ currentMix: false,
231
+ infoList: {
232
+ nextOtherOrgObj: [],
233
+ nextCurrentOrgObj: [],
234
+ noticeType: [],
235
+ noticeList: [],
236
+ noticeInfo: '',
237
+ opinion: '',
238
+ customLimitTime: '',
239
+ customLimitTimeText: ''
240
+ },
241
+ onlyName: '',
242
+ unionSealData: [],
243
+ currentOrgTabs: [],
244
+ foreignOrgTabs: [],
245
+ foreignOrgTabsParam: {},
246
+ currentOrgTabsParam: {},
247
+ currentOrgProcessKey: '',
248
+ otherOrgDisabledObjId: [],
249
+ isSubFlow: true,
250
+ choiceDeptId: '',
251
+ choiceOrgId: '',
252
+ isSinglePage: false,
253
+ isChoiceOtherOrgDept: '',
254
+ currentOrgName: '',
255
+ otherOrgName: '',
256
+ newMultiple: true,
257
+ params: { filid: 'all',only_filid:true },
258
+ isHideOtherOrg: '',
259
+ isHideCurrentOrg: 0,
260
+ isOpinionRequired: 0,
261
+ otherParams: { filid: 'all', roleid: '', nofilid: sessionStorage.getItem('orgId') },
262
+ loading: false
263
+ };
264
+ },
265
+ computed: {
266
+ rules() {
267
+ return {
268
+ customLimitTime: [
269
+ {
270
+ required: this.enableCustomLimitTimeSetting,
271
+ message: this.showCustomLimitTimeText
272
+ ? '请输入限时办理天数'
273
+ : '请选择限时办理天数',
274
+ trigger: 'blur'
275
+ },
276
+ {
277
+ required: this.enableCustomLimitTimeSetting,
278
+ validator: this.checkCustomLimitTime,
279
+ trigger: 'change'
280
+ }
281
+ ]
282
+ };
283
+ }
284
+ },
285
+ mounted() {
286
+ this.loading = true;
287
+ this.newMultiple = this.multiple;
288
+ this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
289
+ if(this.type == 'startDraf'){
290
+ this.otherParams.nofilid = sessionStorage.getItem('orgId')
291
+ }
292
+ this.opinion = this.oldOption;
293
+ this.getNodeType();
294
+ if (this.type === 'taskReview') return this.getTaskReview();
295
+ this.getInfo();
296
+ },
297
+ methods: {
298
+ handleChangeTime(val) {
299
+ this.infoList.customLimitTime = val;
300
+ },
301
+ validate() {
302
+ let validSate = true;
303
+ this.$refs.infoList.validate((valid) => {
304
+ if (valid) {
305
+ validSate = true;
306
+ } else {
307
+ validSate = false;
308
+ }
309
+ });
310
+ return validSate;
311
+ },
312
+ checkCustomLimitTime(rule, value, callback) {
313
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
314
+ callback(new Error('请输入正确的天数'));
315
+ this.infoList.customLimitTime = '';
316
+ } else {
317
+ callback();
318
+ }
319
+ },
320
+ isMultiple(val) {
321
+ if (val == 7 || val == 9 || val == 11) {
322
+ this.newMultiple = false;
323
+ }
324
+ },
325
+ subTaskReview() {
326
+ let {
327
+ infoList: { nextOtherOrgObj, noticeType, noticeInfo },
328
+ businessId,
329
+ opinion,
330
+ isSubFlow,
331
+ currentOrgProcessKey,
332
+ pendingId
333
+ } = this;
334
+ let params = {
335
+ url: taskReview,
336
+ data: {
337
+ nextUserId: nextOtherOrgObj.join(','),
338
+ notificationType: noticeType.join(','),
339
+ notificationMsg: noticeInfo,
340
+ opinion:this.isSinglePage?opinion : this.oldOption,
341
+ isSubFlow,
342
+ businessId,
343
+ currentOrgProcessKey,
344
+ pendingId
345
+ },
346
+ method: 'POST'
347
+ };
348
+ this.loading = true;
349
+ util
350
+ .ajax(params)
351
+ .then((res) => {
352
+ const { message, status } = res;
353
+ this.loading = false;
354
+ if (status === 'success') {
355
+ this.simpleTips && this.$message.success('提交成功');
356
+ this.quit(true);
357
+ } else {
358
+ this.$message.error(message || '系统错误,请联系管理员!');
359
+ }
360
+ })
361
+ .catch((err) => {
362
+ this.loading = false;
363
+ if (err.message && err.message !== 'canceled') {
364
+ this.$message.error(err.message);
365
+ }
366
+ });
367
+ },
368
+ getTaskReview() {
369
+ let params = {
370
+ url: toTaskReview,
371
+ params: { pendingId: this.pendingId }
372
+ };
373
+ util
374
+ .ajax(params)
375
+ .then((res) => {
376
+ const { status, message } = res;
377
+ this.loading = false;
378
+ if (status === 'success') {
379
+ const {
380
+ data: { initiatorUser, taskExamine }
381
+ } = res;
382
+ if (taskExamine.opinion) {
383
+ this.opinion = taskExamine.opinion;
384
+ }
385
+ this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
386
+ this.onlyName = initiatorUser.username;
387
+ this.isSubFlow = taskExamine.isSubFlow;
388
+ this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
389
+ this.getFind();
390
+ this.getMessage();
391
+ } else {
392
+ this.$message.error(message || '系统错误,请联系管理员!');
393
+ }
394
+ })
395
+ .catch((err) => {
396
+ this.loading = false;
397
+ if (err.message && err.message !== 'canceled') {
398
+ this.$message.error(err.message);
399
+ }
400
+ });
401
+ },
402
+ getInfo() {
403
+ let params = {
404
+ url:
405
+ this.type == 'takeAdvice'
406
+ ? toTaskTakeAdvice
407
+ : this.type === 'startDraf'
408
+ ? toTaskStartDraft
409
+ : this.type == 'unionSeal'
410
+ ? toTaskUnionSeal
411
+ : this.type == 'twoOfficesDispatch'
412
+ ? toTwoOfficesDispatch
413
+ : toTaskUnionExamine,
414
+ params: { pendingId: this.pendingId },
415
+ headers: { Accept: 'application/json,text/plain' }
416
+ };
417
+ util
418
+ .ajax(params)
419
+ .then((res) => {
420
+ const { message, status } = res;
421
+ this.loading = false;
422
+ if (status == 'success') {
423
+ const {
424
+ data: {
425
+ choiceDeptId,
426
+ choiceOrgId,
427
+ taskExamine,
428
+ unionDispatchOrgName,
429
+ readOnlyNotificationType,
430
+ notificationMessageReadOnly,
431
+ unionDispatchOrgId,
432
+ otherOrgDisabledObjId,
433
+ orgNames,
434
+ enableCustomLimitTimeSetting,
435
+ defaultCustomLimitDays,
436
+ nodeInfoMap: {
437
+ nodeExtAttr: {
438
+ userSelectionType,
439
+ isHideOtherOrg,
440
+ isHideCurrentOrg,
441
+ isOpinionRequired
442
+ }
443
+ }
444
+ }
445
+ } = res;
446
+ if (otherOrgDisabledObjId) {
447
+ this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
448
+ }
449
+ this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
450
+ if (this.enableCustomLimitTimeSetting && defaultCustomLimitDays) {
451
+ this.infoList.customLimitTime =
452
+ this.infoList.customLimitTimeText = defaultCustomLimitDays + '';
453
+ }
454
+ if (res.data.customizedConfig) {
455
+ if (res.data.customizedConfig.currentOrgSelectorCustomized) {
456
+ this.currentMix =
457
+ res.data.customizedConfig.currentOrgSelectorSelectMix ==
458
+ 'true';
459
+ this.currentOrgTabs =
460
+ res.data.customizedConfig.currentOrgSelectorItemList.split(
461
+ ','
462
+ );
463
+ let param =
464
+ res.data.customizedConfig.currentOrgSelectorRangeList.split(
465
+ ','
466
+ );
467
+ this.currentOrgTabs.map((x, i) => {
468
+ this.params[x] = {
469
+ filid:
470
+ param[i] == 'my'
471
+ ? (this.params.filid =choiceOrgId || JSON.parse(
472
+ util.getStorage('mainConfig')
473
+ ).userModel.orgId)
474
+ : param[i],
475
+ only_filid:true
476
+ };
477
+ });
478
+ } else {
479
+ if (this.type == 'takeAdvice') {
480
+ this.params.filid = choiceOrgId || JSON.parse(
481
+ util.getStorage('mainConfig')
482
+ ).userModel.orgId;
483
+ }
484
+ }
485
+
486
+ if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
487
+ this.otherMix =
488
+ res.data.customizedConfig.foreignOrgSelectorSelectMix ==
489
+ 'true';
490
+ this.foreignOrgTabs =
491
+ res.data.customizedConfig.foreignOrgSelectorItemList.split(
492
+ ','
493
+ );
494
+ let param =
495
+ res.data.customizedConfig.foreignOrgSelectorRangeList.split(
496
+ ','
497
+ );
498
+ this.foreignOrgTabs.map((x, i) => {
499
+ this.otherParams[x] = {
500
+ filid: 'all',
501
+ roleid: this.selectorParams.roleid,
502
+ nofilid: sessionStorage.getItem('orgId')
503
+ };
504
+ });
505
+ }
506
+ }
507
+ this.readOnlyNotificationType = readOnlyNotificationType;
508
+ this.notificationMessageReadOnly =
509
+ notificationMessageReadOnly == 'true';
510
+ this.isSinglePage = taskExamine.isSinglePage;
511
+ this.isSubFlow = taskExamine.isSubFlow;
512
+ if (taskExamine.opinion) {
513
+ this.opinion = taskExamine.opinion;
514
+ }
515
+ this.choiceDeptId = choiceDeptId;
516
+ this.choiceOrgId = choiceOrgId;
517
+ if (this.type == 'takeAdvice' || this.type == 'startDraf') {
518
+ this.currentOrgName = res.data.currentOrgName;
519
+ this.otherOrgName = res.data.otherOrgName;
520
+ this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
521
+ this.isHideOtherOrg = isHideOtherOrg;
522
+ this.isHideCurrentOrg = isHideCurrentOrg;
523
+ }
524
+ this.isOpinionRequired = isOpinionRequired;
525
+ if (this.type == 'unionSeal') {
526
+ let names = unionDispatchOrgName.split(',');
527
+ let ids = unionDispatchOrgId.split(',');
528
+ names.map((x, i) => {
529
+ if (x) {
530
+ this.unionSealData.push({
531
+ showname: x,
532
+ showid: ids[i]
533
+ });
534
+ }
535
+ });
536
+ // this.onlyName = unionDispatchOrgName;
537
+ // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
538
+ }
539
+ if (this.type == 'twoOfficesDispatch') {
540
+ this.onlyName = orgNames;
541
+ this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
542
+ }
543
+ this.isMultiple(userSelectionType);
544
+ this.getFind();
545
+ this.getMessage();
546
+ } else {
547
+ this.$message.error(message || '系统错误,请联系管理员!');
548
+ }
549
+ })
550
+ .catch((err) => {
551
+ this.loading = false;
552
+ if (err.message && err.message !== 'canceled') {
553
+ this.$message.error(err.message);
554
+ }
555
+ });
556
+ },
557
+ subProcess() {
558
+ this.subMit();
559
+ },
560
+ subMit() {
561
+ // if (
562
+ // this.infoList.nextOtherOrgObjName == '' ||
563
+ // this.infoList.nextOtherOrgObjName.length == 0
564
+ // )
565
+ // return this.$message.warning('请选择联合单位');
566
+ if (this.type === 'taskReview') return this.subTaskReview();
567
+ let {
568
+ infoList: {
569
+ nextCurrentOrgObj,
570
+ nextOtherOrgObj,
571
+ noticeType,
572
+ customLimitTime,
573
+ noticeInfo
574
+ },
575
+ isOpinionRequired,
576
+ opinion,
577
+ type,
578
+ isHideOtherOrg,
579
+ choiceDeptId,
580
+ choiceOrgId,
581
+ isHideCurrentOrg,
582
+ isSubFlow,
583
+ pendingId
584
+ } = this;
585
+ console.log(nextCurrentOrgObj);
586
+ console.log(nextOtherOrgObj);
587
+ if (
588
+ type == 'takeAdvice' &&
589
+ !nextCurrentOrgObj &&
590
+ isHideCurrentOrg == 0 &&
591
+ nextCurrentOrgObj.length == 0 &&
592
+ isHideOtherOrg == 0 &&
593
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
594
+ ) {
595
+ return this.$message.warning('请选择处理对象!');
596
+ } else if (
597
+ isHideCurrentOrg == 0 &&
598
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
599
+ (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
600
+ ) {
601
+ return this.$message.warning('请选择处理对象!');
602
+ }
603
+
604
+ if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
605
+ return this.$message.warning('当前步骤必须输入意见!');
606
+ }
607
+ // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
608
+ // return this.$message.warning('暂未开放,敬请期待!');
609
+ const param = {
610
+ url:
611
+ this.type === 'startDraf'
612
+ ? taskStartDraft
613
+ : this.type == 'unionSeal'
614
+ ? taskUnionSeal
615
+ : this.type === 'twoOfficesDispatch'
616
+ ? twoOfficesDispatch
617
+ : this.type == 'takeAdvice'
618
+ ? taskTakeAdvice
619
+ : taskUnionExamine,
620
+ data: {
621
+ opinion:this.hideBtn?this.oldOption:opinion,
622
+ pendingId,
623
+
624
+ nextOtherOrgObj:
625
+ this.type == 'unionSeal'
626
+ ? this.unionSealData.map((x) => x.showid).join(',')
627
+ : Array.isArray(nextOtherOrgObj)
628
+ ? nextOtherOrgObj.join(',')
629
+ : nextOtherOrgObj,
630
+ nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
631
+ ? nextCurrentOrgObj.join(',')
632
+ : nextCurrentOrgObj,
633
+ notificationMsg: noticeInfo,
634
+ notificationType: noticeType.join(','),
635
+ choiceDeptId,
636
+ isSubFlow,
637
+ choiceOrgId
638
+ },
639
+ headers: { Accept: 'application/json,text/plain' },
640
+ method: 'POST'
641
+ };
642
+ if (this.enableCustomLimitTimeSetting) {
643
+ param.data.customLimitTime = customLimitTime;
644
+ console.log(this.validate(), 'this.validate()');
645
+ if (!this.validate()) return;
646
+ }
647
+ this.loading = true;
648
+ util
649
+ .ajax(param)
650
+ .then((res) => {
651
+ const { message, status } = res;
652
+ this.loading = false;
653
+ if (status == 'success') {
654
+ this.simpleTips && this.$message.success('提交成功');
655
+ this.quit(true);
656
+ } else {
657
+ this.$message.error(message || '系统错误,请联系管理员!');
658
+ }
659
+ })
660
+ .catch((err) => {
661
+ this.loading = false;
662
+ if (err.message && err.message !== 'canceled') {
663
+ this.$message.error(err.message);
664
+ }
665
+ });
666
+ },
667
+ quit(val) {
668
+ if (val === true) return this.$emit('cancel', val);
669
+ this.$emit('cancel');
670
+ },
671
+ changeSelectUser(val, type) {
672
+ const { nextUser, options } = val;
673
+ let newNextUser = [];
674
+ let obj = {};
675
+ options.map((item) => {
676
+ if (obj[item.stype]) {
677
+ obj[item.stype].push(item.id);
678
+ } else {
679
+ obj[item.stype] = [item.id];
680
+ }
681
+ // if (newNextUser) {
682
+ // newNextUser += `,${item.stype}-${item.id}`;
683
+ // } else {
684
+ // newNextUser = `${item.stype}-${item.id}`;
685
+ // }
686
+ });
687
+ for (let key in obj) {
688
+ newNextUser.push(`${key}-${obj[key].join(',')}`);
689
+ }
690
+
691
+ this.infoList[type] = newNextUser.join('|');
692
+ },
693
+ getNodeType() {
694
+ util
695
+ .ajax({
696
+ url: findCodeValues,
697
+ params: {
698
+ ccCode: 'notification_type',
699
+ userId: util.getStorage('userId'),
700
+ pendingId: this.pendingId
701
+ }
702
+ })
703
+ .then((res) => {
704
+ const { status, data } = res;
705
+ this.loading = false;
706
+ if (status === 'success') {
707
+ this.infoList.noticeList = data;
708
+ }
709
+ })
710
+ .catch((err) => {
711
+ this.loading = false;
712
+ if (err.message && err.message !== 'canceled') {
713
+ this.$message.error(err.message);
714
+ }
715
+ });
716
+ },
717
+ //获取通知信息
718
+ getMessage() {
719
+ let params = {
720
+ pendingId: this.pendingId
721
+ };
722
+ util
723
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
724
+ .then((res) => {
725
+ if (res.status === 'success') {
726
+ this.infoList.noticeInfo = res.message;
727
+ }
728
+ this.loading = false;
729
+ })
730
+ .catch((err) => {
731
+ this.loading = false;
732
+ if (err.message && err.message !== 'canceled') {
733
+ this.$message.error(err.message);
734
+ }
735
+ });
736
+ },
737
+ getFind() {
738
+ util
739
+ .ajax({
740
+ url: findSysCodes
741
+ })
742
+ .then((res) => {
743
+ const { status, message } = res;
744
+ if (status === 'success') {
745
+ if(this.hideMessage) return;
746
+ this.infoList.noticeType = message.split(',');
747
+ let arr = [];
748
+ this.infoList.noticeList.map((item) => {
749
+ this.infoList.noticeType.map((x) => {
750
+ if (x == item.cciValue) {
751
+ arr.push(x);
752
+ }
753
+ });
754
+ });
755
+ this.infoList.noticeType = arr;
756
+ } else {
757
+ this.$message.error(message || '系统错误,请联系管理员!');
758
+ }
759
+ })
760
+ .catch((err) => {
761
+ this.loading = false;
762
+ if (err.message && err.message !== 'canceled') {
763
+ this.$message.error(err.message);
764
+ }
765
+ });
766
+ }
767
+ }
768
+ };
769
+ </script>
770
+
771
+ <style></style>