|
@@ -74,23 +74,25 @@ const refreshing = ref(false);
|
|
|
const page = ref(1);
|
|
const page = ref(1);
|
|
|
const pageSize = 10;
|
|
const pageSize = 10;
|
|
|
|
|
|
|
|
-// 后端状态: -2=已放弃 -1=审核失败 0=进行中 1=待审核 2=已完成
|
|
|
|
|
|
|
+// 后端状态: -2=已放弃 -1=审核失败 0=进行中 1=待审核 2=已完成 5=已打回
|
|
|
const statusTabs = computed(() => [
|
|
const statusTabs = computed(() => [
|
|
|
{ label: t('taskStatus.all'), value: -99 },
|
|
{ label: t('taskStatus.all'), value: -99 },
|
|
|
{ label: t('taskStatus.inProgress'), value: 0 },
|
|
{ label: t('taskStatus.inProgress'), value: 0 },
|
|
|
{ label: t('taskStatus.pendingReview'), value: 1 },
|
|
{ label: t('taskStatus.pendingReview'), value: 1 },
|
|
|
{ label: t('taskStatus.completed'), value: 2 },
|
|
{ label: t('taskStatus.completed'), value: 2 },
|
|
|
|
|
+ { label: t('taskStatus.returnBack'), value: 5 },
|
|
|
{ label: t('taskStatus.rejected'), value: -1 }
|
|
{ label: t('taskStatus.rejected'), value: -1 }
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
-// 后端状态: -2=已放弃 -1=审核失败 0=进行中 1=待审核 2=已完成
|
|
|
|
|
|
|
+// 后端状态: -2=已放弃 -1=审核失败 0=进行中 1=待审核 2=已完成 5=已打回
|
|
|
const getStatusClass = (s: number) => {
|
|
const getStatusClass = (s: number) => {
|
|
|
const map: Record<number, string> = {
|
|
const map: Record<number, string> = {
|
|
|
[-2]: 'abandoned',
|
|
[-2]: 'abandoned',
|
|
|
[-1]: 'rejected',
|
|
[-1]: 'rejected',
|
|
|
0: 'in-progress',
|
|
0: 'in-progress',
|
|
|
1: 'pending',
|
|
1: 'pending',
|
|
|
- 2: 'completed'
|
|
|
|
|
|
|
+ 2: 'completed',
|
|
|
|
|
+ 5: 'return-back'
|
|
|
};
|
|
};
|
|
|
return map[s] || '';
|
|
return map[s] || '';
|
|
|
};
|
|
};
|
|
@@ -101,7 +103,8 @@ const getStatusText = (s: number) => {
|
|
|
[-1]: t('taskStatus.rejected'),
|
|
[-1]: t('taskStatus.rejected'),
|
|
|
0: t('taskStatus.inProgress'),
|
|
0: t('taskStatus.inProgress'),
|
|
|
1: t('taskStatus.pendingReview'),
|
|
1: t('taskStatus.pendingReview'),
|
|
|
- 2: t('taskStatus.completed')
|
|
|
|
|
|
|
+ 2: t('taskStatus.completed'),
|
|
|
|
|
+ 5: t('taskStatus.returnBack')
|
|
|
};
|
|
};
|
|
|
return map[s] || '';
|
|
return map[s] || '';
|
|
|
};
|
|
};
|
|
@@ -179,8 +182,8 @@ const goBack = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const goDetail = (item: TaskApplyInfo) => {
|
|
const goDetail = (item: TaskApplyInfo) => {
|
|
|
- if (item.status === 0) {
|
|
|
|
|
- // 进行中(status=0) - 跳转提交页
|
|
|
|
|
|
|
+ if (item.status === 0 || item.status === 5 || item.status === 3 || item.status === -1) {
|
|
|
|
|
+ // 进行中(0)、已拒绝(3/-1)或已打回(5) - 跳转提交页
|
|
|
router.push(`/task/submit/${item.id}`);
|
|
router.push(`/task/submit/${item.id}`);
|
|
|
} else {
|
|
} else {
|
|
|
// 其他状态 - 跳转详情页
|
|
// 其他状态 - 跳转详情页
|
|
@@ -319,6 +322,10 @@ onMounted(() => {
|
|
|
background: rgba(158, 158, 158, 0.2);
|
|
background: rgba(158, 158, 158, 0.2);
|
|
|
color: #9e9e9e;
|
|
color: #9e9e9e;
|
|
|
}
|
|
}
|
|
|
|
|
+ &.return-back {
|
|
|
|
|
+ background: rgba(255, 152, 0, 0.2);
|
|
|
|
|
+ color: #ff9800;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|