diff --git a/src/api/ai/auditContent/index.ts b/src/api/ai/auditContent/index.ts index 42133df..d36318b 100644 --- a/src/api/ai/auditContent/index.ts +++ b/src/api/ai/auditContent/index.ts @@ -2,6 +2,51 @@ import request from '@/utils/request'; import type { ApiResult } from '@/api'; import { MODULES_API_URL } from '@/config/setting'; +/** + * 生成八项规定对比分析表 + */ +export async function generateEightRegTable(data: { + kbIds?: string; + libraryIds?: string; + projectLibrary?: string; + history?: string; + suggestion?: string; + docList?: any[]; + fileList?: any[]; +}) { + const res = await request.post>( + MODULES_API_URL + '/ai/auditContent1/generateEightRegTable', + data + ); + + if (res.data.code === 0) { + return res.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 导出八项规定对比分析表到Excel + */ +export async function exportEightRegTable(data: { + data?: any[]; + companyName?: string; + auditTime?: string; +}) { + const res = await request.post( + MODULES_API_URL + '/ai/auditContent1/exportEightRegTable', + data, + { + responseType: 'blob' + } + ); + + if (res.status === 200) { + return res.data; + } + return Promise.reject(new Error('导出失败')); +} + /** * 生成重大经济决策调查表 */ diff --git a/src/views/pwl/pwlProject/components/reportContent.vue b/src/views/pwl/pwlProject/components/reportContent.vue index 24990af..612e3ed 100644 --- a/src/views/pwl/pwlProject/components/reportContent.vue +++ b/src/views/pwl/pwlProject/components/reportContent.vue @@ -179,6 +179,18 @@