From a27075237ddc511dd4f404534c33267acebf7203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=AD=A6=E6=88=90?= <1274337408@qq.com> Date: Fri, 31 Jul 2026 17:04:00 +0800 Subject: [PATCH] =?UTF-8?q?web=E7=AB=AF-=E9=A3=8E=E9=87=87=E5=A2=99-?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90:=20=E9=A5=BC=E7=8A=B6?= =?UTF-8?q?=E4=BD=93=E5=92=8C=E6=9F=B1=E7=8A=B6=E5=9B=BE=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=BC=82=E5=B8=B8=E4=BF=AE=E5=A4=8D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/platform/zhgh/spread/statistics/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/resources/views/platform/zhgh/spread/statistics/index.html b/src/main/resources/views/platform/zhgh/spread/statistics/index.html index 9ab21bf1..8c2a2bcb 100644 --- a/src/main/resources/views/platform/zhgh/spread/statistics/index.html +++ b/src/main/resources/views/platform/zhgh/spread/statistics/index.html @@ -233,11 +233,12 @@ layout("/layouts/platform.html"){ if (this.categoryChart) this.categoryChart.resize() } }, - created() { - this.loadCategories().then(() => this.loadAll()) - }, mounted() { window.addEventListener("resize", this.resizeCharts) + // 图表容器挂载完成后自动执行首次查询,避免必须点击“查询”才显示数据。 + this.$nextTick(() => { + this.loadCategories().then(() => this.loadAll()) + }) }, beforeDestroy() { window.removeEventListener("resize", this.resizeCharts)