diff --git a/vehicle-data-platform/apps/web/src/pages/Realtime.tsx b/vehicle-data-platform/apps/web/src/pages/Realtime.tsx index 9252e0e5..3baf40b0 100644 --- a/vehicle-data-platform/apps/web/src/pages/Realtime.tsx +++ b/vehicle-data-platform/apps/web/src/pages/Realtime.tsx @@ -1070,6 +1070,46 @@ export function Realtime({ secondaryDisabled: !selectedMapRow || !canOpenVehicle(selectedMapRow.vin) } ]; + const mapFieldCommandItems = [ + { + title: '全域定位', + value: `${locatedCount.toLocaleString()} 辆有坐标`, + detail: amapConfigured ? '用高德地图查看车辆分布、在线状态和最近上报位置。' : '高德不可用时先用坐标预览确认车辆分布。', + color: locatedCount > 0 ? 'blue' as const : 'orange' as const, + action: '刷新地图', + disabled: false, + onClick: () => load(filters, pagination.currentPage, pagination.pageSize) + }, + { + title: '关注车辆', + value: mapAttentionRows.length > 0 ? `${mapAttentionRows.length.toLocaleString()} 辆待处理` : '暂无异常', + detail: mapAttentionRows[0] + ? `${mapAttentionRows[0].plate || mapAttentionRows[0].vin}:${realtimeIssueLabels(mapAttentionRows[0]).join(';')}` + : '当前筛选下车辆在线、定位和新鲜度未形成主要风险。', + color: mapAttentionRows.length > 0 ? 'orange' as const : 'green' as const, + action: '定位关注车', + disabled: mapAttentionRows.length === 0, + onClick: () => mapAttentionRows[0] && selectRealtimeRow(mapAttentionRows[0]) + }, + { + title: '轨迹复盘', + value: selectedVehicleLabel, + detail: selectedMapRow ? '打开选中车辆轨迹,核对路径、速度、里程和停留。' : '先选择车辆,再进入轨迹回放和时间窗复盘。', + color: selectedMapRow ? 'blue' as const : 'grey' as const, + action: '打开轨迹', + disabled: !selectedMapRow || !canOpenVehicle(selectedMapRow.vin), + onClick: () => selectedMapRow && onOpenHistory?.(selectedMapRow.vin, selectedVehicleProtocol) + }, + { + title: '通知证据', + value: mapAttentionRows.length > 0 ? '需通知' : '可交付', + detail: mapAttentionRows.length > 0 ? '复制地图监控包后进入告警事件,形成通知和处置闭环。' : '地图态势稳定时,可直接复制地图监控包用于交接。', + color: mapAttentionRows.length > 0 ? 'orange' as const : 'green' as const, + action: mapAttentionRows.length > 0 ? '告警事件' : '复制监控包', + disabled: false, + onClick: () => mapAttentionRows.length > 0 && onOpenQuality ? onOpenQuality({ serviceStatus: 'degraded' }) : copyMapCustomerPackage() + } + ]; const mapCustomerDecisionItems = [ { label: '先看在线', @@ -1346,7 +1386,7 @@ export function Realtime({ - +
@@ -1381,7 +1421,40 @@ export function Realtime({ ))}
- + +
+
+ + 现场指挥建议 + {amapConfigured ? '地图可用' : '坐标预览'} + 0 ? 'orange' : 'green'}> + {mapAttentionRows.length > 0 ? '先处置关注车辆' : '态势稳定'} + + + 先看车在哪里,再决定回放、告警和导出 + + 现场调度按实时地图、关注车辆、轨迹复盘、通知证据四步工作;围栏和告警后续也应从这里进入。 + +
+
+ {mapFieldCommandItems.map((item) => ( + + ))} +
+
+
{mapFleetKpis.map((item) => (