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 |   38 ++++++++++++++++++++++++++------------
 1 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/eims-ui-mobile/src/pages/maint/maint-st.vue b/eims-ui-mobile/src/pages/maint/maint-st.vue
index 4db3bdf..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>
@@ -45,17 +51,19 @@
           <image class="slot-img text-center" src="/static/images/camera.png" />
           <view class="flex-1">
             <view class="text-color-gray text-sm mt-1 flex">
-              <text class="mr-3">宸ュ崟鎬绘暟: {{ item.orderCount }}</text>
+              <text class="mr-3">鎬绘暟: {{ item.orderCount }}</text>
               |
-              <text class="mx-3">宸插畬鎴�: {{ item.wcCount }}</text>
+              <text class="mx-3">宸插畬鎴�: {{ item.dyzCount }}</text>
+              |
+              <text class="mx-3">寰呬繚鍏�: {{ item.dbyCount }}</text>
             </view>
-            <view class="text-color-gray text-sm mt-2 flex">
-              <text class="mr-3">寰呬繚鍏�: {{ item.dbyCount }}</text>
-              |
-              <text class="mx-3">淇濆吇涓�: {{ item.byCount }}</text>
+<!--            <view class="text-color-gray text-sm mt-2 flex">-->
+<!--              <text class="mr-3">寰呬繚鍏�: {{ item.dbyCount }}</text>-->
 <!--              |-->
-<!--              <text class="ml-3">寰呴獙璇�: {{ item.dyzCount }}</text>-->
-            </view>
+<!--&lt;!&ndash;              <text class="mx-3">淇濆吇涓�: {{ item.byCount }}</text>&ndash;&gt;-->
+<!--&lt;!&ndash;              |&ndash;&gt;-->
+<!--&lt;!&ndash;              <text class="ml-3">寰呴獙璇�: {{ item.dyzCount }}</text>&ndash;&gt;-->
+<!--            </view>-->
             <view class="text-color-gray text-sm mt-2 flex">
               <text>鐘舵�侊細</text>
               <template v-if="item.status === '1'">
@@ -84,7 +92,7 @@
 import { ref, computed } from 'vue'
 import { getMaintStList } from '@/service/maint'
 import dayjs from 'dayjs'
-
+const searchValue = ref<string>('')
 /**
  * 鍏朵粬椤甸潰浼犺繃鏉ョ殑鏁版嵁
  * assetNo: 璧勪骇缂栧彿
@@ -136,7 +144,7 @@
 // 鍘熸湁鐘舵��
 const status = ref<string>('0') // 榛樿涓哄緟淇濆吇鐘舵��
 const equName = ref<string>('-1')
-const filterDate = ref<string>('1')
+const filterDate = ref<string>('0')
 
 const filterDateList = ref<Record<string, any>[]>([
   { label: '鎵�鏈夋暟鎹�', value: '0' },
@@ -189,6 +197,7 @@
     pageSize,
     equName: equName.value,
     status: status.value,
+    params: {},
   }
   if (filterDate.value === '1') {
     // 鑾峰彇褰撳墠鏃ユ湡
@@ -198,7 +207,7 @@
       endPlanTime: now.endOf('month').format('YYYY-MM-DD 23:59:59'),
     }
   } else {
-    delete queryParams.params
+    queryParams.params = {}
   }
 
   if (equName.value === '-1') {
@@ -211,7 +220,7 @@
   if (option?.from === 'scan') {
     queryParams.assetNo = option.assetNo
   }
-
+  queryParams.params.searchValue = searchValue.value
   getMaintStList(queryParams)
     .then((res: any) => {
       // 璇峰嬁鍦ㄧ綉缁滆姹傚洖璋冧腑缁檇ataList璧嬪�硷紒锛佸彧闇�瑕佽皟鐢╟omplete灏卞彲浠ヤ簡
@@ -231,6 +240,11 @@
   })
 }
 
+function handleSearch () {
+  console.log('handleSearch')
+  paging.value.reload()
+}
+
 function reloadData() {
   paging.value.reload()
 }

--
Gitblit v1.9.3