From 79702b005a055df600ad61b19c2e7a4a01cc3d40 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 23 Jan 2026 17:50:30 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/jagzwxm/ja_web

---
 uniapps/work-app/src/pages/work/index.vue |   39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/uniapps/work-app/src/pages/work/index.vue b/uniapps/work-app/src/pages/work/index.vue
index 005eafe..7295f81 100644
--- a/uniapps/work-app/src/pages/work/index.vue
+++ b/uniapps/work-app/src/pages/work/index.vue
@@ -2,7 +2,7 @@
   <div class="eventTickets" :style="{ paddingTop: topMargin + 'px' }">
 
     <div class="searchTop">
-      <up-search placeholder="请输入关键字搜索"  :animation="true"  v-model="listParams.keyword" :show-action="false"></up-search>
+      <up-search placeholder="请输入关键字搜索"  :animation="true"  v-model="listParams.keyword" :show-action="false" @search="handleSearch"></up-search>
     </div>
     <div class="listBox">
       <div class="tabs-container">
@@ -35,7 +35,7 @@
 <script setup>
 
 import { useUserStore } from '@/store/index.js'
-import {getGdList,getstatusCount} from '/src/api/work/index1.js'
+import {getGdList,getstatusCount} from '/src/api/work/index.js'
 import dayjs from 'dayjs';
 import { getStatusBarHeight } from '@/utils/common';
 const userStore = useUserStore()
@@ -49,15 +49,17 @@
     name: '全部工单',
     key: 'all',
     badge: {
-      value: 0
+      value: 0,
+      showZero: true
     },
-    status: null
+
   },
   {
     name: '我的工单',
     key: 'myTickets',
     badge: {
-      value: 0
+      value: 0,
+      showZero: true
     }
   }
 
@@ -67,7 +69,7 @@
   return dayjs(dateString).format('MM/DD HH:mm');
 };
 const listParams = ref({
-  status: null,
+
   current: 1,
   size: 12,
   source: 1,
@@ -82,7 +84,7 @@
   const params = {
     current: listParams.value.current,
     size: listParams.value.size,
-    // event_name:listParams.value.keyword,
+    keyword:listParams.value.keyword,
     onlyMine:currentTab.value=== 'myTickets' ? 1 : 0
   }
   getGdList(params).then(res => {
@@ -105,22 +107,22 @@
     loading.value = false
   })
 }
-
-
-
 const getstatusCountData=()=>{
-	getstatusCount().then(res=>{
+  const params={
+    keyword:listParams.value.keyword,
+  }
+	getstatusCount(params).then(res=>{
 		const response = res.data.data
 		 const {  totalCount,myCount } = response
 		tabList.value.forEach(tab=>{
 
 			if(tab.key === 'all'){
 				tab.badge.value = totalCount || 0
+        tab.badge.showZero = true
 
 			}else if(tab.key === 'myTickets'){
 				tab.badge.value = myCount || 0
-			}else{
-				tab.badge.value=statusCount[String(tab.status)] || 0
+        tab.badge.showZero = true
 			}
 		})
 
@@ -129,7 +131,7 @@
 
 const handleClick = (item) => {
   currentTab.value = item.key
-  listParams.value.status = item.status
+
   listParams.value.current = 1
   hasMore.value = true
   dataList.value = []
@@ -146,6 +148,15 @@
     url: `/subPackages/workDetail/index?id=${val.id}`,
   })
 }
+
+// 搜索功能
+const handleSearch = () => {
+  listParams.value.current = 1
+  hasMore.value = true
+  dataList.value = []
+  getDataList()
+  getstatusCountData()
+}
 const topMargin = getStatusBarHeight()
 onShow(() => {
   listParams.value.current = 1

--
Gitblit v1.9.3