From 5eeac2be08383953337d3789a8d442c21303bb54 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 28 八月 2023 15:25:05 +0800 Subject: [PATCH] 周六的代码更新对比 合并 2023-8-28 --- src/views/visualization.vue | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/visualization.vue b/src/views/visualization.vue index 9697ba8..25dbbbf 100644 --- a/src/views/visualization.vue +++ b/src/views/visualization.vue @@ -531,6 +531,9 @@ countDownHour:0, countDownMinute:0, Arr:[], + // 璁板綍瀹氭椂鍣ㄧ姸鎬� + procInfoTimer:null, + cutdownTimer: null }; }, mounted() { @@ -695,9 +698,11 @@ } }); this.getProgressInfo(); - setInterval(() => { - this.getProgressInfo(); - }, 6000); + if (!this.procInfoTimer) { + this.procInfoTimer = setInterval(() => { + this.getProgressInfo(); + }, 6000); + } } console.log(this.procedureList, "===1111procedureList"); // setTimeout(() => { @@ -708,9 +713,12 @@ } if(res.code!=200||!this.taskData.Procedure.ID){ this.getcountdown(); - setInterval(() => { - this.getcountdown(); - }, 60000); + // 鎺у埗閲嶆柊璇锋眰getTaskInfo, 鍙紑鍚竴涓畾鏃跺櫒 + if (!this.cutdownTimer) { + this.cutdownTimer = setInterval(() => { + this.getcountdown(); + }, 60000); + } } }); }, -- Gitblit v1.8.0