ui-process-h5 0.1.36 → 1.0.1

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 (92) hide show
  1. package/build/configure/README.md +212 -0
  2. package/build/configure/package.json +28 -0
  3. package/build/scripts/postinstall.mjs +14 -0
  4. package/build/scripts/switch-cli.mjs +4 -0
  5. package/build/scripts/utils.mjs +60 -0
  6. package/index.html +12 -0
  7. package/package.json +51 -20
  8. package/src/App.vue +222 -0
  9. package/src/assets/font-icon/iconfont.scss +57 -0
  10. package/src/assets/font-icon/iconfont.ttf +0 -0
  11. package/src/assets/img/arrow-right.png +0 -0
  12. package/src/assets/img/arrow.png +0 -0
  13. package/src/assets/img/check.png +0 -0
  14. package/src/assets/js/auth.js +65 -0
  15. package/src/assets/js/errorCode.js +6 -0
  16. package/src/assets/js/message.js +352 -0
  17. package/src/assets/js/request.js +99 -0
  18. package/src/assets/js/toast.js +239 -0
  19. package/src/assets/js/top.js +229 -0
  20. package/src/assets/js/utils.js +83 -0
  21. package/src/assets/js/vuePopper.js +123 -0
  22. package/src/assets/query.png +0 -0
  23. package/src/assets/status/check.png +0 -0
  24. package/src/assets/status/del.png +0 -0
  25. package/src/main.js +17 -0
  26. package/src/packages/attchUpload/index.js +374 -0
  27. package/src/packages/attchUpload/index.scss +143 -0
  28. package/src/packages/attchUpload/index.vue +173 -0
  29. package/src/packages/downSelect/index.js +99 -0
  30. package/src/packages/downSelect/index.scss +86 -0
  31. package/src/packages/downSelect/index.vue +57 -0
  32. package/src/packages/index.js +6 -0
  33. package/src/packages/popup/index.js +73 -0
  34. package/src/packages/popup/index.scss +173 -0
  35. package/src/packages/popup/index.vue +80 -0
  36. package/src/packages/preview/index.js +36 -0
  37. package/src/packages/preview/index.vue +15 -0
  38. package/src/packages/previewImage/index.js +281 -0
  39. package/src/packages/previewImage/index.scss +76 -0
  40. package/src/packages/previewImage/index.vue +53 -0
  41. package/src/packages/process/index.js +923 -0
  42. package/src/packages/process/index.scss +175 -0
  43. package/src/packages/process/index.vue +263 -0
  44. package/src/packages/process/operation/backNode.vue +485 -0
  45. package/src/packages/process/operation/cancel.vue +518 -0
  46. package/src/packages/process/operation/ccTask.vue +473 -0
  47. package/src/packages/process/operation/complete.vue +1126 -0
  48. package/src/packages/process/operation/counterSign.vue +590 -0
  49. package/src/packages/process/operation/delegateTask.vue +587 -0
  50. package/src/packages/process/operation/msgList.vue +174 -0
  51. package/src/packages/process/operation/restart.vue +316 -0
  52. package/src/packages/submitPopup/index.js +644 -0
  53. package/src/packages/submitPopup/index.scss +88 -0
  54. package/src/packages/submitPopup/index.vue +154 -0
  55. package/src/packages/tab/index.js +236 -0
  56. package/src/packages/tab/index.scss +177 -0
  57. package/src/packages/tab/index.vue +155 -0
  58. package/src/packages/tip/index.js +80 -0
  59. package/src/packages/tip/index.scss +121 -0
  60. package/src/packages/tip/index.vue +57 -0
  61. package/src/packages/viewAttchList/index.js +134 -0
  62. package/src/packages/viewAttchList/index.scss +76 -0
  63. package/src/packages/viewAttchList/index.vue +112 -0
  64. package/src/style.css +80 -0
  65. package/vite.config.ts +107 -0
  66. package/packages/components/approval/index.js +0 -0
  67. package/packages/components/process/index.js +0 -8
  68. package/packages/components/process/src/attchlist-upload.vue +0 -585
  69. package/packages/components/process/src/operation/backNode.vue +0 -141
  70. package/packages/components/process/src/operation/cancel.vue +0 -170
  71. package/packages/components/process/src/operation/ccTask.vue +0 -170
  72. package/packages/components/process/src/operation/complete.vue +0 -224
  73. package/packages/components/process/src/operation/counterSign.vue +0 -178
  74. package/packages/components/process/src/operation/delegateTask.vue +0 -168
  75. package/packages/components/process/src/operation/restart.vue +0 -172
  76. package/packages/components/process/src/popup.vue +0 -230
  77. package/packages/components/process/src/process.vue +0 -900
  78. package/packages/components/process/src/tab.vue +0 -459
  79. package/packages/components/process/src/tip.vue +0 -207
  80. package/packages/index.js +0 -4
  81. /package/{packages/components/process/theme → src/assets}/img/add-file.png +0 -0
  82. /package/{packages/components/process/theme → src/assets}/img/del.png +0 -0
  83. /package/{packages/components/process/theme → src/assets}/img/doc.png +0 -0
  84. /package/{packages/components/process/theme → src/assets}/img/file.png +0 -0
  85. /package/{packages/components/process/theme → src/assets}/img/image.png +0 -0
  86. /package/{packages/components/process/theme → src/assets}/img/pdf.png +0 -0
  87. /package/{packages/components/process/theme → src/assets}/img/xls.png +0 -0
  88. /package/{packages/components/process/theme → src/assets}/img/zip.png +0 -0
  89. /package/{packages/components/process/theme → src/assets}/status/error.png +0 -0
  90. /package/{packages/components/process/theme → src/assets}/status/loading.png +0 -0
  91. /package/{packages/components/process/theme → src/assets}/status/success.png +0 -0
  92. /package/{packages/components/process/src → src/packages/process}/operation/index.js +0 -0
@@ -0,0 +1,1126 @@
1
+ <template>
2
+ <div class="process-popup-content">
3
+ <div class="process-pc-label" v-if="param.isDocument">
4
+ 快捷回复
5
+ </div>
6
+ <div
7
+ class="process-pc-value"
8
+ style="display: flex;"
9
+ v-if="param.isDocument"
10
+ >
11
+ <div class="process-radio" style="width: 100%;">
12
+ <div
13
+ class="process-radio-item"
14
+ :class="
15
+ value == commentMsg ? 'process-radio-item--check' : ''
16
+ "
17
+ v-for="value in msgCheckList"
18
+ @click="() => (commentMsg = value)"
19
+ >
20
+ <span>
21
+ <img
22
+ class="process-radio-item-check"
23
+ v-if="value == commentMsg"
24
+ :src="check"
25
+ />
26
+ </span>
27
+ {{ value }}
28
+ </div>
29
+ <div
30
+ class="process-radio-item"
31
+ @click="handleOpenMsg()"
32
+ v-if="param.isMsg"
33
+ style="color: #1389ff; font-size: 14px; margin-left: auto;"
34
+ >
35
+ 常用意见
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div v-if="param.isMsg && !param.isDocument">
40
+ <div
41
+ class="process-radio-item"
42
+ @click="handleOpenMsg()"
43
+ style="color: #1389ff; font-size: 14px;"
44
+ >
45
+ 常用意见
46
+ </div>
47
+ </div>
48
+ <div class="process-pc-label">
49
+ 审批意见
50
+ <span class="process-pc-label--re">*</span>
51
+ </div>
52
+ <div class="process-pc-value">
53
+ <div class="process-popup-textarea">
54
+ <textarea
55
+ v-model="commentMsg"
56
+ class="textarea-item"
57
+ name="description"
58
+ cols="40"
59
+ placeholder="请输入审批意见(200字以内)"
60
+ maxlength="200"
61
+ ></textarea>
62
+ </div>
63
+ <div class="msg-btn" v-if="param.isMsg">
64
+ <span class="msg-btn-click" @click="handleMakeMsg()"
65
+ >设置为常用意见</span
66
+ >
67
+ </div>
68
+ </div>
69
+
70
+ <template
71
+ v-if="
72
+ taskNode && taskNode.length > 0 && taskNode[0].taskState != 11
73
+ "
74
+ >
75
+ <template v-if="nextNodeData.length">
76
+ <template v-for="item in nextNodeData">
77
+ <template
78
+ v-if="
79
+ item.type != 'endEvent' &&
80
+ isOption(
81
+ item?.userTaskModelDTO?.humanPerformer?.name
82
+ )
83
+ "
84
+ >
85
+ <div class="process-pc-label">
86
+ <div>
87
+ {{ item.userTaskModelDTO.name }}
88
+ <br />
89
+ 审批人
90
+ <span class="process-pc-label--re">*</span>
91
+ </div>
92
+ </div>
93
+ <div
94
+ class="process-pc-value"
95
+ @click="handleOpenPopup(item)"
96
+ >
97
+ <div class="process-pc-value--people">
98
+ <div
99
+ class="process-pc-value--data"
100
+ v-if="
101
+ partNode[item.id] &&
102
+ partNode[item.id].length
103
+ "
104
+ >
105
+ <span>
106
+ {{ partNode[item.id].join(",") }}
107
+ </span>
108
+ </div>
109
+ <div
110
+ v-else-if="
111
+ item.humanPerformerName !==
112
+ '固定账户' &&
113
+ item.humanPerformerName !==
114
+ '与流程申请人相关'
115
+ "
116
+ class="process-pc-value--data"
117
+ style="color: #888;"
118
+ >
119
+ <span>
120
+ 请选择审批人
121
+ </span>
122
+ </div>
123
+
124
+ <div
125
+ v-else-if="
126
+ item.routeTxt && item.routeTxt.userNames
127
+ "
128
+ class="process-pc-value--data"
129
+ >
130
+ {{ item.routeTxt.userNames }}
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </template>
135
+ <template v-else-if="item.type != 'endEvent'">
136
+ <div class="process-pc-label">
137
+ {{ item.userTaskModelDTO.name }}
138
+ <span v-if="personMakeList[item.id]"
139
+ >:{{ personMakeList[item.id] }}</span
140
+ >
141
+ </div>
142
+ </template>
143
+ </template>
144
+ </template>
145
+
146
+ <template v-else-if="outGatewayUserTaskModel.length">
147
+ <template v-for="item in outGatewayUserTaskModel">
148
+ <template
149
+ v-if="
150
+ outGatewayUserTaskModel.childNode &&
151
+ outGatewayUserTaskModel.childNode.length
152
+ "
153
+ >
154
+ <template
155
+ v-if="
156
+ item.type != 'endEvent' &&
157
+ isOption(
158
+ item?.userTaskModelDTO?.humanPerformer?.name
159
+ )
160
+ "
161
+ >
162
+ <div class="process-pc-label">
163
+ <div>
164
+ {{ item.userTaskModelDTO.name }}
165
+ <br />
166
+ 审批人
167
+ <span class="process-pc-label--re">*</span>
168
+ </div>
169
+ </div>
170
+ <div
171
+ class="process-pc-value"
172
+ @click="handleOpenPopup(item)"
173
+ >
174
+ <div class="process-pc-value--people">
175
+ <div
176
+ class="process-pc-value--data"
177
+ v-if="
178
+ partNode[item.id] &&
179
+ partNode[item.id].length
180
+ "
181
+ >
182
+ <span>
183
+ {{ partNode[item.id].join(",") }}
184
+ </span>
185
+ </div>
186
+ <div
187
+ v-else
188
+ class="process-pc-value--data"
189
+ style="color: #888;"
190
+ >
191
+ <span>
192
+ 请选择审批人
193
+ </span>
194
+ </div>
195
+ </div>
196
+ </div>
197
+ </template>
198
+ <template v-else-if="item.type != 'endEvent'">
199
+ <div class="process-pc-label">
200
+ {{ item.userTaskModelDTO.name }}
201
+ </div>
202
+ </template>
203
+ </template>
204
+
205
+ <template v-else>
206
+ <div class="process-pc-label">
207
+ 下一节点审批
208
+ <span class="process-pc-label--re">*</span>
209
+ </div>
210
+ <div class="process-pc-value">
211
+ <div class="process-radio">
212
+ <div
213
+ class="process-radio-item"
214
+ :class="
215
+ value.id == radioCheck
216
+ ? 'process-radio-item--check'
217
+ : ''
218
+ "
219
+ v-for="value in item.childNode"
220
+ @click="handleNode(value)"
221
+ >
222
+ <span>
223
+ <img
224
+ class="process-radio-item-check"
225
+ v-if="value.id == radioCheck"
226
+ :src="check"
227
+ />
228
+ </span>
229
+ {{ value.nodeName }}
230
+ </div>
231
+ </div>
232
+ </div>
233
+ </template>
234
+ </template>
235
+
236
+ <template v-if="radioCheck">
237
+ <template
238
+ v-if="
239
+ radioCheckChild &&
240
+ radioCheckChild.length &&
241
+ radioCheckChild[0].type !== 'EndEventModel'
242
+ "
243
+ >
244
+ <div v-for="item in radioCheckChild">
245
+ <div
246
+ class="process-pc-label"
247
+ @click="handleSaveNode(item.id)"
248
+ >
249
+ <div class="process-checkbox">
250
+ 下一节点审批:<br />
251
+ <div class="process-checkbox-item">
252
+ {{ item.nodeName }}
253
+ <span>
254
+ <img
255
+ v-if="
256
+ radioCheckNameList.includes(
257
+ item.id
258
+ )
259
+ "
260
+ class="process-checkbox-item-check"
261
+ :src="checkS"
262
+ />
263
+ </span>
264
+ </div>
265
+ </div>
266
+ </div>
267
+
268
+ <div
269
+ class="process-pc-value"
270
+ @click="handleOpenPopup(item)"
271
+ >
272
+ <div class="process-pc-value--people">
273
+ <div
274
+ class="process-pc-value--data"
275
+ v-if="
276
+ partNode[item.id] &&
277
+ partNode[item.id].length
278
+ "
279
+ >
280
+ <span>
281
+ {{ partNode[item.id].join(",") }}
282
+ </span>
283
+ </div>
284
+ <div
285
+ v-else
286
+ class="process-pc-value--data"
287
+ style="color: #888;"
288
+ >
289
+ <span>
290
+ 请选择审批人
291
+ </span>
292
+ </div>
293
+ </div>
294
+ </div>
295
+ </div>
296
+ </template>
297
+ <template v-else>
298
+ <div class="process-pc-label">
299
+ 下一节点审批
300
+ </div>
301
+ <div class="process-pc-value">
302
+ {{
303
+ radioCheckChild[0].type === "EndEventModel"
304
+ ? "结束事件"
305
+ : radioCheckName
306
+ }}
307
+ </div>
308
+ </template>
309
+ </template>
310
+ </template>
311
+ </template>
312
+ <TopTips
313
+ ref="topTips"
314
+ :text="textTips"
315
+ :statusTips="statusTips"
316
+ :type="typeTips"
317
+ />
318
+ <TopPopup
319
+ v-bind:visible="visible"
320
+ v-on:update:visible="(val) => (visible = val)"
321
+ ref="TopPopup"
322
+ titleText="选人"
323
+ :isDrawer="true"
324
+ >
325
+ <departPerson
326
+ :isTitle="false"
327
+ :visible.sync="visible"
328
+ v-bind="entity"
329
+ @callback="handleCallback"
330
+ @cancel="handleCancel"
331
+ >
332
+ </departPerson>
333
+ </TopPopup>
334
+
335
+ <TopPopup
336
+ v-bind:visible="visibleListMsg"
337
+ v-on:update:visible="(val) => (visibleListMsg = val)"
338
+ ref="TopPopup"
339
+ titleText="常用意见"
340
+ :isDrawer="true"
341
+ >
342
+ <MsgList
343
+ :visible="visibleListMsg"
344
+ :request="param.request"
345
+ :useInfo="param.userInfo"
346
+ @handleTips="handleTips"
347
+ @handleMsg="handleMsg"
348
+ ></MsgList>
349
+ </TopPopup>
350
+
351
+ <TopPopup
352
+ titleText="操作消息提示"
353
+ :isTips="true"
354
+ :context="`将${commentMsg}设置为常用意见`"
355
+ :cancel="handleTipsCancel"
356
+ :comfig="handleTipsComfig"
357
+ v-bind:visible="visibleMsgComfig"
358
+ v-on:update:visible="(val) => (visibleMsgComfig = val)"
359
+ >
360
+ </TopPopup>
361
+
362
+ <attchViews
363
+ v-if="labels == '1'"
364
+ :limit="limit ? limit : -1"
365
+ :requires="requires"
366
+ :request="param.request"
367
+ :linkUrl="param.linkUrl"
368
+ @getValue="getValues"
369
+ />
370
+
371
+ <!-- -->
372
+ </div>
373
+ </template>
374
+ <script>
375
+ import TopTips from "../../tip/index.vue";
376
+ import attchViews from "../../attchUpload/index.vue";
377
+ import TopPopup from "../../popup/index.vue";
378
+ import { departPerson } from "checked-pick-app";
379
+ import success from "@/assets/status/success.png";
380
+ import checks from "@/assets/status/check.png";
381
+ import MsgList from "./msgList.vue";
382
+ import "checked-pick-app-style";
383
+ export default {
384
+ name: "complete",
385
+ props: {
386
+ param: {
387
+ type: Object,
388
+ defalut: () => {
389
+ visible: false;
390
+ },
391
+ },
392
+ },
393
+ components: {
394
+ TopTips,
395
+ attchViews,
396
+ TopPopup,
397
+ departPerson,
398
+ MsgList,
399
+ },
400
+ computed: {
401
+ check() {
402
+ return success;
403
+ },
404
+ checkS() {
405
+ return checks;
406
+ },
407
+ },
408
+ data() {
409
+ return {
410
+ commentMsg: "",
411
+ style: {
412
+ color: "#333",
413
+ disableColor: "#F7F6F6",
414
+ },
415
+ textTips: "",
416
+ statusTips: false,
417
+ typeTips: "success",
418
+ // annex 附件属性
419
+ limit: "",
420
+ requires: "",
421
+ labels: "",
422
+ otherList: "",
423
+ attchLists: [],
424
+ // next
425
+ nextNodeData: [],
426
+ taskNode: [],
427
+
428
+ outGatewayUserTaskModel: [],
429
+ formData: {},
430
+
431
+ // 选人组件
432
+ visible: false,
433
+ entity: {
434
+ source: "0",
435
+ type: "0",
436
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
437
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
438
+ multiple: true, // 是否多选
439
+ },
440
+ /* {
441
+ source: "0",
442
+ type: "0",
443
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
444
+ businessId: "6a9aaf5742572e82b5d89d6f7e52e2f2",
445
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
446
+ multiple: true, // 是否多选
447
+ } */
448
+ // 存储选人信息
449
+ multiNodeParticipant: {},
450
+ // 当前评估对象
451
+ partObjId: [],
452
+ // 选中人员信息
453
+ partNode: {},
454
+ // 是否可选
455
+ canCheck: true,
456
+ // radio
457
+ radioCheck: "",
458
+ radioCheckChild: [],
459
+ radioCheckName: "",
460
+ radioCheckNameList: [],
461
+ // 选人回显
462
+ partList: [],
463
+
464
+ //
465
+ gateVars: {},
466
+
467
+ // 固定账户id存储:[]
468
+ personMake: [],
469
+ personMakeList: {},
470
+
471
+ // 常用意见列表
472
+ visibleListMsg: false,
473
+ visibleMsgComfig: false,
474
+ msgCheck: "",
475
+ msgCheckList: ["同意", "如拟", "已阅"],
476
+
477
+ actionName: "",
478
+ };
479
+ },
480
+ watch: {
481
+ param: {
482
+ handler(val, preVal) {
483
+ this.nextNodeData = val.nextNodeData;
484
+ this.taskNode = val.taskNode;
485
+ this.outGatewayUserTaskModel = val.outGatewayUserTaskModel;
486
+ this.actionName = val.actionName;
487
+
488
+ console.log("param:::", val);
489
+ /* if(this.nextNodeData) */
490
+
491
+ if (
492
+ this.outGatewayUserTaskModel &&
493
+ this.outGatewayUserTaskModel.length
494
+ ) {
495
+ this.outGatewayUserTaskModel.map((v) => {
496
+ if (v.type === "endEvent") return;
497
+ v.userTaskModelDTO = {
498
+ name: v.name,
499
+ humanPerformer: {
500
+ name: v.humanPerformerName,
501
+ },
502
+ };
503
+ v.humanPerformer = {
504
+ name: v.humanPerformerName,
505
+ };
506
+ });
507
+ }
508
+
509
+ ///userTaskModelDTO
510
+ if (this.nextNodeData && this.nextNodeData.length) {
511
+ this.nextNodeData.map((v, i) => {
512
+ if (v.type === "endEvent") return;
513
+
514
+ if (
515
+ v.userTaskModelDTO.participantList &&
516
+ v.userTaskModelDTO.participantList.length
517
+ ) {
518
+ v.userTaskModelDTO.participantList.map((value) => {
519
+ /* */
520
+ if (!this.multiNodeParticipant[v.id]) {
521
+ this.multiNodeParticipant[v.id] = [];
522
+ }
523
+ if (!this.partNode[v.id]) {
524
+ this.partNode[v.id] = [];
525
+ }
526
+
527
+ if (
528
+ !this.multiNodeParticipant[v.id].includes(
529
+ value.id
530
+ )
531
+ ) {
532
+ this.multiNodeParticipant[v.id].push(
533
+ value.id
534
+ );
535
+ }
536
+
537
+ if (!this.partNode[v.id].includes(value.name)) {
538
+ this.partNode[v.id].push(value.name);
539
+ }
540
+ });
541
+ }
542
+
543
+ /* console.log(
544
+ "nextData",
545
+ v.userTaskModelDTO.humanPerformer.name
546
+ ); */
547
+ if (
548
+ v.userTaskModelDTO.humanPerformer.name ==
549
+ "固定账户" ||
550
+ v.userTaskModelDTO.humanPerformer.name ==
551
+ "与流程申请人相关"
552
+ ) {
553
+ this.personMake.push(v.id);
554
+ }
555
+ });
556
+
557
+ if (this.personMake && this.personMake.length) {
558
+ this.param.request
559
+ .post(
560
+ `aws/repository/getParticipantsOfPerformerNames?taskInstId=${this.param.taskInstId}`,
561
+ {
562
+ userTaskDefIds: this.personMake,
563
+ }
564
+ )
565
+ .then((res) => {
566
+ if (res.code == 200) {
567
+ this.personMakeList = res.data;
568
+ }
569
+ });
570
+ }
571
+ } else if (
572
+ this.outGatewayUserTaskModel &&
573
+ this.outGatewayUserTaskModel.length
574
+ ) {
575
+ this.outGatewayUserTaskModel.map((v, i) => {
576
+ if (v.type === "endEvent") return;
577
+ if (v.participantList && v.participantList.length) {
578
+ v.participantList.map((value) => {
579
+ /* */
580
+ if (!this.multiNodeParticipant[v.id]) {
581
+ this.multiNodeParticipant[v.id] = [];
582
+ }
583
+ if (!this.partNode[v.id]) {
584
+ this.partNode[v.id] = [];
585
+ }
586
+
587
+ if (
588
+ !this.multiNodeParticipant[v.id].includes(
589
+ value.id
590
+ )
591
+ ) {
592
+ this.multiNodeParticipant[v.id].push(
593
+ value.id
594
+ );
595
+ }
596
+
597
+ if (!this.partNode[v.id].includes(value.name)) {
598
+ this.partNode[v.id].push(value.name);
599
+ }
600
+ });
601
+ }
602
+ });
603
+ }
604
+ console.log("userTaskModelDTO", this.multiNodeParticipant);
605
+ console.log(
606
+ "outGatewayUserTaskModel",
607
+ this.outGatewayUserTaskModel
608
+ );
609
+ },
610
+ immediate: true,
611
+ deep: true,
612
+ },
613
+ },
614
+ created() {
615
+ // console.log("isVue2", this.param);
616
+ this.makeDelegateTaskButtonAnnex();
617
+ },
618
+ methods: {
619
+ // 设置msg
620
+ handleMakeMsg() {
621
+ if (this.commentMsg == "" && !this.commentMsg.length) {
622
+ this.handleTips("请输入审批意见!", false, "success");
623
+ this.visibleMsgComfig = false;
624
+ } else {
625
+ this.visibleMsgComfig = true;
626
+ }
627
+ },
628
+
629
+ handleTipsCancel() {
630
+ this.visibleMsgComfig = false;
631
+ },
632
+ handleTipsComfig() {
633
+ this.handleTips("", true, "loading");
634
+ this.visibleMsgComfig = false;
635
+ this.param.request
636
+ .post("/auth//user/opinion/save", {
637
+ opinionName: this.commentMsg,
638
+ })
639
+ .then((res) => {
640
+ if (res.code === 200) {
641
+ this.handleTips("设置成功!", true, "success");
642
+ } else {
643
+ this.handleTips(res.msg, true, "error");
644
+ }
645
+ })
646
+ .catch((error) => {
647
+ this.handleTips(error.msg, true, "error");
648
+ });
649
+ },
650
+ handleMsg(val) {
651
+ this.commentMsg = val;
652
+ this.visibleListMsg = false;
653
+ },
654
+ handleSaveNode(id) {
655
+ if (this.radioCheckNameList.includes(id)) {
656
+ this.radioCheckNameList.splice(
657
+ this.radioCheckNameList.indexOf(id),
658
+ 1
659
+ );
660
+ } else {
661
+ this.radioCheckNameList.push(id);
662
+ }
663
+
664
+ // console.log("查看::", this.radioCheckNameList);
665
+ },
666
+ handleNode(item) {
667
+ this.radioCheck = item.id;
668
+ this.radioCheckName = item.nodeName;
669
+ this.radioCheckChild =
670
+ item.childNode && item.childNode.length
671
+ ? item.childNode
672
+ : [item];
673
+ console.log("当前选中", item, this.radioCheckChild);
674
+
675
+ if (
676
+ this.outGatewayUserTaskModel &&
677
+ this.outGatewayUserTaskModel.length
678
+ ) {
679
+ if (this.radioCheckChild && this.radioCheckChild.length) {
680
+ this.gateVars[
681
+ this.radioCheckChild[0].incomingConditionItemList[0].itemName
682
+ ] = this.radioCheckChild[0].incomingConditionItemList[0].compareValue;
683
+
684
+ this.gateVars[item.incomingConditionItemList[0].itemName] =
685
+ item.incomingConditionItemList[0].compareValue;
686
+ } else {
687
+ this.gateVars[item.incomingConditionItemList[0].itemName] =
688
+ item.incomingConditionItemList[0].compareValue;
689
+ }
690
+ }
691
+ },
692
+ handleOpenPopup(item) {
693
+ this.visible = true;
694
+ this.partObjId = item.id;
695
+
696
+ if (this.nextNodeData && this.nextNodeData.length) {
697
+ item = {
698
+ ...item,
699
+ ...item.userTaskModelDTO,
700
+ };
701
+ }
702
+ console.log("partNode", this.partObjId, item);
703
+ if (item.humanPerformer.name == "固定单位") {
704
+ let subjectName;
705
+ let checkedArray = [];
706
+ item.routeTxt.companyIds.map((v, i) => {
707
+ subjectName = v.name;
708
+ });
709
+
710
+ if (
711
+ this.multiNodeParticipant[item.id] &&
712
+ this.multiNodeParticipant[item.id].length
713
+ ) {
714
+ this.multiNodeParticipant[item.id].map((v, i) => {
715
+ checkedArray.push({
716
+ type: 3,
717
+ uid: v,
718
+ });
719
+ });
720
+ }
721
+
722
+ this.entity = {
723
+ source: "1",
724
+ type: "0",
725
+ request: this.param.request,
726
+ codeType: [3],
727
+ multiple:
728
+ item.type == "InclusiveGatewayModel" ||
729
+ item.loopCardinality > 1,
730
+ maxMultiple: item.loopCardinality
731
+ ? item.loopCardinality
732
+ : item.loopCardinality,
733
+ subjectName: subjectName,
734
+ checkedArray: checkedArray,
735
+ };
736
+ } else if (item.humanPerformer.name == "固定部门") {
737
+ let deptCode;
738
+ let checkedArray = [];
739
+ item.routeTxt.departmentIds.map((v, i) => {
740
+ deptCode = v.rangeId;
741
+ });
742
+
743
+ if (
744
+ this.multiNodeParticipant[item.id] &&
745
+ this.multiNodeParticipant[item.id].length
746
+ ) {
747
+ this.multiNodeParticipant[item.id].map((v, i) => {
748
+ checkedArray.push({
749
+ type: 3,
750
+ uid: v,
751
+ deptId: deptCode,
752
+ });
753
+ });
754
+ }
755
+
756
+ console.log(
757
+ "multiNodeParticipant",
758
+ this.multiNodeParticipant[item.id],
759
+ checkedArray
760
+ );
761
+
762
+ this.entity = {
763
+ source: "1",
764
+ type: "0",
765
+ request: this.param.request,
766
+ codeType: [3],
767
+ multiple:
768
+ item.type == "InclusiveGatewayModel" ||
769
+ item.loopCardinality > 1,
770
+ maxMultiple: item.loopCardinality
771
+ ? item.loopCardinality
772
+ : item.loopCardinality,
773
+ deptCode: deptCode,
774
+ checkedArray: checkedArray,
775
+ };
776
+ } else {
777
+ let checkedArray = [];
778
+
779
+ if (
780
+ this.multiNodeParticipant[item.id] &&
781
+ this.multiNodeParticipant[item.id].length
782
+ ) {
783
+ this.multiNodeParticipant[item.id].map((v, i) => {
784
+ checkedArray.push({
785
+ type: 3,
786
+ uid: v,
787
+ });
788
+ });
789
+ }
790
+
791
+ this.entity = {
792
+ source: "1",
793
+ type: "0",
794
+ request: this.param.request,
795
+ codeType: [3],
796
+ multiple:
797
+ item.type == "InclusiveGatewayModel" ||
798
+ item.loopCardinality > 1,
799
+ maxMultiple: item.loopCardinality
800
+ ? item.loopCardinality
801
+ : item.loopCardinality,
802
+ checkedArray: checkedArray,
803
+ };
804
+
805
+ console.log("任意选人节点参数", this.entity);
806
+ }
807
+ },
808
+
809
+ handleOpenMsg() {
810
+ this.visibleListMsg = true;
811
+ },
812
+
813
+ async confirm() {
814
+ if (!this.commentMsg) {
815
+ this.handleTips("请输入审批意见!", false, "success");
816
+ return;
817
+ }
818
+
819
+ if (this.requires && this.attchLists.length <= 0) {
820
+ this.handleTips("请上传附件!", false, "success");
821
+ return;
822
+ }
823
+
824
+ let multiNodeParticipant = {};
825
+ if (this.radioCheckNameList && this.radioCheckNameList.length) {
826
+ let num = 0;
827
+ this.radioCheckNameList.map((v, i) => {
828
+ if (
829
+ !this.multiNodeParticipant[v] ||
830
+ !this.multiNodeParticipant[v].length
831
+ ) {
832
+ num += 1;
833
+ }
834
+ multiNodeParticipant[v] = this.multiNodeParticipant[v];
835
+ });
836
+
837
+ if (num > 0) {
838
+ this.handleTips("请选择审批人!", false, "success");
839
+ return;
840
+ }
841
+ } else {
842
+ if (
843
+ this.multiNodeParticipant[this.partObjId] &&
844
+ !this.multiNodeParticipant[this.partObjId].length
845
+ ) {
846
+ this.handleTips("请选择审批人!", false, "success");
847
+ return;
848
+ }
849
+ multiNodeParticipant = this.multiNodeParticipant;
850
+ }
851
+
852
+ this.handleTips("", true, "loading");
853
+ await this.param.request
854
+ .post("/aws/tis/complete", {
855
+ actionName: this.param.actionComplete,
856
+ commentMsg: this.commentMsg,
857
+ taskInstId: this.param.taskInstId,
858
+ vars: this.param.vars || this.gateVars,
859
+ multiNodeParticipant: multiNodeParticipant,
860
+ })
861
+ .then((res) => {
862
+ if (res.code == 200) {
863
+ if (this.attchLists.length > 0) {
864
+ this.uploadAttch();
865
+ return;
866
+ }
867
+ this.$emit("handleClosePopup1");
868
+ this.handleTips("提交成功!", false, "success");
869
+ this.handleFinal();
870
+ this.commentMsg = "";
871
+ } else {
872
+ this.handleTips(res.msg, true, "error");
873
+ }
874
+ });
875
+ },
876
+ makeDelegateTaskButtonAnnex() {
877
+ if (this.param.annex && this.param.annex.length) {
878
+ this.otherList = this.param.annex;
879
+ let str = this.otherList.split(";");
880
+ this.limit = str[2];
881
+ this.requires = JSON.parse(str[1]);
882
+ this.labels = str[0];
883
+ }
884
+ },
885
+
886
+ handleCallback(res) {
887
+ this.visible = false;
888
+ this.multiNodeParticipant[this.partObjId] = [];
889
+ this.partNode[this.partObjId] = [];
890
+
891
+ res.map((v, i) => {
892
+ this.multiNodeParticipant[this.partObjId].push(v.uid);
893
+ this.partNode[this.partObjId].push(v.name);
894
+ });
895
+
896
+ // console.log("callback_OK", res, this.multiNodeParticipant);
897
+ },
898
+ handleCancel() {
899
+ // console.log("cancel_No");
900
+ },
901
+
902
+ getValues(data) {
903
+ // console.log("获取当前附件信息::::", data);
904
+ this.attchLists = data;
905
+ },
906
+
907
+ async uploadAttch() {
908
+ if (this.attchLists.length > 0) {
909
+ this.attchLists.map((v, i) => {
910
+ v.size = v.fileSize;
911
+ v.format = v.originFileName.substring(
912
+ v.originFileName.lastIndexOf(".") + 1
913
+ );
914
+ v.uploadTime = v.createTime;
915
+ v.processInstId = this.param.processInstId;
916
+ v.taskInstId = this.param.taskInstId;
917
+ v.name = v.originFileName;
918
+ });
919
+
920
+ let param = this.attchLists;
921
+ const ress = await this.param.request.post(
922
+ "/aws/meta/annex/patchSave",
923
+ {
924
+ saveMetaAnnexCmdList: param,
925
+ }
926
+ );
927
+ // console.log("asd", ress);
928
+ if (ress.success) {
929
+ this.$emit("handleClosePopup1");
930
+ this.handleTips("提交成功!", false, "success");
931
+ this.handleFinal();
932
+ this.commentMsg = "";
933
+ } else {
934
+ this.handleTips("上传失败", true, "error");
935
+ }
936
+ }
937
+ },
938
+
939
+ isOption(humanPerformer) {
940
+ return (
941
+ humanPerformer == "任意指定" ||
942
+ humanPerformer == "固定部门" ||
943
+ humanPerformer == "固定单位" ||
944
+ humanPerformer == "与流程申请人所在组织结构的位置相关" ||
945
+ humanPerformer == "固定群组"
946
+ );
947
+ },
948
+
949
+ handleTips(text, status, type) {
950
+ this.textTips = text;
951
+ this.statusTips = status;
952
+ this.typeTips = type;
953
+ this.$refs.topTips.handleOpen();
954
+ },
955
+
956
+ handleFinal() {
957
+ if (this.param.endFunction) {
958
+ this.param.endFunction("complete");
959
+ }
960
+ },
961
+ },
962
+ };
963
+ </script>
964
+ <style scoped>
965
+ .process-popup-content {
966
+ flex: 1;
967
+ }
968
+
969
+ .process-popup-content .process-pc-label {
970
+ font-size: 15px;
971
+ display: flex;
972
+ align-items: center;
973
+ font-weight: 400;
974
+ color: #333333;
975
+ padding-top: 20px;
976
+ padding-bottom: 5px;
977
+ }
978
+
979
+ .process-popup-content .process-pc-value .van-field {
980
+ border-bottom: 1px solid #e8e8e8;
981
+ padding: 0;
982
+ }
983
+
984
+ .input-padding {
985
+ padding: 0;
986
+ }
987
+
988
+ .process-popup-textarea {
989
+ position: relative;
990
+ width: 100%;
991
+ height: 62px;
992
+ min-height: 62px;
993
+ }
994
+
995
+ .process-popup-textarea::after {
996
+ position: absolute;
997
+ content: "";
998
+ width: 100%;
999
+ height: 1px;
1000
+ background-color: #f2f2f2;
1001
+ bottom: 0;
1002
+ left: 0;
1003
+ }
1004
+
1005
+ .process-popup-textarea .textarea-item {
1006
+ resize: none;
1007
+ background: none;
1008
+ color: inherit;
1009
+ opacity: 1;
1010
+ font: inherit;
1011
+ line-height: inherit;
1012
+ letter-spacing: inherit;
1013
+ text-align: inherit;
1014
+ text-indent: inherit;
1015
+ text-transform: inherit;
1016
+ text-shadow: inherit;
1017
+ outline: none;
1018
+ border: none;
1019
+ padding: 0;
1020
+ margin: 0;
1021
+ text-decoration: inherit;
1022
+ height: 100%;
1023
+ font-size: 14px;
1024
+ }
1025
+
1026
+ .process-popup-textarea .textarea-item::placeholder {
1027
+ line-height: 4;
1028
+ }
1029
+ .process-pc-label--re {
1030
+ color: #ee0000;
1031
+ }
1032
+
1033
+ .process-pc-value--people {
1034
+ width: 100%;
1035
+ min-height: 43px;
1036
+ padding: 10px 26px 10px 0;
1037
+ box-sizing: border-box;
1038
+ position: relative;
1039
+ font-size: 14px;
1040
+ }
1041
+
1042
+ .process-pc-value--people::after {
1043
+ position: absolute;
1044
+ content: "";
1045
+ width: 100%;
1046
+ height: 1px;
1047
+ background-color: #e8e8e8;
1048
+ bottom: 0;
1049
+ left: 0;
1050
+ }
1051
+
1052
+ .process-tag {
1053
+ width: 36px;
1054
+ height: 20px;
1055
+ box-sizing: border-box;
1056
+ border: 1px solid #2979ff;
1057
+ color: #2979ff;
1058
+ font-size: 12px;
1059
+ display: flex;
1060
+ justify-content: center;
1061
+ align-items: center;
1062
+ margin-right: 5px;
1063
+ }
1064
+
1065
+ .process-radio {
1066
+ display: flex;
1067
+ justify-content: flex-start;
1068
+ }
1069
+ .process-radio-item,
1070
+ .process-checkbox-item {
1071
+ display: flex;
1072
+ align-items: center;
1073
+ margin-right: 10px;
1074
+ padding-top: 10px;
1075
+ }
1076
+ .process-radio-item span {
1077
+ display: inline-block;
1078
+ border: 1px solid #d1d1d1;
1079
+ border-radius: 50%;
1080
+ width: 24px;
1081
+ height: 24px;
1082
+ box-sizing: border-box;
1083
+ background-color: #fff;
1084
+ margin-right: 5px;
1085
+ }
1086
+
1087
+ .process-checkbox-item span {
1088
+ display: inline-block;
1089
+ border: 1px solid #d1d1d1;
1090
+ border-radius: 3px;
1091
+ width: 24px;
1092
+ height: 24px;
1093
+ box-sizing: border-box;
1094
+ background-color: #fff;
1095
+ margin-left: 5px;
1096
+ }
1097
+
1098
+ .process-radio-item--check span {
1099
+ background-color: rgb(0, 122, 255);
1100
+ border-color: rgb(0, 122, 255);
1101
+ }
1102
+
1103
+ .process-radio-item-check {
1104
+ width: 80%;
1105
+ height: 80%;
1106
+ transform: translate(12%, 18%);
1107
+ }
1108
+
1109
+ .process-checkbox-item-check {
1110
+ width: 80%;
1111
+ height: 80%;
1112
+ transform: translate(12%, 18%);
1113
+ }
1114
+
1115
+ ::v-deep .departPerson-main {
1116
+ width: 100% !important;
1117
+ height: 100% !important;
1118
+ }
1119
+
1120
+ .msg-btn {
1121
+ font-size: 14px;
1122
+ margin: 8px 0;
1123
+ text-align: right;
1124
+ color: #1890ff;
1125
+ }
1126
+ </style>