diff --git a/src/views/pwl/pwlProject/components/data/tableCommon.ts b/src/views/pwl/pwlProject/components/data/tableCommon.ts index b3ba6c2..aad43fd 100644 --- a/src/views/pwl/pwlProject/components/data/tableCommon.ts +++ b/src/views/pwl/pwlProject/components/data/tableCommon.ts @@ -163,6 +163,13 @@ function parseWorkPaperIndex(workPaperIndex) { if (!workPaperIndex || !Array.isArray(workPaperIndex)) return []; return workPaperIndex.map(item => { + if (item && typeof item === 'object') { + return { + fileId: item.fileId || item.file_id || '', + fileName: item.fileName || item.file_name || '', + fileUrl: item.fileUrl || item.url || '' + }; + } if (typeof item === 'string') { const parts = item.split('||'); if (parts.length >= 3) { @@ -231,22 +238,20 @@ export function createDataMapper(type: string) { budgetManage: (data) => data.map((item, index) => ({ key: index, index: index + 1, + ...item, 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: parseWorkPaperIndex(item.workPaperIndex), // 工作底稿索引 + 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: parseWorkPaperIndex(item.workPaperIndex), })), investmentSituation: (data) => data.map((item, index) => ({ key: index, diff --git a/src/views/pwl/pwlProject/components/reportContent.vue b/src/views/pwl/pwlProject/components/reportContent.vue index 362a4af..00f541e 100644 --- a/src/views/pwl/pwlProject/components/reportContent.vue +++ b/src/views/pwl/pwlProject/components/reportContent.vue @@ -156,14 +156,29 @@ @@ -303,9 +318,6 @@ @@ -313,9 +325,6 @@ @@ -405,11 +414,19 @@ :project-id="props.data?.id" @select="handleHistorySelect" /> + + +