feat(platform): add history replay customer navigation
This commit is contained in:
@@ -1346,6 +1346,44 @@ export function History({
|
||||
}
|
||||
loadRawFrames(nextFilters, 1, rawPagination.pageSize, tab === 'fields');
|
||||
};
|
||||
const customerReplayNavigation = [
|
||||
{
|
||||
title: '选车和时间',
|
||||
value: currentVehicleKeyword || '待选择车辆',
|
||||
detail: `${currentProtocol || '全部数据通道'} / ${filters.dateFrom || '-'} 至 ${filters.dateTo || '-'}`,
|
||||
action: '调整筛选',
|
||||
color: currentVehicleKeyword ? 'green' as const : 'orange' as const,
|
||||
disabled: false,
|
||||
onClick: () => document.querySelector<HTMLInputElement>('input[name="keyword"]')?.focus()
|
||||
},
|
||||
{
|
||||
title: '回放路线',
|
||||
value: validLocations.length > 0 ? `${validLocations.length.toLocaleString()} 点` : '待查询',
|
||||
detail: '按时间顺序播放轨迹,核对路线、停留和断点。',
|
||||
action: '播放轨迹',
|
||||
color: validLocations.length > 0 ? 'green' as const : 'grey' as const,
|
||||
disabled: validLocations.length === 0,
|
||||
onClick: () => openQueryTab('location')
|
||||
},
|
||||
{
|
||||
title: '核对里程',
|
||||
value: formatNumber(mileageDelta, ' km'),
|
||||
detail: '跳到同一车辆和时间窗的里程统计,检查区间差值。',
|
||||
action: '统计查询',
|
||||
color: isFiniteNumber(mileageDelta) ? 'green' as const : 'grey' as const,
|
||||
disabled: !onOpenMileage || !currentVehicleKeyword,
|
||||
onClick: () => onOpenMileage?.({ keyword: currentVehicleKeyword, protocol: currentProtocol, ...(filters.dateFrom ? { dateFrom: filters.dateFrom } : {}), ...(filters.dateTo ? { dateTo: filters.dateTo } : {}) })
|
||||
},
|
||||
{
|
||||
title: '导出证据',
|
||||
value: deliveryState,
|
||||
detail: '复制客户交付包,包含轨迹、位置、RAW、字段和统计链接。',
|
||||
action: '复制交付',
|
||||
color: deliveryStateColor,
|
||||
disabled: false,
|
||||
onClick: copyDeliveryPackage
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
@@ -1528,6 +1566,38 @@ export function History({
|
||||
</div>
|
||||
</Card>
|
||||
) : null}
|
||||
<Card bordered title="客户复盘导航" style={{ marginTop: 16 }}>
|
||||
<div className="vp-history-replay-nav">
|
||||
<div className="vp-history-replay-nav-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">Trips History</Tag>
|
||||
<Tag color={trajectoryDecisionColor}>{trajectoryDecisionState}</Tag>
|
||||
<Tag color={deliveryStateColor}>{deliveryState}</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>像 Trips History 一样,先锁定车辆和时间,再回放路线、核对里程、导出证据。</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
客户复盘不从 RAW 开始,而是从车辆、时间、路线和交付结果开始;字段和原始记录只作为证明材料。
|
||||
</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-history-replay-nav-grid">
|
||||
{customerReplayNavigation.map((item) => (
|
||||
<button
|
||||
key={item.title}
|
||||
type="button"
|
||||
className="vp-history-replay-nav-item"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户复盘导航 ${item.title} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered className="vp-trip-workbench" bodyStyle={{ padding: 0 }}>
|
||||
<div className="vp-trip-workbench-map">
|
||||
<div className="vp-trip-workbench-copy">
|
||||
|
||||
Reference in New Issue
Block a user