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/equ/equ-list.vue |   32 +++++++++++++++++++++++++-------
 1 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/eims-ui-mobile/src/pages/equ/equ-list.vue b/eims-ui-mobile/src/pages/equ/equ-list.vue
index ecd0923..920c368 100644
--- a/eims-ui-mobile/src/pages/equ/equ-list.vue
+++ b/eims-ui-mobile/src/pages/equ/equ-list.vue
@@ -2,14 +2,20 @@
 {
   layout: 'default',
   needLogin: true,
-  style: {
-    navigationBarTitleText: '璁惧鍒楄〃',
-  },
+  style: { navigationBarTitleText: '璁惧鍒楄〃', navigationStyle: 'custom' },
 }
 </route>
 <template>
-  <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time>
+ <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time>
     <template #top>
+      <wd-navbar
+        title="璁惧鍒楄〃"
+        left-arrow
+        @click-left="goBack"
+        custom-style="background: #4D80F0;"
+        safeAreaInsetTop
+      ></wd-navbar>
+      <wd-search v-model="searchValue" placeholder="璇疯緭鍏ュ叧閿瓧" @search="handleSearch" />
       <wd-drop-menu>
         <wd-drop-menu-item
           v-model="equTypeId"
@@ -34,7 +40,7 @@
           <view class="flex justify-between items-baseline">
             <view class="flex items-center menu-title-box">
               <view class="menu-indicator"></view>
-              <text class="ml-1 text-xs">{{ item.assetNo }}</text>
+              <text class="ml-1 text-sm">{{ item.assetNo }}</text>
               <wd-tag v-if="item.status === '0'" class="ml-2" bg-color="cyan">璇曠敤</wd-tag>
               <wd-tag v-else-if="item.status === '1'" class="ml-2" type="success">浣跨敤</wd-tag>
               <wd-tag v-else-if="item.status === '2'" class="ml-2" type="danger">鍋滅敤</wd-tag>
@@ -56,7 +62,7 @@
               {{ item.equName }}
               <text class="text-color-gray ml-2 text-mini">{{ item.modelNo }}</text>
             </view>
-            <view class="text-color-gray text-xs mt-1">
+            <view class="text-color-gray text-sm mt-1">
               {{ item.location }} | {{ item.madeIn }}
             </view>
           </view>
@@ -80,7 +86,7 @@
 const equTypeId = ref<number>(-1)
 // 璁惧鐘舵��
 const status = ref<number>(-1)
-
+const searchValue = ref<string>('')
 const isSelectEqu = ref(false)
 
 const typeList = ref<Record<string, any>[]>([{ dictLabel: '璁惧绫诲瀷', dictValue: -1 }])
@@ -103,6 +109,9 @@
     pageSize,
     equTypeId: equTypeId.value,
     status: status.value,
+    params: {
+      searchValue: searchValue.value,
+    },
   }
   if (equTypeId.value === -1) {
     delete parmams.equTypeId
@@ -121,6 +130,10 @@
       // 鍦ㄥ簳灞傜殑缃戠粶璇锋眰鎶涘嚭寮傚父鏃讹紝鍐檜ni.$emit('z-paging-error-emit');鍗冲彲
       paging.value.complete(false)
     })
+}
+
+const goBack = () => {
+  uni.navigateBack()
 }
 
 /**
@@ -145,6 +158,11 @@
   }
 }
 
+function handleSearch() {
+  console.log('handleSearch')
+  paging.value.reload()
+}
+
 /**
  * 閫夋嫨璁惧鍥炶皟
  * @param equ

--
Gitblit v1.9.3