From 74351ae487297f193c43965bc14518f25d127886 Mon Sep 17 00:00:00 2001 From: zhouhaibin Date: Tue, 22 Jul 2025 16:52:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/configs/tenderTaskConfigs.json | 391 ++++++++++-------- .../src/PdfPreview/PdfPreviewComponent.vue | 1 - src/components/UniversalResultDrawer.vue | 13 +- src/utils/encryption/crypto.ts | 52 ++- src/utils/http/axios/index.ts | 13 +- .../ContractualTasks/ContractualTasks.data.ts | 4 + 6 files changed, 275 insertions(+), 199 deletions(-) diff --git a/public/configs/tenderTaskConfigs.json b/public/configs/tenderTaskConfigs.json index df46ec2..afb0e0f 100644 --- a/public/configs/tenderTaskConfigs.json +++ b/public/configs/tenderTaskConfigs.json @@ -1,186 +1,237 @@ { - "bidConsistencyReview": { - "taskType": "bidConsistencyReview", - "name": "投标文件综合分析", - "mode": "tabs", - "tabs": [ - { - "key": "文档元数据", - "label": "文档元数据", - "fields": [ - { - "field": "originalText", - "title": "文档名称", - "dataType": "string", - "displayType": "markdown", - "pdfSource": "bid", - "required": true - }, - { - "field": "reviewBasis", - "title": "详细元数据信息", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["review_content", "review_points"], - "separator": ":", - "fieldProcessors": { - "review_points": "arrayJoinNewLine" - } + "bidConsistencyReview": { + "taskType": "bidConsistencyReview", + "name": "投标文件综合分析", + "mode": "tabs", + "tabs": [ + { + "key": "文档元数据", + "label": "文档元数据", + "fields": [ + { + "field": "originalText", + "title": "文档名称", + "dataType": "string", + "displayType": "markdown", + "pdfSource": "bid", + "required": true + }, + { + "field": "reviewBasis", + "title": "详细元数据信息", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "review_content", + "review_points" + ], + "separator": ":", + "fieldProcessors": { + "review_points": "arrayJoinNewLine" } } - ] - }, - { - "key": "重点关注相似内容", - "label": "重点关注相似内容", - "fields": [ - - { - "field": "reviewBasis", - "title": "各文档具体内容", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["review_points"], - "separator": ":", - "fieldProcessors": { - "review_points": "arrayJoinNewLine" - } - }, - "showComparison": true, - "comparisonConfig": { - "comparisonField": "modificationDisplay", - "comparisonTitle": "修改情况展示", - "showButton": true - } - }, - { - "field": "reviewBasis", - "title": "错别字", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["error_review_points"], - "separator": ":", - "fieldProcessors": { - "error_review_points": "arrayJoinNewLine" - } + } + ] + }, + { + "key": "公司人员信息", + "label": "公司人员信息", + "fields": [ + { + "field": "issueName", + "title": "文档名称", + "dataType": "string", + "displayType": "markdown", + "pdfSource": "bid", + "required": true + }, + { + "field": "reviewBasis", + "title": "公司人员信息详情", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "review_points" + ], + "separator": ":", + "fieldProcessors": { + "review_points": "arrayJoinNewLine" } } - ] - }, - { - "key": "错别字", - "label": "错别字", - "fields": [ - { - "field": "originalText", - "title": "文档1原文", - "dataType": "string", - "displayType": "markdown", - "pdfSource": "bid", - "required": true - }, - { - "field": "comparedText", - "title": "文档2原文", - "dataType": "string", - "displayType": "markdown", - "pdfSource": "bid", - "required": true + } + ] + }, + { + "key": "重点关注相似内容", + "label": "重点关注相似内容", + "fields": [ + { + "field": "reviewBasis", + "title": "各文档具体内容", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "review_points" + ], + "separator": ":", + "fieldProcessors": { + "review_points": "arrayJoinNewLine" + } }, - - { - "field": "reviewBasis", - "title": "错误详情", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["review_content", "review_points"], - "separator": ":", - "fieldProcessors": { - "review_points": "arrayJoin" - } + "showComparison": true, + "comparisonConfig": { + "comparisonField": "modificationDisplay", + "comparisonTitle": "修改情况展示", + "showButton": true + } + }, + { + "field": "reviewBasis", + "title": "错别字", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "error_review_points" + ], + "separator": ":", + "fieldProcessors": { + "error_review_points": "arrayJoinNewLine" } } - ] - }, - { - "key": "一般相似内容", - "label": "一般相似内容", - "fields": [ - { - "field": "modificationDisplay", - "title": "涉及文档", - "dataType": "string", - "displayType": "markdown" - }, - { - "field": "reviewBasis", - "title": "各文档具体内容", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["review_content", "review_points"], - "separator": ":", - "fieldProcessors": { - "review_points": "arrayJoinNewLine" - } + } + ] + }, + { + "key": "一般相似内容", + "label": "一般相似内容", + "fields": [ + { + "field": "modificationDisplay", + "title": "涉及文档", + "dataType": "string", + "displayType": "markdown" + }, + { + "field": "reviewBasis", + "title": "各文档具体内容", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "review_content", + "review_points" + ], + "separator": ":", + "fieldProcessors": { + "review_points": "arrayJoinNewLine" } } - ] + } + ] + } + ] + }, + "tenderComplianceReview": { + "taskType": "tenderComplianceReview", + "name": "招投标文件合规性审核", + "mode": "single", + "pdfConfig": { + "layout": "single", + "sources": [ + { + "id": "document", + "title": "投标文件", + "apiField": "id" } ] }, - "tenderComplianceReview": { - "taskType": "tenderComplianceReview", - "name": "招投标合规性审查", - "mode": "single", - "fields": [ - { - "field": "originalText", - "title": "原文", - "dataType": "string", - "displayType": "markdown", - "pdfSource": "bid", - "required": true - }, - { - "field": "reviewBasis", - "title": "审查意见", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["review_content"], - "separator": ":" + "fields": [ + { + "field": "issueName", + "title": "合规性分类-具体问题(示例:资质审查-业绩要求)", + "dataType": "string", + "displayType": "markdown", + "pdfSource": "document" + }, + { + "field": "originalText", + "title": "原文", + "dataType": "string", + "displayType": "markdown", + "pdfSource": "document" + }, + { + "field": "reviewBasis", + "title": "相关法律法规政策", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "review_points" + ], + "separator": ":", + "fieldProcessors": { + "review_points": "arrayJoinNewLine" } - }, - { - "field": "reviewBasis", - "title": "审查要点", - "dataType": "json", - "displayType": "markdown", - "jsonConfig": { - "extractFields": ["review_points"], - "separator": ":", - "fieldProcessors": { - "review_points": "arrayJoinNewLine" - } + } + }, + { + "field": "modifiedContent", + "title": "修改建议", + "dataType": "string", + "displayType": "markdown", + "pdfSource": "document" + }, + { + "field": "reviewBasis", + "title": "风险等级(红色预警:直接废标项,橙色风险:可能引发投诉项)", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "risk_level" + ], + "separator": ":" + } + } + ] + }, + "bidImageAnalysis": { + "taskType": "bidImageAnalysis", + "name": "招标文件图片相似度分析", + "mode": "single", + "fields": [ + { + "field": "originalText", + "title": "图片1路径", + "dataType": "string", + "displayType": "markdown" + }, + { + "field": "comparedText", + "title": "图片2路径", + "dataType": "string", + "displayType": "markdown" + }, + { + "field": "reviewBasis", + "title": "页码", + "dataType": "json", + "displayType": "markdown", + "jsonConfig": { + "extractFields": [ + "review_points" + ], + "separator": ":", + "fieldProcessors": { + "review_points": "arrayJoinNewLine" } - }, - { - "field": "modifiedContent", - "title": "修改建议", - "dataType": "string", - "displayType": "markdown" - }, - { - "field": "modificationDisplay", - "title": "修改情况", - "dataType": "string", - "displayType": "markdown" } - ] - } - } \ No newline at end of file + } + ] + } +} \ No newline at end of file diff --git a/src/components/Preview/src/PdfPreview/PdfPreviewComponent.vue b/src/components/Preview/src/PdfPreview/PdfPreviewComponent.vue index 9947f6c..0722a7a 100644 --- a/src/components/Preview/src/PdfPreview/PdfPreviewComponent.vue +++ b/src/components/Preview/src/PdfPreview/PdfPreviewComponent.vue @@ -126,7 +126,6 @@ } } catch (error) { console.error('加载PDF失败:', error); - message.error('加载PDF失败'); emit('pdfError', error); } finally { loading.value = false; diff --git a/src/components/UniversalResultDrawer.vue b/src/components/UniversalResultDrawer.vue index daebe8a..77e3286 100644 --- a/src/components/UniversalResultDrawer.vue +++ b/src/components/UniversalResultDrawer.vue @@ -1276,7 +1276,7 @@ .item-card { width: 100%; - margin-bottom: 10px; + margin-bottom: 1px; cursor: pointer; } @@ -1314,8 +1314,8 @@ } .item-title { - font-weight: 500; - font-size: 14px; + font-weight: 600; + font-size: 16px; flex: 1; overflow: visible; text-overflow: unset; @@ -1341,7 +1341,8 @@ } .section-title { - font-weight: 500; + font-weight: 600; + font-size: 16px; margin-bottom: 8px; color: #333; display: flex; @@ -1387,9 +1388,11 @@ padding: 12px; background-color: #f9fbfd; border-radius: 4px; - white-space: pre-wrap; + // white-space: pre-wrap; max-height: 300px; overflow: auto; + font-size: 18px; + font-weight: 500; } .comparison-section { diff --git a/src/utils/encryption/crypto.ts b/src/utils/encryption/crypto.ts index 480700c..0937060 100644 --- a/src/utils/encryption/crypto.ts +++ b/src/utils/encryption/crypto.ts @@ -24,7 +24,8 @@ function randomUUID() { // /** -// * 随机生成aes 密钥 +// * 随机生成aes 密钥 (已废弃,请使用generateSM4Key) +// * @deprecated // * @returns // */ // export function generateAesKey() { @@ -95,18 +96,24 @@ export function encryptBase64(str) { } /** - * 使用公钥加密 + * 使用SM4密钥加密数据 * @param message 加密内容 - * @param aesKey aesKey + * @param sm4Key SM4密钥 * @returns */ -export function encryptWithAes(message: string, aesKey) { - // const encrypted = CryptoJS.AES.encrypt(message, aesKey, { - // mode: CryptoJS.mode.ECB, - // padding: CryptoJS.pad.Pkcs7, - // }); - // return encrypted.toString(); - return sm4.encrypt(message, aesKey) +export function encryptWithSM4(message: string, sm4Key: string) { + return sm4.encrypt(message, sm4Key) +} + +/** + * 使用密钥加密数据 (兼容性接口,实际使用SM4) + * @deprecated 请使用 encryptWithSM4 + * @param message 加密内容 + * @param aesKey 密钥 + * @returns + */ +export function encryptWithAes(message: string, aesKey: string) { + return encryptWithSM4(message, aesKey); } /** @@ -117,13 +124,22 @@ export function decryptBase64(str: string) { } /** - * 使用密钥对数据进行解密 + * 使用SM4密钥解密数据 + * @param message 密文 + * @param sm4Key SM4密钥 + * @returns + */ +export function decryptWithSM4(message: string, sm4Key: string) { + return sm4.decrypt(message, sm4Key) +} + +/** + * 使用密钥解密数据 (兼容性接口,实际使用SM4) + * @deprecated 请使用 decryptWithSM4 + * @param message 密文 + * @param aesKey 密钥 + * @returns */ -export function decryptWithAes(message: string, aesKey) { - // const decrypted = CryptoJS.AES.decrypt(message, aesKey, { - // mode: CryptoJS.mode.ECB, - // padding: CryptoJS.pad.Pkcs7, - // }); - // return decrypted.toString(CryptoJS.enc.Utf8); - return sm4.decrypt(message, aesKey) +export function decryptWithAes(message: string, aesKey: string) { + return decryptWithSM4(message, aesKey); } diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 0dae758..793c9ae 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -22,8 +22,11 @@ import axios from 'axios'; import { generateSM4Key, encryptBase64, - encryptWithAes, + encryptWithSM4, decryptBase64, + decryptWithSM4, + // 兼容性导入 + encryptWithAes, decryptWithAes, } from '@/utils/encryption/crypto'; import * as encryptUtil from '@/utils/encryption/jsencrypt'; @@ -53,8 +56,8 @@ const transform: AxiosTransform = { const aesSecret = decryptBase64(base64Str.toString()); // aesSecret此时为数组,需要变成字符串 const asciiStr=CryptoJS.enc.Utf8.stringify(aesSecret) - /** 使用aesKey解密 responseData */ - const decryptData = decryptWithAes(res.data as unknown as string, asciiStr); + /** 使用SM4密钥解密 responseData */ + const decryptData = decryptWithSM4(res.data as unknown as string, asciiStr); /** 赋值 需要转为对象 */ res.data = JSON.parse(decryptData); } @@ -216,9 +219,9 @@ const transform: AxiosTransform = { config.headers['encrypt-key'] = encryptUtil.encrypt(encryptBase64(asciiStr)); if (typeof config.data === 'object') { - config.data = encryptWithAes(JSON.stringify(config.data), aesKey); + config.data = encryptWithSM4(JSON.stringify(config.data), aesKey); } else { - config.data = encryptWithAes(config.data, aesKey); + config.data = encryptWithSM4(config.data, aesKey); } } return config; diff --git a/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts b/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts index 8ccfc47..8c1cb8f 100644 --- a/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts +++ b/src/views/contractReview/ContractualTasks/ContractualTasks.data.ts @@ -78,6 +78,10 @@ export const childColumns: BasicColumn[] = [ dataIndex: 'taskName', customRender: ({ value }) => renderDict(value, 'contract_review'), }, + { + title:"合同角色", + dataIndex: 'contractPartyRole', + }, { title: '任务耗时', dataIndex: 'taskDuration',