修复: 多视图UX(知识库窄屏CSS+任务详情路由+项目灵感视图)
This commit is contained in:
@@ -126,15 +126,13 @@ const stats = computed(() => [
|
||||
])
|
||||
|
||||
function getProjectStage(status: string): { stage: string; stageLabelKey: string; progress: number } {
|
||||
// stage(颜色档)与 stageLabelKey(文案)语义必须一致:
|
||||
// planning/cancelled 不再借用 coding/testing 颜色(否则颜色撒谎),改用专属颜色档。
|
||||
// F-09 对齐:project status 死键(in_progress/paused/cancelled)已从后端映射移除,
|
||||
// 此处 switch 同步收敛,与 constants/project.ts 的 PROJECT_STAGE_INFO 语义一致。
|
||||
switch (status) {
|
||||
case 'planning': return { stage: 'planning', stageLabelKey: 'planning', progress: 20 }
|
||||
case 'in_progress': return { stage: 'coding', stageLabelKey: 'coding', progress: 55 }
|
||||
case 'paused': return { stage: 'testing', stageLabelKey: 'paused', progress: 40 }
|
||||
case 'active': return { stage: 'coding', stageLabelKey: 'coding', progress: 55 }
|
||||
case 'completed': return { stage: 'release', stageLabelKey: 'done', progress: 100 }
|
||||
case 'cancelled': return { stage: 'cancelled', stageLabelKey: 'cancelled', progress: 0 }
|
||||
default: return { stage: 'coding', stageLabelKey: 'coding', progress: 30 }
|
||||
default: return { stage: 'planning', stageLabelKey: 'planning', progress: 20 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user