From ffbf1a2c34408dc55f7e0c49befdf7903f9ba455 Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 17 Jun 2025 11:34:01 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[1445527441342464]?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=A4=84=E7=90=86-eoa=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=9A=84=E5=89=8D=E7=BD=AE=E6=AD=A5=E9=AA=A4tab=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E7=BD=AE=E9=A1=B6=EF=BC=8C=E6=97=A0=E6=B3=95=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=BD=AE=E9=A1=B6=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/bug-detail/939050947543040/939050947543057/1445527441342?= =?UTF-8?q?464?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processdetail/workorder/CenterDetail.vue | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue b/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue index 366be48a..280d8f66 100644 --- a/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue +++ b/src/views/pages/process/task/processdetail/workorder/CenterDetail.vue @@ -624,6 +624,7 @@ export default { this.$set(this.fixedPageTab, d.name, true); }); } + this.initData(); }, mounted() { this.$nextTick(() => { @@ -697,14 +698,20 @@ export default { if (item.top) { // 前置步骤信息 this.viewStepData.forEach(step => { + this.$set(this.fixedPageTab, `showStep${step.id}`, false); this.fixedPageList.push({ tabValue: `showStep${step.id}`, label: step.name, item: step }); }); - } else if (!defaultTabValue) { - defaultTabValue = `showStep${this.viewStepData[0].id}`; + } else { + this.viewStepData.forEach(step => { + this.$set(this.fixedPageTab, `showStep${step.id}`, true); + }); + if (!defaultTabValue) { + defaultTabValue = `showStep${this.viewStepData[0].id}`; + } } } return defaultTabValue; @@ -825,11 +832,12 @@ export default { this.setTimeUpdata = null; }, 300); }, - initData() { + async initData() { + await this.getStepStatusList(); this.wipeCenterDetail(); this.getActivityList(); this.getAllFileList(); - this.getStepStatusList(); + this.getTaskComment(); this.getRepeatList(); this.initTabList(); @@ -934,7 +942,7 @@ export default { let data = { processTaskId: this.processTaskId }; - this.$api.process.processtask.getStepStatusList(data).then(res => { + return this.$api.process.processtask.getStepStatusList(data).then(res => { if (res.Status == 'OK') { this.stepData = res.Return; mutations.setStepList(res.Return); @@ -951,13 +959,6 @@ export default { let step = this.stepData.find(step => step.processStepUuid === pre); if (!this.$utils.isEmpty(step)) { this.viewStepData.push(step); - this.fixedPageTab['showStep' + step.id] = false; - //前置步骤信息 - this.fixedPageList.push({ - tabValue: 'showStep' + step.id, - label: step.name, - item: step - }); } }); } @@ -1379,6 +1380,9 @@ export default { if (this.slotList.find(s => s.name === tabValue)) { //步骤节点信息 findTab = this.tabList.find(item => item.key === 'node'); + } else if (this.viewStepData.find(v => `showStep${v.id}` === tabValue)) { + //前置步骤 + findTab = this.tabList.find(item => item.key === 'preNode'); } } findTab && this.$set(findTab, 'top', false); @@ -1704,9 +1708,6 @@ export default { watch: { processTaskConfig: { handler(val, oldval) { - if (val.id && ((oldval && val.id != oldval.id) || !oldval)) { - this.initData(); - } if (val && ((oldval && val.id != oldval.id) || !oldval) && val.formAttributeDataMap) { this.$nextTick(() => { if (this.$refs.FormPreview) { -- Gitee