diff --git a/app/api/evaluation_points/reviews.ts b/app/api/evaluation_points/reviews.ts index 4c0ef4d..4bec8ae 100644 --- a/app/api/evaluation_points/reviews.ts +++ b/app/api/evaluation_points/reviews.ts @@ -478,6 +478,7 @@ export async function getReviewPoints(fileId: string) { // "type": "logic", // "config": { // "logic": "all", + // "res": true, // "conditions": [ // { // "field": { diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx index c52fe3a..e4f2775 100644 --- a/app/components/layout/Sidebar.tsx +++ b/app/components/layout/Sidebar.tsx @@ -20,6 +20,12 @@ export function Sidebar({ onToggle, collapsed }: SidebarProps) { const [expandedMenus, setExpandedMenus] = useState>({}); const menuItems: MenuItem[] = [ + { + id: 'home', + title: '系统概览', + path: '/home', + icon: 'ri-home-line' + }, { id: 'contract-template', title: '合同模板', @@ -40,12 +46,6 @@ export function Sidebar({ onToggle, collapsed }: SidebarProps) { } ] }, - { - id: 'home', - title: '系统概览', - path: '/home', - icon: 'ri-home-line' - }, { id: 'file-management', title: '文件管理', diff --git a/app/components/reviews/FilePreview.tsx b/app/components/reviews/FilePreview.tsx index 0f3194c..ed5e314 100644 --- a/app/components/reviews/FilePreview.tsx +++ b/app/components/reviews/FilePreview.tsx @@ -179,7 +179,7 @@ export function FilePreview({ fileContent, activeReviewPointResultId, targetPage // 如果有目标页码,并且与上次相同,提示用户 if(targetPage && numPages && targetPage <= numPages && targetPage === prevTargetPageRef.current){ - toastService.success(`已跳转至目标页码`); + // toastService.success(`已跳转至目标页码`); } // 如果有目标页码,并且与上次不同或activeReviewPointId变化了,则执行跳转 if (targetPage && numPages && targetPage <= numPages && (targetPage !== prevTargetPageRef.current || activeReviewPointResultId)) { diff --git a/app/components/reviews/ReviewPointsList.tsx b/app/components/reviews/ReviewPointsList.tsx index 92b9d1e..c0b6116 100644 --- a/app/components/reviews/ReviewPointsList.tsx +++ b/app/components/reviews/ReviewPointsList.tsx @@ -577,7 +577,7 @@ export function ReviewPointsList({
{ // console.log('rule-------', rule); - // if (rule.type === 'consistency' && rule.res === true) { if (rule.type === 'consistency') { - // console.log('rule-------', rule); - return
-
- {renderConsistencyRule(rule, reviewPoint)} + // if (rule.res === true && reviewPoint.result === true) { + return
+
+ {renderConsistencyRule(rule, reviewPoint)}
; + // }else { + // return null; + // } } if (rule.type === 'ai') { @@ -839,9 +841,15 @@ export function ReviewPointsList({ * @returns 评查点一致性的规则的样式 */ const renderConsistencyRule = (singleReviewPoint: Record,reviewPoint: ReviewPoint) => { + // 如果评查点结果为false,则判断单个规则是否通过,如果一致,则渲染 + if (reviewPoint.result !== singleReviewPoint.res) { + return null; + } + if (!singleReviewPoint || Object.keys(singleReviewPoint).length === 0) { return null; } + // console.log('singleReviewPoint-------', singleReviewPoint); // 检查是否存在配置和pairs数组 const config = singleReviewPoint.config as { @@ -1126,6 +1134,7 @@ export function ReviewPointsList({ >
+ {/* 展示链条 */}
{chain.map((item, idx) => ( @@ -1141,18 +1150,19 @@ export function ReviewPointsList({ ))}
+ {/* 展示链条的每个元素的内容 */}
{chain.map((item, idx) => ( - )} + )} */}
{/* 初始上传区域 */} {uploadStage === "idle" && ( <> - {!isContractType ? ( - // 标准上传区域 - 非合同类型 + {/* {!isContractType ? ( */} + {/* {true ? ( */} + {/* // 标准上传区域 - 非合同类型 */} - ) : ( - // 合同文件上传区域 - 双区域并排 -
+ {/* ) : ( */} + {/* 合同文件上传区域 - 双区域并排 */} + {/*

合同主文件

- {contractMainFiles.length > 0 && ( -
- - 已选择主文件: {contractMainFiles[0].name} -
- )} -
-
-

合同附件

- - {contractAttachmentFiles.length > 0 && ( -
- - 已选择附件: {contractAttachmentFiles.map((file, index) => ( - {file.name} - ))} -
- )} -
-
- )} + // onFilesSelected={handleContractMainFilesSelected} + // ref={contractMainFileRef} + // multiple={false} + // accept=".pdf" + // tipText="请上传合同主文件,格式:PDF" + // mainText="上传合同主文件" + // buttonText="选择主文件" + // icon="ri-file-text-line" + // shouldPreventFileSelect={!fileType} + // /> + // {contractMainFiles.length > 0 && ( + //
+ // + // 已选择主文件: {contractMainFiles[0].name} + //
+ // )} + //
+ //
+ //

合同附件

+ // + // {contractAttachmentFiles.length > 0 && ( + //
+ // + // 已选择附件: {contractAttachmentFiles.map((file, index) => ( + // {file.name} + // ))} + //
+ // )} + //
+ //
+ // )} {/* 测试文档标记 */}