feat(platform): add vehicle priority queue
This commit is contained in:
@@ -1547,6 +1547,42 @@ export function Dashboard({
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
const onlineVehicleCount = serviceSummary?.onlineVehicles ?? summary?.onlineVehicles ?? 0;
|
||||
const missingLocationCount = Math.max(onlineVehicleCount - commandLocatedCount, 0);
|
||||
const vehiclePriorityQueue = [
|
||||
{
|
||||
title: '告警待处理',
|
||||
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 } : {})
|
||||
},
|
||||
{
|
||||
title: '无有效定位',
|
||||
value: `${missingLocationCount.toLocaleString()} 辆`,
|
||||
detail: '在线车辆缺少有效坐标时,客户无法完成地图看车和轨迹复盘。',
|
||||
action: '打开地图',
|
||||
color: missingLocationCount > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
title: '身份未绑定',
|
||||
value: `${formatCount(serviceSummary?.identityRequiredVehicles)} 辆`,
|
||||
detail: '已有数据但无法归并到 VIN,会影响车辆服务、统计和导出。',
|
||||
action: '维护绑定',
|
||||
color: (serviceSummary?.identityRequiredVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenVehicles({ serviceStatus: 'identity_required' })
|
||||
},
|
||||
{
|
||||
title: '暂无数据',
|
||||
value: `${formatCount(serviceSummary?.noDataVehicles)} 辆`,
|
||||
detail: '车辆没有形成实时、轨迹或历史证据,优先确认平台转发。',
|
||||
action: '车辆列表',
|
||||
color: (serviceSummary?.noDataVehicles ?? 0) > 0 ? 'red' as const : 'green' as const,
|
||||
onClick: () => onOpenVehicles({ serviceStatus: 'no_data' })
|
||||
}
|
||||
];
|
||||
const customerNextActions = [
|
||||
{
|
||||
level: (summary?.issueVehicles ?? 0) > 0 ? '优先' : '巡检',
|
||||
@@ -1842,6 +1878,31 @@ export function Dashboard({
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-vehicle-priority-queue">
|
||||
<div className="vp-vehicle-priority-queue-head">
|
||||
<div>
|
||||
<Typography.Text strong>车辆运营优先级队列</Typography.Text>
|
||||
<Typography.Text type="secondary">先处理影响客户看车、查轨迹、算里程和收通知的问题车辆。</Typography.Text>
|
||||
</div>
|
||||
<Tag color="blue">按车辆问题排序</Tag>
|
||||
</div>
|
||||
<div className="vp-vehicle-priority-queue-grid">
|
||||
{vehiclePriorityQueue.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-vehicle-priority-queue-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`车辆运营优先级队列 ${item.title} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-fleet-monitor-panel-head">
|
||||
<Typography.Text strong>今日先处理</Typography.Text>
|
||||
<Button size="small" theme="light" type="primary" onClick={copyCustomerServiceGuide}>复制说明</Button>
|
||||
|
||||
Reference in New Issue
Block a user