From 60384e8241fa855b5780260633ee9b9f8904847a Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期五, 20 六月 2025 14:24:19 +0800
Subject: [PATCH] feat(eims-ui-mobile): 为多个页面添加搜索功能 - 在 equ-list、insp-st、maint-st、req-list 和 res-list 页面中添加设备名称和资产编号的模糊搜索

---
 eims-ui-mobile/src/pages/maint/maint-st.vue |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/eims-ui-mobile/src/pages/maint/maint-st.vue b/eims-ui-mobile/src/pages/maint/maint-st.vue
index 836d79d..5e01de6 100644
--- a/eims-ui-mobile/src/pages/maint/maint-st.vue
+++ b/eims-ui-mobile/src/pages/maint/maint-st.vue
@@ -11,6 +11,12 @@
 <template>
   <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time>
     <template #top>
+      <!-- 澧炲姞涓�涓悳绱㈡爮 -->
+      <wd-search v-model="searchValue" @search="handleSearch">
+        <template #right-icon>
+          <wd-icon name="scan" size="34rpx"></wd-icon>
+        </template>
+      </wd-search>
       <wd-tabs v-model="activeTab" @change="handleTabChange">
         <wd-tab title="寰呬繚鍏�"></wd-tab>
         <wd-tab title="寰呯‘璁�"></wd-tab>
@@ -86,7 +92,7 @@
 import { ref, computed } from 'vue'
 import { getMaintStList } from '@/service/maint'
 import dayjs from 'dayjs'
-
+const searchValue = ref<string>('')
 /**
  * 鍏朵粬椤甸潰浼犺繃鏉ョ殑鏁版嵁
  * assetNo: 璧勪骇缂栧彿
@@ -191,6 +197,7 @@
     pageSize,
     equName: equName.value,
     status: status.value,
+    params: {},
   }
   if (filterDate.value === '1') {
     // 鑾峰彇褰撳墠鏃ユ湡
@@ -200,7 +207,7 @@
       endPlanTime: now.endOf('month').format('YYYY-MM-DD 23:59:59'),
     }
   } else {
-    delete queryParams.params
+    queryParams.params = {}
   }
 
   if (equName.value === '-1') {
@@ -213,7 +220,7 @@
   if (option?.from === 'scan') {
     queryParams.assetNo = option.assetNo
   }
-
+  queryParams.params.searchValue = searchValue.value
   getMaintStList(queryParams)
     .then((res: any) => {
       // 璇峰嬁鍦ㄧ綉缁滆姹傚洖璋冧腑缁檇ataList璧嬪�硷紒锛佸彧闇�瑕佽皟鐢╟omplete灏卞彲浠ヤ簡
@@ -233,6 +240,11 @@
   })
 }
 
+function handleSearch () {
+  console.log('handleSearch')
+  paging.value.reload()
+}
+
 function reloadData() {
   paging.value.reload()
 }

--
Gitblit v1.9.3