From 071958329cc68d58112eeaa6a8f26841ef7892e2 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 2 Feb 2024 17:14:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9C=8B=E6=9D=BF=E6=89=93=E5=BC=80ufp?= =?UTF-8?q?=E9=80=9F=E7=8E=87=E5=AE=9A=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/overview/components/UPFFlow/index.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/dashboard/overview/components/UPFFlow/index.vue b/src/views/dashboard/overview/components/UPFFlow/index.vue index 4d920413..a399b00c 100644 --- a/src/views/dashboard/overview/components/UPFFlow/index.vue +++ b/src/views/dashboard/overview/components/UPFFlow/index.vue @@ -39,7 +39,6 @@ type EChartsOption = echarts.ComposeOption< | LineSeriesOption >; - /**定时器ID */ const timeoutId = ref(null); @@ -66,7 +65,7 @@ function fnDesign(container: HTMLElement | undefined, option: EChartsOption) { //渲染速率图 function initPicture() { - // clearTimeout(timeoutId.value); + clearTimeout(timeoutId.value); let queryArr: any = []; const initTime: Date = new Date(); @@ -77,9 +76,9 @@ function initPicture() { queryArr = [parseDateToStr(startTime), parseDateToStr(endTime)]; listUPFData(queryArr).then(res => { - // timeoutId.value = setTimeout(() => { - // initPicture(); // 5秒后再次获取数据 - // }, 5000); + timeoutId.value = setTimeout(() => { + initPicture(); // 5秒后再次获取数据 + }, 5000); let timeArr: any = []; let upValue: any = []; let downValue: any = []; @@ -225,7 +224,7 @@ onMounted(() => { /**组件实例被卸载之后调用 */ onUnmounted(() => { - // clearTimeout(timeoutId.value); + clearTimeout(timeoutId.value); });