/** * 规范性评估报告组件 */ import { AlertTriangle, CheckCircle, XCircle } from 'lucide-react'; import type { EditorialReviewResult } from '../types'; import ScoreRing from './ScoreRing'; interface EditorialReportProps { data: EditorialReviewResult; } export default function EditorialReport({ data }: EditorialReportProps) { const getStatusIcon = (status: 'pass' | 'warning' | 'fail') => { switch (status) { case 'pass': return ; case 'warning': return ; case 'fail': return ; } }; const getStatusTag = (status: 'pass' | 'warning' | 'fail') => { switch (status) { case 'pass': return 通过; case 'warning': return 警告; case 'fail': return 不通过; } }; const getItemBgClass = (status: 'pass' | 'warning' | 'fail') => { switch (status) { case 'pass': return ''; case 'warning': return 'bg-amber-50/50'; case 'fail': return 'bg-red-50/50'; } }; return (
{/* 总分卡片 */}
= 80 ? 'border-green-200' : data.overall_score >= 60 ? 'border-amber-200' : 'border-red-200' }`}>

{data.overall_score >= 80 ? '基本符合稿约规范' : data.overall_score >= 60 ? '部分符合稿约规范' : '不符合稿约规范'}

{data.summary}

{/* 检测详情 */}
检测详情({data.items.length}项)
{data.items.map((item, index) => (
{getStatusIcon(item.status)}

{item.criterion}

{item.score}分 {getStatusTag(item.status)}
{item.issues && item.issues.length > 0 && (
{item.issues.map((issue, i) => (

• {issue}

))}
)} {item.suggestions && item.suggestions.length > 0 && (

建议:

{item.suggestions.map((suggestion, i) => (

• {suggestion}

))}
)}
))}
); }