From a8de18c6332fa766a673078b730215f6734988d4 Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期一, 07 四月 2025 11:42:52 +0800
Subject: [PATCH] fix

---
 src/views/DataScreen.vue |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/views/DataScreen.vue b/src/views/DataScreen.vue
index 538bf7b..38d3ddf 100644
--- a/src/views/DataScreen.vue
+++ b/src/views/DataScreen.vue
@@ -8,7 +8,7 @@
     </div>
     <header-panel />
     <left-panel v-if="!loading" :data="data" />
-    <center-panel v-if="!loading" :data="data" />
+    <center-panel :searchText="searchText" @searchForText="searchForText" v-if="!loading" :data="data" />
     <right-panel v-if="!loading" :data="data" />
   </div>
 </template>
@@ -39,7 +39,8 @@
       data: {},
       loading: true,
       isFullscreen: false,
-      timer: null
+      timer: null,
+      searchText: ''
     };
   },
   created() {
@@ -49,7 +50,7 @@
       this.loading = false;
     });
     this.timer = setInterval(() => {
-      getData().then(res => {
+      getData({houseHead:this.searchText}).then(res => {
         this.data = res.data;
         this.loading = false;
       });
@@ -72,6 +73,14 @@
     clearInterval(this.timer);
   },
   methods: {
+    searchForText(text) {
+      this.searchText = text;
+      this.loading = true;
+      getData({houseHead:text}).then(res => {
+        this.data = res.data;
+        this.loading = false;
+      });
+    },
     handleResize() {
       const widthScale = window.innerWidth / 1920;
       const heightScale = window.innerHeight / 1080;

--
Gitblit v1.7.1