diff --git a/app/components/reviews/AIAnalysis.tsx b/app/components/reviews/AIAnalysis.tsx new file mode 100644 index 0000000..3ef4afc --- /dev/null +++ b/app/components/reviews/AIAnalysis.tsx @@ -0,0 +1,132 @@ +/** + * AI智能分析组件 + * 显示AI对文档的分析结果、风险提示和优化建议 + */ + +// 分析项类型 +interface AnalysisItem { + title: string; + content: string; + description: string; +} + +// 分析数据类型 +interface AnalysisData { + riskAlerts: AnalysisItem[]; + suggestions: AnalysisItem[]; + summary: string; +} + +interface AIAnalysisProps { + analysisData: AnalysisData; + score: number; + onConfirmResults: () => void; +} + +export function AIAnalysis({ analysisData, score, onConfirmResults }: AIAnalysisProps) { + const handleExportReport = () => { + alert('导出评查报告功能'); + }; + + // 渲染风险提示项 + const renderRiskAlerts = () => { + return analysisData.riskAlerts.map((item, index) => ( +
+ {item.title}: + {item.content} +
+{item.description}
++ {item.title}: + {item.content} +
+{item.description}
+{analysisData.summary}
+ + {/* 评分 */} ++ 合规性评分: + {score}分 +
+合同编号:{fileContent.contractNumber}
+ +甲方(供方):{fileContent.parties.partyA.name}
+地址:{fileContent.parties.partyA.address}
+法定代表人:{fileContent.parties.partyA.representative}
+联系电话:{fileContent.parties.partyA.phone}
++
乙方(需方):{fileContent.parties.partyB.name}
+地址:{fileContent.parties.partyB.address}
+法定代表人:{fileContent.parties.partyB.representative}
+联系电话:{fileContent.parties.partyB.phone}
+根据《中华人民共和国合同法》及有关法律法规的规定,经双方协商一致,签订本合同,共同遵守。
+ + {fileContent.sections.map((section, sectionIndex) => ( +{line}
+{line}
; + } + }); + }; + + return ( +已处理
+ {reviewPoint.suggestion && ( +{reviewPoint.suggestion}
+{reviewPoint.content || '(内容为空)'}
+ + {reviewPoint.suggestion && ( +{reviewPoint.content || '(内容为空)'}
+ + {reviewPoint.suggestion && ( +{reviewPoint.suggestion}
+没有找到匹配的评查点
+请尝试不同的搜索词或清除筛选条件
+ {(searchText || statusFilter) && ( + + )} +