项目管理页面重构0.5

This commit is contained in:
WindowBird 2025-11-22 13:32:55 +08:00
parent ddbe28886d
commit db3e771bbc
2 changed files with 41 additions and 42 deletions

View File

@ -157,6 +157,12 @@
"navigationBarTitleText": "项目管理"
}
},
{
"path": "pages/project/search/index",
"style": {
"navigationBarTitleText": "项目搜索"
}
},
{
"path": "pages/notice/list/index",
"style": {

View File

@ -26,28 +26,21 @@
<!-- 筛选面板 -->
<view class="filter-panel" v-if="showFilter">
<view class="filter-item">
<text class="filter-label">客户</text>
<input
class="filter-input"
v-model="filterParams.customerName"
placeholder="请输入客户名称"
/>
</view>
<view class="filter-item">
<text class="filter-label">项目编号</text>
<input
class="filter-input"
v-model="filterParams.projectId"
placeholder="请输入项目编号"
/>
</view>
<view class="filter-item">
<text class="filter-label">项目名称</text>
<input
class="filter-input"
v-model="filterParams.projectName"
placeholder="请输入项目名称"
/>
<text class="filter-label">状态</text>
<view class="filter-options">
<text
class="filter-option"
:class="{ 'active': filterParams.status === '' }"
@click="filterParams.status = ''"
>全部</text>
<text
class="filter-option"
v-for="tab in filterStatusTabs"
:key="tab.value"
:class="{ 'active': filterParams.status === tab.value }"
@click="filterParams.status = tab.value"
>{{ tab.label }}</text>
</view>
</view>
<view class="filter-item">
<text class="filter-label">成员</text>
@ -69,17 +62,17 @@
<text
class="filter-option"
:class="{ 'active': filterParams.overdue === '' }"
@click="filterParams.overdue = ''; handleSearch()"
@click="filterParams.overdue = ''"
>全部</text>
<text
class="filter-option"
:class="{ 'active': filterParams.overdue === true }"
@click="filterParams.overdue = true; handleSearch()"
@click="filterParams.overdue = true"
></text>
<text
class="filter-option"
:class="{ 'active': filterParams.overdue === false }"
@click="filterParams.overdue = false; handleSearch()"
@click="filterParams.overdue = false"
></text>
</view>
</view>
@ -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();