feat(platform): surface map situation from dashboard

This commit is contained in:
lingniu
2026-07-04 17:04:32 +08:00
parent 255afe8a84
commit 5ca6b51d0b
3 changed files with 26 additions and 3 deletions

View File

@@ -173,6 +173,7 @@ function sourceConsistencyAction(row: VehicleCoverageRow, onFilter: (filters: Re
export function Dashboard({
onOpenVehicle,
onOpenQuality,
onOpenMap,
onOpenRealtime,
onOpenVehicles,
onOpenHistory,
@@ -180,6 +181,7 @@ export function Dashboard({
}: {
onOpenVehicle: (vin: string, protocol?: string) => void;
onOpenQuality: (filters?: Record<string, string>) => void;
onOpenMap: (filters?: Record<string, string>) => void;
onOpenRealtime: (filters?: Record<string, string>) => void;
onOpenVehicles: (filters?: Record<string, string>) => void;
onOpenHistory: (filters?: Record<string, string>) => void;
@@ -309,6 +311,14 @@ export function Dashboard({
title: `${row.plate || row.vin || '-'} ${row.primaryProtocol || ''} ${row.lastSeen || ''}`
}));
const capabilities = [
{
title: '地图态势',
status: `在线态势 ${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)}`,
color: 'green' as const,
description: '以地图为主视角查看车辆在线分布、定位有效性、来源一致性和高德接入状态。',
action: '打开地图',
onClick: () => onOpenMap({ online: 'online' })
},
{
title: '实时监控',
status: `在线 ${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)}`,
@@ -563,7 +573,7 @@ export function Dashboard({
<Typography.Text type="secondary">线</Typography.Text>
</div>
<Space vertical align="start">
<Button theme="solid" type="primary" onClick={() => onOpenRealtime({ online: 'online' })}></Button>
<Button theme="solid" type="primary" onClick={() => onOpenMap({ online: 'online' })}></Button>
<Button
disabled={!highPriorityIssue?.issueType}
theme="light"