feat(platform): anchor dashboard on amap vehicle service

This commit is contained in:
lingniu
2026-07-05 20:28:29 +08:00
parent 36ac5fe7c5
commit 7348cc6186
3 changed files with 143 additions and 0 deletions

View File

@@ -1468,6 +1468,40 @@ export function Dashboard({
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
}
];
const amapVehicleServiceItems = [
{
label: '实时看车',
value: `${commandLocatedCount.toLocaleString()} 有定位`,
detail: '高德底图承接车辆在线、最新位置、速度和最后上报时间。',
action: '打开地图',
color: commandLocatedCount > 0 ? 'green' as const : 'orange' as const,
onClick: () => onOpenMap({ online: 'online' })
},
{
label: '路线回放',
value: dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo),
detail: '同一车辆和时间窗回放路径,核对速度、停留、里程和断点。',
action: '轨迹回放',
color: 'blue' as const,
onClick: openTimeMonitorHistory
},
{
label: '区域告警',
value: `${formatCount(summary?.issueVehicles)} 告警`,
detail: highPriorityIssue ? `${qualityIssueLabel(highPriorityIssue.issueType)} / ${priorityIssueVehicleLabel(highPriorityIssue)}` : '围栏、断链、定位异常后续统一进入告警通知。',
action: '告警通知',
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
},
{
label: '时间窗导出',
value: `${formatCount(summary?.frameToday)} 今日数据`,
detail: '按车辆、时间和字段导出位置、原始记录、解析字段和统计证据。',
action: '历史导出',
color: 'blue' as const,
onClick: openTimeMonitorRaw
}
];
const customerQuestionActions = [
{
question: '这辆车现在在哪里?',
@@ -1855,6 +1889,36 @@ export function Dashboard({
))}
</div>
</section>
<section className="vp-amap-service-foundation" aria-label="高德地图车辆服务底座">
<div className="vp-amap-service-foundation-copy">
<Space wrap>
<Tag color="blue"></Tag>
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? 'Web JS 已配置' : '坐标预览'}</Tag>
<Tag color={amapApiConfigured ? 'green' : 'orange'}>{amapApiConfigured ? '服务端 API 已配置' : '服务端 API 待配置'}</Tag>
<Tag color={amapSecurityProxyEnabled ? 'green' : 'orange'}>{amapSecurityProxyEnabled ? '安全代理已启用' : '安全代理未启用'}</Tag>
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}>线</Typography.Title>
<Typography.Text type="secondary">
32960808MQTT
</Typography.Text>
</div>
<div className="vp-amap-service-foundation-grid">
{amapVehicleServiceItems.map((item) => (
<button
key={item.label}
type="button"
className="vp-amap-service-foundation-item"
onClick={item.onClick}
aria-label={`高德地图车辆服务底座 ${item.label} ${item.value} ${item.action}`}
>
<Tag color={item.color}>{item.label}</Tag>
<strong>{item.value}</strong>
<span>{item.detail}</span>
<em>{item.action}</em>
</button>
))}
</div>
</section>
<section className="vp-customer-vehicle-monitor" aria-label="客户车辆监控台">
<div className="vp-customer-vehicle-monitor-copy">
<Space wrap>