From c6b6d1defa0528560c83f4b72100d8829272a242 Mon Sep 17 00:00:00 2001 From: dengbf Date: Wed, 4 Jun 2025 18:25:49 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E5=8A=9F=E8=83=BD]=20#[1406589561438208]?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E7=8A=B6=E6=80=81=E4=BC=98=E5=8C=96=20http:/?= =?UTF-8?q?/192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/?= =?UTF-8?q?939050947543042/1406589561438208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pages/autoexec/detail/job-detail.vue | 18 +++++++++++------- .../detail/jobDetail/phase/node-list.vue | 17 +++++++++++------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/views/pages/autoexec/detail/job-detail.vue b/src/views/pages/autoexec/detail/job-detail.vue index 81219a92..468ebc18 100644 --- a/src/views/pages/autoexec/detail/job-detail.vue +++ b/src/views/pages/autoexec/detail/job-detail.vue @@ -272,7 +272,8 @@ export default { }, versionId: null, hasOperationVersionAndProductManagerAuth: false, - jobNameWidth: 0 + jobNameWidth: 0, + refreshTimes: 3 //作业完成后刷新次数 }; }, beforeCreate() {}, @@ -455,11 +456,11 @@ export default { } }); if (phaseIdList.length > 0) { - //refreshPhaseList存在定时器 - // this.timmer = setTimeout(() => { - this.refreshPhaseList(phaseIdList); - // }, 5000); + this.refreshTimes = 3; } + this.timmer = setTimeout(() => { + this.refreshPhaseList(phaseIdList); + }, 5000); } }) .finally(() => { @@ -474,7 +475,7 @@ export default { }, refreshPhaseList(phaseIdList) { this.clearTimmer(); - if (phaseIdList && phaseIdList.length > 0) { + if (!this.$utils.isEmpty(phaseIdList) || this.refreshTimes > 0) { this.$api.autoexec.job.getPhaseList({ jobId: this.jobParam.jobId, phaseIdList: phaseIdList }).then(res => { if (res.Return['phaseList'] && res.Return['phaseList'].length > 0) { res.Return['phaseList'].forEach(phase => { @@ -496,7 +497,10 @@ export default { if (this.jobData && this.jobData.extraInfo) { this.$set(this.jobData, 'extraInfo', res.Return['extraInfo']); } - if (phaseIdList.length > 0) { + if (this.$utils.isEmpty(phaseIdList)) { + this.refreshTimes--; + } + if (phaseIdList.length > 0 || this.refreshTimes > 0) { this.timmer = setTimeout(() => { this.refreshPhaseList(phaseIdList); }, 5000); diff --git a/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue b/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue index e7cb1b4d..415087ba 100644 --- a/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue +++ b/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue @@ -353,7 +353,8 @@ export default { fn: _this.resetNode } }, - nodeTitle: null + nodeTitle: null, + refreshTimes: 3 //完成后刷新次数 }; }, beforeCreate() {}, @@ -505,7 +506,7 @@ export default { clearTimeout(this.timmer); this.timmer = null; } - if (nodeIdList && nodeIdList.length > 0) { + if (!this.$utils.isEmpty(nodeIdList) || this.refreshTimes > 0) { this.$api.autoexec.job .searchPhaseNode({ nodeIdList: nodeIdList, @@ -529,7 +530,10 @@ export default { node['isDisabled'] = true; } }); - if (nodeIdList.length > 0) { + if (this.$utils.isEmpty(nodeIdList)) { + this.refreshTimes--; + } + if (nodeIdList.length > 0 || this.refreshTimes > 0) { this.timmer = setTimeout(() => { this.refreshNode(nodeIdList); }, 3000); @@ -563,10 +567,11 @@ export default { }); } if (nodeIdList.length > 0) { - this.timmer = setTimeout(() => { - this.refreshNode(nodeIdList); - }, 3000); + this.refreshTimes = 3; } + this.timmer = setTimeout(() => { + this.refreshNode(nodeIdList); + }, 3000); } if (this.nodeData && this.nodeData.tbodyList && this.nodeData.tbodyList.length > 0) { // 节点被删除,复选框禁用 -- Gitee