feat(platform): show archive gaps on vehicle detail

This commit is contained in:
lingniu
2026-07-04 10:00:35 +08:00
parent adff22ef74
commit 7925be676b
2 changed files with 26 additions and 6 deletions

View File

@@ -201,6 +201,14 @@ export function VehicleDetail({
const archiveOEM = resolution?.oem || summary?.oem || identity?.oem || '';
const archiveFields = [hasResolvedVIN && displayVIN !== '-', archivePlate, archivePhone, archiveOEM];
const archiveCompleteness = `${archiveFields.filter(Boolean).length}/${archiveFields.length}`;
const archiveMissingLabels = [
{ value: hasResolvedVIN && displayVIN !== '-' ? displayVIN : '', label: '缺VIN' },
{ value: archivePlate, label: '缺车牌' },
{ value: archivePhone, label: '缺手机号' },
{ value: archiveOEM, label: '缺OEM' }
]
.filter((item) => !String(item.value ?? '').trim())
.map((item) => item.label);
const archiveSourceCount = Math.max(protocols.length, sourceCount);
const formKey = `${query.keyword}-${query.protocol ?? ''}`;
const switchSource = (nextProtocol = '') => {
@@ -407,7 +415,17 @@ export function VehicleDetail({
{ key: '车牌', value: archivePlate || '-' },
{ key: '手机号', value: archivePhone || '-' },
{ key: 'OEM', value: archiveOEM || '-' },
{ key: '档案完整度', value: <Tag color={archiveCompleteness === '4/4' ? 'green' : 'orange'}>{archiveCompleteness}</Tag> },
{
key: '档案完整度',
value: (
<Space spacing={4} wrap>
<Tag color={archiveCompleteness === '4/4' ? 'green' : 'orange'}>{archiveCompleteness}</Tag>
{archiveMissingLabels.map((label) => (
<Tag key={label} color="orange">{label}</Tag>
))}
</Space>
)
},
{ key: '归并来源数', value: archiveSourceCount },
{ key: '在线', value: <StatusTag status={online ? 'ok' : 'offline'} /> },
{