From 29707ae2e4e377ab6676024f207333ccaaa3b5ad Mon Sep 17 00:00:00 2001 From: ruancuihong <2806986110@qq.com> Date: Thu, 13 Mar 2025 18:32:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BE=E8=A1=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Main/DailyPatrolCard/index.vue | 7 ++++--- src/views/Main/RiskInspectionCard/index.vue | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/Main/DailyPatrolCard/index.vue b/src/views/Main/DailyPatrolCard/index.vue index 88ebde3..a02d311 100644 --- a/src/views/Main/DailyPatrolCard/index.vue +++ b/src/views/Main/DailyPatrolCard/index.vue @@ -41,7 +41,7 @@ const handleResize = () => { const dailyData: any = ref([]); const dailyCount = ref(0); const getChartData = async (time: any) => { - dailyCount.value = 0 + dailyCount.value = 0; dailyData.value = []; const pramas = { // endTime: '', @@ -219,14 +219,15 @@ const initChart = () => { // Set options and render chart chart.setOption(option); -};watch( +}; +watch( () => props.timeRange, (newVal) => { getChartData(newVal); } ); onMounted(() => { - getChartData(props.timeRange); + // getChartData(props.timeRange); window.addEventListener('resize', handleResize); }); diff --git a/src/views/Main/RiskInspectionCard/index.vue b/src/views/Main/RiskInspectionCard/index.vue index 38811ce..22a978b 100644 --- a/src/views/Main/RiskInspectionCard/index.vue +++ b/src/views/Main/RiskInspectionCard/index.vue @@ -445,7 +445,7 @@ watch( } ); onMounted(() => { - getChartData(props.timeRange); + // getChartData(props.timeRange); window.addEventListener('resize', handleResize); });