diff --git a/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx b/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx index a8670649..f21a6c83 100644 --- a/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx +++ b/vehicle-data-platform/apps/web/src/pages/VehicleDetail.tsx @@ -83,6 +83,21 @@ export function VehicleDetail({ const online = summary?.online || identity?.online || false; const lastSeen = summary?.lastSeen || latest?.lastSeen || '-'; const formKey = `${query.keyword}-${query.protocol ?? ''}`; + const qualityTable = ( + `${row?.protocol ?? ''}-${row?.issueType ?? ''}-${row?.lastSeen ?? ''}`} + dataSource={detail?.quality.items ?? []} + columns={[ + { title: '来源', dataIndex: 'protocol', width: 130 }, + { title: '问题', dataIndex: 'issueType', width: 150 }, + { title: '级别', width: 110, render: (_: unknown, row: QualityIssueRow) => {row.severity} }, + { title: '最后时间', dataIndex: 'lastSeen', width: 190 }, + { title: '说明', dataIndex: 'detail' } + ]} + /> + ); return (
@@ -142,53 +157,66 @@ export function VehicleDetail({ ) : null} - - {detail?.sourceStatus?.length ? ( -
- {detail.sourceStatus.map((source) => ( -
-
- - {source.protocol} - - - {source.lastSeen || '无上报'} -
- - {sourceCapabilities.map((item) => ( - - {item.label}{source[item.key] ? '有' : '无'} - - ))} - + {hasResolvedVIN ? ( + <> + + {detail?.sourceStatus?.length ? ( +
+ {detail.sourceStatus.map((source) => ( +
+
+ + {source.protocol} + + + {source.lastSeen || '无上报'} +
+ + {sourceCapabilities.map((item) => ( + + {item.label}{source[item.key] ? '有' : '无'} + + ))} + +
+ ))}
- ))} -
- ) : ( - 暂未查询到该车辆的数据来源覆盖。 - )} - + ) : ( + 暂未查询到该车辆的数据来源覆盖。 + )} + - -
}, - { title: '最后时间', dataIndex: 'lastSeen', width: 190 }, - { title: '实时', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasRealtime ? '有' : '无'} }, - { title: '历史', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasHistory ? '有' : '无'} }, - { title: 'RAW', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasRaw ? '有' : '无'} }, - { title: '里程', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasMileage ? '有' : '无'} } - ]} - /> - + +
}, + { title: '最后时间', dataIndex: 'lastSeen', width: 190 }, + { title: '实时', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasRealtime ? '有' : '无'} }, + { title: '历史', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasHistory ? '有' : '无'} }, + { title: 'RAW', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasRaw ? '有' : '无'} }, + { title: '里程', width: 90, render: (_: unknown, row: VehicleSourceStatus) => {row.hasMileage ? '有' : '无'} } + ]} + /> + + + ) : null} - - + {!hasResolvedVIN ? ( + + + + {qualityTable} + + + + ) : ( + +
{[ @@ -271,22 +299,11 @@ export function VehicleDetail({ /> -
`${row?.protocol ?? ''}-${row?.issueType ?? ''}-${row?.lastSeen ?? ''}`} - dataSource={detail?.quality.items ?? []} - columns={[ - { title: '来源', dataIndex: 'protocol', width: 130 }, - { title: '问题', dataIndex: 'issueType', width: 150 }, - { title: '级别', width: 110, render: (_: unknown, row: QualityIssueRow) => {row.severity} }, - { title: '最后时间', dataIndex: 'lastSeen', width: 190 }, - { title: '说明', dataIndex: 'detail' } - ]} - /> + {qualityTable} - - + + + )} ); }