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/home/index.vue |   74 ++++++++++++++++++++++--------------
 1 files changed, 45 insertions(+), 29 deletions(-)

diff --git a/eims-ui-mobile/src/pages/home/index.vue b/eims-ui-mobile/src/pages/home/index.vue
index 8033aef..bcc1faa 100644
--- a/eims-ui-mobile/src/pages/home/index.vue
+++ b/eims-ui-mobile/src/pages/home/index.vue
@@ -61,7 +61,7 @@
           <template #title>
             <view class="flex items-center menu-title-box">
               <view class="menu-indicator"></view>
-              <view class="ml-1 text-xs">鏁版嵁鎬昏</view>
+              <view class="ml-1 text-sm">鏁版嵁鎬昏</view>
             </view>
           </template>
           <view class="flex flex-row justify-around">
@@ -80,34 +80,35 @@
           </view>
         </wd-card>
       </view>
+<!--      <view class="bg-white mt-2">-->
+<!--        <wd-card type="rectangle">-->
+<!--          <template #title>-->
+<!--            <view class="flex items-center menu-title-box">-->
+<!--              <view class="menu-indicator"></view>-->
+<!--              <view class="ml-1 text-sm">蹇嵎鎿嶄綔</view>-->
+<!--            </view>-->
+<!--          </template>-->
+<!--          <wd-grid :column="4">-->
+<!--            <wd-grid-item-->
+<!--              use-slot-->
+<!--              class="flex justify-center items-center"-->
+<!--              v-for="(item, index) in commonMenu"-->
+<!--              :key="item.id"-->
+<!--              @click.stop="goItemPage(item)"-->
+<!--              v-show="!(isLeader() && item.custom)"-->
+<!--            >-->
+<!--              <image class="slot-img text-center" :src="item.icon" />-->
+<!--              <text>{{ item.name }}</text>-->
+<!--            </wd-grid-item>-->
+<!--          </wd-grid>-->
+<!--        </wd-card>-->
+<!--      </view>-->
       <view class="bg-white mt-2">
         <wd-card type="rectangle">
           <template #title>
             <view class="flex items-center menu-title-box">
               <view class="menu-indicator"></view>
-              <view class="ml-1 text-xs">蹇嵎鎿嶄綔</view>
-            </view>
-          </template>
-          <wd-grid :column="4">
-            <wd-grid-item
-              use-slot
-              class="flex justify-center items-center"
-              v-for="(item, index) in commonMenu"
-              :key="item.id"
-              @click.stop="goItemPage(item)"
-            >
-              <image class="slot-img text-center" :src="item.icon" />
-              <text>{{ item.name }}</text>
-            </wd-grid-item>
-          </wd-grid>
-        </wd-card>
-      </view>
-      <view class="bg-white mt-2">
-        <wd-card type="rectangle">
-          <template #title>
-            <view class="flex items-center menu-title-box">
-              <view class="menu-indicator"></view>
-              <view class="ml-1 text-xs">璁惧绠$悊</view>
+              <view class="ml-1 text-sm">璁惧绠$悊</view>
             </view>
           </template>
           <wd-grid :column="4">
@@ -129,7 +130,7 @@
           <template #title>
             <view class="flex items-center menu-title-box">
               <view class="menu-indicator"></view>
-              <view class="ml-1 text-xs">鍙拌处鐩稿叧</view>
+              <view class="ml-1 text-sm">鍙拌处鐩稿叧</view>
             </view>
           </template>
           <wd-grid :column="4">
@@ -156,11 +157,12 @@
 import { useUserStore } from '@/store'
 import { tabbarStore } from '@/components/fg-tabbar/tabbar'
 import { getEquList } from '@/service/equ'
-import { getRepairResList } from '@/service/repair'
+import { getRepairResList, getRepairResUnfinished } from "@/service/repair";
 import { getFixtureList } from '@/service/fixture'
 import { receiveOrderRepair } from '@/service/mobile'
 import { useToast, useMessage } from 'wot-design-uni'
 import { ref } from 'vue'
+import {isLeader} from "@/utils/RoleUtils";
 
 const message = useMessage()
 const toast = useToast()
@@ -194,7 +196,8 @@
   getEquList({ pageNum, pageSize })
     .then((res: any) => {
       equTotal.value = res?.total || 0
-      queryRepairResList()
+      // queryRepairResList()
+      queryUnFinishedRepairResList()
       queryFixtureList()
       paging.value.complete(true)
     })
@@ -212,7 +215,11 @@
   } else {
     switch (item.name) {
       case '鎺ュ崟缁翠慨':
-        handleSelectReq()
+        if (isLeader()) {
+          toast.info('璇风櫥褰曠淮淇伐璐﹀彿鎺ュ崟')
+        } else {
+          handleSelectReq()
+        }
         break
     }
   }
@@ -221,7 +228,7 @@
 onLoad(() => {
   // getAllMenus()
   queryEquList()
-  queryRepairResList()
+  queryUnFinishedRepairResList()
   queryFixtureList()
 })
 
@@ -373,6 +380,15 @@
     .catch((res) => {})
 }
 
+function queryUnFinishedRepairResList() {
+  getRepairResUnfinished('0,1,2')
+    .then((res: any) => {
+      console.log("res", res)
+      faultTotal.value = res || 0
+    })
+    .catch((res) => {})
+}
+
 function queryFixtureList() {
   getFixtureList({
     page: 1,

--
Gitblit v1.9.3