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,644 @@
1
+ import { defineComponent } from "vue-demi";
2
+ import TopPopup from "../popup/index.vue";
3
+ import TopDownSelect from "../downSelect/index.vue";
4
+ import PreviewImage from "../previewImage/index.vue";
5
+ import { departPerson } from "checked-pick-app";
6
+ import TopTips from "../tip/index.vue";
7
+
8
+ export default defineComponent({
9
+ name: "TopSubmitPopup",
10
+ components: {
11
+ TopPopup,
12
+ TopDownSelect,
13
+ PreviewImage,
14
+ departPerson,
15
+ TopTips,
16
+ },
17
+ props: {
18
+ visible: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ // 请求
23
+ request: {
24
+ type: [Function, Object],
25
+ default: () => {
26
+ return { get: () => {}, post: () => {}, upload: () => {} };
27
+ },
28
+ },
29
+ // appid
30
+ appId: {
31
+ type: String,
32
+ default: "",
33
+ },
34
+ // 区分
35
+ processName: {
36
+ type: String,
37
+ default: "",
38
+ },
39
+ // 是否为重新提交
40
+ resubmit: {
41
+ type: Boolean,
42
+ default: false,
43
+ },
44
+ // 业务id
45
+ id: {
46
+ type: String,
47
+ default: "",
48
+ },
49
+ // 业务
50
+ businessType: {
51
+ type: [String, Number],
52
+ },
53
+ // todoParameter
54
+ todoParameter: {
55
+ type: Object,
56
+ default() {
57
+ return {};
58
+ },
59
+ },
60
+ // 是否清除送审记录
61
+ isClearHistory: {
62
+ type: Boolean,
63
+ default: false,
64
+ },
65
+ // title
66
+ title: {
67
+ type: String,
68
+ default: "测试",
69
+ },
70
+ // 送审
71
+ showType: {
72
+ type: String,
73
+ default: "all",
74
+ },
75
+ beforeFunction: {
76
+ type: Function,
77
+ default: null,
78
+ },
79
+ manual: {
80
+ type: Boolean,
81
+ default: false,
82
+ },
83
+ // 自定义参数列表
84
+ selfList: {
85
+ type: Array,
86
+ default: () => [],
87
+ },
88
+ //
89
+ },
90
+ data() {
91
+ return {
92
+ show: false,
93
+ option: [],
94
+ checkedItem: {},
95
+ personList: [],
96
+ trackUrl: [],
97
+ taskurlshow: false,
98
+ isStyle: "width:35%",
99
+ visiblePerson: false,
100
+ entity: {
101
+ source: "0",
102
+ type: "0",
103
+ request: this.request, //'http://59.53.91.231:2100' 0002
104
+ /* businessId: this.param.businessKey, */
105
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
106
+ multiple: false, // 是否多选
107
+ checkedArray: [],
108
+ },
109
+
110
+ multiNodeParticipant: {},
111
+ personListCopy: {},
112
+ partNode: {},
113
+ personObjId: "",
114
+
115
+ // 流程id
116
+ processId: "",
117
+
118
+ // 提示弹窗
119
+ textTips: "",
120
+ statusTips: false,
121
+ typeTips: "success",
122
+ firstPerson: [],
123
+ selectDefaultValue: "",
124
+
125
+ // 监听复制
126
+ businessTypeData: "",
127
+ idData: "",
128
+ processNameData: "",
129
+ titleData: "",
130
+ todoParameterData: {},
131
+
132
+ humanPerformerName: "",
133
+ btnLoading: false,
134
+ };
135
+ },
136
+ watch: {
137
+ visible: {
138
+ async handler(val, preVal) {
139
+ this.show = val;
140
+ this.$emit("update:visible", this.show);
141
+ if (val) {
142
+ this.handleOption();
143
+ }
144
+ },
145
+ },
146
+ // 业务类型
147
+ businessType: {
148
+ handler(val, preVal) {
149
+ this.businessTypeData = val;
150
+ },
151
+ immediate: true,
152
+ },
153
+ // 业务id
154
+ id: {
155
+ handler(val, preVal) {
156
+ this.idData = val;
157
+ },
158
+ immediate: true,
159
+ },
160
+ // 业务查询
161
+ processName: {
162
+ handler(val, preVal) {
163
+ this.processNameData = val;
164
+ },
165
+ immediate: true,
166
+ },
167
+ // 标题
168
+ title: {
169
+ handler(val, preVal) {
170
+ this.titleData = val;
171
+ },
172
+ immediate: true,
173
+ },
174
+ //
175
+ todoParameter: {
176
+ handler(val, preVal) {
177
+ this.todoParameterData = val;
178
+ },
179
+ immediate: true,
180
+ deep: true,
181
+ },
182
+ // 自定义流程选择
183
+ selfList: {
184
+ handler(val, preVal) {
185
+ if (val && val.length) {
186
+ this.option = val;
187
+ this.checkedItem = this.option[0];
188
+ this.selectDefaultValue = this.checkedItem.id;
189
+ this.$emit("change", this.checkedItem, this.option);
190
+ }
191
+ },
192
+ immediate: true,
193
+ deep: true,
194
+ },
195
+ resubmit: {
196
+ handler(val, preVal) {
197
+ if (val) {
198
+ this.getProcessInstance();
199
+ }
200
+ },
201
+ },
202
+ },
203
+
204
+ methods: {
205
+ async handleOption() {
206
+ // 流程列表 getProcessInstanceByBusinessKey
207
+ this.checkedItem = {};
208
+ this.firstPerson = [];
209
+ this.personList = [];
210
+
211
+ if (this.selfList && this.selfList.length) {
212
+ return;
213
+ }
214
+
215
+ this.handleTips("", true, "loading");
216
+ await this.request
217
+ .get("/aws/repository/getProcessDefList", {
218
+ params: {
219
+ appId: this.appId,
220
+ processGroupName: this.processNameData,
221
+ },
222
+ })
223
+ .then((res) => {
224
+ if (res.code == 200) {
225
+ this.option = res.data;
226
+ if (res.data && res.data.length) {
227
+ this.handleTips("", true, "success");
228
+ this.checkedItem = this.option[0];
229
+ this.selectDefaultValue = this.checkedItem.id;
230
+ this.$emit("change", this.checkedItem, this.option);
231
+ this.handlefirstNode(this.checkedItem.id);
232
+ this.getProcessInstance();
233
+ this.getDiagramUrl();
234
+ } else {
235
+ this.handleTips("暂无流程节点信息", true, "error");
236
+ this.option = [];
237
+ }
238
+ }
239
+ });
240
+ },
241
+
242
+ async getProcessInstance() {
243
+ if (this.id) {
244
+ await this.request
245
+ .get("/aws/pis/getProcessInstanceByBusinessKey", {
246
+ params: { businessKey: this.id },
247
+ })
248
+ .then((res) => {
249
+ if (res.code == 200) {
250
+ this.processId = res.data.id;
251
+ if (this.processId) {
252
+ this.option.map((v, i) => {
253
+ // console.log("sc:::", v , res.data);
254
+ if (v.id === res.data.processDefId) {
255
+ this.checkedItem = v;
256
+ this.selectDefaultValue = this.checkedItem.id;
257
+ this.$emit(
258
+ "change",
259
+ this.checkedItem,
260
+ this.option
261
+ );
262
+ this.handlefirstNode(
263
+ this.checkedItem.id
264
+ );
265
+ this.getDiagramUrl();
266
+ }
267
+ });
268
+ }
269
+ }
270
+ });
271
+ }
272
+ },
273
+ async handlefirstNode(data) {
274
+ // 第一个流程节点
275
+ if (data) {
276
+ await this.request
277
+ .get("/aws/repository/getFirstProcessNode", {
278
+ params: {
279
+ processDefId: data,
280
+ },
281
+ })
282
+ .then((res) => {
283
+ // console.log("getFirstProcessNode", res);
284
+ if (res.code === 200) {
285
+ this.firstPerson = res.data;
286
+ this.getAfferentParticipantNodeList();
287
+ } else {
288
+ this.firstPerson = [];
289
+ this.getAfferentParticipantNodeList();
290
+ }
291
+ })
292
+ .catch((error) => {
293
+ this.firstPerson = [];
294
+ this.getAfferentParticipantNodeList();
295
+ });
296
+ }
297
+ },
298
+ async handleChange(item, items) {
299
+ this.handleTips("", true, "loading");
300
+ console.log("当前选择::::", item, items);
301
+ this.checkedItem = item;
302
+ this.handlefirstNode(this.checkedItem.id);
303
+ this.getDiagramUrl();
304
+ this.$emit("change", item, items);
305
+ this.$refs.topTips.handleClose();
306
+ },
307
+ // 获取当前流程下所有节点
308
+ async getAfferentParticipantNodeList() {
309
+ await this.request
310
+ .get("/aws/repository/getAfferentParticipantNodeList", {
311
+ params: {
312
+ processDefId: this.checkedItem.id,
313
+ },
314
+ })
315
+ .then((res) => {
316
+ if (res.code == 200) {
317
+ if (this.firstPerson && this.firstPerson.length) {
318
+ console.log(
319
+ "选中节点L::",
320
+ this.personList,
321
+ this.firstPerson
322
+ );
323
+ this.personList = res.data.filter(
324
+ (item) =>
325
+ !this.firstPerson.some(
326
+ (item2) => item2.id == item.id
327
+ )
328
+ );
329
+ }
330
+ this.$emit("change", this.checkedItem, this.option);
331
+ }
332
+ this.$refs.topTips.handleClose();
333
+ });
334
+ },
335
+ // 获取流程图
336
+ getDiagramUrl() {
337
+ this.request
338
+ .get("/aws/repository/getDiagramUrl", {
339
+ params: {
340
+ processDefId: this.checkedItem.id,
341
+ diagramType: 1,
342
+ type: "pc",
343
+ },
344
+ })
345
+ .then((res) => {
346
+ if (res.code == 200) {
347
+ this.trackUrl = [res.data];
348
+ }
349
+ });
350
+ },
351
+ // 呼出选人
352
+ handleOpenPerson(item) {
353
+ // console.log("选人弹窗", item);
354
+ this.visiblePerson = true;
355
+ this.personObjId = item.id;
356
+ this.humanPerformerName = item.humanPerformerName;
357
+ if (item.humanPerformerName === "任意指定") {
358
+ this.entity = {
359
+ source: "1",
360
+ type: "0",
361
+ request: this.request,
362
+ codeType: [3],
363
+ multiple:
364
+ item.type == "InclusiveGatewayModel" ||
365
+ item.loopCardinality > 1,
366
+ maxMultiple: item.loopCardinality
367
+ ? item.loopCardinality
368
+ : item.loopCardinality,
369
+ checkedArray: [],
370
+ };
371
+ console.log(this.multiNodeParticipant[item.id]);
372
+ if (
373
+ !(
374
+ this.multiNodeParticipant[item.id] &&
375
+ this.multiNodeParticipant[item.id].length
376
+ )
377
+ ) {
378
+ this.entity.checkedArray = [];
379
+ } else {
380
+ this.entity.checkedArray = this.personListCopy[item.id].map(
381
+ (e) => ({
382
+ uid: e.uid,
383
+ type: e.type,
384
+ deptId: this.handleLastStr(
385
+ e.ancestors,
386
+ e.subjectId
387
+ ),
388
+ })
389
+ );
390
+ }
391
+ } else if (item.humanPerformerName === "固定部门") {
392
+ let deptCode;
393
+ item.routeTxt.departmentIds.map((v, i) => {
394
+ deptCode = v.rangeId;
395
+ });
396
+
397
+ this.entity = {
398
+ source: "1",
399
+ type: "0",
400
+ request: this.request,
401
+ codeType: [3],
402
+ deptCode: deptCode,
403
+ multiple:
404
+ item.type == "InclusiveGatewayModel" ||
405
+ item.loopCardinality > 1,
406
+ maxMultiple: item.loopCardinality
407
+ ? item.loopCardinality
408
+ : item.loopCardinality,
409
+ };
410
+
411
+ if (
412
+ !(
413
+ this.multiNodeParticipant[item.id] &&
414
+ this.multiNodeParticipant[item.id].length
415
+ )
416
+ ) {
417
+ this.entity.checkedArray = [];
418
+ } else {
419
+ this.entity.checkedArray = this.personListCopy[item.id].map(
420
+ (e) => ({
421
+ uid: e.uid,
422
+ type: e.type,
423
+ deptId: deptCode,
424
+ })
425
+ );
426
+ }
427
+ } else if (item.humanPerformerName === "固定单位") {
428
+ let subjectName;
429
+
430
+ item.routeTxt.companyIds.map((v, i) => {
431
+ subjectName = v.name;
432
+ });
433
+
434
+ this.entity = {
435
+ source: "1",
436
+ type: "0",
437
+ request: this.request,
438
+ codeType: [3],
439
+ multiple:
440
+ item.type == "InclusiveGatewayModel" ||
441
+ item.loopCardinality > 1,
442
+ maxMultiple: item.loopCardinality
443
+ ? item.loopCardinality
444
+ : item.loopCardinality,
445
+ subjectName: subjectName,
446
+ };
447
+
448
+ if (
449
+ !(
450
+ this.multiNodeParticipant[item.id] &&
451
+ this.multiNodeParticipant[item.id].length
452
+ )
453
+ ) {
454
+ this.entity.checkedArray = [];
455
+ } else {
456
+ this.entity.checkedArray = this.personListCopy[item.id].map(
457
+ (e) => ({
458
+ uid: e.uid,
459
+ type: e.type,
460
+ deptId: this.handleLastStr(
461
+ e.ancestors,
462
+ e.subjectId
463
+ ),
464
+ subjectName: e.ancestorNames.slice(
465
+ 0,
466
+ e.ancestorNames.indexOf("/")
467
+ ),
468
+ })
469
+ );
470
+ }
471
+ }
472
+ },
473
+ handleCallback(res) {
474
+ console.log("参数::::", res);
475
+ this.personListCopy[this.personObjId] = res;
476
+ this.entity.checkedArray = res.map((e) => ({
477
+ uid: e.uid,
478
+ type: e.type,
479
+ deptId: this.handleLastStr(e.ancestors, e.subjectId),
480
+ subjectName:
481
+ this.humanPerformerName === "固定单位"
482
+ ? e.ancestorNames.slice(0, e.ancestorNames.indexOf("/"))
483
+ : "",
484
+ }));
485
+
486
+ this.multiNodeParticipant[this.personObjId] = [];
487
+ this.partNode[this.personObjId] = [];
488
+ res.map((v, i) => {
489
+ this.multiNodeParticipant[this.personObjId].push(v.uid);
490
+ this.partNode[this.personObjId].push(v.name);
491
+ });
492
+ this.visiblePerson = false;
493
+ // console.log("callback_OK", res, this.multiNodeParticipant);
494
+ },
495
+ handleCancel() {
496
+ // console.log("cancel_No");
497
+ },
498
+ handleLastStr(str, subjectId) {
499
+ return str.split(",")[str.split(",").length - 1] !== subjectId
500
+ ? str.split(",")[str.split(",").length - 1]
501
+ : "";
502
+ },
503
+ async handleSumbit() {
504
+ if (this.btnLoading) {
505
+ return;
506
+ }
507
+
508
+ this.btnLoading = true;
509
+ // 验证
510
+ if (
511
+ this.firstPerson &&
512
+ this.firstPerson.length &&
513
+ !this.firstPerson[0].routeTxt.userNames &&
514
+ this.firstPerson[0].humanPerformerName !== "固定账户" &&
515
+ this.firstPerson[0].humanPerformerName !== "与流程申请人相关" &&
516
+ (!this.multiNodeParticipant[this.firstPerson[0].id] ||
517
+ !this.multiNodeParticipant[this.firstPerson[0].id].length)
518
+ ) {
519
+ this.handleTips(
520
+ `${this.firstPerson[0].name}节点未选择审批人`,
521
+ true,
522
+ "error"
523
+ );
524
+ this.btnLoading = false;
525
+ return;
526
+ }
527
+
528
+ // 送审前执行事件
529
+ if (this.beforeFunction) {
530
+ await this.beforeFunction();
531
+ if (this.manual) {
532
+ this.btnLoading = false;
533
+ }
534
+ }
535
+ if (!this.manual) {
536
+ this.$nextTick(async () => {
537
+ await this.handleSongshen();
538
+ });
539
+ }
540
+ },
541
+ handleSongshen() {
542
+ // 送审
543
+ this.btnLoading = true;
544
+ if (this.resubmit) {
545
+ // console.log("送审重新提交", this.multiNodeParticipant);
546
+ this.handleTips("", true, "loading");
547
+ this.request
548
+ .post("/aws/pis/reactivate", {
549
+ processInstId: this.processId,
550
+ isClearHistory: this.isClearHistory,
551
+ reactivateReason: "重新提交",
552
+ multiNodeParticipant: this.multiNodeParticipant,
553
+ })
554
+ .then((res) => {
555
+ if (res.code == 200) {
556
+ this.show = false;
557
+ this.$emit("update:visible", this.show);
558
+ this.handleTips("提交成功!", false, "success");
559
+ this.$emit("successFn");
560
+ this.btnLoading = false;
561
+ } else {
562
+ this.handleTips(res.msg, true, "error");
563
+ this.btnLoading = false;
564
+ }
565
+ })
566
+ .catch((error) => {
567
+ this.handleTips(error.msg, true, "error");
568
+ this.btnLoading = false;
569
+ });
570
+ } else {
571
+ this.handleTips("", true, "loading");
572
+ let params = {
573
+ title: this.titleData,
574
+ processDefId: this.checkedItem.id,
575
+ processBusinessKey: this.idData,
576
+ showType: this.showType,
577
+ businessType: this.businessTypeData,
578
+ multiNodeParticipant: this.multiNodeParticipant,
579
+ todoParameter: this.todoParameterData,
580
+ };
581
+ if (!this.checkedItem.id) {
582
+ this.$refs.topTips.handleClose();
583
+ this.btnLoading = false;
584
+ return;
585
+ }
586
+ this.request
587
+ .post("/aws/pis/createAndStart", params)
588
+ .then((res) => {
589
+ if (res.code === 200) {
590
+ this.show = false;
591
+ this.$emit("update:visible", this.show);
592
+ this.handleTips("提交成功!", false, "success");
593
+ this.$emit("successFn");
594
+ this.btnLoading = false;
595
+ } else if (res.code == 499) {
596
+ this.request
597
+ .post("/aws/pis/reactivate", {
598
+ processInstId: this.processId,
599
+ isClearHistory: this.isClearHistory,
600
+ reactivateReason: "重新提交",
601
+ multiNodeParticipant: this
602
+ .multiNodeParticipant,
603
+ })
604
+ .then((res) => {
605
+ if (res.code == 200) {
606
+ this.show = false;
607
+ this.$emit("update:visible", this.show);
608
+ this.handleTips(
609
+ "提交成功!",
610
+ false,
611
+ "success"
612
+ );
613
+ this.$emit("successFn");
614
+ this.btnLoading = false;
615
+ } else {
616
+ this.handleTips(res.msg, true, "error");
617
+ this.btnLoading = false;
618
+ }
619
+ })
620
+ .catch((error) => {
621
+ this.handleTips(error.msg, true, "error");
622
+ this.btnLoading = false;
623
+ });
624
+ } else {
625
+ this.handleTips(res.msg, true, "error");
626
+ this.btnLoading = false;
627
+ }
628
+ })
629
+ .catch((error) => {
630
+ this.handleTips(error.msg, true, "error");
631
+ this.btnLoading = false;
632
+ });
633
+ }
634
+ },
635
+ handleTips(text, status, type) {
636
+ this.textTips = text;
637
+ this.statusTips = status;
638
+ this.typeTips = type;
639
+ if (this.$refs.topTips) {
640
+ this.$refs.topTips.handleOpen();
641
+ }
642
+ },
643
+ },
644
+ });