From 877e40c9f625f234428907c9c9e293efb5f37237 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Fri, 23 Jan 2026 15:35:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
uniapps/work-app/src/pages/work/index.vue | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/uniapps/work-app/src/pages/work/index.vue b/uniapps/work-app/src/pages/work/index.vue
index 005eafe..0982666 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">
@@ -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