From db3e771bbce828c9365b6e9c4c11db1ba2b3b46f Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Sat, 22 Nov 2025 13:32:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=840.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 6 +++ pages/project/list/index.vue | 77 ++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/pages.json b/pages.json index b2c8fb5..ef3ea85 100644 --- a/pages.json +++ b/pages.json @@ -157,6 +157,12 @@ "navigationBarTitleText": "项目管理" } }, + { + "path": "pages/project/search/index", + "style": { + "navigationBarTitleText": "项目搜索" + } + }, { "path": "pages/notice/list/index", "style": { diff --git a/pages/project/list/index.vue b/pages/project/list/index.vue index 3b51259..111cc18 100644 --- a/pages/project/list/index.vue +++ b/pages/project/list/index.vue @@ -26,28 +26,21 @@ - 客户: - - - - 项目编号: - - - - 项目名称: - + 状态: + + 全部 + {{ tab.label }} + 成员: @@ -69,17 +62,17 @@ 全部 @@ -251,11 +244,9 @@ const userStore = useUserStore(); // 筛选参数 const filterParams = ref({ - customerName: '', - projectId: '', - projectName: '', joinUserId: '', overdue: '', // ''表示全部, true表示是, false表示否 + status: '', // 筛选面板中的状态筛选 }); // 默认状态字典(用于字典数据尚未加载时的兜底) @@ -310,6 +301,15 @@ const mainStatusTabs = computed(() => { return mainTabs; }); +// 筛选面板中的其他状态(除了开发中、维护中之外的所有状态) +const filterStatusTabs = computed(() => { + const allTabs = statusTabs.value; + return allTabs.filter(tab => + tab.value !== 'IN_PROGRESS' && + tab.value !== 'MAINTENANCE' + ); +}); + // 当字典加载完成后确保当前选中状态仍然存在 watch(statusTabs, (tabs) => { if (!Array.isArray(tabs) || tabs.length === 0) { @@ -347,22 +347,17 @@ const { }; // 添加状态筛选 + // 优先使用顶部标签的状态,如果顶部标签是"全部",则使用筛选面板中的状态 if (activeStatusTab.value && activeStatusTab.value !== 'ALL') { // 根据选中的状态标签设置statusList(使用字典键值) requestParams.statusList = [activeStatusTab.value]; + } else if (filterParams.value.status) { + // 如果顶部标签是"全部",且筛选面板中有选择状态,则使用筛选面板的状态 + requestParams.statusList = [filterParams.value.status]; } - // 如果选择"全部",则不设置statusList,显示所有状态 + // 如果都没有选择,则不设置statusList,显示所有状态 // 添加其他筛选条件 - if (filterParams.value.customerName) { - requestParams.customerName = filterParams.value.customerName; - } - if (filterParams.value.projectId) { - requestParams.projectId = filterParams.value.projectId; - } - if (filterParams.value.projectName) { - requestParams.projectName = filterParams.value.projectName; - } if (filterParams.value.joinUserId) { requestParams.joinUserId = filterParams.value.joinUserId; } @@ -797,11 +792,9 @@ const handleSearch = () => { // 重置 const handleReset = () => { filterParams.value = { - customerName: '', - projectId: '', - projectName: '', joinUserId: '', - overdue: '' + overdue: '', + status: '' }; selectedMemberName.value = ''; handleSearch();