1、审计内容里的操作功能优化
2、审计内容9增加一个表的内容生成 3、添加取证单弹窗
This commit is contained in:
543
src/views/pwl/pwlProject/components/components/EvidenceModal.vue
Normal file
543
src/views/pwl/pwlProject/components/components/EvidenceModal.vue
Normal file
@@ -0,0 +1,543 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:visible="visible"
|
||||
title="审计取证单预览"
|
||||
:width="1100"
|
||||
:footer="null"
|
||||
@cancel="handleCancel"
|
||||
destroy-on-close
|
||||
>
|
||||
<div class="evidence-actions">
|
||||
<a-space>
|
||||
<a-button @click="resetFields">重置内容</a-button>
|
||||
<a-button type="primary" @click="printEvidence">打印/导出</a-button>
|
||||
</a-space>
|
||||
<div class="action-tip">可直接在表格中编辑,打印即可生成与效果图一致的取证单</div>
|
||||
</div>
|
||||
|
||||
<div class="evidence-container">
|
||||
<div class="evidence-sheet" ref="printArea">
|
||||
<div class="sheet-title">审计取证单</div>
|
||||
<div class="sheet-meta">
|
||||
<div class="meta-left">
|
||||
<span>案引号:</span>
|
||||
<input
|
||||
v-model="form.caseIndex"
|
||||
class="inline-input long"
|
||||
placeholder="填写案件编号"
|
||||
/>
|
||||
</div>
|
||||
<div class="meta-right">
|
||||
<span>第</span>
|
||||
<input v-model="form.pageIndex" class="inline-input small" />
|
||||
<span>页(共</span>
|
||||
<input v-model="form.pageTotal" class="inline-input small" />
|
||||
<span>页)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="sheet-table">
|
||||
<colgroup>
|
||||
<col style="width: 18%" />
|
||||
<col style="width: 32%" />
|
||||
<col style="width: 18%" />
|
||||
<col style="width: 32%" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>项目名称</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.projectName"
|
||||
class="cell-input single"
|
||||
placeholder="填写项目名称"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>被审计(调查)单位或个人</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.auditedTarget"
|
||||
class="cell-input single"
|
||||
placeholder="填写被审计(调查)单位或个人"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>审计(调查)事项</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.auditMatter"
|
||||
class="cell-input single"
|
||||
placeholder="填写审计(调查)事项"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>摘要提示</th>
|
||||
<td colspan="3" class="summary-cell">
|
||||
<div class="summary-title">
|
||||
审计(调查)事项摘要包括:标题、审计记录、审计发现、定性依据。
|
||||
</div>
|
||||
<div class="summary-hint">
|
||||
1. 标题:突出核心问题,采用观点性语句,可作为审计内容、审计目标的结论性描述。
|
||||
</div>
|
||||
<div class="summary-hint">
|
||||
2. 审计记录:客观记录审计核查的具体事实(时间、地点、主体、行为、数据等),避免主观评价。
|
||||
</div>
|
||||
<div class="summary-hint">
|
||||
3. 审计发现:基于审计记录提出具体问题性质,先事实后定性,避免夸大。
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>标题</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.summaryTitle"
|
||||
class="cell-input"
|
||||
placeholder="填写核心标题或要点"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审计记录</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.auditRecord"
|
||||
class="cell-input tall"
|
||||
placeholder="客观记录审计核查的过程与事实"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审计发现</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.auditFinding"
|
||||
class="cell-input tall"
|
||||
placeholder="写明审计发现的事实、性质及影响"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>定性依据</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.evidenceBasis"
|
||||
class="cell-input"
|
||||
placeholder="引用法规、制度或合同条款作为依据"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>处理</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.handling"
|
||||
class="cell-input"
|
||||
placeholder="拟采取的处理措施"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>建议</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.suggestion"
|
||||
class="cell-input"
|
||||
placeholder="提出改进或整改建议"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>附件</th>
|
||||
<td colspan="3">
|
||||
<textarea
|
||||
v-model="form.attachment"
|
||||
class="cell-input"
|
||||
placeholder="列示随附的证明材料"
|
||||
></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>审计人员</th>
|
||||
<td colspan="2">
|
||||
<input
|
||||
v-model="form.auditors"
|
||||
class="cell-input input-line"
|
||||
placeholder="填写审计人员"
|
||||
/>
|
||||
</td>
|
||||
<th>编制日期</th>
|
||||
<td>
|
||||
<input
|
||||
v-model="form.compileDate"
|
||||
class="cell-input input-line"
|
||||
placeholder="YYYY-MM-DD"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>证据提供单位或个人意见</th>
|
||||
<td colspan="2">
|
||||
<textarea
|
||||
v-model="form.providerOpinion"
|
||||
class="cell-input tall"
|
||||
placeholder="盖章并填写确认意见"
|
||||
></textarea>
|
||||
</td>
|
||||
<td class="date-cell">
|
||||
<div class="date-label">日期</div>
|
||||
<input
|
||||
v-model="form.providerDate"
|
||||
class="cell-input input-line"
|
||||
placeholder="YYYY-MM-DD"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="footer-note">
|
||||
<div class="note-row">
|
||||
附件:
|
||||
<input
|
||||
v-model="form.attachmentPages"
|
||||
class="inline-input small"
|
||||
placeholder="页数"
|
||||
/>
|
||||
页
|
||||
</div>
|
||||
<div class="note">
|
||||
说明:1. 请你单位在
|
||||
<input
|
||||
v-model="form.feedbackDeadline"
|
||||
class="inline-input long"
|
||||
placeholder="填写反馈期限"
|
||||
/>
|
||||
前反馈意见,逾期未反馈视为无异议;
|
||||
</div>
|
||||
<div class="note">
|
||||
2. 证据提供单位意见栏如填写不下,可另附说明。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PropType, reactive, ref, watch } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
type BaseInfo = {
|
||||
caseIndex?: string;
|
||||
projectName?: string;
|
||||
auditedTarget?: string;
|
||||
auditMatter?: string;
|
||||
};
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
baseInfo: {
|
||||
type: Object as PropType<BaseInfo>,
|
||||
default: () => ({})
|
||||
},
|
||||
selectedRows: {
|
||||
type: Array as PropType<any[]>,
|
||||
default: () => []
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void;
|
||||
}>();
|
||||
|
||||
const printArea = ref<HTMLElement | null>(null);
|
||||
|
||||
const defaultForm = () => ({
|
||||
caseIndex: '',
|
||||
pageIndex: '1',
|
||||
pageTotal: '1',
|
||||
projectName: '',
|
||||
auditedTarget: '',
|
||||
auditMatter: '',
|
||||
summaryTitle: '',
|
||||
auditRecord: '',
|
||||
auditFinding: '',
|
||||
evidenceBasis: '',
|
||||
handling: '',
|
||||
suggestion: '',
|
||||
attachment: '',
|
||||
auditors: '',
|
||||
compileDate: '',
|
||||
providerOpinion: '',
|
||||
providerDate: '',
|
||||
attachmentPages: '',
|
||||
feedbackDeadline: ''
|
||||
});
|
||||
|
||||
const form = reactive(defaultForm());
|
||||
|
||||
const applyBaseInfo = () => {
|
||||
Object.assign(form, defaultForm(), props.baseInfo || {});
|
||||
|
||||
if (props.selectedRows && props.selectedRows.length > 0) {
|
||||
const firstRow: any = props.selectedRows[0] || {};
|
||||
form.summaryTitle =
|
||||
firstRow.title || firstRow.name || form.summaryTitle || '';
|
||||
form.auditRecord =
|
||||
firstRow.auditRecord ||
|
||||
firstRow.auditContent ||
|
||||
firstRow.content ||
|
||||
form.auditRecord ||
|
||||
'';
|
||||
form.auditFinding =
|
||||
firstRow.auditFinding || firstRow.testResult || form.auditFinding || '';
|
||||
}
|
||||
|
||||
if (!form.compileDate) {
|
||||
const now = new Date();
|
||||
form.compileDate = `${now.getFullYear()}-${String(
|
||||
now.getMonth() + 1
|
||||
).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.visible,
|
||||
(visible) => {
|
||||
if (visible) {
|
||||
applyBaseInfo();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.baseInfo,
|
||||
() => {
|
||||
if (props.visible) {
|
||||
applyBaseInfo();
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false);
|
||||
};
|
||||
|
||||
const resetFields = () => {
|
||||
applyBaseInfo();
|
||||
message.success('内容已重置');
|
||||
};
|
||||
|
||||
const printEvidence = () => {
|
||||
const area = printArea.value;
|
||||
if (!area) {
|
||||
message.warning('暂无可导出的内容');
|
||||
return;
|
||||
}
|
||||
|
||||
const newWindow = window.open('', '_blank');
|
||||
if (!newWindow) {
|
||||
message.error('浏览器阻止了弹窗,请允许弹窗后重试');
|
||||
return;
|
||||
}
|
||||
|
||||
const style = `
|
||||
* { box-sizing: border-box; }
|
||||
body { margin: 0; padding: 24px; font-family: 'Songti SC', 'SimSun', serif; }
|
||||
.sheet-title { text-align: center; font-size: 28px; letter-spacing: 4px; margin-bottom: 12px; }
|
||||
.sheet-meta { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
|
||||
.inline-input { border: none; border-bottom: 1px solid #000; min-width: 60px; padding: 2px 4px; font-size: 14px; }
|
||||
.inline-input.small { width: 48px; text-align: center; }
|
||||
.inline-input.long { min-width: 180px; }
|
||||
.sheet-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
||||
.sheet-table th, .sheet-table td { border: 1px solid #000; padding: 8px 10px; vertical-align: top; font-size: 14px; }
|
||||
.sheet-table th { background: #fafafa; font-weight: 600; text-align: center; }
|
||||
.cell-input { width: 100%; border: none; resize: vertical; min-height: 34px; font-size: 14px; line-height: 1.5; font-family: inherit; }
|
||||
.cell-input:focus { outline: none; }
|
||||
.cell-input.single { min-height: 32px; }
|
||||
.cell-input.tall { min-height: 120px; }
|
||||
.input-line { height: 32px; }
|
||||
.summary-title { font-weight: 700; margin-bottom: 4px; }
|
||||
.summary-hint { color: #555; line-height: 1.5; margin-bottom: 2px; }
|
||||
.summary-cell { background: #fcfcfc; }
|
||||
.date-cell { display: flex; flex-direction: column; gap: 6px; }
|
||||
.date-label { font-weight: 600; }
|
||||
.footer-note { margin-top: 12px; font-size: 14px; line-height: 1.6; }
|
||||
.note-row { margin-bottom: 4px; }
|
||||
.note input { vertical-align: middle; }
|
||||
`;
|
||||
|
||||
newWindow.document.write(`
|
||||
<html>
|
||||
<head>
|
||||
<title>审计取证单</title>
|
||||
<style>${style}</style>
|
||||
</head>
|
||||
<body>${area.innerHTML}</body>
|
||||
</html>
|
||||
`);
|
||||
newWindow.document.close();
|
||||
newWindow.focus();
|
||||
newWindow.print();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.evidence-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.action-tip {
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.evidence-container {
|
||||
max-height: 70vh;
|
||||
overflow: auto;
|
||||
background: #f5f5f5;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.evidence-sheet {
|
||||
background: #fff;
|
||||
padding: 16px 20px;
|
||||
border: 1px solid #e5e5e5;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.sheet-title {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
letter-spacing: 4px;
|
||||
margin-bottom: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sheet-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.inline-input {
|
||||
border: none;
|
||||
border-bottom: 1px solid #000;
|
||||
min-width: 60px;
|
||||
padding: 2px 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.inline-input.small {
|
||||
width: 48px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.inline-input.long {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.sheet-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.sheet-table th,
|
||||
.sheet-table td {
|
||||
border: 1px solid #000;
|
||||
padding: 8px 10px;
|
||||
vertical-align: top;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.sheet-table th {
|
||||
background: #fafafa;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cell-input {
|
||||
width: 100%;
|
||||
border: none;
|
||||
resize: vertical;
|
||||
min-height: 34px;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.cell-input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cell-input.single {
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.cell-input.tall {
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.input-line {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.summary-cell {
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
.summary-title {
|
||||
font-weight: 700;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.summary-hint {
|
||||
color: #555;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.date-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.date-label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.footer-note {
|
||||
margin-top: 12px;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.note-row {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -17,8 +17,11 @@ export function initNavigationItems() {
|
||||
mode: 'table',
|
||||
showFileSelect: true, // 所有项都显示文件选择
|
||||
data: [],
|
||||
extraData: [],
|
||||
currentTableIndex: 0, // 当前选中的表格索引
|
||||
columns: null,
|
||||
extraTableTitle: config?.extraTableTitle || null,
|
||||
extraColumns: config?.extraColumns || [],
|
||||
tableOptions: config?.options || [],
|
||||
count: index + 1,
|
||||
tableType: config?.type || `auditContent${index + 1}`,
|
||||
@@ -42,4 +45,4 @@ export default function useNavigationItems() {
|
||||
initNavigationItems();
|
||||
}
|
||||
return navigationItems;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,14 +68,14 @@ export const partyConductColumns = [
|
||||
width: 200,
|
||||
// ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
partyConductColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -81,14 +81,14 @@ export const auditHistoryColumns = [
|
||||
width: 200,
|
||||
// ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
auditHistoryColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -429,12 +429,12 @@ export const eightRegColumns = [
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 140
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 140
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
@@ -443,4 +443,4 @@ export default {
|
||||
expenseColumns,
|
||||
eightRegColumns,
|
||||
createTestResultRender
|
||||
};
|
||||
};
|
||||
|
||||
@@ -48,15 +48,15 @@ export const strategyAuditColumns = [
|
||||
align: 'center',
|
||||
// ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 100,
|
||||
align: 'center'
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// width: 100,
|
||||
// align: 'center'
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
strategyAuditColumns,
|
||||
createTestResultRender
|
||||
};
|
||||
};
|
||||
|
||||
@@ -126,15 +126,15 @@ export const decisionTableColumns = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 140
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 140
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
tripleOneColumns,
|
||||
decisionTableColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -164,15 +164,15 @@ export const budgetExecutionColumns = [
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
budgetManageColumns,
|
||||
budgetExecutionColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -105,14 +105,14 @@ export const stateAssetsManageColumns = [
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
stateAssetsManageColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,15 +41,15 @@ export const investmentSituationColumns = [
|
||||
width: 200,
|
||||
// ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
// 删除不再需要的单独列配置
|
||||
export default {
|
||||
investmentSituationColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -70,14 +70,14 @@ export const internalControlTestColumns = [
|
||||
width: 200,
|
||||
// ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
internalControlTestColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -42,14 +42,14 @@ export const personnelEstablishmentColumns = [
|
||||
align: 'center',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// key: 'action',
|
||||
// align: 'center',
|
||||
// width: 100
|
||||
// }
|
||||
];
|
||||
|
||||
export default {
|
||||
personnelEstablishmentColumns
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
export const benefitEstablishmentColumns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
width: 80,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '凭证号',
|
||||
dataIndex: 'voucher',
|
||||
key: 'voucher',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '支出日期',
|
||||
dataIndex: 'expenditureDate',
|
||||
key: 'expenditureDate',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '用途',
|
||||
dataIndex: 'usage',
|
||||
key: 'usage',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '收款方',
|
||||
dataIndex: 'payee',
|
||||
key: 'payee',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '金额(元)',
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '归属部门/人员',
|
||||
dataIndex: 'belongTo',
|
||||
key: 'belongTo',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '款项性质说明',
|
||||
dataIndex: 'natureDesc',
|
||||
key: 'natureDesc',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '违规说明',
|
||||
dataIndex: 'violationDesc',
|
||||
key: 'violationDesc',
|
||||
align: 'center'
|
||||
}
|
||||
];
|
||||
|
||||
export default benefitEstablishmentColumns;
|
||||
@@ -1,329 +1,457 @@
|
||||
import table9ExtraColumns from './table9ExtraColumns';
|
||||
|
||||
export const tableConfigs = {
|
||||
// 审计内容1表格配置
|
||||
auditContent1: {
|
||||
type: 'auditContent1',
|
||||
title: '贯彻决策部署情况',
|
||||
options: [
|
||||
// { title: '贯彻决策部署', value: 'default1', columns: () => import('./table1Columns').then(m => m.default1Columns) },
|
||||
{ title: '领导班子名单', value: 'leaderList', columns: () => import('./table1Columns').then(m => m.leaderListColumns) },
|
||||
{ title: '决策支出表', value: 'expense', columns: () => import('./table1Columns').then(m => m.expenseColumns) },
|
||||
{ title: '八项规定', value: 'eightReg', columns: () => import('./table1Columns').then(m => m.eightRegColumns) }
|
||||
],
|
||||
// 接口映射
|
||||
interfaceMap: {
|
||||
default1: '/api/ai/auditContent1/generateDefault1Table',
|
||||
leaderList: '/api/ai/auditContent1/generateLeaderListTable',
|
||||
expense: '/api/ai/auditContent1/generateExpenseTable',
|
||||
eightReg: '/api/ai/auditContent1/generateEightRegTable'
|
||||
}
|
||||
},
|
||||
// 审计内容2表格配置
|
||||
auditContent2: {
|
||||
type: 'auditContent2',
|
||||
title: '单位发展战略执行',
|
||||
options: [
|
||||
{ title: '单位发展战略执行', value: 'strategyAudit', columns: () => import('./table2Columns').then(m => m.strategyAuditColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
strategyAudit: '/api/ai/auditContent2/generateStrategyAuditTable'
|
||||
}
|
||||
},
|
||||
// 审计内容3表格配置
|
||||
auditContent3: {
|
||||
type: 'auditContent3',
|
||||
title: '重大经济决策调查',
|
||||
options: [
|
||||
{ title: '重大经济决策调查表', value: 'decisionTable', columns: () => import('./table3Columns').then(m => m.decisionTableColumns) },
|
||||
{ title: '三重一大', value: 'tripleOne', columns: () => import('./table3Columns').then(m => m.tripleOneColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
tripleOne: '/api/ai/auditContent3/generateTripleOneTable',
|
||||
decisionTable: '/api/ai/auditContent3/generateDecisionTable'
|
||||
}
|
||||
},
|
||||
// 审计内容4表格配置
|
||||
auditContent4: {
|
||||
type: 'auditContent4',
|
||||
title: '目标完成情况',
|
||||
options: [
|
||||
{ title: '目标责任完成情况表', value: 'target', columns: () => import('./table4Columns').then(m => m.columns0) }
|
||||
],
|
||||
interfaceMap: {
|
||||
target: '/api/ai/auditContent4/generateTargetTable'
|
||||
}
|
||||
},
|
||||
// 审计内容5表格配置
|
||||
auditContent5: {
|
||||
type: 'auditContent5',
|
||||
title: '财务管理情况',
|
||||
options: [
|
||||
{ title: '预算管理审计', value: 'budgetManage', columns: () => import('./table5Columns').then(m => m.budgetManageColumns) },
|
||||
{ title: '预算执行情况审计', value: 'budgetExecution', columns: () => import('./table5Columns').then(m => m.budgetExecutionColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
budgetManage: '/api/ai/auditContent5/generateBudgetManageTable',
|
||||
budgetExecution: '/api/ai/auditContent5/generateBudgetExecutionTable'
|
||||
}
|
||||
},
|
||||
// 审计内容6表格配置
|
||||
auditContent6: {
|
||||
type: 'auditContent6',
|
||||
title: '国资管理情况',
|
||||
options: [
|
||||
{ title: '国有资产管理审计', value: 'assets', columns: () => import('./table6Columns').then(m => m.stateAssetsManageColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
assets: '/api/ai/auditContent6/generateAssetsTable'
|
||||
}
|
||||
},
|
||||
auditContent7: {
|
||||
type: 'auditContent7',
|
||||
title: '重大投资情况',
|
||||
options: [
|
||||
{ title: '重大投资情况审计', value: 'investmentSituation', columns: () => import('./table7Columns').then(m => m.investmentSituationColumns) },
|
||||
],
|
||||
interfaceMap: {
|
||||
investmentSituation: '/api/ai/auditContent7/generateInvestmentSituationTable'
|
||||
}
|
||||
},
|
||||
auditContent8: {
|
||||
type: 'auditContent8',
|
||||
title: '治理结构与内部控制',
|
||||
options: [
|
||||
{ title: '内部控制测试', value: 'internalControl', columns: () => import('./table8Columns').then(m => m.internalControlTestColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
internalControl: '/api/ai/auditContent8/generateInternalControlTable'
|
||||
}
|
||||
},
|
||||
auditContent9: {
|
||||
type: 'auditContent9',
|
||||
title: '人员编制管理',
|
||||
options: [
|
||||
{ title: '人员编制管理审计', value: 'personnel', columns: () => import('./table9Columns').then(m => m.personnelEstablishmentColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
personnel: '/api/ai/auditContent9/generatePersonnelTable'
|
||||
}
|
||||
},
|
||||
auditContent10: {
|
||||
type: 'auditContent10',
|
||||
title: '廉政情况',
|
||||
options: [
|
||||
{ title: '党风廉政建设责任制审计', value: 'partyConduct', columns: () => import('./table10Columns').then(m => m.partyConductColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
partyConduct: '/api/ai/auditContent10/generatePartyConductTable'
|
||||
}
|
||||
},
|
||||
auditContent11: {
|
||||
type: 'auditContent11',
|
||||
title: '历史审计问题整改',
|
||||
options: [
|
||||
{ title: '历史审计问题整改', value: 'history', columns: () => import('./table11Columns').then(m => m.auditHistoryColumns) }
|
||||
],
|
||||
interfaceMap: {
|
||||
history: '/api/ai/auditContent11/generateHistoryTable'
|
||||
}
|
||||
// 审计内容1表格配置
|
||||
auditContent1: {
|
||||
type: 'auditContent1',
|
||||
title: '贯彻决策部署情况',
|
||||
options: [
|
||||
// { title: '贯彻决策部署', value: 'default1', columns: () => import('./table1Columns').then(m => m.default1Columns) },
|
||||
{
|
||||
title: '领导班子名单',
|
||||
value: 'leaderList',
|
||||
columns: () =>
|
||||
import('./table1Columns').then((m) => m.leaderListColumns)
|
||||
},
|
||||
{
|
||||
title: '决策支出表',
|
||||
value: 'expense',
|
||||
columns: () => import('./table1Columns').then((m) => m.expenseColumns)
|
||||
},
|
||||
{
|
||||
title: '八项规定',
|
||||
value: 'eightReg',
|
||||
columns: () => import('./table1Columns').then((m) => m.eightRegColumns)
|
||||
}
|
||||
],
|
||||
// 接口映射
|
||||
interfaceMap: {
|
||||
default1: '/api/ai/auditContent1/generateDefault1Table',
|
||||
leaderList: '/api/ai/auditContent1/generateLeaderListTable',
|
||||
expense: '/api/ai/auditContent1/generateExpenseTable',
|
||||
eightReg: '/api/ai/auditContent1/generateEightRegTable'
|
||||
}
|
||||
},
|
||||
// 审计内容2表格配置
|
||||
auditContent2: {
|
||||
type: 'auditContent2',
|
||||
title: '单位发展战略执行',
|
||||
options: [
|
||||
{
|
||||
title: '单位发展战略执行',
|
||||
value: 'strategyAudit',
|
||||
columns: () =>
|
||||
import('./table2Columns').then((m) => m.strategyAuditColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
strategyAudit: '/api/ai/auditContent2/generateStrategyAuditTable'
|
||||
}
|
||||
},
|
||||
// 审计内容3表格配置
|
||||
auditContent3: {
|
||||
type: 'auditContent3',
|
||||
title: '重大经济决策调查',
|
||||
options: [
|
||||
{
|
||||
title: '重大经济决策调查表',
|
||||
value: 'decisionTable',
|
||||
columns: () =>
|
||||
import('./table3Columns').then((m) => m.decisionTableColumns)
|
||||
},
|
||||
{
|
||||
title: '三重一大',
|
||||
value: 'tripleOne',
|
||||
columns: () => import('./table3Columns').then((m) => m.tripleOneColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
tripleOne: '/api/ai/auditContent3/generateTripleOneTable',
|
||||
decisionTable: '/api/ai/auditContent3/generateDecisionTable'
|
||||
}
|
||||
},
|
||||
// 审计内容4表格配置
|
||||
auditContent4: {
|
||||
type: 'auditContent4',
|
||||
title: '目标完成情况',
|
||||
options: [
|
||||
{
|
||||
title: '目标责任完成情况表',
|
||||
value: 'target',
|
||||
columns: () => import('./table4Columns').then((m) => m.columns0)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
target: '/api/ai/auditContent4/generateTargetTable'
|
||||
}
|
||||
},
|
||||
// 审计内容5表格配置
|
||||
auditContent5: {
|
||||
type: 'auditContent5',
|
||||
title: '财务管理情况',
|
||||
options: [
|
||||
{
|
||||
title: '预算管理审计',
|
||||
value: 'budgetManage',
|
||||
columns: () =>
|
||||
import('./table5Columns').then((m) => m.budgetManageColumns)
|
||||
},
|
||||
{
|
||||
title: '预算执行情况审计',
|
||||
value: 'budgetExecution',
|
||||
columns: () =>
|
||||
import('./table5Columns').then((m) => m.budgetExecutionColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
budgetManage: '/api/ai/auditContent5/generateBudgetManageTable',
|
||||
budgetExecution: '/api/ai/auditContent5/generateBudgetExecutionTable'
|
||||
}
|
||||
},
|
||||
// 审计内容6表格配置
|
||||
auditContent6: {
|
||||
type: 'auditContent6',
|
||||
title: '国资管理情况',
|
||||
options: [
|
||||
{
|
||||
title: '国有资产管理审计',
|
||||
value: 'assets',
|
||||
columns: () =>
|
||||
import('./table6Columns').then((m) => m.stateAssetsManageColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
assets: '/api/ai/auditContent6/generateAssetsTable'
|
||||
}
|
||||
},
|
||||
auditContent7: {
|
||||
type: 'auditContent7',
|
||||
title: '重大投资情况',
|
||||
options: [
|
||||
{
|
||||
title: '重大投资情况审计',
|
||||
value: 'investmentSituation',
|
||||
columns: () =>
|
||||
import('./table7Columns').then((m) => m.investmentSituationColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
investmentSituation:
|
||||
'/api/ai/auditContent7/generateInvestmentSituationTable'
|
||||
}
|
||||
},
|
||||
auditContent8: {
|
||||
type: 'auditContent8',
|
||||
title: '治理结构与内部控制',
|
||||
options: [
|
||||
{
|
||||
title: '内部控制测试',
|
||||
value: 'internalControl',
|
||||
columns: () =>
|
||||
import('./table8Columns').then((m) => m.internalControlTestColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
internalControl: '/api/ai/auditContent8/generateInternalControlTable'
|
||||
}
|
||||
},
|
||||
auditContent9: {
|
||||
type: 'auditContent9',
|
||||
title: '人员编制管理',
|
||||
options: [
|
||||
{
|
||||
title: '人员编制管理审计',
|
||||
value: 'personnel',
|
||||
columns: () =>
|
||||
import('./table9Columns').then((m) => m.personnelEstablishmentColumns)
|
||||
}
|
||||
],
|
||||
extraTableTitle: '福利费超范围支出明细清单',
|
||||
extraColumns: table9ExtraColumns,
|
||||
interfaceMap: {
|
||||
personnel: '/api/ai/auditContent9/generatePersonnelTable'
|
||||
}
|
||||
},
|
||||
auditContent10: {
|
||||
type: 'auditContent10',
|
||||
title: '廉政情况',
|
||||
options: [
|
||||
{
|
||||
title: '党风廉政建设责任制审计',
|
||||
value: 'partyConduct',
|
||||
columns: () =>
|
||||
import('./table10Columns').then((m) => m.partyConductColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
partyConduct: '/api/ai/auditContent10/generatePartyConductTable'
|
||||
}
|
||||
},
|
||||
auditContent11: {
|
||||
type: 'auditContent11',
|
||||
title: '历史审计问题整改',
|
||||
options: [
|
||||
{
|
||||
title: '历史审计问题整改',
|
||||
value: 'history',
|
||||
columns: () =>
|
||||
import('./table11Columns').then((m) => m.auditHistoryColumns)
|
||||
}
|
||||
],
|
||||
interfaceMap: {
|
||||
history: '/api/ai/auditContent11/generateHistoryTable'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 获取表格配置
|
||||
export function getTableConfig(sectionIndex: number) {
|
||||
const configKeys = Object.keys(tableConfigs);
|
||||
if (sectionIndex >= 0 && sectionIndex < configKeys.length) {
|
||||
return tableConfigs[configKeys[sectionIndex]];
|
||||
}
|
||||
return null;
|
||||
const configKeys = Object.keys(tableConfigs);
|
||||
if (sectionIndex >= 0 && sectionIndex < configKeys.length) {
|
||||
return tableConfigs[configKeys[sectionIndex]];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// 获取所有表格配置
|
||||
export function getAllTableConfigs() {
|
||||
return tableConfigs;
|
||||
return tableConfigs;
|
||||
}
|
||||
|
||||
// 通过接口名称查找表格配置
|
||||
export function findTableConfigByInterface(interfaceName: string) {
|
||||
for (const [key, config] of Object.entries(tableConfigs)) {
|
||||
for (const [tableValue, tableInterface] of Object.entries(config.interfaceMap || {})) {
|
||||
if (tableInterface === interfaceName) {
|
||||
return {
|
||||
sectionType: key,
|
||||
tableValue,
|
||||
config
|
||||
};
|
||||
}
|
||||
}
|
||||
for (const [key, config] of Object.entries(tableConfigs)) {
|
||||
for (const [tableValue, tableInterface] of Object.entries(
|
||||
config.interfaceMap || {}
|
||||
)) {
|
||||
if (tableInterface === interfaceName) {
|
||||
return {
|
||||
sectionType: key,
|
||||
tableValue,
|
||||
config
|
||||
};
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// 解析workPaperIndex字符串为对象数组
|
||||
function parseWorkPaperIndex(workPaperIndex) {
|
||||
if (!workPaperIndex || !Array.isArray(workPaperIndex)) return [];
|
||||
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) {
|
||||
return {
|
||||
fileId: parts[0] || '',
|
||||
fileName: parts[1] || '',
|
||||
fileUrl: parts[2] || ''
|
||||
};
|
||||
}
|
||||
}
|
||||
// 兼容旧格式
|
||||
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) {
|
||||
return {
|
||||
fileId: '',
|
||||
fileName: typeof item === 'string' ? item : '',
|
||||
fileUrl: ''
|
||||
fileId: parts[0] || '',
|
||||
fileName: parts[1] || '',
|
||||
fileUrl: parts[2] || ''
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
// 兼容旧格式
|
||||
return {
|
||||
fileId: '',
|
||||
fileName: typeof item === 'string' ? item : '',
|
||||
fileUrl: ''
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
// 通用数据映射函数
|
||||
export function createDataMapper(type: string) {
|
||||
const mappers = {
|
||||
default1: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
leaderList: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
expense: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
finalStatementAmount: formatAmount(item.finalStatementAmount),
|
||||
initialBudgetAmount: formatAmount(item.initialBudgetAmount),
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
eightReg: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
strategyAudit: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
tripleOne: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
decisionTable: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
goods: item.executionEffect?.good || item.goods || '否',
|
||||
normal: item.executionEffect?.normal || item.normal || '否',
|
||||
bad: item.executionEffect?.bad || item.bad || '否',
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
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),
|
||||
})),
|
||||
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: parseWorkPaperIndex(item.workPaperIndex),
|
||||
...item
|
||||
})),
|
||||
// 其他类型的映射...
|
||||
default: (data) => data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
}))
|
||||
};
|
||||
const mappers = {
|
||||
default1: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
leaderList: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
expense: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
finalStatementAmount: formatAmount(item.finalStatementAmount),
|
||||
initialBudgetAmount: formatAmount(item.initialBudgetAmount),
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
eightReg: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
strategyAudit: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
tripleOne: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
decisionTable: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
goods: item.executionEffect?.good || item.goods || '否',
|
||||
normal: item.executionEffect?.normal || item.normal || '否',
|
||||
bad: item.executionEffect?.bad || item.bad || '否',
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
})),
|
||||
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)
|
||||
})),
|
||||
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: parseWorkPaperIndex(item.workPaperIndex),
|
||||
...item
|
||||
})),
|
||||
// 其他类型的映射...
|
||||
default: (data) =>
|
||||
data.map((item, index) => ({
|
||||
key: index,
|
||||
index: index + 1,
|
||||
...item,
|
||||
workPaperIndex: parseWorkPaperIndex(item.workPaperIndex)
|
||||
}))
|
||||
};
|
||||
|
||||
return mappers[type] || mappers.default;
|
||||
return mappers[type] || mappers.default;
|
||||
}
|
||||
|
||||
// 格式化金额
|
||||
function formatAmount(amount) {
|
||||
if (!amount) return '0.00';
|
||||
if (typeof amount === 'string' && amount.includes(',')) return amount;
|
||||
const num = parseFloat(amount);
|
||||
return isNaN(num) ? '0.00' : num.toLocaleString('zh-CN', {
|
||||
if (!amount) return '0.00';
|
||||
if (typeof amount === 'string' && amount.includes(',')) return amount;
|
||||
const num = parseFloat(amount);
|
||||
return isNaN(num)
|
||||
? '0.00'
|
||||
: num.toLocaleString('zh-CN', {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 生成接口映射
|
||||
export const apiMethodMap = {
|
||||
// 审计内容1
|
||||
default1: { generate: 'generateDefault1Table', export: 'exportDefault1Table' },
|
||||
leaderList: { generate: 'generateLeaderListTable', export: 'exportLeaderListTable' },
|
||||
expense: { generate: 'generateExpenseTable', export: 'exportExpenseTable' },
|
||||
eightReg: { generate: 'generateEightRegTable', export: 'exportEightRegTable' },
|
||||
// 审计内容2
|
||||
strategyAudit: { generate: 'generateStrategyAuditTable', export: 'exportStrategyAuditTable' },
|
||||
// 审计内容3
|
||||
tripleOne: { generate: 'generateTripleOneTable', export: 'exportTripleOneTable' },
|
||||
decisionTable: { generate: 'generateDecisionTable', export: 'exportDecisionTable' },
|
||||
// 审计内容4
|
||||
target: { generate: 'generateTargetTable', export: 'exportTargetTable' },
|
||||
// 审计内容5
|
||||
budgetManage: { generate: 'generateBudgetManageTable', export: 'exportBudgetManageTable' },
|
||||
budgetExecution: { generate: 'generateBudgetExecutionTable', export: 'exportBudgetExecutionTable' },
|
||||
// 审计内容6
|
||||
assets: { generate: 'generateAssetsTable', export: 'exportAssetsTable' },
|
||||
// 审计内容7
|
||||
investmentSituation: { generate: 'generateInvestmentSituationTable', export: 'exportInvestmentSituationTable' },
|
||||
// 审计内容8
|
||||
internalControl: { generate: 'generateInternalControlTable', export: 'exportInternalControlTable' },
|
||||
// 审计内容9
|
||||
personnel: { generate: 'generatePersonnelTable', export: 'exportPersonnelTable' },
|
||||
// 审计内容10
|
||||
partyConduct: { generate: 'generatePartyConductTable', export: 'exportPartyConductTable' },
|
||||
// 审计内容11
|
||||
history: { generate: 'generateHistoryTable', export: 'exportHistoryTable' },
|
||||
// 默认
|
||||
default: { generate: 'generateDefaultTable', export: 'exportDefaultTable' }
|
||||
// 审计内容1
|
||||
default1: {
|
||||
generate: 'generateDefault1Table',
|
||||
export: 'exportDefault1Table'
|
||||
},
|
||||
leaderList: {
|
||||
generate: 'generateLeaderListTable',
|
||||
export: 'exportLeaderListTable'
|
||||
},
|
||||
expense: { generate: 'generateExpenseTable', export: 'exportExpenseTable' },
|
||||
eightReg: {
|
||||
generate: 'generateEightRegTable',
|
||||
export: 'exportEightRegTable'
|
||||
},
|
||||
// 审计内容2
|
||||
strategyAudit: {
|
||||
generate: 'generateStrategyAuditTable',
|
||||
export: 'exportStrategyAuditTable'
|
||||
},
|
||||
// 审计内容3
|
||||
tripleOne: {
|
||||
generate: 'generateTripleOneTable',
|
||||
export: 'exportTripleOneTable'
|
||||
},
|
||||
decisionTable: {
|
||||
generate: 'generateDecisionTable',
|
||||
export: 'exportDecisionTable'
|
||||
},
|
||||
// 审计内容4
|
||||
target: { generate: 'generateTargetTable', export: 'exportTargetTable' },
|
||||
// 审计内容5
|
||||
budgetManage: {
|
||||
generate: 'generateBudgetManageTable',
|
||||
export: 'exportBudgetManageTable'
|
||||
},
|
||||
budgetExecution: {
|
||||
generate: 'generateBudgetExecutionTable',
|
||||
export: 'exportBudgetExecutionTable'
|
||||
},
|
||||
// 审计内容6
|
||||
assets: { generate: 'generateAssetsTable', export: 'exportAssetsTable' },
|
||||
// 审计内容7
|
||||
investmentSituation: {
|
||||
generate: 'generateInvestmentSituationTable',
|
||||
export: 'exportInvestmentSituationTable'
|
||||
},
|
||||
// 审计内容8
|
||||
internalControl: {
|
||||
generate: 'generateInternalControlTable',
|
||||
export: 'exportInternalControlTable'
|
||||
},
|
||||
// 审计内容9
|
||||
personnel: {
|
||||
generate: 'generatePersonnelTable',
|
||||
export: 'exportPersonnelTable'
|
||||
},
|
||||
// 审计内容10
|
||||
partyConduct: {
|
||||
generate: 'generatePartyConductTable',
|
||||
export: 'exportPartyConductTable'
|
||||
},
|
||||
// 审计内容11
|
||||
history: { generate: 'generateHistoryTable', export: 'exportHistoryTable' },
|
||||
// 默认
|
||||
default: { generate: 'generateDefaultTable', export: 'exportDefaultTable' }
|
||||
};
|
||||
|
||||
export default {
|
||||
tableConfigs,
|
||||
getTableConfig,
|
||||
getAllTableConfigs,
|
||||
findTableConfigByInterface,
|
||||
createDataMapper,
|
||||
apiMethodMap
|
||||
};
|
||||
tableConfigs,
|
||||
getTableConfig,
|
||||
getAllTableConfigs,
|
||||
findTableConfigByInterface,
|
||||
createDataMapper,
|
||||
apiMethodMap
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user