diff --git a/app/api/auth/user-routes.ts b/app/api/auth/user-routes.ts index 82bc063..852f43b 100644 --- a/app/api/auth/user-routes.ts +++ b/app/api/auth/user-routes.ts @@ -199,7 +199,23 @@ const FALLBACK_MENU_DATA: Record = { title: '交叉评查', path: '/cross-checking', icon: 'ri-color-filter-line', - order: 7 + order: 7, + children: [ + { + id: 'cross-checking-upload', + title: '创建任务', + path: '/cross-checking/upload', + icon: 'ri-upload-cloud-line', + order: 1 + }, + { + id: 'cross-checking-result', + title: '评查结果', + path: '/cross-checking/result', + icon: 'ri-file-list-3-line', + order: 2 + } + ] } ], 'common': [ @@ -291,7 +307,23 @@ const FALLBACK_MENU_DATA: Record = { title: '交叉评查', path: '/cross-checking', icon: 'ri-color-filter-line', - order: 7 + order: 7, + children: [ + { + id: 'cross-checking-upload', + title: '创建任务', + path: '/cross-checking/upload', + icon: 'ri-upload-cloud-line', + order: 1 + }, + { + id: 'cross-checking-result', + title: '评查结果', + path: '/cross-checking/result', + icon: 'ri-file-list-3-line', + order: 2 + } + ] } ], 'deptLeader': [ @@ -390,7 +422,23 @@ const FALLBACK_MENU_DATA: Record = { title: '交叉评查', path: '/cross-checking', icon: 'ri-color-filter-line', - order: 7 + order: 7, + children: [ + { + id: 'cross-checking-upload', + title: '创建任务', + path: '/cross-checking/upload', + icon: 'ri-upload-cloud-line', + order: 1 + }, + { + id: 'cross-checking-result', + title: '评查结果', + path: '/cross-checking/result', + icon: 'ri-file-list-3-line', + order: 2 + } + ] } ], 'groupLeader': [ @@ -482,7 +530,23 @@ const FALLBACK_MENU_DATA: Record = { title: '交叉评查', path: '/cross-checking', icon: 'ri-color-filter-line', - order: 7 + order: 7, + children: [ + { + id: 'cross-checking-upload', + title: '创建任务', + path: '/cross-checking/upload', + icon: 'ri-upload-cloud-line', + order: 1 + }, + { + id: 'cross-checking-result', + title: '评查结果', + path: '/cross-checking/result', + icon: 'ri-file-list-3-line', + order: 2 + } + ] } ] }; diff --git a/app/components/cross-checking/ReviewPointsList.tsx b/app/components/cross-checking/ReviewPointsList.tsx index 48ecdb5..a14143e 100644 --- a/app/components/cross-checking/ReviewPointsList.tsx +++ b/app/components/cross-checking/ReviewPointsList.tsx @@ -449,7 +449,9 @@ export function ReviewPointsList({ scoringProposals = [], jwtToken, userInfo, - onOpinionSubmitted + onOpinionSubmitted, + fileFormat, + onAiSuggestionReplace }: ReviewPointsListProps) { // 状态管理 const [searchText, setSearchText] = useState(''); // 搜索文本 @@ -1971,10 +1973,15 @@ export function ReviewPointsList({ // 渲染AI建议(ai_suggestion) if (config.ai_suggestion?.suggestions && Object.keys(config.ai_suggestion.suggestions).length > 0) { + // 判断是否为PDF文档(禁用替换按钮) + fileFormat = fileFormat?.replace(/\./g,'') + const isPDF = fileFormat?.toUpperCase() === 'PDF'; + // 遍历suggestions对象的key-value对 Object.entries(config.ai_suggestion.suggestions).forEach(([key, suggestionValue], index) => { // 检查建议值是否存在(null 或有值都要渲染) const hasSuggestedValue = suggestionValue.suggested_value !== null && suggestionValue.suggested_value.trim() !== ''; + const isReplaceDisabled = !hasSuggestedValue || isPDF; fieldElements.push(
@@ -1986,7 +1993,7 @@ export function ReviewPointsList({ {/* 原因说明 */}
-
+
{suggestionValue.reason} @@ -1999,14 +2006,14 @@ export function ReviewPointsList({
- {/* 建议内容显示 */} + {/* 建议内容和替换按钮 */}
{/* 文本输入框 */}