feat: 修复 AI 风险语义并隔离 Mock 数据

This commit is contained in:
weijuesen
2026-08-14 01:16:50 +08:00
parent 839ba91354
commit 74d1948d68
29 changed files with 650 additions and 113 deletions
+2
View File
@@ -113,6 +113,7 @@ const InspectionPage: React.FC = () => {
? '检测到疑似异常'
: '未见明显异常'
: 'AI 检测失败'}
{result.isMock ? '(联调 Mock' : ''}
</Text>
{result.aiStatus === 'done' && result.detections && result.detections.length > 0 ? (
<View className={styles.detectionList}>
@@ -145,6 +146,7 @@ const InspectionPage: React.FC = () => {
? '疑似异常'
: '正常'
: '检测失败'}
{rec.isMock ? 'Mock' : ''}
</Text>
<Text className={styles.historyTime}>{formatRelativeTime(rec.createdAt)}</Text>
</View>
+11
View File
@@ -223,6 +223,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;
idempotencyKey?: string;
createdAt?: string;