feat(platform): show vehicle archive completeness

This commit is contained in:
lingniu
2026-07-04 09:33:45 +08:00
parent d4ff7d8b83
commit 817e5324f6
2 changed files with 16 additions and 0 deletions

View File

@@ -34,6 +34,12 @@ function sourceEvidenceText(row: VehicleCoverageRow) {
return `${row.onlineSourceCount}/${row.sourceCount} 来源在线`;
}
function vehicleArchiveCompleteness(row: VehicleCoverageRow) {
const fields = [row.vin, row.plate, row.phone, row.oem];
const completed = fields.filter((item) => Boolean(String(item ?? '').trim())).length;
return { completed, total: fields.length, label: `${completed}/${fields.length}` };
}
const coverageLabel: Record<string, string> = {
single: '单源',
multi: '多源'
@@ -226,6 +232,14 @@ export function Vehicles({
{ title: '车牌', dataIndex: 'plate', width: 120 },
{ title: '手机号', dataIndex: 'phone', width: 130 },
{ title: 'OEM', dataIndex: 'oem', width: 120 },
{
title: '档案完整度',
width: 120,
render: (_: unknown, row: VehicleCoverageRow) => {
const archive = vehicleArchiveCompleteness(row);
return <Tag color={archive.completed === archive.total ? 'green' : 'orange'}>{archive.label}</Tag>;
}
},
{
title: '车辆服务状态',
width: 130,