feat(platform): surface selected vehicle map actions

This commit is contained in:
lingniu
2026-07-05 13:28:07 +08:00
parent 2453d3e467
commit b3ec3def14
3 changed files with 125 additions and 0 deletions

View File

@@ -1367,6 +1367,53 @@ export function Realtime({
))}
</div>
<div className="vp-map-selected-service-strip">
<div className="vp-map-selected-service-summary">
<Space wrap>
<Tag color="blue"></Tag>
{selectedMapRow ? (
<>
<Tag color={vehicleServiceStatus(selectedMapRow).color}>{vehicleServiceStatus(selectedMapRow).label}</Tag>
<Tag color={dataFreshness(selectedMapRow).color}>{dataFreshness(selectedMapRow).detail}</Tag>
</>
) : (
<Tag color="grey"></Tag>
)}
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}>{selectedVehicleLabel}</Typography.Title>
<Typography.Text type="secondary">
</Typography.Text>
</div>
<div className="vp-map-selected-service-actions">
{mapVehicleWorkItems.map((item) => (
<button
key={item.title}
type="button"
className="vp-map-selected-service-action"
disabled={item.disabled}
onClick={item.onClick}
aria-label={`地图选中车辆 ${item.title} ${item.action}`}
>
<Tag color={item.color}>{item.title}</Tag>
<strong>{item.action}</strong>
<span>{item.value}</span>
</button>
))}
<button
type="button"
className="vp-map-selected-service-action"
disabled={!selectedMapRow || !canOpenVehicle(selectedMapRow.vin)}
onClick={openSelectedVehicleRaw}
aria-label="地图选中车辆 数据导出 历史导出"
>
<Tag color="blue"></Tag>
<strong></strong>
<span>{selectedMapRow ? selectedVehicleProtocol || selectedMapRow.primaryProtocol || '全部通道' : '等待选择'}</span>
</button>
</div>
</div>
<div className="vp-map-task-strip">
{mapCustomerTasks.map((item) => (
<div key={item.title} className="vp-map-task-item">