feat(M08-B): 补联调筛选导出
This commit is contained in:
@@ -73,7 +73,7 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
<el-button :icon="FileDown" @click="exportSnapshot">快照</el-button>
|
<el-button :icon="FileDown" @click="exportSnapshot">快照</el-button>
|
||||||
<el-button :icon="FileUp" @click="openSnapshotImport">导入</el-button>
|
<el-button :icon="FileUp" @click="openSnapshotImport">导入</el-button>
|
||||||
<el-button :icon="Download" @click="exportChecklist">导出</el-button>
|
<el-button :icon="Download" @click="exportChecklist">导出筛选</el-button>
|
||||||
<el-button :icon="FileDown" :disabled="riskItems.length === 0" @click="exportRiskRegister">风险</el-button>
|
<el-button :icon="FileDown" :disabled="riskItems.length === 0" @click="exportRiskRegister">风险</el-button>
|
||||||
<el-button :icon="Copy" @click="copyHandoffReport">复制报告</el-button>
|
<el-button :icon="Copy" @click="copyHandoffReport">复制报告</el-button>
|
||||||
<el-button :icon="FileDown" @click="exportHandoffReport">报告</el-button>
|
<el-button :icon="FileDown" @click="exportHandoffReport">报告</el-button>
|
||||||
@@ -1012,7 +1012,10 @@ function statusText(status: FieldStatus) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exportChecklist() {
|
function exportChecklist() {
|
||||||
|
const exportItems = filteredChecklist.value;
|
||||||
downloadCsv(`cleaning-field-handoff-${Date.now()}.csv`, [
|
downloadCsv(`cleaning-field-handoff-${Date.now()}.csv`, [
|
||||||
|
['filter', '当前筛选条件', buildFilterSummary(), '', '', '', '', '', ''],
|
||||||
|
['filter', '导出检查项数', `${exportItems.length}/${checklist.length}`, '', '', '', '', '', ''],
|
||||||
['类别', '字段', '值', '', '', '', '', '', ''],
|
['类别', '字段', '值', '', '', '', '', '', ''],
|
||||||
['session', '联调批次', sessionMeta.batchNo, '', '', '', '', '', ''],
|
['session', '联调批次', sessionMeta.batchNo, '', '', '', '', '', ''],
|
||||||
['session', '现场/门店', sessionMeta.site, '', '', '', '', '', ''],
|
['session', '现场/门店', sessionMeta.site, '', '', '', '', '', ''],
|
||||||
@@ -1027,7 +1030,7 @@ function exportChecklist() {
|
|||||||
['session', '待补证据数', String(evidenceMissingCount.value), '', '', '', '', '', ''],
|
['session', '待补证据数', String(evidenceMissingCount.value), '', '', '', '', '', ''],
|
||||||
['session', '逾期检查项', String(overdueItems.value.length), '', '', '', '', '', ''],
|
['session', '逾期检查项', String(overdueItems.value.length), '', '', '', '', '', ''],
|
||||||
['ID', '类别', '检查项', '期望', '状态', '负责人', '期限', '结果记录', '应留证据', '证据记录'],
|
['ID', '类别', '检查项', '期望', '状态', '负责人', '期限', '结果记录', '应留证据', '证据记录'],
|
||||||
...checklist.map((item) => [
|
...exportItems.map((item) => [
|
||||||
item.id,
|
item.id,
|
||||||
item.category,
|
item.category,
|
||||||
item.title,
|
item.title,
|
||||||
@@ -1042,6 +1045,15 @@ function exportChecklist() {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildFilterSummary() {
|
||||||
|
return [
|
||||||
|
`分类=${category.value}`,
|
||||||
|
`状态=${statusFilter.value}`,
|
||||||
|
`负责人=${ownerFilter.value}`,
|
||||||
|
`关键字=${keywordFilter.value.trim() || '全部'}`
|
||||||
|
].join(';');
|
||||||
|
}
|
||||||
|
|
||||||
function exportRiskRegister() {
|
function exportRiskRegister() {
|
||||||
downloadCsv(`cleaning-field-risk-register-${Date.now()}.csv`, [
|
downloadCsv(`cleaning-field-risk-register-${Date.now()}.csv`, [
|
||||||
['类别', '字段', '值', '', '', '', '', '', ''],
|
['类别', '字段', '值', '', '', '', '', '', ''],
|
||||||
|
|||||||
@@ -363,6 +363,11 @@ for (const pattern of [
|
|||||||
'copyBlockedSummary',
|
'copyBlockedSummary',
|
||||||
'navigator.clipboard.writeText',
|
'navigator.clipboard.writeText',
|
||||||
'exportChecklist',
|
'exportChecklist',
|
||||||
|
'导出筛选',
|
||||||
|
'exportItems',
|
||||||
|
'buildFilterSummary',
|
||||||
|
'当前筛选条件',
|
||||||
|
'导出检查项数',
|
||||||
'exportRiskRegister',
|
'exportRiskRegister',
|
||||||
'cleaning-field-handoff',
|
'cleaning-field-handoff',
|
||||||
'cleaning-field-risk-register',
|
'cleaning-field-risk-register',
|
||||||
|
|||||||
Reference in New Issue
Block a user