From ae5d429630a1b3b6d0c3276115bdb79d151def1f Mon Sep 17 00:00:00 2001 From: yuance <182865460@qq.com> Date: Thu, 16 Oct 2025 15:55:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(pwl):=E6=B7=BB=E5=8A=A0=E5=AE=A1=E8=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=9F=A5=E5=8A=9F=E8=83=BD=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/auditReport/index.ts | 34 +++ .../pwl/pwlProject/components/auditCheck.vue | 198 +++++++++++++++--- 2 files changed, 198 insertions(+), 34 deletions(-) diff --git a/src/api/ai/auditReport/index.ts b/src/api/ai/auditReport/index.ts index 2c00369..664cfbd 100644 --- a/src/api/ai/auditReport/index.ts +++ b/src/api/ai/auditReport/index.ts @@ -33,4 +33,38 @@ export async function downloadAuditReport(req: AuditReport) { return res.data; } return Promise.reject(new Error('文件下载失败')); +} + +/** + * 生成审计核查报告 - 重构版 + */ +export async function generateAuditReport2( + file: File, + kbId?: string, + libraryIds?: string, + analysisLibrary?: string, + projectLibrary?: string +) { + const formData = new FormData(); + formData.append('file', file); + + if (kbId) formData.append('kbId', kbId); + if (libraryIds) formData.append('libraryIds', libraryIds); + if (analysisLibrary) formData.append('analysisLibrary', analysisLibrary); + if (projectLibrary) formData.append('projectLibrary', projectLibrary); + + const res = await request.post>( + MODULES_API_URL + '/ai/auditReport2/generate', + formData, + { + headers: { + 'Content-Type': 'multipart/form-data' + } + } + ); + + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); } \ No newline at end of file diff --git a/src/views/pwl/pwlProject/components/auditCheck.vue b/src/views/pwl/pwlProject/components/auditCheck.vue index 6a82eb8..c2fb82e 100644 --- a/src/views/pwl/pwlProject/components/auditCheck.vue +++ b/src/views/pwl/pwlProject/components/auditCheck.vue @@ -17,6 +17,20 @@
审计发现问题情况表
+ + + + + 上传附件 + + + 新增问题 @@ -37,12 +51,27 @@
+ + + +
+
+
{{ file.name }}
+ + 删除 + +
+
+
+ + + +