From 55b9d9a12e848f9569cf2bb91bf6e73682ef5f00 Mon Sep 17 00:00:00 2001 From: zyh Date: Thu, 27 Jul 2023 10:02:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Ddashboard?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E5=9C=A8=E6=B2=A1=E6=9C=89=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=97=B6=20=E6=9C=AA=E6=8F=90=E7=A4=BA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=9A=84=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/snapshotProgress/snapshotProgress.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nezha-fronted/src/components/common/snapshotProgress/snapshotProgress.vue b/nezha-fronted/src/components/common/snapshotProgress/snapshotProgress.vue index c1272076a..e80ba79e4 100644 --- a/nezha-fronted/src/components/common/snapshotProgress/snapshotProgress.vue +++ b/nezha-fronted/src/components/common/snapshotProgress/snapshotProgress.vue @@ -92,12 +92,6 @@ export default { methods: { async startTimer () { this.prevent_opt.import = true - - // 定时获取运行时间 - this.timer = createWorker(() => { - this.elapsedTime += 100 - }, 100) - const vars = this.$store.getters.getVariablesArr.map(item => { return { name: item.name, @@ -114,8 +108,15 @@ export default { // 创建任务 const res = await this.$post('/visual/dashboard/snapshot/task', params) if (res.code === 200) { + // 定时获取运行时间 + this.timer = createWorker(() => { + this.elapsedTime += 100 + }, 100) this.tid = res.data.tid this.getResult() + } else { + this.prevent_opt.import = false + this.$message.error(res.msg) } }, // 任务进度查询