From d61657eedbd6b7e743409f1d9b3b65cd8a081040 Mon Sep 17 00:00:00 2001 From: sinohqb Date: Thu, 20 Aug 2026 19:34:18 +0800 Subject: [PATCH] fix(ui): display 5-point scale scores correctly in dimension cards --- .../web/src/components/intelligent_eval/EvalReport.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/web/src/components/intelligent_eval/EvalReport.tsx b/frontend/web/src/components/intelligent_eval/EvalReport.tsx index 9060e6f..c8d70df 100644 --- a/frontend/web/src/components/intelligent_eval/EvalReport.tsx +++ b/frontend/web/src/components/intelligent_eval/EvalReport.tsx @@ -105,15 +105,15 @@ function SessionMessages({ evalId, sessionId, verdict }: { function DimensionScoresCards({ dimScores }: { dimScores: [string, number][] }) { const getScoreMeta = (score: number) => { - if (score >= 0.8) return { color: statusColors.completed, label: '优秀', icon: } - if (score >= 0.6) return { color: colors.warning, label: '良好', icon: } + if (score >= 4) return { color: statusColors.completed, label: '优秀', icon: } + if (score >= 3) return { color: colors.warning, label: '良好', icon: } return { color: statusColors.failed, label: '待改进', icon: } } return (
{dimScores.map(([dimension, score]) => { - const pct = Math.round(score * 100) + const pct = Math.round((score / 5) * 100) const meta = getScoreMeta(score) return (
@@ -136,7 +136,7 @@ function DimensionScoresCards({ dimScores }: { dimScores: [string, number][] }) />
- {pct} + {score.toFixed(1)}