diff --git a/src/views/datav/Global.vue b/src/views/datav/Global.vue index 91ac014..2e5ccd6 100644 --- a/src/views/datav/Global.vue +++ b/src/views/datav/Global.vue @@ -495,6 +495,9 @@ const getGlobalMapData = async (timeValue = time.value) => { }, { gte: range80Percent, label: "高于最大问题80%", color: "#D34343" }, ]; + clearInterval(globalMapIntervalId); + globalMapIntervalId = setInterval(mapAnimation, 2000); + mapAnimationStop(); }; const getGlobalTrendData = async (year = selectedYear.value) => { const res = await getGlobalTrend(year); @@ -573,8 +576,6 @@ const mapAnimation = () => { dataIndex: randomNum, }); }; -// 启动定时器,每隔 2 秒执行一次 -globalMapIntervalId = setInterval(mapAnimation, 2000); // 趋势动画 const globalTrendAnimation = () => { @@ -653,7 +654,6 @@ const handleClick = (params) => { const setupEventListeners = () => { cartProRankAnimtionStop(); ywlxzbAnimationStop(); - mapAnimationStop(); trendAnimationStop(); wtlxzbAnimationStop(); };