From 4436c040d89980c8624f88cd4876c808806c414f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 28 八月 2023 19:52:46 +0800 Subject: [PATCH] 下发参数 弹框修改 2023-8-28 --- src/views/visualization.vue | 37 +++++++++++++++++-------------------- 1 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/views/visualization.vue b/src/views/visualization.vue index 9697ba8..657e20a 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); + } } }); }, @@ -729,13 +737,8 @@ if (Object.keys(this.taskData).length > 0 && this.taskData.Procedure.ID) { this.$refs.control.islook = true; } else { - this.$confirm( "褰撳墠璁惧娌℃湁宸ュ簭!", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", - }) - .then(() => {}) - .catch(() => {}); + this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); + } }, // 鍙充晶瀹屾垚 @@ -749,13 +752,7 @@ } }); } else { - this.$confirm( "褰撳墠璁惧娌℃湁宸ュ簭!", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", - }) - .then(() => {}) - .catch(() => {}); + this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); } }, getRandomNumber(min, max) { -- Gitblit v1.8.0