@lambo-design-mobile/workflow-approve 1.0.0-beta.1 → 1.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <div>
3
- <van-tabs ref="tabs" style="padding-bottom: 60px" v-model="active" @click="onTabClick" animated>
3
+ <van-tabs ref="tabs" style="padding-bottom: 60px" v-model="active"
4
+ @click="onTabClick"
5
+ sticky :offset-top="offsetTop"
6
+ animated>
4
7
  <slot name="business-content"/>
5
8
  <van-tab title="流程信息">
6
9
  <div style="padding: 0 10px">
@@ -15,6 +18,8 @@
15
18
  v-model="approvalForm.auditOpinion"
16
19
  rows="3"
17
20
  autosize
21
+ @focus="handleInputFocus"
22
+ :error="approvalError"
18
23
  required
19
24
  label="审批意见"
20
25
  type="textarea"
@@ -24,16 +29,14 @@
24
29
  />
25
30
  <div v-if="approvalForm.nextNode!==''">
26
31
  <van-cell title="下一环节" :value="approvalForm.nextNode"/>
27
- <van-cell @click="nextNodePopupShow = true" title="办理人员" value-class="approvalForm-value"
28
- :value="approvalForm.handlingPersonnel">
29
- <template #right-icon>
30
- <van-icon name="friends-o" size="16" style="line-height: inherit;padding-left: 5px"/>
31
- </template>
32
- </van-cell>
33
- <div class="van-hairline--bottom"></div>
34
- </div>
35
- <div v-else>
36
- <van-cell title="下一环节" value="无下一环节"/>
32
+ <div v-if="handleButtons.includes('appointHandler')">
33
+ <van-cell @click="nextNodePopupShow = true" title="办理人员" value-class="approvalForm-value"
34
+ :value="approvalForm.handlingPersonnel">
35
+ <template #right-icon>
36
+ <van-icon name="friends-o" size="16" style="line-height: inherit;padding-left: 5px"/>
37
+ </template>
38
+ </van-cell>
39
+ </div>
37
40
  <div class="van-hairline--bottom"></div>
38
41
  </div>
39
42
  <div v-if="handleButtons.includes('attachmentFile')">
@@ -59,43 +62,10 @@
59
62
  <van-collapse-item v-for="(items,index) in processHistory" :key="index" :title="items[0].taskName"
60
63
  :name="index">
61
64
  <div v-for="(item,index) in items" :key="index" class="record-item">
62
- <van-cell center>
63
- <template #icon>
64
- <div
65
- v-if="['通过', '跳转指定节点'].includes(getAuditStatus(item.auditResult).text)"
66
- class="completed-icon">
67
- <van-icon class="iconfont" class-prefix='icon' :name=getAuditStatus(item.auditResult).icon
68
- size="30px" color="#fff"/>
69
- </div>
70
- <div v-else class="pending-icon">
71
- <van-icon class="iconfont" class-prefix='icon' :name=getAuditStatus(item.auditResult).icon
72
- size="30px" color="#fff"/>
73
- </div>
74
- </template>
75
- <template #title>
76
- <div :style="{ color: getAuditStatus(item.auditResult).color }"
77
- style="font-size: 16px;font-weight: bold;padding:5px 0;">
78
- {{ item.auditName[0] }}
79
- </div>
80
- <div>{{ item.auditOrganName[0] }}
81
- <span v-if="item.auditComment" @click="showAuditDetail(item.auditComment)">
82
- | 审批意见 <van-icon name="comment-circle-o"/>
83
- </span>
84
- </div>
85
- </template>
86
- <template #label>
87
- <div>{{ item.startDate }}{{ item.auditDate }}</div>
88
- </template>
89
- <template #default>
90
- <span :style="{ color: getAuditStatus(item.auditResult).color }">{{
91
- getAuditStatus(item.auditResult).text
92
- }}</span>
93
- </template>
94
- </van-cell>
65
+ <approval-node-cell :node-detail="item" :folding-approval-comments="foldingApprovalComments" />
95
66
  <div v-if="index !== items.length - 1" class="van-hairline--bottom"></div>
96
67
  </div>
97
68
  </van-collapse-item>
98
-
99
69
  </van-collapse>
100
70
  </div>
101
71
  </div>
@@ -195,57 +165,59 @@
195
165
  :is-link="true" :arrow-direction="detailsVisible[index] ? 'down' : ''">
196
166
  </van-cell>
197
167
  <div v-if="detailsVisible[index] && item.personType === 'candidate'">
198
- <van-cell @click="clickCandidateGroup()" title-style="padding-left:10px" title="候选用户"
199
- :value="(item.candidateGroups?.users ?? []).map(user => user.name).join(',')">
200
- </van-cell>
201
- <van-cell @click="clickCandidateGroup()" title-style="padding-left:10px" title="候选岗位"
202
- :value="(item.candidateGroups?.positions ?? []).map(position => position.name).join(',')">
203
- </van-cell>
204
- <van-cell @click="clickCandidateGroup()" title-style="padding-left:10px" title="候选角色"
205
- :value="(item.candidateGroups?.roles ?? []).map(role => role.name).join(',')">
206
- </van-cell>
207
- <van-cell @click="clickCandidateGroup()" title-style="padding-left:10px" title="候选组织"
208
- :value="(item.candidateGroups?.organs ?? []).map(organ => organ.name).join(',')">
209
- </van-cell>
168
+ <van-field @click="handleSelectUserPopupShow(index)" label="候选用户" readonly placeholder="点击选择"
169
+ :value="(item.candidateGroups?.users ?? []).map(user => user.name).join(',')">
170
+ </van-field>
171
+ <van-field @click="handleSelectPositionPopupShow(index)" label="候选岗位" readonly placeholder="点击选择"
172
+ :value="(item.candidateGroups?.positions ?? []).map(position => position.name).join(',')">
173
+ </van-field>
174
+ <van-field @click="handleSelectRolePopupShow(index)" label="候选角色" readonly placeholder="点击选择"
175
+ :value="(item.candidateGroups?.roles ?? []).map(role => role.name).join(',')">
176
+ </van-field>
177
+ <van-field @click="handleSelectOrganizePopupShow(index)" label="候选组织" readonly placeholder="点击选择"
178
+ :value="(item.candidateGroups?.organs ?? []).map(organ => organ.name).join(',')">
179
+ </van-field>
210
180
  </div>
211
- <van-cell center title="停留时间">
212
- <template #default>
213
- <div style="display: flex; align-items: center;">
214
- <div style="display: flex; align-items: center; margin-right: 16px;">
215
- <van-stepper disable-input button-size="22" min="0" v-model="item.remainDay"/>
216
- <span style="margin-left: 4px;">天</span>
217
- </div>
181
+ <div v-if="handleButtons.includes('appointTimeoutTime')">
182
+ <van-cell center title="停留时间">
183
+ <template #default>
218
184
  <div style="display: flex; align-items: center;">
219
- <van-stepper disable-input button-size="22" min="0" v-model="item.remainTime"/>
220
- <span style="margin-left: 4px;">小时</span>
221
- </div>
222
- </div>
223
- </template>
224
- </van-cell>
225
- <van-cell title="任务提前">
226
- <template #default>
227
- <div style="display: flex; align-items: center;">
228
- <div style="display: flex; align-items: center; margin-right: 16px;">
229
- <van-stepper disable-input button-size="22" min="0" v-model="item.inAdvanceDay"/>
230
- <span style="margin-left: 4px;">天</span>
185
+ <div style="display: flex; align-items: center; margin-right: 16px;">
186
+ <van-stepper disable-input button-size="22" min="0" v-model="item.remainDay"/>
187
+ <span style="margin-left: 4px;">天</span>
188
+ </div>
189
+ <div style="display: flex; align-items: center;">
190
+ <van-stepper disable-input button-size="22" min="0" v-model="item.remainTime"/>
191
+ <span style="margin-left: 4px;">小时</span>
192
+ </div>
231
193
  </div>
194
+ </template>
195
+ </van-cell>
196
+ <van-cell title="任务提前">
197
+ <template #default>
232
198
  <div style="display: flex; align-items: center;">
233
- <van-stepper disable-input button-size="22" min="0" v-model="item.inAdvanceTime"/>
234
- <span style="margin-left: 4px;">小时</span>
199
+ <div style="display: flex; align-items: center; margin-right: 16px;">
200
+ <van-stepper disable-input button-size="22" min="0" v-model="item.inAdvanceDay"/>
201
+ <span style="margin-left: 4px;">天</span>
202
+ </div>
203
+ <div style="display: flex; align-items: center;">
204
+ <van-stepper disable-input button-size="22" min="0" v-model="item.inAdvanceTime"/>
205
+ <span style="margin-left: 4px;">小时</span>
206
+ </div>
235
207
  </div>
236
- </div>
237
- </template>
238
- </van-cell>
239
- <van-field
240
- readonly
241
- clickable
242
- input-align="right"
243
- name="picker"
244
- :value="(handleTypeList.find(handleType => handleType.value === item.processing) || {}).label"
245
- label="处理方式"
246
- placeholder="点击选择处理方式"
247
- @click="$set(showPicker, index, true)"
248
- />
208
+ </template>
209
+ </van-cell>
210
+ <van-field
211
+ readonly
212
+ clickable
213
+ input-align="right"
214
+ name="picker"
215
+ :value="(handleTypeList.find(handleType => handleType.value === item.processing) || {}).label"
216
+ label="处理方式"
217
+ placeholder="点击选择处理方式"
218
+ @click="$set(showPicker, index, true)"
219
+ />
220
+ </div>
249
221
  <van-popup v-model="showPicker[index]" position="bottom">
250
222
  <van-picker
251
223
  show-toolbar
@@ -260,9 +232,25 @@
260
232
  <div class="bar-item approve" @click="handleSelect('select')">确认</div>
261
233
  </div>
262
234
  </van-popup>
263
- <van-popup v-model="selectHandlePopupShow" closeable round position="bottom"
235
+ <van-popup v-if="selectHandlePopupShow" v-model="selectHandlePopupShow" closeable round position="bottom"
264
236
  :style="{ height: '80%' }" style="background: #f7f8fa">
265
- <select-handle @selectHandle="handleSelectResult"></select-handle>
237
+ <select-handle title="指定办理人" :multi-select="false" :procType="procType" @selectHandle="handleSelectResult"></select-handle>
238
+ </van-popup>
239
+ <van-popup v-if="selectOrganizePopupShow" v-model="selectOrganizePopupShow" closeable round position="bottom"
240
+ :style="{ height: '80%' }">
241
+ <select-organize ref="selectOrganize" :all-organize="false" :organize-id-list="permissionsScope.O" @selectOrganizeHandle="selectOrganizeHandle" ></select-organize>
242
+ </van-popup>
243
+ <van-popup v-if="selectUserPopupShow" v-model="selectUserPopupShow" closeable round position="bottom"
244
+ :style="{ height: '80%' }">
245
+ <select-handle title="选择用户" :multi-select="true" :procType="procType" @selectHandle="selectUserHandle" ></select-handle>
246
+ </van-popup>
247
+ <van-popup v-if="selectPositionPopupShow" v-model="selectPositionPopupShow" closeable round position="bottom"
248
+ :style="{ height: '80%' }">
249
+ <select-normal-list title="选择岗位" :id-list="permissionsScope.P" @selectNormalListHandle="selectPositionHandle" :parse-function="parsePositionFunction"></select-normal-list>
250
+ </van-popup>
251
+ <van-popup v-if="selectRolePopupShow" v-model="selectRolePopupShow" closeable round position="bottom"
252
+ :style="{ height: '80%' }">
253
+ <select-normal-list title="选择角色" :id-list="permissionsScope.R" @selectNormalListHandle="selectRoleHandle" :parse-function="parseRoleFunction"></select-normal-list>
266
254
  </van-popup>
267
255
  <van-dialog v-model="nodeListDialogShow" @confirm="processJumpSpecifiedNode()" @close="nodeListDialogShowClose()"
268
256
  :title="getAuditButtonStatus(auditResult)" show-cancel-button>
@@ -297,18 +285,26 @@
297
285
 
298
286
  <script>
299
287
  import {
300
- audit, config,
288
+ audit,
289
+ config,
301
290
  getAllPreNodes,
302
291
  getAttachmentList,
303
292
  getNextNodes,
304
293
  getNodesBehind,
294
+ getPosition,
305
295
  getPreNode,
306
- getProcessHis
296
+ getProcessHis,
297
+ getProcessType, getRole
307
298
  } from "../api";
308
299
  import {Dialog, Toast} from "vant";
309
300
  import UploadFile from '@lambo-design-mobile/upload-file';
310
301
  import {flutterUtil} from "./utils/flutterUtil";
311
302
  import SelectHandle from "./SelectHandle.vue";
303
+ import Tree from "./tree/Tree.vue";
304
+ import SelectOrganize from "./SelectOrganize.vue";
305
+ import SelectNormalList from "./SelectNormalList.vue";
306
+ import ApprovalNodeCell from "./ApprovalNodeCell.vue";
307
+ import {getAuditStatus} from "./js/global";
312
308
 
313
309
 
314
310
  export default {
@@ -317,7 +313,7 @@ export default {
317
313
  return config
318
314
  }
319
315
  },
320
- components: {SelectHandle, UploadFile},
316
+ components: {ApprovalNodeCell, SelectNormalList, SelectOrganize, Tree, SelectHandle, UploadFile},
321
317
  props: {
322
318
  //业务表单保存方法
323
319
  businessFormSave: {
@@ -340,6 +336,18 @@ export default {
340
336
  processTraceRouterName: {
341
337
  type: String,
342
338
  required: true,
339
+ },
340
+ activeFirstTab: {
341
+ type: Boolean,
342
+ default: false,
343
+ },
344
+ offsetTop: {
345
+ type: Number,
346
+ default: 0
347
+ },
348
+ foldingApprovalComments: {
349
+ type: Boolean,
350
+ default: false
343
351
  }
344
352
  },
345
353
  data() {
@@ -348,6 +356,7 @@ export default {
348
356
  //初始化路由数据
349
357
  taskNode: this.$route.query.taskNode,
350
358
  procId: this.$route.query.procId,
359
+ procType: this.$route.query.procType,
351
360
  instanceId: this.$route.query.instanceId,
352
361
  applyId: this.$route.query.applyId,
353
362
  formUrl: this.$route.query.formUrl,
@@ -360,6 +369,7 @@ export default {
360
369
  handlingPersonnel: '',
361
370
  nodeConfigMaps: '',
362
371
  },
372
+ approvalError: false,
363
373
 
364
374
  processHistory: [],
365
375
  tableData: [],
@@ -404,14 +414,22 @@ export default {
404
414
  //给附件列表展示
405
415
  files: [],
406
416
  //文件上传列表
407
- fileList: []
417
+ fileList: [],
418
+
419
+ permissionsScope: {},
420
+ selectOrganizePopupShow: false,
421
+ selectUserPopupShow: false,
422
+ selectRolePopupShow: false,
423
+ selectPositionPopupShow: false,
408
424
  };
409
425
  },
410
426
  methods: {
427
+ getAuditStatus,
411
428
  initData() {
412
429
  this.getProcessHistory();
413
430
  this.getNextNodes();
414
431
  this.getAttachmentList();
432
+ this.getProcessTypeList();
415
433
  //设置提示持续时间默认为500ms
416
434
  Toast.setDefaultOptions({duration: 500});
417
435
  },
@@ -429,11 +447,82 @@ export default {
429
447
  this.nextNodeProcessedData = this.processData(result.data);
430
448
  this.approvalForm.nextNode = result.data.map(node => node.name).join(',');
431
449
  this.approvalForm.handlingPersonnel = result.data
432
- .map(node => node.assignee?.name || '未指定')
450
+ .map(node => node.assignee?.name || '候选人')
433
451
  .join(',');
434
452
  }
435
453
  })
436
454
  },
455
+ getProcessTypeList() {
456
+ getProcessType(this.procType).then(res => {
457
+ let permScope = res.data.data.rows[0].permScope;
458
+ this.permissionsScope = this.extractPermissions(permScope);
459
+ });
460
+ },
461
+ extractPermissions(permScope) {
462
+ const permissions = {};
463
+
464
+ // 使用正则分别匹配 O、U、P 和 R
465
+ const oMatch = permScope.match(/O:([^,]*)/);
466
+ const uMatch = permScope.match(/U:([^,]*)/);
467
+ const pMatch = permScope.match(/P:([^,]*)/);
468
+ const rMatch = permScope.match(/R:([^,]*)/);
469
+
470
+ // 分别解析 O、U、P 和 R 权限
471
+ permissions.O = oMatch && oMatch[1] ? oMatch[1].split(';') : [];
472
+ permissions.U = uMatch && uMatch[1] ? uMatch[1].split(';') : [];
473
+ permissions.P = pMatch && pMatch[1] ? pMatch[1].split(';') : [];
474
+ permissions.R = rMatch && rMatch[1] ? rMatch[1].split(';') : [];
475
+
476
+ return permissions;
477
+ },
478
+ async parsePositionFunction(idList) {
479
+ try {
480
+ // 并行调用 getPosition 方法
481
+ return await Promise.all(
482
+ idList.map(async (id) => {
483
+ const response = await getPosition(id);
484
+ const result = response.data; // 假设响应的主体包含在 data 中
485
+
486
+ // 返回 { id, name } 对象
487
+ return {
488
+ id: id,
489
+ name: result.data.positionName || `Unknown Name for ${id}`, // 使用返回数据中的 name,若无则提供默认值
490
+ };
491
+ })
492
+ ); // 返回解析结果数组
493
+ } catch (error) {
494
+ console.error('Error fetching positions:', error);
495
+ // 在错误情况下返回默认结构
496
+ return idList.map((id) => ({
497
+ id: id,
498
+ name: `Unknown Name for ${id}`,
499
+ }));
500
+ }
501
+ },
502
+ async parseRoleFunction(idList) {
503
+ try {
504
+ // 并行调用 getPosition 方法
505
+ return await Promise.all(
506
+ idList.map(async (id) => {
507
+ const response = await getRole(id);
508
+ const result = response.data; // 假设响应的主体包含在 data 中
509
+
510
+ // 返回 { id, name } 对象
511
+ return {
512
+ id: id,
513
+ name: result.data.name || `Unknown Name for ${id}`, // 使用返回数据中的 name,若无则提供默认值
514
+ };
515
+ })
516
+ ); // 返回解析结果数组
517
+ } catch (error) {
518
+ console.error('Error fetching positions:', error);
519
+ // 在错误情况下返回默认结构
520
+ return idList.map((id) => ({
521
+ id: id,
522
+ name: `Unknown Name for ${id}`,
523
+ }));
524
+ }
525
+ },
437
526
  processData(data) {
438
527
  return data.map(node => {
439
528
  node.personType = node.assignee ? "assignee" : "candidate";
@@ -518,7 +607,7 @@ export default {
518
607
  }, {});
519
608
  this.approvalForm.nodeConfigMaps = JSON.stringify(params)
520
609
  this.approvalForm.handlingPersonnel = this.nextNodeProcessedData
521
- .map(node => node.assignee?.name || '未指定')
610
+ .map(node => node.personType === "assignee" ? node.assignee?.name : '候选人')
522
611
  .join(',');
523
612
  this.nextNodePopupShow = false;
524
613
  } else {
@@ -527,6 +616,22 @@ export default {
527
616
  this.nextNodePopupShow = false;
528
617
  }
529
618
  },
619
+ handleSelectOrganizePopupShow(index) {
620
+ this.nextNodeHandleIndex = index;
621
+ this.selectOrganizePopupShow=true;
622
+ },
623
+ handleSelectUserPopupShow(index) {
624
+ this.nextNodeHandleIndex = index;
625
+ this.selectUserPopupShow=true;
626
+ },
627
+ handleSelectRolePopupShow(index) {
628
+ this.nextNodeHandleIndex = index;
629
+ this.selectRolePopupShow = true;
630
+ },
631
+ handleSelectPositionPopupShow(index) {
632
+ this.nextNodeHandleIndex = index;
633
+ this.selectPositionPopupShow = true;
634
+ },
530
635
  getAttachmentList() {
531
636
  getAttachmentList(this.procId, this.applyId).then(resp => {
532
637
  if (resp.data.code === '200') {
@@ -563,23 +668,7 @@ export default {
563
668
  if (ext === 'pdf') return 'P';
564
669
  return ext.charAt(0).toUpperCase();
565
670
  },
566
- getAuditStatus(auditResult) {
567
- const statusMap = {
568
- '30': {text: '通过', icon: "tongguo", color: '#0d88ff', type: 'success'},
569
- '40': {text: '驳回上一节点', icon: "bohui", color: '#ed4014', type: 'danger'},
570
- '50': {text: '驳回到原点', icon: "bohui", color: '#ed4014', type: 'danger'},
571
- '51': {text: '流程作废', icon: "liuchengzuofei", color: '#ed4014', type: 'danger'},
572
- '60': {text: '撤回', icon: "chehui", color: '#ed4014', type: 'warning'},
573
- '80': {text: '跳转指定节点', icon: "tiaozhuan", color: '#0d88ff', type: 'primary'},
574
- '90': {text: '驳回指定节点', icon: "bohui", color: '#ed4014', type: 'primary'},
575
- };
576
- return {
577
- text: (statusMap[auditResult] && statusMap[auditResult].text) || '待审批',
578
- icon: (statusMap[auditResult] && statusMap[auditResult].icon) || 'daishenpi',
579
- color: (statusMap[auditResult] && statusMap[auditResult].color) || '#ff9900',
580
- type: (statusMap[auditResult] && statusMap[auditResult].type) || 'warning',
581
- };
582
- },
671
+
583
672
  getAuditButtonStatus(auditResult) {
584
673
  let statusMap = {
585
674
  '30': '通过',
@@ -604,6 +693,8 @@ export default {
604
693
  query: {
605
694
  applyId: this.applyId,
606
695
  procId: this.procId,
696
+ instanceId: this.instanceId,
697
+ taskNode: this.taskNode,
607
698
  }
608
699
  })
609
700
  },
@@ -612,6 +703,8 @@ export default {
612
703
 
613
704
  if (this.approvalForm.auditOpinion === '' || this.approvalForm.auditOpinion == null) {
614
705
  if (!this.handleButtons || this.handleButtons.includes('auditOpinion')) {
706
+ this.updateActiveTab()
707
+ this.approvalError = true
615
708
  Toast({message: '请输入审批意见', duration: '500'});
616
709
  return
617
710
  } else {
@@ -627,6 +720,9 @@ export default {
627
720
  this.popupShow = false;
628
721
 
629
722
  },
723
+ handleInputFocus() {
724
+ this.approvalError = false;
725
+ },
630
726
  submit() {
631
727
  let self = this;
632
728
  self.auditParams = {
@@ -724,7 +820,7 @@ export default {
724
820
  this.executionCompleted(true, result.data.processInstanceId, taskIds, auditResult, self.taskId);
725
821
  }
726
822
  } else {
727
- this.executionCompleted(true, null, null);
823
+ this.executionCompleted(true, null, null, auditResult, self.taskId);
728
824
  }
729
825
  Toast.success(result.message);
730
826
  } else if (result.code === '20002') {
@@ -821,14 +917,56 @@ export default {
821
917
  }
822
918
  self.selectHandlePopupShow = false;
823
919
  },
920
+ selectOrganizeHandle(handle, checkedNodes) {
921
+ if (handle === 'select') {
922
+ this.nextNodeProcessedData[this.nextNodeHandleIndex].candidateGroups.organs =
923
+ checkedNodes.map(item => ({
924
+ name: item.node.title,
925
+ id: item.node.id,
926
+ }));
927
+ }
928
+ this.selectOrganizePopupShow = false
929
+ },
930
+ selectUserHandle(checkResult) {
931
+ this.nextNodeProcessedData[this.nextNodeHandleIndex].candidateGroups.users =
932
+ checkResult.map(item => ({
933
+ name: item.userName,
934
+ id: item.userId,
935
+ }));
936
+ this.selectUserPopupShow = false;
937
+ },
938
+ selectPositionHandle(handle, result) {
939
+ if (handle === 'select') {
940
+ this.nextNodeProcessedData[this.nextNodeHandleIndex].candidateGroups.positions =
941
+ result.map(item => ({
942
+ name: item.name,
943
+ id: item.id,
944
+ }));
945
+ }
946
+ this.selectPositionPopupShow = false
947
+ },
948
+ selectRoleHandle(handle, result) {
949
+ if (handle === 'select') {
950
+ this.nextNodeProcessedData[this.nextNodeHandleIndex].candidateGroups.roles =
951
+ result.map(item => ({
952
+ name: item.name,
953
+ id: item.id,
954
+ }));
955
+ }
956
+ this.selectRolePopupShow = false
957
+ },
824
958
  },
825
959
  activated() {
826
- this.updateActiveTab();
960
+ if (!this.activeFirstTab) {
961
+ this.updateActiveTab();
962
+ }
827
963
  },
828
964
  mounted() {
829
965
  this.initData()
830
966
  // 默认选中最后一个tab页
831
- this.updateActiveTab();
967
+ if (!this.activeFirstTab) {
968
+ this.updateActiveTab();
969
+ }
832
970
  }
833
971
 
834
972
  };
@@ -837,6 +975,10 @@ export default {
837
975
  <style scoped>
838
976
  @import 'styles/global.css';
839
977
 
978
+ ::v-deep .van-tabs__content {
979
+ background: #f7f8fa;
980
+ }
981
+
840
982
  ::v-deep .van-collapse-item__content {
841
983
  padding: 0 0;
842
984
  }
@@ -853,6 +995,7 @@ export default {
853
995
  ::v-deep .van-tab--active .van-tab__text {
854
996
  color: #3478f6; /* 设置激活状态下的文字颜色为蓝色 */
855
997
  font-size: 16px; /* 增大激活状态下的字体大小 */
998
+ font-weight: bold;
856
999
  }
857
1000
 
858
1001
  ::v-deep .van-tabs__line {
@@ -901,38 +1044,6 @@ export default {
901
1044
  padding: 20px 10px;
902
1045
  }
903
1046
 
904
- .completed-icon {
905
- width: 45px; /* 自定义宽度 */
906
- height: 45px; /* 自定义高度 */
907
- background-clip: padding-box; /* 使背景不填充边框 */
908
-
909
- border-radius: 50%;
910
- margin-right: 15px;
911
-
912
- display: flex;
913
- align-items: center;
914
- justify-content: center;
915
-
916
- background: linear-gradient(90deg, #0096FF, #1677FF);
917
- border: 5px solid rgb(229, 244, 255); /* 半透明边框,颜色和背景色相同 */
918
- }
919
-
920
- .pending-icon {
921
- width: 45px; /* 自定义宽度 */
922
- height: 45px; /* 自定义高度 */
923
- background-clip: padding-box; /* 使背景不填充边框 */
924
-
925
- border-radius: 50%;
926
- margin-right: 15px;
927
-
928
- display: flex;
929
- align-items: center;
930
- justify-content: center;
931
-
932
- background: linear-gradient(90deg, #FF7E00, #FFA200);
933
- border: 5px solid rgb(255, 245, 229); /* 半透明边框,颜色和背景色相同 */
934
- }
935
-
936
1047
  .info-icon {
937
1048
  display: inline-block;
938
1049
  color: white; /* 自定义文字颜色 */