eoss-ui 0.8.38 → 0.8.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/lib/eoss-ui.common.js +746 -687
  2. package/lib/flow-group.js +2 -2
  3. package/lib/flow.js +724 -669
  4. package/lib/index.js +1 -1
  5. package/lib/selector.js +7 -3
  6. package/package.json +1 -1
  7. package/packages/flow/src/component/taskUnionExamine.vue +821 -771
  8. package/packages/flow/src/flow.vue +4534 -4526
  9. package/packages/flow/src/main.vue +4411 -4411
  10. package/packages/flow/src/selectUser.vue +1 -0
  11. package/packages/flow/src/startTaskRead.vue +718 -718
  12. package/packages/flow-group/src/main.vue +756 -756
  13. package/packages/selector/src/main.vue +764 -761
  14. package/packages/theme-chalk/lib/archives.css +1 -0
  15. package/packages/theme-chalk/lib/base.css +1 -0
  16. package/packages/theme-chalk/lib/button-group.css +1 -0
  17. package/packages/theme-chalk/lib/button.css +1 -0
  18. package/packages/theme-chalk/lib/calendar.css +1 -0
  19. package/packages/theme-chalk/lib/calogin.css +0 -0
  20. package/packages/theme-chalk/lib/card.css +1 -0
  21. package/packages/theme-chalk/lib/cascader.css +0 -0
  22. package/packages/theme-chalk/lib/checkbox-group.css +1 -0
  23. package/packages/theme-chalk/lib/clients.css +1 -0
  24. package/packages/theme-chalk/lib/data-table-form.css +1 -0
  25. package/packages/theme-chalk/lib/data-table.css +1 -0
  26. package/packages/theme-chalk/lib/date-picker.css +1 -0
  27. package/packages/theme-chalk/lib/dialog.css +1 -0
  28. package/packages/theme-chalk/lib/enable-drag.css +1 -0
  29. package/packages/theme-chalk/lib/enterprise.css +1 -0
  30. package/packages/theme-chalk/lib/error-page.css +1 -0
  31. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  32. package/packages/theme-chalk/lib/flow-group.css +1 -0
  33. package/packages/theme-chalk/lib/flow-list.css +1 -0
  34. package/packages/theme-chalk/lib/flow.css +1 -0
  35. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  36. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  37. package/packages/theme-chalk/lib/form.css +1 -0
  38. package/packages/theme-chalk/lib/handle-user.css +1 -0
  39. package/packages/theme-chalk/lib/handler.css +1 -0
  40. package/packages/theme-chalk/lib/icon.css +1 -0
  41. package/packages/theme-chalk/lib/icons.css +1 -0
  42. package/packages/theme-chalk/lib/index.css +1 -0
  43. package/packages/theme-chalk/lib/input-number.css +0 -0
  44. package/packages/theme-chalk/lib/input.css +1 -0
  45. package/packages/theme-chalk/lib/label.css +1 -0
  46. package/packages/theme-chalk/lib/layout.css +1 -0
  47. package/packages/theme-chalk/lib/login.css +1 -0
  48. package/packages/theme-chalk/lib/main.css +1 -0
  49. package/packages/theme-chalk/lib/menu.css +1 -0
  50. package/packages/theme-chalk/lib/nav.css +1 -0
  51. package/packages/theme-chalk/lib/notify.css +0 -0
  52. package/packages/theme-chalk/lib/page.css +1 -0
  53. package/packages/theme-chalk/lib/pagination.css +1 -0
  54. package/packages/theme-chalk/lib/player.css +1 -0
  55. package/packages/theme-chalk/lib/qr-code.css +1 -0
  56. package/packages/theme-chalk/lib/radio-group.css +1 -0
  57. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  58. package/packages/theme-chalk/lib/select-ganged.css +1 -0
  59. package/packages/theme-chalk/lib/select.css +1 -0
  60. package/packages/theme-chalk/lib/selector-panel.css +1 -0
  61. package/packages/theme-chalk/lib/selector.css +1 -0
  62. package/packages/theme-chalk/lib/simplicity-top.css +1 -0
  63. package/packages/theme-chalk/lib/simplicity.css +1 -0
  64. package/packages/theme-chalk/lib/sizer.css +1 -0
  65. package/packages/theme-chalk/lib/steps.css +1 -0
  66. package/packages/theme-chalk/lib/switch.css +1 -0
  67. package/packages/theme-chalk/lib/table-form.css +0 -0
  68. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  69. package/packages/theme-chalk/lib/tabs.css +1 -0
  70. package/packages/theme-chalk/lib/tips.css +1 -0
  71. package/packages/theme-chalk/lib/toolbar.css +1 -0
  72. package/packages/theme-chalk/lib/tree-group.css +1 -0
  73. package/packages/theme-chalk/lib/tree.css +1 -0
  74. package/packages/theme-chalk/lib/upload.css +1 -0
  75. package/packages/theme-chalk/lib/wujie.css +0 -0
  76. package/packages/theme-chalk/lib/wxlogin.css +1 -0
  77. package/src/index.js +1 -1
  78. package/packages/theme-chalk/gulpfile.js +0 -25
@@ -1,771 +1,821 @@
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>
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="subProcess"> 确定 </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
+ isCancelSecondConfirmationType: { type: Boolean, default: false },
214
+ selectorParams: {
215
+ type: Object,
216
+ default: () => {
217
+ return {};
218
+ }
219
+ },
220
+ hideMessage: { type: Boolean, default: false },
221
+ },
222
+ inheritAttrs: false,
223
+ data() {
224
+ return {
225
+ opinion: '', //办理意见
226
+ readOnlyNotificationType: '',
227
+ notificationMessageReadOnly: false,
228
+ otherMix: false,
229
+ enableCustomLimitTimeSetting: false,
230
+ showCustomLimitTimeText: false,
231
+ currentMix: false,
232
+ infoList: {
233
+ nextOtherOrgObj: [],
234
+ nextCurrentOrgObj: [],
235
+ noticeType: [],
236
+ noticeList: [],
237
+ noticeInfo: '',
238
+ opinion: '',
239
+ customLimitTime: '',
240
+ customLimitTimeText: ''
241
+ },
242
+ onlyName: '',
243
+ unionSealData: [],
244
+ currentOrgTabs: [],
245
+ foreignOrgTabs: [],
246
+ foreignOrgTabsParam: {},
247
+ currentOrgTabsParam: {},
248
+ currentOrgProcessKey: '',
249
+ otherOrgDisabledObjId: [],
250
+ isSubFlow: true,
251
+ choiceDeptId: '',
252
+ choiceOrgId: '',
253
+ isSinglePage: false,
254
+ isChoiceOtherOrgDept: '',
255
+ currentOrgName: '',
256
+ otherOrgName: '',
257
+ newMultiple: true,
258
+ params: { filid: 'all',only_filid:true },
259
+ isHideOtherOrg: '',
260
+ isHideCurrentOrg: 0,
261
+ isOpinionRequired: 0,
262
+ otherParams: { filid: 'all', roleid: '', nofilid: sessionStorage.getItem('orgId') },
263
+ loading: false
264
+ };
265
+ },
266
+ computed: {
267
+ rules() {
268
+ return {
269
+ customLimitTime: [
270
+ {
271
+ required: this.enableCustomLimitTimeSetting,
272
+ message: this.showCustomLimitTimeText
273
+ ? '请输入限时办理天数'
274
+ : '请选择限时办理天数',
275
+ trigger: 'blur'
276
+ },
277
+ {
278
+ required: this.enableCustomLimitTimeSetting,
279
+ validator: this.checkCustomLimitTime,
280
+ trigger: 'change'
281
+ }
282
+ ]
283
+ };
284
+ }
285
+ },
286
+ watch: {
287
+ oldOption:{
288
+ handler(val){
289
+ this.opinion = val;
290
+ },
291
+ immediate: true,
292
+ deep: true
293
+ }
294
+ },
295
+ mounted() {
296
+ this.loading = true;
297
+ this.newMultiple = this.multiple;
298
+ this.otherParams.roleid = this.params.roleid = this.selectorParams.roleid;
299
+ if(this.type == 'startDraf'){
300
+ this.otherParams.nofilid = sessionStorage.getItem('orgId')
301
+ }
302
+ this.opinion = this.oldOption;
303
+ this.getNodeType();
304
+ if (this.type === 'taskReview') return this.getTaskReview();
305
+ this.getInfo();
306
+ },
307
+ methods: {
308
+ handleChangeTime(val) {
309
+ this.infoList.customLimitTime = val;
310
+ },
311
+ validate() {
312
+ let validSate = true;
313
+ this.$refs.infoList.validate((valid) => {
314
+ if (valid) {
315
+ validSate = true;
316
+ } else {
317
+ validSate = false;
318
+ }
319
+ });
320
+ return validSate;
321
+ },
322
+ checkCustomLimitTime(rule, value, callback) {
323
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
324
+ callback(new Error('请输入正确的天数'));
325
+ this.infoList.customLimitTime = '';
326
+ } else {
327
+ callback();
328
+ }
329
+ },
330
+ isMultiple(val) {
331
+ if (val == 7 || val == 9 || val == 11) {
332
+ this.newMultiple = false;
333
+ }
334
+ },
335
+ subTaskReview() {
336
+ let {
337
+ infoList: { nextOtherOrgObj, noticeType, noticeInfo },
338
+ businessId,
339
+ opinion,
340
+ isSubFlow,
341
+ currentOrgProcessKey,
342
+ pendingId
343
+ } = this;
344
+ let params = {
345
+ url: taskReview,
346
+ data: {
347
+ nextUserId: nextOtherOrgObj.join(','),
348
+ notificationType: noticeType.join(','),
349
+ notificationMsg: noticeInfo,
350
+ opinion:this.isSinglePage?opinion : this.oldOption,
351
+ isSubFlow,
352
+ businessId,
353
+ currentOrgProcessKey,
354
+ pendingId
355
+ },
356
+ method: 'POST'
357
+ };
358
+ this.loading = true;
359
+ util
360
+ .ajax(params)
361
+ .then((res) => {
362
+ const { message, status } = res;
363
+ this.loading = false;
364
+ if (status === 'success') {
365
+ this.simpleTips && this.$message.success('提交成功');
366
+ this.quit(true);
367
+ } else {
368
+ this.$message.error(message || '系统错误,请联系管理员!');
369
+ }
370
+ })
371
+ .catch((err) => {
372
+ this.loading = false;
373
+ if (err.message && err.message !== 'canceled') {
374
+ this.$message.error(err.message);
375
+ }
376
+ });
377
+ },
378
+ getTaskReview() {
379
+ let params = {
380
+ url: toTaskReview,
381
+ params: { pendingId: this.pendingId }
382
+ };
383
+ util
384
+ .ajax(params)
385
+ .then((res) => {
386
+ const { status, message } = res;
387
+ this.loading = false;
388
+ if (status === 'success') {
389
+ const {
390
+ data: { initiatorUser, taskExamine }
391
+ } = res;
392
+ if (taskExamine.opinion) {
393
+ this.opinion = taskExamine.opinion;
394
+ }
395
+ this.infoList.nextOtherOrgObj.push(initiatorUser.userId);
396
+ this.onlyName = initiatorUser.username;
397
+ this.isSubFlow = taskExamine.isSubFlow;
398
+ this.currentOrgProcessKey = taskExamine.currentOrgProcessKey;
399
+ this.getFind();
400
+ this.getMessage();
401
+ } else {
402
+ this.$message.error(message || '系统错误,请联系管理员!');
403
+ }
404
+ })
405
+ .catch((err) => {
406
+ this.loading = false;
407
+ if (err.message && err.message !== 'canceled') {
408
+ this.$message.error(err.message);
409
+ }
410
+ });
411
+ },
412
+ getInfo() {
413
+ let params = {
414
+ url:
415
+ this.type == 'takeAdvice'
416
+ ? toTaskTakeAdvice
417
+ : this.type === 'startDraf'
418
+ ? toTaskStartDraft
419
+ : this.type == 'unionSeal'
420
+ ? toTaskUnionSeal
421
+ : this.type == 'twoOfficesDispatch'
422
+ ? toTwoOfficesDispatch
423
+ : toTaskUnionExamine,
424
+ params: { pendingId: this.pendingId },
425
+ headers: { Accept: 'application/json,text/plain' }
426
+ };
427
+ util
428
+ .ajax(params)
429
+ .then((res) => {
430
+ const { message, status } = res;
431
+ this.loading = false;
432
+ if (status == 'success') {
433
+ const {
434
+ data: {
435
+ choiceDeptId,
436
+ choiceOrgId,
437
+ taskExamine,
438
+ unionDispatchOrgName,
439
+ readOnlyNotificationType,
440
+ notificationMessageReadOnly,
441
+ unionDispatchOrgId,
442
+ otherOrgDisabledObjId,
443
+ orgNames,
444
+ enableCustomLimitTimeSetting,
445
+ defaultCustomLimitDays,
446
+ nodeInfoMap: {
447
+ nodeExtAttr: {
448
+ userSelectionType,
449
+ isHideOtherOrg,
450
+ isHideCurrentOrg,
451
+ isOpinionRequired
452
+ }
453
+ }
454
+ }
455
+ } = res;
456
+ if (otherOrgDisabledObjId) {
457
+ this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
458
+ }
459
+ this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
460
+ if (this.enableCustomLimitTimeSetting && defaultCustomLimitDays) {
461
+ this.infoList.customLimitTime =
462
+ this.infoList.customLimitTimeText = defaultCustomLimitDays + '';
463
+ }
464
+ if (res.data.customizedConfig) {
465
+ if (res.data.customizedConfig.currentOrgSelectorCustomized) {
466
+ this.currentMix =
467
+ res.data.customizedConfig.currentOrgSelectorSelectMix ==
468
+ 'true';
469
+ this.currentOrgTabs =
470
+ res.data.customizedConfig.currentOrgSelectorItemList.split(
471
+ ','
472
+ );
473
+ let param =
474
+ res.data.customizedConfig.currentOrgSelectorRangeList.split(
475
+ ','
476
+ );
477
+ this.currentOrgTabs.map((x, i) => {
478
+ this.params[x] = {
479
+ filid:
480
+ param[i] == 'my'
481
+ ? (this.params.filid =choiceOrgId || JSON.parse(
482
+ util.getStorage('mainConfig')
483
+ ).userModel.orgId)
484
+ : param[i],
485
+ only_filid:true
486
+ };
487
+ });
488
+ } else {
489
+ if (this.type == 'takeAdvice') {
490
+ this.params.filid = choiceOrgId || JSON.parse(
491
+ util.getStorage('mainConfig')
492
+ ).userModel.orgId;
493
+ }
494
+ }
495
+
496
+ if (res.data.customizedConfig.foreignOrgSelectorCustomized) {
497
+ this.otherMix =
498
+ res.data.customizedConfig.foreignOrgSelectorSelectMix ==
499
+ 'true';
500
+ this.foreignOrgTabs =
501
+ res.data.customizedConfig.foreignOrgSelectorItemList.split(
502
+ ','
503
+ );
504
+ let param =
505
+ res.data.customizedConfig.foreignOrgSelectorRangeList.split(
506
+ ','
507
+ );
508
+ this.foreignOrgTabs.map((x, i) => {
509
+ this.otherParams[x] = {
510
+ filid: 'all',
511
+ roleid: this.selectorParams.roleid,
512
+ nofilid: sessionStorage.getItem('orgId')
513
+ };
514
+ });
515
+ }
516
+ }
517
+ this.readOnlyNotificationType = readOnlyNotificationType;
518
+ this.notificationMessageReadOnly =
519
+ notificationMessageReadOnly == 'true';
520
+ this.isSinglePage = taskExamine.isSinglePage;
521
+ this.isSubFlow = taskExamine.isSubFlow;
522
+ if (taskExamine.opinion) {
523
+ this.opinion = taskExamine.opinion;
524
+ }
525
+ this.choiceDeptId = choiceDeptId;
526
+ this.choiceOrgId = choiceOrgId;
527
+ if (this.type == 'takeAdvice' || this.type == 'startDraf') {
528
+ this.currentOrgName = res.data.currentOrgName;
529
+ this.otherOrgName = res.data.otherOrgName;
530
+ this.isChoiceOtherOrgDept = res.data.isChoiceOtherOrgDept;
531
+ this.isHideOtherOrg = isHideOtherOrg;
532
+ this.isHideCurrentOrg = isHideCurrentOrg;
533
+ }
534
+ this.isOpinionRequired = isOpinionRequired;
535
+ if (this.type == 'unionSeal') {
536
+ let names = unionDispatchOrgName.split(',');
537
+ let ids = unionDispatchOrgId.split(',');
538
+ names.map((x, i) => {
539
+ if (x) {
540
+ this.unionSealData.push({
541
+ showname: x,
542
+ showid: ids[i]
543
+ });
544
+ }
545
+ });
546
+ // this.onlyName = unionDispatchOrgName;
547
+ // this.infoList.nextOtherOrgObj.push(unionDispatchOrgId);
548
+ }
549
+ if (this.type == 'twoOfficesDispatch') {
550
+ this.onlyName = orgNames;
551
+ this.infoList.nextOtherOrgObj.push(taskExamine.nextOtherOrgObj);
552
+ }
553
+ this.isMultiple(userSelectionType);
554
+ this.getFind();
555
+ this.getMessage();
556
+ } else {
557
+ this.$message.error(message || '系统错误,请联系管理员!');
558
+ }
559
+ })
560
+ .catch((err) => {
561
+ this.loading = false;
562
+ if (err.message && err.message !== 'canceled') {
563
+ this.$message.error(err.message);
564
+ }
565
+ });
566
+ },
567
+ subProcess() {
568
+ if (this.type === 'taskReview') return this.subTaskReview();
569
+ let {
570
+ infoList: {
571
+ nextCurrentOrgObj,
572
+ nextOtherOrgObj,
573
+ },
574
+ isOpinionRequired,
575
+ opinion,
576
+ type,
577
+ isHideOtherOrg,
578
+ isHideCurrentOrg,
579
+ } = this;
580
+ if (
581
+ type == 'takeAdvice' &&
582
+ !nextCurrentOrgObj &&
583
+ isHideCurrentOrg == 0 &&
584
+ nextCurrentOrgObj.length == 0 &&
585
+ isHideOtherOrg == 0 &&
586
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
587
+ ) {
588
+ return this.$message.warning('请选择处理对象!');
589
+ } else if (
590
+ isHideCurrentOrg == 0 &&
591
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
592
+ (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
593
+ ) {
594
+ return this.$message.warning('请选择处理对象!');
595
+ }
596
+
597
+ if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
598
+ return this.$message.warning('当前步骤必须输入意见!');
599
+ }
600
+ if (this.isCancelSecondConfirmationType) {
601
+ this.$confirm('确认提交吗?', '提示', {
602
+ confirmButtonText: '确定',
603
+ cancelButtonText: '取消',
604
+ type: 'warning'
605
+ }).then(() => {
606
+ this.subMit();
607
+ }).catch(() => {})
608
+ }else{
609
+ this.subMit();
610
+ }
611
+ ;
612
+ },
613
+ subMit() {
614
+ // if (
615
+ // this.infoList.nextOtherOrgObjName == '' ||
616
+ // this.infoList.nextOtherOrgObjName.length == 0
617
+ // )
618
+ // return this.$message.warning('请选择联合单位');
619
+ if (this.type === 'taskReview') return this.subTaskReview();
620
+ let {
621
+ infoList: {
622
+ nextCurrentOrgObj,
623
+ nextOtherOrgObj,
624
+ noticeType,
625
+ customLimitTime,
626
+ noticeInfo
627
+ },
628
+ isOpinionRequired,
629
+ opinion,
630
+ type,
631
+ isHideOtherOrg,
632
+ choiceDeptId,
633
+ choiceOrgId,
634
+ isHideCurrentOrg,
635
+ isSubFlow,
636
+ pendingId
637
+ } = this;
638
+ if (
639
+ type == 'takeAdvice' &&
640
+ !nextCurrentOrgObj &&
641
+ isHideCurrentOrg == 0 &&
642
+ nextCurrentOrgObj.length == 0 &&
643
+ isHideOtherOrg == 0 &&
644
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
645
+ ) {
646
+ return this.$message.warning('请选择处理对象!');
647
+ } else if (
648
+ isHideCurrentOrg == 0 &&
649
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
650
+ (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
651
+ ) {
652
+ return this.$message.warning('请选择处理对象!');
653
+ }
654
+
655
+ if (isOpinionRequired == 1 && (opinion == '' || opinion == null)) {
656
+ return this.$message.warning('当前步骤必须输入意见!');
657
+ }
658
+ // if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
659
+ // return this.$message.warning('暂未开放,敬请期待!');
660
+ const param = {
661
+ url:
662
+ this.type === 'startDraf'
663
+ ? taskStartDraft
664
+ : this.type == 'unionSeal'
665
+ ? taskUnionSeal
666
+ : this.type === 'twoOfficesDispatch'
667
+ ? twoOfficesDispatch
668
+ : this.type == 'takeAdvice'
669
+ ? taskTakeAdvice
670
+ : taskUnionExamine,
671
+ data: {
672
+ opinion:this.hideBtn?this.oldOption:opinion,
673
+ pendingId,
674
+
675
+ nextOtherOrgObj:
676
+ this.type == 'unionSeal'
677
+ ? this.unionSealData.map((x) => x.showid).join(',')
678
+ : Array.isArray(nextOtherOrgObj)
679
+ ? nextOtherOrgObj.join(',')
680
+ : nextOtherOrgObj,
681
+ nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
682
+ ? nextCurrentOrgObj.join(',')
683
+ : nextCurrentOrgObj,
684
+ notificationMsg: noticeInfo,
685
+ notificationType: noticeType.join(','),
686
+ choiceDeptId,
687
+ isSubFlow,
688
+ choiceOrgId
689
+ },
690
+ headers: { Accept: 'application/json,text/plain' },
691
+ method: 'POST'
692
+ };
693
+ if (this.enableCustomLimitTimeSetting) {
694
+ param.data.customLimitTime = customLimitTime;
695
+ if (!this.validate()) return;
696
+ }
697
+ this.loading = true;
698
+ util
699
+ .ajax(param)
700
+ .then((res) => {
701
+ const { message, status } = res;
702
+ this.loading = false;
703
+ if (status == 'success') {
704
+ this.simpleTips && this.$message.success('提交成功');
705
+ this.quit(true);
706
+ } else {
707
+ this.$message.error(message || '系统错误,请联系管理员!');
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
+ quit(val) {
718
+ if (val === true) return this.$emit('cancel', val);
719
+ this.$emit('cancel');
720
+ },
721
+ changeSelectUser(val, type) {
722
+ const { nextUser, options } = val;
723
+ let newNextUser = [];
724
+ let obj = {};
725
+ options.map((item) => {
726
+ if (obj[item.stype]) {
727
+ obj[item.stype].push(item.id);
728
+ } else {
729
+ obj[item.stype] = [item.id];
730
+ }
731
+ // if (newNextUser) {
732
+ // newNextUser += `,${item.stype}-${item.id}`;
733
+ // } else {
734
+ // newNextUser = `${item.stype}-${item.id}`;
735
+ // }
736
+ });
737
+ for (let key in obj) {
738
+ newNextUser.push(`${key}-${obj[key].join(',')}`);
739
+ }
740
+
741
+ this.infoList[type] = newNextUser.join('|');
742
+ },
743
+ getNodeType() {
744
+ util
745
+ .ajax({
746
+ url: findCodeValues,
747
+ params: {
748
+ ccCode: 'notification_type',
749
+ userId: util.getStorage('userId'),
750
+ pendingId: this.pendingId
751
+ }
752
+ })
753
+ .then((res) => {
754
+ const { status, data } = res;
755
+ this.loading = false;
756
+ if (status === 'success') {
757
+ this.infoList.noticeList = data;
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
+ getMessage() {
769
+ let params = {
770
+ pendingId: this.pendingId
771
+ };
772
+ util
773
+ .ajax({ url: getNotificationMsg, params, methods: 'post' })
774
+ .then((res) => {
775
+ if (res.status === 'success') {
776
+ this.infoList.noticeInfo = res.message;
777
+ }
778
+ this.loading = false;
779
+ })
780
+ .catch((err) => {
781
+ this.loading = false;
782
+ if (err.message && err.message !== 'canceled') {
783
+ this.$message.error(err.message);
784
+ }
785
+ });
786
+ },
787
+ getFind() {
788
+ util
789
+ .ajax({
790
+ url: findSysCodes
791
+ })
792
+ .then((res) => {
793
+ const { status, message } = res;
794
+ if (status === 'success') {
795
+ if(this.hideMessage) return;
796
+ this.infoList.noticeType = message.split(',');
797
+ let arr = [];
798
+ this.infoList.noticeList.map((item) => {
799
+ this.infoList.noticeType.map((x) => {
800
+ if (x == item.cciValue) {
801
+ arr.push(x);
802
+ }
803
+ });
804
+ });
805
+ this.infoList.noticeType = arr;
806
+ } else {
807
+ this.$message.error(message || '系统错误,请联系管理员!');
808
+ }
809
+ })
810
+ .catch((err) => {
811
+ this.loading = false;
812
+ if (err.message && err.message !== 'canceled') {
813
+ this.$message.error(err.message);
814
+ }
815
+ });
816
+ }
817
+ }
818
+ };
819
+ </script>
820
+
821
+ <style></style>