From 9a366d042a16fb0d098982892e7289d6e59645e1 Mon Sep 17 00:00:00 2001 From: yorn <1057707203@qq.com> Date: Fri, 25 Jul 2025 17:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA=E6=8F=90?= =?UTF-8?q?=E5=87=BA=E6=84=8F=E8=A7=81=E6=97=B6=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E5=B7=B2=E8=8E=B7=E5=BE=97=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/evaluation_points/reviews.ts | 7 ++++-- .../cross-checking/ReviewPointsList.tsx | 24 ++++++++++--------- app/config/api-config.ts | 8 ++++++- app/routes/cross-checking._index.tsx | 16 ++++++------- 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/app/api/evaluation_points/reviews.ts b/app/api/evaluation_points/reviews.ts index a596140..1a8cf0e 100644 --- a/app/api/evaluation_points/reviews.ts +++ b/app/api/evaluation_points/reviews.ts @@ -420,8 +420,11 @@ export async function getReviewPoints(fileId: string, request: Request) { // score是评查点设置的满分的分数 score: point.score || 0, - // finalScore是评查点对应评查结果最终所得的分数 用户交叉评查时使用 - finalScore: result.final_score || 0, + // finalScore是评查点对应评查结果最终所得的分数 用户交叉评查时使用,可能为null + finalScore: result.final_score, + + // machineScore是评查点对应评查结果机器进行的评分,交叉评查时使用,实际上对应的是评查点设置好的分数 + machineScore: result.machine_score, postAction: point.post_action || '', // postAction: 'manual', diff --git a/app/components/cross-checking/ReviewPointsList.tsx b/app/components/cross-checking/ReviewPointsList.tsx index 528abaf..35f5549 100644 --- a/app/components/cross-checking/ReviewPointsList.tsx +++ b/app/components/cross-checking/ReviewPointsList.tsx @@ -118,7 +118,8 @@ export interface ReviewPoint { failMessage?: string; passMessage?: string; score?: number; // 评查点满分 - finalScore?: number; // 评查点已获得分数 + finalScore?: number | null; // 评查点最终获得分数 + machineScore?: number; // 评查点机器获得分数 evaluationConfig?: { rules?: Array<{ type: string; @@ -445,15 +446,15 @@ export function ReviewPointsList({ const fetcher = useFetcher(); // 归一化 reviewPoints,确保每个点都有 id 字段 - const [normalizedReviewPoints, setNormalizedReviewPoints] = useState([]); - console.log('normalizedReviewPoints', normalizedReviewPoints); - useEffect(() => { - const norm = reviewPoints.map(point => ({ - ...point, - id: String(point.id || point.evaluationPointId || point.pointId || '') // 保证 id 为字符串且不为 undefined - })); - setNormalizedReviewPoints(norm); - }, [reviewPoints]); + // const [normalizedReviewPoints, setNormalizedReviewPoints] = useState([]); + // console.log('normalizedReviewPoints', normalizedReviewPoints); + // useEffect(() => { + // const norm = reviewPoints.map(point => ({ + // ...point, + // id: String(point.id || point.evaluationPointId || point.pointId || '') // 保证 id 为字符串且不为 undefined + // })); + // setNormalizedReviewPoints(norm); + // }, [reviewPoints]); // 同步外部scoringProposals到本地状态 useEffect(() => { @@ -2573,7 +2574,8 @@ export function ReviewPointsList({ > = { + '51703': { + baseUrl: 'http://172.16.0.55:51703', + documentUrl: 'http://172.16.0.55:51703/docauditai/', + uploadUrl: 'http://172.16.0.55:51703/admin/documents' + }, '51704': { baseUrl: 'http://172.16.0.55:51704', documentUrl: 'http://172.16.0.55:51704/docauditai/', @@ -96,7 +101,8 @@ const configs: Record = { // 生产环境 production: { // postgrest - baseUrl: 'http://10.79.97.17:8000', + baseUrl: 'http://172.16.0.55:8008', + // baseUrl: 'http://10.79.97.17:8000', // minio documentUrl: 'http://10.76.244.156:9000/docauditai/', // 文件上传 diff --git a/app/routes/cross-checking._index.tsx b/app/routes/cross-checking._index.tsx index c16a1fc..1367586 100644 --- a/app/routes/cross-checking._index.tsx +++ b/app/routes/cross-checking._index.tsx @@ -605,14 +605,14 @@ export default function CrossCheckingIndex() { ); } }, - { - title: "评查分数", - key: "score", - align: "center" as const, - width: "5%", - render: (_: unknown, record: CrossCheckingTask) => - record.status === CrossCheckingTaskStatus.COMPLETED ? record.score : '-' - }, + // { + // title: "评查分数", + // key: "score", + // align: "center" as const, + // width: "5%", + // render: (_: unknown, record: CrossCheckingTask) => + // record.status === CrossCheckingTaskStatus.COMPLETED ? record.score : '-' + // }, { title: "操作", key: "operation",