diff --git a/src/views/pages/autoexec/detail/jobDetail/phase/node/node-detail.vue b/src/views/pages/autoexec/detail/jobDetail/phase/node/node-detail.vue index c98a052975ed88bab917b4abf11ef392c028616f..d44c9891e34b7d09ab3b4b73f80fa16fcca6e3ec 100644 --- a/src/views/pages/autoexec/detail/jobDetail/phase/node/node-detail.vue +++ b/src/views/pages/autoexec/detail/jobDetail/phase/node/node-detail.vue @@ -399,6 +399,7 @@ export default { customTemplateData: {}, isCustomTemplateShow: true, customTemplateTimmer: null, + refreshTimes: 3, //刷新次数:终点状态后刷新,避免operationList数据不更新 operationEndingStatusList: ['completed', 'aborted', 'failed'] //终点状态节点列表,非终点状态列表的需要定时刷新。 }; }, @@ -483,6 +484,12 @@ export default { let isRefresh = data.isRefresh; this.$set(this, 'operationList', data.operationStatusList); if (isRefresh === 1) { + this.refreshTimes = 3; + this.timmer = setTimeout(() => { + this.refreshOperationStatus(); + }, 3000); + } else if (isRefresh === 0 && this.refreshTimes > 0) { + this.refreshTimes--; this.timmer = setTimeout(() => { this.refreshOperationStatus(); }, 3000); diff --git a/src/views/pages/autoexec/detail/logcomponents/node-log.vue b/src/views/pages/autoexec/detail/logcomponents/node-log.vue index 09d22cdf83333128763917fa2abb267b72745bda..688feea7b22c672f7347bc4636141ce8e4c53dff 100644 --- a/src/views/pages/autoexec/detail/logcomponents/node-log.vue +++ b/src/views/pages/autoexec/detail/logcomponents/node-log.vue @@ -99,7 +99,8 @@ export default { timmer: null, isAutoScroll: true, //自动滚动日志 encodeList: [], //编码列表 - encoding: 'UTF-8' + encoding: 'UTF-8', + refreshTimes: 3 //刷新次数:终点状态后刷新,避免日志内容不一致 }; }, beforeCreate() {}, @@ -201,9 +202,15 @@ export default { } } if (isRefresh == 1) { + this.refreshTimes = 3; this.timmer = setTimeout(() => { this.getContent('down', this.endPos); }, this.calcIntervalTime(res.Return.lineList.length)); + } else if (isRefresh == 0 && this.refreshTimes > 0) { + this.refreshTimes--; + this.timmer = setTimeout(() => { + this.getContent('down', this.endPos); + }, 2000); } } })