fix: display canonical API failure labels in the grading page

This commit is contained in:
2026-10-18 12:17:11 +08:00
parent ba5a6952bb
commit 4fec28ce8d
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -34,6 +34,7 @@ const pageTypeLabel = (value: string) => pageTypeLabels[value] || '未分类页
const statusLabels: Record<string, string> = { pending: '待评分', scored: '模型已评分', reviewed: '教师已复核', needs_review: '待教师复核', unscorable: '材料缺失或解析失败', failed: '评分失败' };
const statusLabel = (value: string) => statusLabels[value] || value;
const scoreStatusLabel = (row: any) => {
if (row.status_label) return row.status_label;
if (row.status !== 'failed') return statusLabel(row.status);
if (/模型证据|target_id|评分项或满分|JSON校验/.test(row.error || '')) return '模型输出校验失败';
if (/ConnectError|Timeout|Network|连接|超时|HTTP/i.test(row.error || '')) return '模型连接失败';