feat: 修复 AI 风险语义并隔离 Mock 数据
This commit is contained in:
@@ -15,6 +15,17 @@ export interface InspectionRecord {
|
||||
detections?: AIDetection[];
|
||||
riskScore?: number;
|
||||
riskLevel?: string;
|
||||
riskAssessment?: {
|
||||
score: number;
|
||||
level: string;
|
||||
confidence: string;
|
||||
modelVersion: string;
|
||||
ruleVersion: string;
|
||||
components: Record<string, number | null>;
|
||||
missing: string[];
|
||||
};
|
||||
modelVersion?: string;
|
||||
isMock?: boolean;
|
||||
aiStatus: string;
|
||||
createdAt?: string;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,17 @@ export default function InspectionsPage() {
|
||||
width: 80,
|
||||
render: (_, r) => (r.imageUrl ? <Image src={r.imageUrl} width={48} height={48} style={{ objectFit: 'cover', borderRadius: 4 }} /> : '-'),
|
||||
},
|
||||
{ title: '状态', dataIndex: 'aiStatus', search: false, render: (_, r) => (r.aiStatus === 'done' ? <Tag color="green">成功</Tag> : <Tag color="red">失败</Tag>) },
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'aiStatus',
|
||||
search: false,
|
||||
render: (_, r) => (
|
||||
<>
|
||||
{r.aiStatus === 'done' ? <Tag color="green">成功</Tag> : <Tag color="red">失败</Tag>}
|
||||
{r.isMock ? <Tag color="orange">Mock</Tag> : null}
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
@@ -101,6 +111,8 @@ export default function InspectionsPage() {
|
||||
<br />
|
||||
状态:{detail.aiStatus === 'done' ? '检测成功' : '检测失败'}
|
||||
<br />
|
||||
数据:{detail.isMock ? '联调 Mock,不计入生产统计' : detail.modelVersion || '未知模型'}
|
||||
<br />
|
||||
风险分:{detail.riskScore !== undefined ? Math.round(detail.riskScore) : '-'}(
|
||||
{detail.riskLevel ? riskLevelLabel(detail.riskLevel) : '-'})
|
||||
</Typography.Paragraph>
|
||||
|
||||
Reference in New Issue
Block a user