feat(platform): prioritize customer vehicle command center
This commit is contained in:
@@ -1738,11 +1738,89 @@ export function Dashboard({
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
const customerServiceCommandItems = [
|
||||
{
|
||||
label: '实时地图',
|
||||
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
detail: `${commandLocatedCount.toLocaleString()} 辆有有效定位,优先回答车辆在哪里。`,
|
||||
action: '进入地图',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
label: '轨迹回放',
|
||||
value: `${formatCount(summary?.activeToday)} 活跃`,
|
||||
detail: `${dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo)},按车辆复盘路线、速度和里程断点。`,
|
||||
action: '回放轨迹',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
label: '统计查询',
|
||||
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
|
||||
detail: '按车辆口径核对区间里程、日统计和异常来源。',
|
||||
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 } : {})
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
<PageHeader title="车辆服务工作台" description="面向客户的车辆地图、实时监控、轨迹回放、统计查询、自定义时间窗复盘、历史查询、告警通知和数据导出" />
|
||||
<Spin spinning={loading}>
|
||||
<section className="vp-customer-service-command" aria-label="客户车辆服务总控台">
|
||||
<div className="vp-customer-service-command-main">
|
||||
<div className="vp-customer-service-command-copy">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户车辆服务总控台</Tag>
|
||||
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '地图可用' : '坐标预览'}</Tag>
|
||||
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} 告警</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={4} style={{ margin: 0 }}>把接入来源收敛成一套车辆服务。</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
三个接入来源统一沉到证据层,首页只回答客户怎么监控车辆、回放轨迹、核对里程、导出数据和处理告警。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-customer-service-command-evidence">
|
||||
<span>来源证据:GB32960 / JT808 / YUTONG_MQTT</span>
|
||||
<strong>{vehicleServiceOnlineText(serviceSummary, summary)}</strong>
|
||||
<small>{dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo)}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-customer-service-command-grid">
|
||||
{customerServiceCommandItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-customer-service-command-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-cockpit" aria-label="现代车队运营台">
|
||||
<div className="vp-customer-cockpit-summary">
|
||||
<Space wrap>
|
||||
|
||||
Reference in New Issue
Block a user