"use client" import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog" import { Button } from "@/components/ui/button" import { Badge } from "@/components/ui/badge" import { ScrollArea } from "@/components/ui/scroll-area" import { FileText, Download, RefreshCw, Brain, CheckCircle, XCircle, Clock } from "lucide-react" interface AICleaningLogsDialogProps { open: boolean onOpenChange: (open: boolean) => void ruleName?: string } const AI_LOGS = [ { time: "14:35:12", type: "system", message: "AI清洗任务启动", details: "规则: 用户数据智能清洗 | 模型: GPT-4", }, { time: "14:35:13", type: "ai", message: "分析提示词", details: "解析清洗意图: 手机号格式化、邮箱校验、地址补全", }, { time: "14:35:15", type: "system", message: "读取数据批次 1/10", details: "共 12,895 条记录", }, { time: "14:35:18", type: "ai", message: "AI分析完成", details: "发现 156 条需要清洗的记录, 置信度范围: 0.72-0.98", }, { time: "14:35:20", type: "review", message: "自动审核通过", details: "142 条记录置信度 >= 0.95, 已自动应用", }, { time: "14:35:21", type: "review", message: "待人工审核", details: "14 条记录置信度 < 0.95, 等待审核", }, { time: "14:35:25", type: "system", message: "批次 1 处理完成", details: "成功: 12,881 | 待审核: 14 | 跳过: 0", }, { time: "14:36:45", type: "ai", message: "AI建议", details: "检测到 '86-' 前缀手机号模式, 建议添加自动化规则", }, ] export function AICleaningLogsDialog({ open, onOpenChange, ruleName }: AICleaningLogsDialogProps) { const getTypeIcon = (type: string) => { switch (type) { case "ai": return case "review": return case "error": return default: return } } const getTypeBadge = (type: string) => { switch (type) { case "ai": return AI case "review": return 审核 case "error": return 错误 default: return 系统 } } return ( AI清洗日志 - {ruleName || "清洗规则"} 查看AI清洗规则的执行日志和AI分析过程
运行中 已运行: 1分33秒
{AI_LOGS.map((log, i) => (
{getTypeIcon(log.type)}
{log.time} {getTypeBadge(log.type)} {log.message}

{log.details}

))}
) }