feat(platform): add realtime time window task board
This commit is contained in:
@@ -850,6 +850,62 @@ export function Realtime({
|
||||
onClick: openTimeWindowQuality
|
||||
}
|
||||
];
|
||||
const timeWindowTaskItems = [
|
||||
{
|
||||
step: '1',
|
||||
title: '锁定车辆',
|
||||
value: timeWindowRow?.plate || timeWindowKeyword || '未选择车辆',
|
||||
detail: timeWindowReady ? `${timeWindow.dateFrom} 至 ${timeWindow.dateTo}` : '先从实时列表或地图选择车辆,再确认时间窗。',
|
||||
action: timeWindowReady ? '已锁定' : '先选车辆',
|
||||
color: timeWindowReady ? 'green' as const : 'orange' as const,
|
||||
disabled: false,
|
||||
onClick: () => {
|
||||
if (!timeWindowReady) {
|
||||
Toast.warning('请先选择车辆和时间窗');
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
step: '2',
|
||||
title: '轨迹复盘',
|
||||
value: timeWindowDuration,
|
||||
detail: '回放位置、速度、里程断点和停留变化。',
|
||||
action: '轨迹回放',
|
||||
color: 'blue' as const,
|
||||
disabled: !timeWindowReady,
|
||||
onClick: openTimeWindowHistory
|
||||
},
|
||||
{
|
||||
step: '3',
|
||||
title: '里程核对',
|
||||
value: timeWindowRow?.totalMileageKm != null ? `${timeWindowRow.totalMileageKm} km` : '待核对',
|
||||
detail: '用同一时间窗进入里程统计,核对区间差值和日统计闭合。',
|
||||
action: '统计查询',
|
||||
color: timeWindowRow?.totalMileageKm != null ? 'blue' as const : 'orange' as const,
|
||||
disabled: !timeWindowReady,
|
||||
onClick: openTimeWindowMileage
|
||||
},
|
||||
{
|
||||
step: '4',
|
||||
title: '历史导出',
|
||||
value: timeWindowProtocol || '全部通道',
|
||||
detail: '导出位置、原始帧和字段证据,支撑客户问询。',
|
||||
action: '导出证据',
|
||||
color: 'blue' as const,
|
||||
disabled: !timeWindowReady,
|
||||
onClick: openTimeWindowRaw
|
||||
},
|
||||
{
|
||||
step: '5',
|
||||
title: '告警闭环',
|
||||
value: timeWindowRow ? vehicleServiceStatus(timeWindowRow).label : '待选择',
|
||||
detail: '复盘断链、离线、定位异常和通知处理记录。',
|
||||
action: '告警复盘',
|
||||
color: timeWindowRow && hasSourceIssue(timeWindowRow) ? 'orange' as const : timeWindowReady ? 'green' as const : 'grey' as const,
|
||||
disabled: !timeWindowReady || !onOpenQuality,
|
||||
onClick: openTimeWindowQuality
|
||||
}
|
||||
];
|
||||
const mapPoints: VehicleMapPoint[] = rows.map((row, index) => ({
|
||||
id: realtimeMapPointId(row, index),
|
||||
label: row.plate || row.vin || 'unknown',
|
||||
@@ -1763,6 +1819,33 @@ export function Realtime({
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-time-window-task-board">
|
||||
<div className="vp-time-window-task-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">时间窗监控任务台</Tag>
|
||||
<Tag color={timeWindowReady ? 'green' : 'orange'}>{timeWindowReady ? '可交付' : '待锁定'}</Tag>
|
||||
</Space>
|
||||
<Typography.Text strong>把同一辆车、同一时间窗贯穿到轨迹、里程、历史导出和告警说明,避免客户跨页面重复筛选。</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-time-window-task-grid">
|
||||
{timeWindowTaskItems.map((item) => (
|
||||
<button
|
||||
key={item.step}
|
||||
type="button"
|
||||
className="vp-time-window-task-item"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`时间窗监控任务台 ${item.step} ${item.title} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.step}</Tag>
|
||||
<strong>{item.title}</strong>
|
||||
<span>{item.value}</span>
|
||||
<small>{item.detail}</small>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user