feat: KPI详情历史数据来源/状态中文显示 — sourceLabel/statusLabel映射(Excel导入/账簿提取/手动录入/已验证/估算等)
This commit is contained in:
@@ -169,9 +169,11 @@
|
|||||||
<el-tag v-else type="info" size="small">—</el-tag>
|
<el-tag v-else type="info" size="small">—</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="source_type" label="来源" width="90" />
|
<el-table-column label="来源" width="90">
|
||||||
<el-table-column prop="data_status" label="状态" width="90">
|
<template #default="{ row }">{{ sourceLabel(row.source_type) }}</template>
|
||||||
<template #default="{ row }"><el-tag :type="row.data_status==='verified'?'success':'warning'" size="small">{{ row.data_status }}</el-tag></template>
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" width="90">
|
||||||
|
<template #default="{ row }"><el-tag :type="row.data_status==='verified'?'success':'warning'" size="small">{{ statusLabel(row.data_status) }}</el-tag></template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="source_batch" label="数据批次" min-width="160" show-overflow-tooltip />
|
<el-table-column prop="source_batch" label="数据批次" min-width="160" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -333,6 +335,24 @@ function formatValue(v: any) {
|
|||||||
// 整数不带小数,非整数保留2位
|
// 整数不带小数,非整数保留2位
|
||||||
return n.toLocaleString('zh-CN', { minimumFractionDigits: 0, maximumFractionDigits: 2 })
|
return n.toLocaleString('zh-CN', { minimumFractionDigits: 0, maximumFractionDigits: 2 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 来源中文映射
|
||||||
|
function sourceLabel(s: string) {
|
||||||
|
const map: Record<string, string> = {
|
||||||
|
excel: 'Excel导入', ledger: '账簿提取', manual: '手动录入',
|
||||||
|
'excel-import': 'Excel导入', forecast: '预测', sales_ranking: '销售排行',
|
||||||
|
'bot-bridge-v2': 'Bot桥接', verify: '验证数据', erp: 'ERP',
|
||||||
|
}
|
||||||
|
return map[s] || s || '—'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 状态中文映射
|
||||||
|
function statusLabel(s: string) {
|
||||||
|
const map: Record<string, string> = {
|
||||||
|
verified: '已验证', estimated: '估算', pending: '待处理', error: '错误',
|
||||||
|
}
|
||||||
|
return map[s] || s || '—'
|
||||||
|
}
|
||||||
const mapOptions = ref<any[]>([])
|
const mapOptions = ref<any[]>([])
|
||||||
const activeTab = ref('basic')
|
const activeTab = ref('basic')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user