diff --git a/pages/project/list/index.vue b/pages/project/list/index.vue
index b55beb0..3b51259 100644
--- a/pages/project/list/index.vue
+++ b/pages/project/list/index.vue
@@ -1,111 +1,99 @@
-
-
-
-
- 客户
-
-
-
- 项目编号
-
-
+
+
@@ -253,6 +244,7 @@ import { usePagination } from '@/composables';
import { useDictStore } from '@/store/dict';
import { useUserStore } from '@/store/user';
import { getDictLabel } from '@/utils/dict';
+import FabPlus from '@/components/FabPlus.vue';
const dictStore = useDictStore();
const userStore = useUserStore();
@@ -305,6 +297,18 @@ const statusTabs = computed(() => {
});
const activeStatusTab = ref('IN_PROGRESS'); // 默认选中"开发中"
+const showFilter = ref(false);
+
+// 主要状态标签(开发中、维护中、全部)
+const mainStatusTabs = computed(() => {
+ const allTabs = statusTabs.value;
+ const mainTabs = [
+ allTabs.find(tab => tab.value === 'IN_PROGRESS'),
+ allTabs.find(tab => tab.value === 'MAINTENANCE'),
+ { label: '全部', value: 'ALL' }
+ ].filter(Boolean);
+ return mainTabs;
+});
// 当字典加载完成后确保当前选中状态仍然存在
watch(statusTabs, (tabs) => {
@@ -343,18 +347,11 @@ const {
};
// 添加状态筛选
- if (activeStatusTab.value) {
+ if (activeStatusTab.value && activeStatusTab.value !== 'ALL') {
// 根据选中的状态标签设置statusList(使用字典键值)
- // if (activeStatusTab.value === 'DEVELOPMENT_OVERDUE') {
- // // 开发超期需要特殊处理:状态是IN_PROGRESS,但需要overdue=true
- // requestParams.statusList = ['IN_PROGRESS'];
- // requestParams.overdue = true;
- // } else
- {
- // 其他状态直接使用字典键值
- requestParams.statusList = [activeStatusTab.value];
- }
+ requestParams.statusList = [activeStatusTab.value];
}
+ // 如果选择"全部",则不设置statusList,显示所有状态
// 添加其他筛选条件
if (filterParams.value.customerName) {
@@ -771,6 +768,13 @@ const handleStatusTabClick = (value) => {
handleSearch();
};
+// 跳转到项目搜索页面
+const goToProjectSearch = () => {
+ uni.navigateTo({
+ url: '/pages/project/search/index'
+ });
+};
+
// 处理成员选择
const handleMemberChange = (e) => {
const index = e.detail.value;
@@ -800,9 +804,7 @@ const handleReset = () => {
overdue: ''
};
selectedMemberName.value = '';
- activeStatusTab.value = 'IN_PROGRESS';
- // 使用 updateParams 更新查询参数,会自动重置页码并重新加载数据
- updateParams({});
+ handleSearch();
};
// 上拉加载更多 - 使用 uniapp 的 onReachBottom
@@ -878,22 +880,114 @@ onLoad(() => {
+