From 5eca16c096db71a3a419c655cdcf1326a32f01ea Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期一, 23 六月 2025 12:35:24 +0800
Subject: [PATCH] eims-ui: 新增点检、保养报表

---
 eims-ui-mobile/src/pages/inspect/insp-st.vue |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/eims-ui-mobile/src/pages/inspect/insp-st.vue b/eims-ui-mobile/src/pages/inspect/insp-st.vue
index 0ca9158..f761004 100644
--- a/eims-ui-mobile/src/pages/inspect/insp-st.vue
+++ b/eims-ui-mobile/src/pages/inspect/insp-st.vue
@@ -11,6 +11,9 @@
 <template>
   <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time>
     <template #top>
+      <!-- 澧炲姞涓�涓悳绱㈡爮 -->
+      <wd-search v-model="searchValue" @search="handleSearch">
+      </wd-search>
       <wd-tabs v-model="activeTab" @change="handleTabChange">
         <wd-tab title="寰呯偣妫�"></wd-tab>
         <wd-tab title="寰呯‘璁�"></wd-tab>
@@ -78,7 +81,8 @@
 <script setup lang="ts">
 import { getInspStList } from '@/service/inspect'
 import dayjs from 'dayjs'
-
+import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store'
+import { isLeader, isLineOrRepair, isOperator } from "@/utils/RoleUtils";
 // 鏍囩椤电浉鍏�
 const activeTab = ref(0) // 榛樿閫変腑绗竴涓爣绛鹃〉锛堝緟鐐规锛�
 
@@ -87,6 +91,7 @@
 const equName = ref<string>('鎵�鏈夎澶�')
 const filterDate = ref<string>('1')
 const status = ref<string>('0') // 榛樿涓哄緟鐐规鐘舵��
+const searchValue = ref<string>('')
 
 const viewModeList = ref<Record<string, any>[]>([
   { label: '鏃ヨ鍥�', value: 'Day' },
@@ -98,7 +103,7 @@
 ])
 
 const equList = ref<Record<string, any>[]>([{ label: '鎵�鏈夎澶�', value: '鎵�鏈夎澶�' }])
-
+const userStore = useUserStore()
 // 鏍囩椤靛垏鎹㈠鐞嗗嚱鏁�
 function handleTabChange({ index }) {
   // 鏍规嵁鏍囩椤电储寮曡缃搴旂殑鐘舵�佸��
@@ -136,12 +141,23 @@
     pageSize,
     viewMode: viewMode.value,
     status: status.value, // 娣诲姞鐘舵�佺瓫閫�
+    params: {
+      searchValue: searchValue.value,
+    },
   }
   if (filterDate.value === '1') {
     params.planTime = dayjs().format('YYYY-MM-DD')
   } else {
     delete params.planTime
   }
+
+  console.log('queryList::', isLineOrRepair(), isOperator(), userStore.userInfo)
+  if (isLineOrRepair() || isOperator()) {
+    params.updateBy = userStore.userInfo.userId
+  } else if (isLeader()) {
+    delete params.updateBy
+  }
+  console.log('params::', params)
   getInspStList(params)
     .then((res: any) => {
       // 璇峰嬁鍦ㄧ綉缁滆姹傚洖璋冧腑缁檇ataList璧嬪�硷紒锛佸彧闇�瑕佽皟鐢╟omplete灏卞彲浠ヤ簡
@@ -163,6 +179,11 @@
   })
 }
 
+function handleSearch() {
+  console.log('handleSearch')
+  paging.value.reload()
+}
+
 function reloadData() {
   paging.value.reload()
 }

--
Gitblit v1.9.3