From 5abdc9cf17df0fe383dac3525fd1d07823cadeed Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 18 Mar 2024 20:22:27 +0800
Subject: [PATCH] 驾驶舱切换不刷新问题解决

---
 pages/statistics/index.vue |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/pages/statistics/index.vue b/pages/statistics/index.vue
index ff77429..ba01571 100644
--- a/pages/statistics/index.vue
+++ b/pages/statistics/index.vue
@@ -256,17 +256,22 @@
 				sexData: []
 			}
 		},
-
-		onLoad() {
-			this.getHouseHoldData();
-			this.getHouseData();
-			this.getHouseLabelData();
-			this.getReportData();
-			this.getGridData();
-		},
-
+		onTabItemTap(e) {
+            // tab 点击时执行,此处直接接收单击事件
+            console.log(e)
+			this.refreshData();
+        },
+		// onLoad() {
+			
+		// },
 		methods: {
-
+			refreshData(){
+				this.getHouseHoldData();
+				this.getHouseData();
+				this.getHouseLabelData();
+				this.getReportData();
+				this.getGridData();
+			},
 			getRoleType() {
 				let roleName = uni.getStorageSync("activeRole").roleName;
 				if (roleName == "网格员") {

--
Gitblit v1.9.3