feat:项目管理-审计内容5-优化表格生成功能
This commit is contained in:
@@ -331,6 +331,7 @@ export async function generateBudgetManageTable(data: {
|
|||||||
projectLibrary?: string;
|
projectLibrary?: string;
|
||||||
history?: string;
|
history?: string;
|
||||||
suggestion?: string;
|
suggestion?: string;
|
||||||
|
data?: any;
|
||||||
docList?: any[];
|
docList?: any[];
|
||||||
fileList?: any[];
|
fileList?: any[];
|
||||||
}) {
|
}) {
|
||||||
@@ -376,6 +377,7 @@ export async function generateBudgetExecutionTable(data: {
|
|||||||
projectLibrary?: string;
|
projectLibrary?: string;
|
||||||
history?: string;
|
history?: string;
|
||||||
suggestion?: string;
|
suggestion?: string;
|
||||||
|
data?: any;
|
||||||
docList?: any[];
|
docList?: any[];
|
||||||
fileList?: any[];
|
fileList?: any[];
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const tableConfigs = {
|
|||||||
decisionTable: '/api/ai/auditContent3/generateDecisionTable'
|
decisionTable: '/api/ai/auditContent3/generateDecisionTable'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 其他审计内容表格配置...
|
// 审计内容4表格配置
|
||||||
auditContent4: {
|
auditContent4: {
|
||||||
type: 'auditContent4',
|
type: 'auditContent4',
|
||||||
title: '目标完成情况',
|
title: '目标完成情况',
|
||||||
@@ -53,6 +53,7 @@ export const tableConfigs = {
|
|||||||
target: '/api/ai/auditContent4/generateTargetTable'
|
target: '/api/ai/auditContent4/generateTargetTable'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 审计内容5表格配置
|
||||||
auditContent5: {
|
auditContent5: {
|
||||||
type: 'auditContent5',
|
type: 'auditContent5',
|
||||||
title: '财务管理情况',
|
title: '财务管理情况',
|
||||||
@@ -65,6 +66,7 @@ export const tableConfigs = {
|
|||||||
budgetExecution: '/api/ai/auditContent5/generateBudgetExecutionTable'
|
budgetExecution: '/api/ai/auditContent5/generateBudgetExecutionTable'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 审计内容6表格配置
|
||||||
auditContent6: {
|
auditContent6: {
|
||||||
type: 'auditContent6',
|
type: 'auditContent6',
|
||||||
title: '国资管理情况',
|
title: '国资管理情况',
|
||||||
@@ -185,6 +187,26 @@ export function createDataMapper(type: string) {
|
|||||||
bad: item.executionEffect?.bad || item.bad || '否',
|
bad: item.executionEffect?.bad || item.bad || '否',
|
||||||
...item
|
...item
|
||||||
})),
|
})),
|
||||||
|
budgetManage: (data) => data.map((item, index) => ({
|
||||||
|
key: index,
|
||||||
|
index: index + 1,
|
||||||
|
budgetSubject: item.budgetSubject || '-',
|
||||||
|
// 指标来源部分字段映射
|
||||||
|
indicatorSource: item.indicatorSource, // 指标来源
|
||||||
|
total: formatAmount(item.indicatorSourceTotal), // 指标来源-合计
|
||||||
|
lastYearBalance: formatAmount(item.indicatorSourceLastYearBalance), // 指标来源-上年结余
|
||||||
|
initialBudget: formatAmount(item.indicatorSourceInitialBudget), // 指标来源-年初部门预算
|
||||||
|
additionalBudget: formatAmount(item.indicatorSourceAdditionalBudget), // 指标来源-追加(减)预算
|
||||||
|
// 指标运用部分字段映射
|
||||||
|
indicatorUseTotal: formatAmount(item.indicatorUseTotal), // 指标运用-合计
|
||||||
|
appropriationSubtotal: formatAmount(item.indicatorUseAppropriationSubtotal), // 指标运用-拨款小计
|
||||||
|
appropriation: formatAmount(item.indicatorUseAppropriation), // 指标运用-拨款
|
||||||
|
salaryPayment: formatAmount(item.indicatorUseSalaryPayment), // 指标运用-工资统发
|
||||||
|
govProcurement: formatAmount(item.indicatorUseGovProcurement), // 指标运用-政府采购
|
||||||
|
// 其他字段
|
||||||
|
indicatorBalance: formatAmount(item.indicatorBalance), // 指标结余
|
||||||
|
workPaperIndex: Array.isArray(item.workPaperIndex) ? item.workPaperIndex : [], // 工作底稿索引
|
||||||
|
})),
|
||||||
// 其他类型的映射...
|
// 其他类型的映射...
|
||||||
default: (data) => data.map((item, index) => ({ key: index, index: index + 1, ...item }))
|
default: (data) => data.map((item, index) => ({ key: index, index: index + 1, ...item }))
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -470,6 +470,8 @@ const currentInterfaceName = ref('');
|
|||||||
|
|
||||||
// ========== 三重一大数据 ==========
|
// ========== 三重一大数据 ==========
|
||||||
const tripleOneData = ref(null);
|
const tripleOneData = ref(null);
|
||||||
|
// ========== 国资管理数据 ==========
|
||||||
|
const stateAssetsData = ref(null);
|
||||||
|
|
||||||
// ========== 表格数据存储 ==========
|
// ========== 表格数据存储 ==========
|
||||||
const tableData = reactive({});
|
const tableData = reactive({});
|
||||||
@@ -564,7 +566,12 @@ const generateTableContent = async (sectionIndex: number) => {
|
|||||||
suggestion: section.suggestion || '',
|
suggestion: section.suggestion || '',
|
||||||
docList: checkedDirKeys.value,
|
docList: checkedDirKeys.value,
|
||||||
fileList: selectedFileKeys.value,
|
fileList: selectedFileKeys.value,
|
||||||
...(currentTable.value === 'decisionTable' ? { data: tripleOneData.value } : {})
|
// 重大经济决策调查表需要三重一大数据
|
||||||
|
...(currentTable.value === 'decisionTable' ? { data: tripleOneData.value } : {}),
|
||||||
|
// 预算管理审计表需要国资管理数据
|
||||||
|
...(currentTable.value === 'budgetManage' ? { data: stateAssetsData.value } : {}),
|
||||||
|
// 预算执行情况审计表需要预算管理审计的数据
|
||||||
|
...(currentTable.value === 'budgetExecution' ? { data: tableData['auditContent5_budgetManage'] } : {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取对应的生成方法
|
// 获取对应的生成方法
|
||||||
@@ -586,9 +593,12 @@ const generateTableContent = async (sectionIndex: number) => {
|
|||||||
const dataKey = `${section.tableType}_${currentTable.value}`;
|
const dataKey = `${section.tableType}_${currentTable.value}`;
|
||||||
tableData[dataKey] = mappedData;
|
tableData[dataKey] = mappedData;
|
||||||
|
|
||||||
// 特殊处理三重一大数据
|
// 特殊处理数据存储
|
||||||
if (currentTable.value === 'tripleOne') {
|
if (currentTable.value === 'tripleOne') {
|
||||||
tripleOneData.value = result.data.data;
|
tripleOneData.value = result.data.data;
|
||||||
|
} else if (currentTable.value === 'assets') {
|
||||||
|
// 存储国资管理数据,供预算管理审计表使用
|
||||||
|
stateAssetsData.value = result.data.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
section.data = mappedData;
|
section.data = mappedData;
|
||||||
@@ -792,9 +802,12 @@ const applyHistoryData = async (sectionIndex: number, data: any[], tableValue: s
|
|||||||
section.data = mappedData;
|
section.data = mappedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 特殊处理三重一大数据
|
// 特殊处理数据存储
|
||||||
if (tableValue === 'tripleOne') {
|
if (tableValue === 'tripleOne') {
|
||||||
tripleOneData.value = data;
|
tripleOneData.value = data;
|
||||||
|
} else if (tableValue === 'assets') {
|
||||||
|
// 存储国资管理数据,供预算管理审计表使用
|
||||||
|
stateAssetsData.value = data;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -926,6 +939,9 @@ watch(
|
|||||||
Object.keys(tableData).forEach(key => {
|
Object.keys(tableData).forEach(key => {
|
||||||
delete tableData[key];
|
delete tableData[key];
|
||||||
});
|
});
|
||||||
|
// 清空特殊数据
|
||||||
|
tripleOneData.value = null;
|
||||||
|
stateAssetsData.value = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user