feat(platform): show canonical vehicle archive

This commit is contained in:
lingniu
2026-07-04 09:31:13 +08:00
parent cb45c44a05
commit d4ff7d8b83
2 changed files with 90 additions and 4 deletions

View File

@@ -196,6 +196,12 @@ export function VehicleDetail({
const evidenceTimeDeltaSeconds = consistencyTimeDeltaSeconds;
const activeProtocol = query.protocol?.trim() ?? '';
const scopeText = activeProtocol ? `单一来源:${activeProtocol}` : '全部来源聚合';
const archivePlate = resolution?.plate || summary?.plate || identity?.plate || latest?.plate || '';
const archivePhone = resolution?.phone || summary?.phone || identity?.phone || '';
const archiveOEM = resolution?.oem || summary?.oem || identity?.oem || '';
const archiveFields = [hasResolvedVIN && displayVIN !== '-', archivePlate, archivePhone, archiveOEM];
const archiveCompleteness = `${archiveFields.filter(Boolean).length}/${archiveFields.length}`;
const archiveSourceCount = Math.max(protocols.length, sourceCount);
const formKey = `${query.keyword}-${query.protocol ?? ''}`;
const switchSource = (nextProtocol = '') => {
const nextQuery = { keyword: resolvedVIN || query.keyword, protocol: nextProtocol };
@@ -389,17 +395,20 @@ export function VehicleDetail({
</div>
</Card>
<Card bordered style={{ marginTop: 16 }}>
<Card bordered title="车辆档案" style={{ marginTop: 16 }}>
<div className="vp-vehicle-summary">
<Descriptions
row
data={[
{ key: '车辆主键', value: displayVIN },
{ key: '查询关键词', value: displayLookupKey },
{ key: 'VIN', value: displayVIN },
{ key: '解析状态', value: <Tag color={hasResolvedVIN ? 'green' : 'orange'}>{hasResolvedVIN ? '已解析 VIN' : '未解析到 VIN'}</Tag> },
{ key: '车牌', value: resolution?.plate || summary?.plate || identity?.plate || latest?.plate || '-' },
{ key: '手机号', value: resolution?.phone || summary?.phone || identity?.phone || '-' },
{ key: 'OEM', value: resolution?.oem || summary?.oem || identity?.oem || '-' },
{ key: '车牌', value: archivePlate || '-' },
{ key: '手机号', value: archivePhone || '-' },
{ key: 'OEM', value: archiveOEM || '-' },
{ key: '档案完整度', value: <Tag color={archiveCompleteness === '4/4' ? 'green' : 'orange'}>{archiveCompleteness}</Tag> },
{ key: '归并来源数', value: archiveSourceCount },
{ key: '在线', value: <StatusTag status={online ? 'ok' : 'offline'} /> },
{
key: '数据来源',