Files
InternalAuditInterprise/frontend/src/labels.ts
T

39 lines
950 B
TypeScript

// 后端英文枚举值 → 中文显示映射
export const confidenceLabel: Record<string, string> = {
high: "高置信",
medium: "中置信",
low: "低置信",
};
export const statusLabel: Record<string, string> = {
new: "待处理",
assigned: "已分派",
reviewing: "研判中",
confirmed: "已确认(属实)",
dismissed: "已排除(误报)",
rectifying: "整改中",
transferred: "已移交",
closed: "已销项",
};
export const feedbackLabel: Record<string, string> = {
confirmed: "属实",
false_positive: "误报",
};
export const scenarioLabel: Record<string, string> = {
R8: "政企拆单",
R9: "养卡骗补",
};
export const providerLabel: Record<string, string> = {
mock: "本地Mock",
vllm: "本地vLLM",
dashscope: "公网千问",
};
// 带兜底的取值函数
export const L = (map: Record<string, string>, key: string | null | undefined): string =>
key ? map[key] ?? key : "-";