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 }}
+ + 删除 + +
+
+
+ + + +