feat(platform): show vehicle archive completeness
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user