feat(platform-web): show vehicle detail source scope

This commit is contained in:
lingniu
2026-07-04 01:39:18 +08:00
parent dc3e12328e
commit 5000d5cd1c
3 changed files with 100 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ export function VehicleDetail({
const online = resolution?.online || summary?.online || identity?.online || false;
const lastSeen = resolution?.lastSeen || summary?.lastSeen || latest?.lastSeen || '-';
const activeProtocol = query.protocol?.trim() ?? '';
const scopeText = activeProtocol ? `单一来源:${activeProtocol}` : '全部来源聚合';
const formKey = `${query.keyword}-${query.protocol ?? ''}`;
const switchSource = (nextProtocol = '') => {
const nextQuery = { keyword: resolvedVIN || query.keyword, protocol: nextProtocol };
@@ -136,6 +137,14 @@ export function VehicleDetail({
</Form>
</Card>
<div className="vp-scope-bar">
<span className="vp-scope-label"></span>
<Tag color={activeProtocol ? 'blue' : 'green'}>{scopeText}</Tag>
<Typography.Text type="tertiary">
{activeProtocol ? '下方实时、历史、RAW 和里程仅展示该来源返回的数据。' : '下方数据按车辆聚合展示全部可用来源。'}
</Typography.Text>
</div>
<Card bordered style={{ marginTop: 16 }}>
<div className="vp-vehicle-summary">
<Descriptions