feat:项目管理-审计内容7-优化表格生成功能

This commit is contained in:
2025-12-10 16:50:01 +08:00
parent c1082d42f3
commit 2632b33f18
3 changed files with 44 additions and 109 deletions

View File

@@ -1,22 +1,38 @@
import { createTestResultRender } from './table2Columns';
// 重大对外投资审计表格列
export const majorInvestmentColumns = [
// 重大投资情况审计表格列
export const investmentSituationColumns = [
{
title: '',
dataIndex: 'category',
key: 'category',
width: 150,
align: 'center',
// filters: [
// { text: '重大对外投资审计', value: '重大对外投资审计' },
// { text: '重大工程建设审计', value: '重大工程建设审计' },
// { text: '重大资本运作审计', value: '重大资本运作审计' },
// { text: '重大资产处置审计', value: '重大资产处置审计' },
// { text: '重大物资(服务)采购审计', value: '重大物资(服务)采购审计' },
// { text: '重大担保借款审计', value: '重大担保借款审计' },
// ],
// onFilter: (value, record) => record.category === value,
},
{
title: '审计内容',
dataIndex: 'auditContent',
key: 'auditContent',
align: 'left',
align: 'center',
width: 300,
ellipsis: true
// ellipsis: true
},
{
title: '检查的证据及测试内容',
dataIndex: 'checkEvidence',
key: 'checkEvidence',
align: 'left',
align: 'center',
width: 400,
ellipsis: true
// ellipsis: true
},
{
title: '测试结果',
@@ -32,49 +48,7 @@ export const majorInvestmentColumns = [
key: 'workPaperIndex',
align: 'center',
width: 140,
ellipsis: true
},
{
title: '操作',
key: 'action',
align: 'center',
width: 100
}
];
// 重大工程建设审计表格列
export const majorProjectConstructionColumns = [
{
title: '审计内容',
dataIndex: 'auditContent',
key: 'auditContent',
align: 'left',
width: 250,
ellipsis: true
},
{
title: '检查的证据及测试内容',
dataIndex: 'checkEvidence',
key: 'checkEvidence',
align: 'left',
width: 350,
ellipsis: true
},
{
title: '测试结果',
dataIndex: 'testResult',
key: 'testResult',
align: 'center',
width: 100,
customRender: createTestResultRender()
},
{
title: '工作底稿索引',
dataIndex: 'workPaperIndex',
key: 'workPaperIndex',
align: 'center',
width: 140,
ellipsis: true
// ellipsis: true
},
{
title: '操作',
@@ -84,7 +58,7 @@ export const majorProjectConstructionColumns = [
}
];
// 删除不再需要的单独列配置
export default {
majorInvestmentColumns,
majorProjectConstructionColumns
investmentSituationColumns
};

View File

@@ -1,4 +1,3 @@
// 表格配置管理器
export const tableConfigs = {
// 审计内容1表格配置
auditContent1: {
@@ -81,12 +80,10 @@ export const tableConfigs = {
type: 'auditContent7',
title: '重大投资情况',
options: [
{ title: '重大对外投资审计', value: 'investment', columns: () => import('./table7Columns').then(m => m.majorInvestmentColumns) },
{ title: '重大工程建设审计', value: 'projectConstruction', columns: () => import('./table7Columns').then(m => m.majorProjectConstructionColumns) }
{ title: '重大投资情况审计', value: 'investmentSituation', columns: () => import('./table7Columns').then(m => m.investmentSituationColumns) },
],
interfaceMap: {
investment: '/api/ai/auditContent7/generateInvestmentTable',
projectConstruction: '/api/ai/auditContent7/generateProjectConstructionTable'
investmentSituation: '/api/ai/auditContent7/generateInvestmentSituationTable'
}
},
auditContent8: {
@@ -207,6 +204,16 @@ export function createDataMapper(type: string) {
indicatorBalance: formatAmount(item.indicatorBalance), // 指标结余
workPaperIndex: Array.isArray(item.workPaperIndex) ? item.workPaperIndex : [], // 工作底稿索引
})),
investmentSituation: (data) => data.map((item, index) => ({
key: index,
index: index + 1,
category: item.category || '未分类',
auditContent: item.auditContent || item.content || '',
checkEvidence: item.checkEvidence || item.evidence || '',
testResult: item.testResult || '待检查',
workPaperIndex: Array.isArray(item.workPaperIndex) ? item.workPaperIndex : [],
...item
})),
// 其他类型的映射...
default: (data) => data.map((item, index) => ({ key: index, index: index + 1, ...item }))
};
@@ -245,8 +252,7 @@ export const apiMethodMap = {
// 审计内容6
assets: { generate: 'generateAssetsTable', export: 'exportAssetsTable' },
// 审计内容7
investment: { generate: 'generateInvestmentTable', export: 'exportInvestmentTable' },
projectConstruction: { generate: 'generateProjectConstructionTable', export: 'exportProjectConstructionTable' },
investmentSituation: { generate: 'generateInvestmentSituationTable', export: 'exportInvestmentSituationTable' },
// 审计内容8
internalControl: { generate: 'generateInternalControlTable', export: 'exportInternalControlTable' },
// 审计内容9