diff --git a/src/views/dashboard/overview/components/UPFFlow/index.vue b/src/views/dashboard/overview/components/UPFFlow/index.vue index 4574107b..22739868 100644 --- a/src/views/dashboard/overview/components/UPFFlow/index.vue +++ b/src/views/dashboard/overview/components/UPFFlow/index.vue @@ -42,7 +42,7 @@ type EChartsOption = echarts.ComposeOption< let timeoutDuration = 5 * 1000; // 设置5s进行刷新请求 let loadId: any = null; -// 超时锁屏 +// 定时制图 function resetTimeout() { if (loadId) { clearInterval(loadId); @@ -75,6 +75,9 @@ function fnDesign(container: HTMLElement | undefined, option: EChartsOption) { //渲染速率图 function initPicture() { + if (loadId) { + clearInterval(loadId); + } let queryArr: any = []; const initTime: Date = new Date(); const startTime: Date = new Date(initTime); @@ -84,6 +87,8 @@ function initPicture() { queryArr = [parseDateToStr(startTime), parseDateToStr(endTime)]; listUPFData(queryArr).then(res => { + resetTimeout(); + let timeArr: any = []; let upValue: any = []; let downValue: any = [];