feat: 1. 实现一键替换。

2. 优化追加附件和模板上传的样式。
This commit is contained in:
2025-12-03 12:07:56 +08:00
parent 2897423404
commit d88cfc818b
13 changed files with 627 additions and 141 deletions
+7 -1
View File
@@ -59,10 +59,15 @@ interface FilePreviewProps {
sub: string;
nick_name: string;
}; // 用户信息(用于 Collabora
aiSuggestionReplace?: {
searchText: string;
replaceText: string;
pageNumber: number;
}; // AI建议替换参数
}
// export function FilePreview({ fileContent, reviewPoints, activeReviewPointResultId, targetPage }: FilePreviewProps) {
export function FilePreview({ fileContent, activeReviewPointResultId, targetPage, charPositions, highlightValue, isStructuredView = false, userInfo }: FilePreviewProps) {
export function FilePreview({ fileContent, activeReviewPointResultId, targetPage, charPositions, highlightValue, isStructuredView = false, userInfo, aiSuggestionReplace }: FilePreviewProps) {
// 获取文件类型
const real_path = fileContent.path || fileContent.template_contract_path || '';
const fileExtension = real_path.split('.').pop()?.toLowerCase();
@@ -361,6 +366,7 @@ export function FilePreview({ fileContent, activeReviewPointResultId, targetPage
userName={userInfo?.nick_name || ''}
targetPage={targetPage}
highlightText={highlightText}
aiSuggestionReplace={aiSuggestionReplace}
/>
);
} else {