ui-process-h5 0.1.33 → 0.1.40

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 (98) hide show
  1. package/build/configure/README.md +171 -0
  2. package/build/configure/package.json +27 -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 +43 -58
  8. package/src/App.vue +151 -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/add-file.png +0 -0
  12. package/src/assets/img/arrow-right.png +0 -0
  13. package/src/assets/img/arrow.png +0 -0
  14. package/src/assets/img/check.png +0 -0
  15. package/src/assets/img/del.png +0 -0
  16. package/src/assets/img/doc.png +0 -0
  17. package/src/assets/img/file.png +0 -0
  18. package/src/assets/img/image.png +0 -0
  19. package/src/assets/img/pdf.png +0 -0
  20. package/src/assets/img/xls.png +0 -0
  21. package/src/assets/img/zip.png +0 -0
  22. package/src/assets/js/auth.js +41 -0
  23. package/src/assets/js/errorCode.js +6 -0
  24. package/src/assets/js/message.js +352 -0
  25. package/src/assets/js/request.js +90 -0
  26. package/src/assets/js/toast.js +239 -0
  27. package/src/assets/js/top.js +229 -0
  28. package/src/assets/js/utils.js +82 -0
  29. package/src/assets/js/vuePopper.js +123 -0
  30. package/src/assets/query.png +0 -0
  31. package/src/assets/status/error.png +0 -0
  32. package/src/assets/status/loading.png +0 -0
  33. package/src/assets/status/success.png +0 -0
  34. package/src/main.js +15 -0
  35. package/src/packages/attchUpload/index.js +371 -0
  36. package/src/packages/attchUpload/index.scss +136 -0
  37. package/src/packages/attchUpload/index.vue +173 -0
  38. package/src/packages/downSelect/index.js +81 -0
  39. package/src/packages/downSelect/index.scss +82 -0
  40. package/src/packages/downSelect/index.vue +54 -0
  41. package/src/packages/index.js +6 -0
  42. package/src/packages/popup/index.js +61 -0
  43. package/src/packages/popup/index.scss +174 -0
  44. package/src/packages/popup/index.vue +79 -0
  45. package/src/packages/preview/index.js +36 -0
  46. package/src/packages/preview/index.vue +15 -0
  47. package/src/packages/previewImage/index.js +158 -0
  48. package/src/packages/previewImage/index.scss +59 -0
  49. package/src/packages/previewImage/index.vue +32 -0
  50. package/src/packages/process/index.js +679 -0
  51. package/src/packages/process/index.scss +164 -0
  52. package/src/packages/process/index.vue +189 -0
  53. package/src/packages/process/operation/backNode.vue +393 -0
  54. package/src/packages/process/operation/cancel.vue +399 -0
  55. package/src/packages/process/operation/ccTask.vue +461 -0
  56. package/src/packages/process/operation/complete.vue +488 -0
  57. package/src/packages/process/operation/counterSign.vue +485 -0
  58. package/src/packages/process/operation/delegateTask.vue +480 -0
  59. package/src/packages/process/operation/index.js +9 -0
  60. package/src/packages/process/operation/restart.vue +305 -0
  61. package/src/packages/submitPopup/index.js +296 -0
  62. package/src/packages/submitPopup/index.scss +83 -0
  63. package/src/packages/submitPopup/index.vue +138 -0
  64. package/src/packages/tab/index.js +207 -0
  65. package/src/packages/tab/index.scss +176 -0
  66. package/src/packages/tab/index.vue +155 -0
  67. package/src/packages/tip/index.js +74 -0
  68. package/src/packages/tip/index.scss +82 -0
  69. package/src/packages/tip/index.vue +57 -0
  70. package/src/packages/viewAttchList/index.js +132 -0
  71. package/src/packages/viewAttchList/index.scss +76 -0
  72. package/src/packages/viewAttchList/index.vue +112 -0
  73. package/src/style.css +80 -0
  74. package/ui-process-h5/README.md +171 -0
  75. package/ui-process-h5/package.json +27 -0
  76. package/ui-process-h5/scripts/postinstall.mjs +14 -0
  77. package/ui-process-h5/scripts/switch-cli.mjs +4 -0
  78. package/ui-process-h5/scripts/utils.mjs +60 -0
  79. package/ui-process-h5/v2/style.css +1 -0
  80. package/ui-process-h5/v2/ui-process-h5.js +13467 -0
  81. package/ui-process-h5/v2/ui-process-h5.umd.cjs +67 -0
  82. package/ui-process-h5/v2.7/style.css +1 -0
  83. package/ui-process-h5/v2.7/ui-process-h5.js +12844 -0
  84. package/ui-process-h5/v2.7/ui-process-h5.umd.cjs +67 -0
  85. package/ui-process-h5/v3/style.css +1 -0
  86. package/ui-process-h5/v3/ui-process-h5.js +10336 -0
  87. package/ui-process-h5/v3/ui-process-h5.umd.cjs +55 -0
  88. package/vite.config.ts +78 -0
  89. package/packages/components/process/index.js +0 -8
  90. package/packages/components/process/src/button.vue +0 -55
  91. package/packages/components/process/src/index.vue +0 -447
  92. package/packages/components/process/src/popup.vue +0 -128
  93. package/packages/components/process/src/tab.vue +0 -467
  94. package/packages/components/utils/request/api.ts +0 -11
  95. package/packages/components/utils/request/cache.d.ts +0 -52
  96. package/packages/components/utils/request/cache.js +0 -99
  97. package/packages/components/utils/request/request.ts +0 -62
  98. package/packages/index.js +0 -4
@@ -0,0 +1,679 @@
1
+ import TopTab from "../tab/index.vue";
2
+ import TopPopup from "../popup/index.vue";
3
+ import TopTips from "../tip/index.vue";
4
+ import TopSumbitPopup from "../submitPopup/index.vue";
5
+ import * as operation from "./operation";
6
+ import { defineComponent } from "vue-demi";
7
+ import "checked-pick-app/style.css";
8
+
9
+ export default defineComponent({
10
+ name: "TopProcess",
11
+ components: {
12
+ TopTab,
13
+ TopPopup,
14
+ TopTips,
15
+ TopSumbitPopup,
16
+ },
17
+ props: {
18
+ // tab控制
19
+ tapList: { require: false, default: () => [], type: Array },
20
+ // 自定义tab
21
+ selfTapList: { require: false, default: () => [], type: Array },
22
+ // 流程id
23
+ processDefId: { require: true, default: "", type: String },
24
+ processInstId: { require: true, default: "", type: String },
25
+ isAdditional: { require: false, default: false, type: Boolean },
26
+ isView: { default: false, type: Boolean },
27
+ // 当前账号 id
28
+ userId: { require: true, default: "", type: String },
29
+ // 表单信息
30
+ formData: { default: {}, type: Object },
31
+
32
+ // 弹窗开启前执行方法
33
+ getVarsStatus: { default: true, type: Boolean },
34
+ getVars: { default: null, type: Function },
35
+
36
+ // 请求
37
+ request: {
38
+ type: Function,
39
+ default: () => {
40
+ return { get: () => {}, post: () => {}, upload: () => {} };
41
+ },
42
+ },
43
+
44
+ // appid
45
+ appId: {
46
+ type: String,
47
+ default: "",
48
+ },
49
+
50
+ // 结束执行事件
51
+ endFunction: {
52
+ type: Function,
53
+ default: null,
54
+ },
55
+ },
56
+ data() {
57
+ return {
58
+ processStatus: {},
59
+ processDefList: {},
60
+ processBusiness: {},
61
+ getFirstProcessNode: {},
62
+ // 底部按钮
63
+ taskNode: [],
64
+ taskNodeList: [],
65
+ taskNodeIds: [],
66
+ taskState: NaN,
67
+ taskCurrent: 0,
68
+ taskObj: {},
69
+ taskId: "",
70
+ taskNodeShow: false,
71
+ //额外按钮
72
+ actionShow: false,
73
+ // 弹窗标题
74
+ titleText: "",
75
+ btnStyle: "",
76
+ processIntId: "",
77
+ // 流程图
78
+ trackUrl: "",
79
+ // 审批记录
80
+ taskCommentList: [],
81
+ // 节点dom
82
+ operationCom: null,
83
+ // 流程实例对象
84
+ ProcessInsObj: {},
85
+
86
+ // 确认弹窗文本
87
+ popupContext: "",
88
+ // 弹窗数据
89
+ operationParam: {},
90
+
91
+ nextTaskNode: {},
92
+
93
+ //附件信息
94
+ annexlabel: "",
95
+
96
+ // 小弹窗处理逻辑类型
97
+ handleTipsType: "",
98
+
99
+ /* tips 相关属性 */
100
+ // 文本
101
+ textTips: "",
102
+ // 是否为状态弹窗
103
+ statusTips: false,
104
+ // 状态类型
105
+ typeTips: "",
106
+
107
+ // 节点
108
+ outGatewayUserTaskModel: [],
109
+ nextNodeData: [],
110
+
111
+ // 测试送审节点
112
+ visibleSong: false,
113
+
114
+ trackList: [],
115
+ };
116
+ },
117
+ watch: {
118
+ processInstId: {
119
+ // 初始化获取流程相关信息
120
+ async handler(val, preVal) {
121
+ this.processIntId = this.processInstId;
122
+ if (val) {
123
+ // 流程图
124
+ this.request
125
+ .get("/aws/repository/getTrackUrl", {
126
+ params: {
127
+ processInstId: this.processIntId,
128
+ type: "mobile",
129
+ },
130
+ })
131
+ .then((res) => {
132
+ if (res.code == 200) {
133
+ this.trackUrl = res.data;
134
+ }
135
+ });
136
+
137
+ // 流程图信息
138
+ this.request
139
+ .get("/aws/pis/findNodeParticipantRows", {
140
+ params: {
141
+ processInstId: this.processIntId,
142
+ },
143
+ })
144
+ .then((res) => {
145
+ // console.log("流程信息", res);
146
+ if (res.code == 200) {
147
+ this.trackList = res.data;
148
+ }
149
+ });
150
+
151
+ // 流程信息
152
+ this.request
153
+ .get("/aws/tis/getTaskCommentList", {
154
+ params: {
155
+ processInstId: this.processInstId,
156
+ processBusinessKey: this.formData.businessKey,
157
+ },
158
+ })
159
+ .then((res) => {
160
+ if (res.code == 200) {
161
+ this.taskCommentList = res.data;
162
+ }
163
+ });
164
+
165
+ // id
166
+ this.request
167
+ .get("/aws/pis/getProcessInstanceById", {
168
+ params: { processInstId: this.processInstId },
169
+ })
170
+ .then((res) => {
171
+ if (res.code == 200) {
172
+ this.ProcessInsObj = res.data;
173
+ }
174
+ });
175
+
176
+ // task信息 任务节点
177
+ await this.request
178
+ .get("/aws/repository/queryTaskNodeList", {
179
+ params: { processInstId: this.processInstId },
180
+ })
181
+ .then((res) => {
182
+ if (res.code == 200) {
183
+ this.taskNode = res.data;
184
+ this.taskNodeList = res.data;
185
+ if (this.taskNodeList.length == 1) {
186
+ if (this.taskNodeList[0].taskState == 4) {
187
+ this.taskState = 4;
188
+ return false;
189
+ }
190
+ if (this.taskNodeList[0].taskState == 11) {
191
+ this.taskState = 11;
192
+ }
193
+ let tid = this.taskNodeList[0].taskId;
194
+
195
+ this.handleGetProcessStatus();
196
+ this.handleGetUserTaskModel();
197
+ } else if (this.taskNodeList.length > 1) {
198
+ this.taskNodeList.forEach((item) => {
199
+ item.name = item.nodeName;
200
+ });
201
+ this.taskNodeShow = true;
202
+ this.actionShow = true;
203
+ } else {
204
+ this.handleGetProcessStatus();
205
+ this.handleGetUserTaskModel();
206
+ }
207
+ }
208
+ });
209
+ }
210
+ },
211
+ immediate: true,
212
+ deep: true,
213
+ },
214
+ },
215
+ computed: {
216
+ //筛选
217
+ actionBtn() {
218
+ if (this.operBtn.length > 3) {
219
+ return this.operBtn.slice(3);
220
+ }
221
+ return [];
222
+ },
223
+ // 按钮对象
224
+ operBtn() {
225
+ let btnList = [];
226
+ let flag =
227
+ this.taskNode &&
228
+ this.taskNode[0] &&
229
+ this.taskNode[0].taskState != 4;
230
+
231
+ //处理
232
+ if (flag && !this.isView && this.taskObj.completeButtonLabel) {
233
+ let obj = {};
234
+ obj.name = this.taskObj.completeButtonLabel;
235
+ obj.btnProps = { type: "primary" };
236
+ btnList.push(obj);
237
+ obj.click = (name) => {
238
+ this.$refs.TopPopup1.handleOpen();
239
+ this.handleActionClose();
240
+ this.showOperation(
241
+ operation.complete,
242
+ name,
243
+ this.request,
244
+ this.taskObj.completeButtonAnnex
245
+ );
246
+ };
247
+ }
248
+
249
+ // 拒绝
250
+ if (flag && !this.isView && this.processStatus.currUserName) {
251
+ let obj = {};
252
+ obj.name = "拒绝";
253
+ obj.btnProps = { type: "danger" };
254
+ btnList.push(obj);
255
+ obj.click = (name) => {
256
+ this.$refs.TopPopup1.handleOpen();
257
+ this.handleActionClose();
258
+ this.showOperation(
259
+ operation.cancel,
260
+ name,
261
+ this.request,
262
+ this.taskObj.otherButtonAnnexList
263
+ );
264
+ };
265
+ }
266
+
267
+ // 退回
268
+ if (
269
+ flag &&
270
+ !this.isView &&
271
+ this.taskObj.buttons &&
272
+ this.taskObj.buttons.length
273
+ ) {
274
+ this.taskObj.buttons.forEach((s) => {
275
+ if (s.label === "退回") {
276
+ let obj = {};
277
+ obj.name = s.label;
278
+ obj.btnProps = { type: "danger" };
279
+ btnList.push(obj);
280
+ obj.click = (name) => {
281
+ this.$refs.TopPopup1.handleOpen();
282
+ this.handleActionClose();
283
+ this.showOperation(
284
+ operation.backNode,
285
+ name,
286
+ this.request,
287
+ this.taskObj.otherButtonAnnexList
288
+ );
289
+ };
290
+ }
291
+ });
292
+ }
293
+
294
+ // 抄送
295
+ if (flag && !this.isView && this.taskObj.ccTaskButtonLabel) {
296
+ let obj = {};
297
+ obj.name = this.taskObj.ccTaskButtonLabel;
298
+ obj.btnProps = { type: "default" };
299
+ obj.click = (name) => {
300
+ this.$refs.TopPopup1.handleOpen();
301
+ this.handleActionClose();
302
+ this.showOperation(
303
+ operation.ccTask,
304
+ name,
305
+ this.request,
306
+ this.taskObj.ccTaskButtonAnnex
307
+ );
308
+ };
309
+ btnList.push(obj);
310
+ }
311
+
312
+ // 转审
313
+ if (flag && !this.isView && this.taskObj.delegateTaskButtonLabel) {
314
+ let obj = {};
315
+ obj.name = this.taskObj.delegateTaskButtonLabel;
316
+ obj.btnProps = { type: "default" };
317
+ obj.click = (name) => {
318
+ this.$refs.TopPopup1.handleOpen();
319
+ this.handleActionClose();
320
+ this.showOperation(
321
+ operation.delegateTask,
322
+ name,
323
+ this.request,
324
+ this.taskObj.delegateTaskButtonAnnex
325
+ );
326
+ };
327
+ btnList.push(obj);
328
+ }
329
+
330
+ // 加签
331
+ if (flag && !this.isView && this.taskObj.counterSignLabel) {
332
+ let obj = {};
333
+ obj.name = this.taskObj.counterSignLabel;
334
+ obj.btnProps = { type: "primary" };
335
+ obj.click = (name) => {
336
+ this.$refs.TopPopup1.handleOpen();
337
+ this.handleActionClose();
338
+ this.showOperation(
339
+ operation.counterSign,
340
+ name,
341
+ this.request,
342
+ this.taskObj.counterSignButtonAnnex
343
+ );
344
+ };
345
+ btnList.push(obj);
346
+ }
347
+
348
+ // 催办
349
+ if (
350
+ this.processIntId &&
351
+ this.processStatus.createTopUserId == this.userId &&
352
+ this.taskNode[0]?.taskState != 2 &&
353
+ this.processStatus.status !== "已驳回" &&
354
+ this.processStatus.status !== "已撤销"
355
+ ) {
356
+ let obj = {};
357
+ obj.name = "催办";
358
+ obj.btnProps = { type: "default" };
359
+ obj.click = (name) => {
360
+ this.$refs.TopPopup2.handleOpen();
361
+ this.handleActionClose();
362
+ this.titleText = name;
363
+ this.popupContext = `确定${name}吗?`;
364
+ this.handleTipsType = "催办";
365
+ };
366
+ btnList.push(obj);
367
+ }
368
+
369
+ // 撤销
370
+ if (
371
+ this.processIntId &&
372
+ this.processStatus.createTopUserId == this.userId &&
373
+ this.taskNode[0]?.taskState != 2 &&
374
+ this.processStatus.status !== "已驳回" &&
375
+ this.processStatus.status !== "已撤销"
376
+ ) {
377
+ let obj = {};
378
+ obj.name = "撤销";
379
+ obj.btnProps = { type: "default" };
380
+ obj.click = (name) => {
381
+ this.$refs.TopPopup2.handleOpen();
382
+ this.handleActionClose();
383
+ this.titleText = name;
384
+ this.popupContext = `确定${name}吗?`;
385
+ this.handleTipsType = "撤销";
386
+ };
387
+ btnList.push(obj);
388
+ }
389
+ return btnList;
390
+ },
391
+ // 底部高度
392
+ processCardHeight() {
393
+ let num = 210;
394
+ // || !this.operBtn || this.operBtn?.length == 0
395
+ /* if (this.ProcessInsObj.end) {
396
+ num -= 80;
397
+ } */
398
+ if (!this.processStatus.status) num -= 140;
399
+ else if (!this.processStatus.currUserName) num -= 40;
400
+ return `calc(100vh - ${num}px)`;
401
+ },
402
+ },
403
+ methods: {
404
+ // 测试
405
+ handleTest() {
406
+ // this.visibleSong = true
407
+ },
408
+ // 流程查询
409
+ async handleGetSimulation(vars) {
410
+ this.handleTips("", true, "loading");
411
+ let params = {
412
+ processInstId: this.processInstId,
413
+ taskInstId: this.taskNode.length ? this.taskNode[0].taskId : "",
414
+ vars: vars,
415
+ };
416
+
417
+ let simulationData = await this.request.post(
418
+ `/aws/tis/simulation`,
419
+ params
420
+ );
421
+
422
+ if (simulationData.success) {
423
+ this.handleTips("", false, "success");
424
+ this.nextNodeData = simulationData.data;
425
+ } else {
426
+ await this.request
427
+ .get("/aws/repository/getOutgoingProcessNode", {
428
+ params: {
429
+ taskId: this.taskNode.length
430
+ ? this.taskNode[0].taskId
431
+ : "",
432
+ processNodeId: "",
433
+ },
434
+ })
435
+ .then((res) => {
436
+ this.handleTips("", false, "success");
437
+ console.log("outGatewayUserTaskModel", res);
438
+ this.outGatewayUserTaskModel = res.data;
439
+ });
440
+ }
441
+ },
442
+
443
+ // 集合
444
+ handleGet(task) {
445
+ this.taskNode = [].concat(task);
446
+ this.taskNodeShow = false;
447
+ this.actionShow = false;
448
+ this.handleGetProcessStatus();
449
+ this.handleGetUserTaskModel();
450
+ },
451
+ // 流程状态
452
+ handleGetProcessStatus() {
453
+ this.request
454
+ .get("/aws/pis/getProcessStatus", {
455
+ params: {
456
+ processInstId: this.processInstId,
457
+ taskId: this.taskNode.length
458
+ ? this.taskNode[0].taskId
459
+ : "",
460
+ },
461
+ })
462
+ .then((res) => {
463
+ if (res.code == 200) {
464
+ this.processStatus = res.data;
465
+ }
466
+ });
467
+ },
468
+ // 按钮操作信息
469
+ handleGetUserTaskModel() {
470
+ if (this.taskNode && this.taskNode.length) {
471
+ this.request
472
+ .get(`/aws/repository/getUserTaskModel`, {
473
+ params: {
474
+ taskId: this.taskNode[0].taskId,
475
+ },
476
+ })
477
+ .then((res) => {
478
+ if (res.code == 200) {
479
+ this.taskObj = res.data;
480
+ }
481
+ });
482
+ }
483
+ },
484
+
485
+ // 弹窗内部渲染
486
+ async showOperation(com, label, request, annex) {
487
+ if (
488
+ this.processStatus.allUserNames &&
489
+ this.processStatus.allUserNames.length == 1
490
+ ) {
491
+ if (this.taskNode[0] && this.taskNode[0].nodeId) {
492
+ let vars;
493
+ if (this.getVars) {
494
+ vars = this.getVars();
495
+ }
496
+
497
+ await this.handleGetSimulation(vars);
498
+ }
499
+ }
500
+
501
+ if (request) {
502
+ this.operationParam.request = request;
503
+ }
504
+ if (request) this.annexlabel = annex;
505
+ this.titleText = label;
506
+ this.operationCom = com;
507
+
508
+ this.operationParam.annex = annex;
509
+ this.operationParam.subjectId = this.formData.subjectId;
510
+ this.operationParam.processInstId = this.processIntId;
511
+ this.operationParam.taskInstId = this.taskNode[0].taskId;
512
+ this.operationParam.actionName = label;
513
+ this.operationParam.formData = this.formData;
514
+
515
+ // 下次节点数据
516
+ this.operationParam.nextNodeData = this.nextNodeData;
517
+ this.operationParam.outGatewayUserTaskModel = this.outGatewayUserTaskModel;
518
+
519
+ this.operationParam.taskNode = this.taskNode;
520
+
521
+ this.operationParam.appId = this.processStatus.appId;
522
+
523
+ // 弹窗确认结束事件
524
+ this.operationParam.endFunction = this.endFunction;
525
+ },
526
+ // 弹窗取消
527
+ handleCancel() {
528
+ console.log("handleCancel");
529
+ },
530
+ // 弹窗确认
531
+ async handleComfig() {
532
+ this.$refs.operationRef.confirm();
533
+ },
534
+ // 关闭弹窗TopPopup1
535
+ handleClosePopup1() {
536
+ this.$refs.TopPopup1.handleClose();
537
+ },
538
+ // 确认弹窗(催办,撤销)
539
+ handleTipsComfig() {
540
+ this.$refs.TopPopup2.handleCancel();
541
+ if (this.handleTipsType == "催办") {
542
+ this.handleTips("", true, "loading");
543
+ this.request
544
+ .get("/aws/tis/reminders", {
545
+ params: { processInstId: this.processIntId },
546
+ })
547
+ .then((res) => {
548
+ if (res.code == 200) {
549
+ this.handleTips("催办成功", true, "success");
550
+ } else {
551
+ this.handleTips(res.msg, true, "error");
552
+ }
553
+ });
554
+ }
555
+ if (this.handleTipsType == "撤销") {
556
+ this.handleTips("", true, "loading");
557
+ this.request
558
+ .post("/aws/pis/revoke", {
559
+ processInstId: this.ProcessInsObj.id,
560
+ processBusinessKey: this.ProcessInsObj
561
+ .processBusinessKey,
562
+ })
563
+ .then((res) => {
564
+ if (res.code == 200) {
565
+ this.handleTips("撤销成功", true, "success");
566
+ } else {
567
+ this.textTips = res.msg;
568
+ this.typeTips = "error";
569
+ this.handleTips(res.msg, true, "error");
570
+ }
571
+ });
572
+ }
573
+ },
574
+ handleTipsCancel() {
575
+ console.log("handleTipsCancel");
576
+ },
577
+
578
+ // 当前流程进度状态回显
579
+ getColor(status) {
580
+ if (status == "审核中") return "#FFA52D";
581
+ if (status == "已驳回") return "#F14B4C";
582
+ if (status == "已撤销") return "#CECECE";
583
+ if (status == "已完成") return "#6DC743";
584
+
585
+ return "#1389FF";
586
+ },
587
+ // 额外按钮tips
588
+ handleActionOpen() {
589
+ this.actionShow = true;
590
+ },
591
+ // 关闭额外按钮弹窗
592
+ handleActionClose() {
593
+ this.actionShow = false;
594
+ },
595
+ // 按钮执行方法
596
+ actionClick(name) {
597
+ this.$refs.TopPopup1.handleOpen();
598
+ this.titleText = name;
599
+ this.actionShow = false;
600
+ },
601
+ // 按钮状态回显
602
+ getBtnStyle(type) {
603
+ switch (type) {
604
+ case "primary":
605
+ return `background-color:#3c9cff;color:#fff`;
606
+
607
+ case "danger":
608
+ return `background-color:rgb(255, 230, 230);color:rgb(255, 96, 96)`;
609
+
610
+ case "default":
611
+ return `background-color:rgb(241, 241, 241);color:rgb(51, 51, 51)`;
612
+ default:
613
+ return `background-color:rgb(241, 241, 241);color:rgb(51, 51, 51)`;
614
+ }
615
+ },
616
+ // 复活流程
617
+ async handleRestart() {
618
+ this.handleTips("", true, "loading");
619
+ await this.request
620
+ .get("/aws/repository/getProcessDefList", {
621
+ params: {
622
+ appId: this.processStatus.appId,
623
+ },
624
+ })
625
+ .then((res) => {
626
+ this.processDefList = res.data;
627
+ this.request
628
+ .get("/aws/pis/getProcessInstanceByBusinessKey", {
629
+ params: {
630
+ businessKey: this.formData.businessKey,
631
+ },
632
+ })
633
+ .then((res) => {
634
+ this.processBusiness = res.data;
635
+ this.request
636
+ .get("/aws/repository/getFirstProcessNode", {
637
+ params: {
638
+ processDefId: this.processBusiness
639
+ .processDefId,
640
+ },
641
+ })
642
+ .then((res) => {
643
+ console.log(
644
+ "getProcessInstanceByBusinessKey:::",
645
+ res
646
+ );
647
+ this.getFirstProcessNode = res.data[0];
648
+ this.operationParam.getFirstProcessNode = this.getFirstProcessNode;
649
+ this.operationParam.formData = this.formData;
650
+ this.handleTips("", false, "success");
651
+ this.$refs.TopPopup1.handleOpen();
652
+ this.handleActionClose();
653
+ this.showOperation(
654
+ operation.restart,
655
+ "重新提交",
656
+ this.request
657
+ );
658
+ })
659
+ .catch((err) => {
660
+ this.handleTips("请求出错", true, "error");
661
+ });
662
+ })
663
+ .catch((err) => {
664
+ this.handleTips("请求出错", true, "error");
665
+ });
666
+ })
667
+ .catch((err) => {
668
+ this.handleTips("请求出错", true, "error");
669
+ });
670
+ },
671
+ // tips公用方法(tips)
672
+ handleTips(text, status, type) {
673
+ this.textTips = text;
674
+ this.statusTips = status;
675
+ this.typeTips = type;
676
+ this.$refs.topTips.handleOpen();
677
+ },
678
+ },
679
+ });