可以查询到项目列表

This commit is contained in:
WindowBird 2025-11-17 13:54:18 +08:00
parent c4f875d979
commit 13210249be

View File

@ -194,18 +194,18 @@ const filterParams = ref({
overdue: '', // '', true, false
});
//
// 使
const statusTabs = ref([
{ label: '待开始', value: '1' },
{ label: '开发中', value: '2' },
{ label: '开发完成', value: '4' },
{ label: '已验收', value: '5' },
{ label: '维护中', value: '6' },
{ label: '维护到期', value: '7' },
{ label: '开发超期', value: '8' }
{ label: '待开始', value: 'WAIT_START' },
{ label: '开发中', value: 'IN_PROGRESS' },
{ label: '开发完成', value: 'COMPLETED' },
{ label: '已验收', value: 'ACCEPTED' },
{ label: '维护中', value: 'MAINTENANCE' },
{ label: '维护到期', value: 'MAINTENANCE_OVERDUE' },
{ label: '开发超期', value: 'DEVELOPMENT_OVERDUE' }
]);
const activeStatusTab = ref('2'); // ""
const activeStatusTab = ref('IN_PROGRESS'); // ""
//
const memberOptions = ref([]);
@ -234,23 +234,15 @@ const {
//
if (activeStatusTab.value) {
// statusList
const statusMap = {
'1': [1], //
'2': [2], //
'4': [4], //
'5': [5], //
'6': [6], //
'7': [7], //
'8': [2] // 2overdue=true
};
if (activeStatusTab.value === '8') {
//
requestParams.statusList = [2];
requestParams.overdue = true;
} else {
requestParams.statusList = statusMap[activeStatusTab.value] || [];
// statusList使
// if (activeStatusTab.value === 'DEVELOPMENT_OVERDUE') {
// // IN_PROGRESSoverdue=true
// requestParams.statusList = ['IN_PROGRESS'];
// requestParams.overdue = true;
// } else
{
// 使
requestParams.statusList = [activeStatusTab.value];
}
}
@ -267,7 +259,7 @@ const {
if (filterParams.value.memberId) {
requestParams.memberId = filterParams.value.memberId;
}
if (filterParams.value.overdue !== '' && activeStatusTab.value !== '8') {
if (filterParams.value.overdue !== '' && activeStatusTab.value !== 'DEVELOPMENT_OVERDUE') {
// ""使overdue
requestParams.overdue = filterParams.value.overdue;
}
@ -294,19 +286,28 @@ const projects = computed(() => list.value);
//
const getStatusText = (status) => {
if (!status && status !== 0) return '未知';
// 使
// dictValue
const dictLabel = getDictLabel('project_status', status);
if (dictLabel && dictLabel !== String(status)) {
return dictLabel;
}
//
//
const statusMap = {
'WAIT_START': '待开始',
'IN_PROGRESS': '开发中',
'COMPLETED': '开发完成',
'ACCEPTED': '已验收',
'MAINTENANCE': '维护中',
'MAINTENANCE_OVERDUE': '维护到期',
'DEVELOPMENT_OVERDUE': '开发超期',
//
'1': '待开始',
'2': '开发中',
'4': '开发完成',
'5': '已验收',
'6': '维护中',
'7': '维护到期'
'7': '维护到期',
'8': '开发超期'
};
return statusMap[String(status)] || `状态${status}`;
};
@ -315,12 +316,22 @@ const getStatusText = (status) => {
const getStatusType = (status) => {
if (!status && status !== 0) return 'primary';
const typeMap = {
//
'WAIT_START': 'primary', //
'IN_PROGRESS': 'warning', //
'COMPLETED': 'success', //
'ACCEPTED': 'info', //
'MAINTENANCE': 'primary', //
'MAINTENANCE_OVERDUE': 'warning', //
'DEVELOPMENT_OVERDUE': 'error', //
//
'1': 'primary', //
'2': 'warning', //
'4': 'success', //
'5': 'info', //
'6': 'primary', //
'7': 'warning' //
'7': 'warning', //
'8': 'error' //
};
return typeMap[String(status)] || 'primary';
};