From 11c00d34bc0a22ba591727735789a7914b74f48a Mon Sep 17 00:00:00 2001 From: wren Date: Thu, 19 Mar 2026 15:50:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(ReviewPointsList):=20=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E4=BC=A0=E5=85=A5=E7=9A=84=20per-field=20res?= =?UTF-8?q?=20=E6=9B=BF=E4=BB=A3=E5=89=8D=E7=AB=AF=E8=87=AA=E8=A1=8C?= =?UTF-8?q?=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit renderModelRule 对 AI 评查点的 res 计算改为优先使用后端写入 config.fields[key].res 的值,fallback 到原来的 value 非空判定。 解决了评查点不通过但所有细项都显示绿色的问题。 Co-Authored-By: Claude Opus 4.6 --- app/components/reviews/ReviewPointsList.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/reviews/ReviewPointsList.tsx b/app/components/reviews/ReviewPointsList.tsx index 497956c..39a87fd 100644 --- a/app/components/reviews/ReviewPointsList.tsx +++ b/app/components/reviews/ReviewPointsList.tsx @@ -1582,6 +1582,7 @@ export function ReviewPointsList({ page: number | string; value: string; char_positions?: CharPosition[]; + res?: boolean; }>; ai_suggestion?: { summary?: string; @@ -1634,7 +1635,8 @@ export function ReviewPointsList({ // 遍历fields,获取每个字段的值并生成对应的JSX元素 if (config.fields) { Object.entries(config.fields).forEach(([key, value], index) => { - const res = value.value.trim() !== ''; + // 优先使用后端传入的 per-field res,fallback 到 value 非空判定 + const res = value.res !== undefined && value.res !== null ? value.res : value.value.trim() !== ''; fieldElements.push(