diff --git a/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx b/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx index 30240566..08561900 100644 --- a/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx +++ b/vehicle-data-platform/apps/web/src/pages/Dashboard.tsx @@ -1502,6 +1502,56 @@ export function Dashboard({ onClick: () => onOpenQuality() } ]; + const customerServiceCockpitItems = [ + { + label: '车辆总览', + value: `${formatCount(serviceSummary?.totalVehicles)} 辆`, + detail: '按 VIN、车牌、手机号或 OEM 进入车辆服务,不从协议列表开始。', + action: '车辆中心', + color: 'blue' as const, + onClick: () => onOpenVehicles({}) + }, + { + label: '实时可见', + value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`, + detail: `${commandLocatedCount.toLocaleString()} 辆有有效坐标,先回答客户车辆在哪里。`, + action: '地图看车', + color: commandLocatedCount > 0 ? 'green' as const : 'orange' as const, + onClick: () => onOpenMap({ online: 'online' }) + }, + { + label: '轨迹复盘', + value: `${formatCount(summary?.activeToday)} 今日活跃`, + detail: '同一辆车、同一时间窗回放路线、速度、停驶和里程断点。', + action: '回放轨迹', + color: 'blue' as const, + onClick: openTimeMonitorHistory + }, + { + label: '里程统计', + value: dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo), + detail: '核对区间里程、每日闭合、异常记录和 BI 统计口径。', + action: '统计查询', + color: 'blue' as const, + onClick: openTimeMonitorMileage + }, + { + label: '数据交付', + value: `${formatCount(summary?.frameToday)} 今日数据`, + detail: '按车辆、时间和字段裁剪历史位置、原始记录和解析证据。', + action: '导出证据', + color: 'blue' as const, + onClick: openTimeMonitorRaw + }, + { + 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 } : {}) + } + ]; const customerCockpitWorkflows = [ { title: '实时看车', @@ -2144,6 +2194,37 @@ export function Dashboard({