From cea91e77791ce24ca7ae64800118568933dda78c Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 28 Jul 2026 12:56:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(duplication):=20=E6=81=A2=E5=A4=8Dconstants?= =?UTF-8?q?.ts=E4=B8=AD=E8=A2=AB=E8=AF=AF=E5=88=A0=E7=9A=84=E5=85=B1?= =?UTF-8?q?=E4=BA=AB=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/pages/duplication/constants.ts | 53 +++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/apps/web/src/pages/duplication/constants.ts b/apps/web/src/pages/duplication/constants.ts index fa7c414d3..289bc3ddc 100755 --- a/apps/web/src/pages/duplication/constants.ts +++ b/apps/web/src/pages/duplication/constants.ts @@ -1,3 +1,56 @@ +import type { DuplicationStatus } from "@/api/duplication" +import type { RiskFilter } from "./types" + +/** 状态配置 */ +export const STATUS_CONFIG: Record< + DuplicationStatus, + { + variant: "primary" | "warning" | "success" | "error" + text: string + icon: string + } +> = { + pending: { variant: "primary", text: "等待中", icon: "⏳" }, + processing: { variant: "warning", text: "查重中", icon: "🔄" }, + completed: { variant: "success", text: "已完成", icon: "✅" }, + failed: { variant: "error", text: "失败", icon: "❌" }, +} + +/** 风险等级描述 */ +export const RISK_DESC: Record = { + low: "查重率较低,内容原创度高", + medium: "存在一定重复,建议修改部分片段", + high: "重复率较高,建议大幅修改或替换", +} + +/** 风险等级标签变体 */ +export const RISK_TAG_VARIANT: Record = { + low: "success", + medium: "warning", + high: "error", +} + +/** 风险等级文字(详情页用) */ +export const RISK_LABEL: Record = { + low: "低风险", + medium: "中风险", + high: "高风险", +} + +/** 风险等级标签(列表页用) */ +export const RISK_LABELS: Record = { + low: "低风险", + medium: "中风险", + high: "高风险", +} + +export const FILTER_OPTIONS: { key: RiskFilter; label: string }[] = [ + { key: "all", label: "全部" }, + { key: "low", label: "低风险" }, + { key: "medium", label: "中风险" }, + { key: "high", label: "高风险" }, +] + /** 支持的视频格式 */ export const ACCEPT_FORMATS = ".mp4,.avi,.mov,.mkv,.wmv,.flv,.webm" export const FORMAT_LIST = ["MP4", "AVI", "MOV", "MKV", "WMV", "FLV", "WebM"]