feat(platform): refine customer map views

This commit is contained in:
lingniu
2026-07-06 06:35:07 +08:00
parent a46072a5e7
commit 6bc3bf14de
2 changed files with 21 additions and 15 deletions
@@ -1621,17 +1621,17 @@ export function Realtime({
];
const mapViewModeItems = [
{
label: '车辆总览',
value: `${rows.length.toLocaleString()} 辆`,
detail: `在线 ${onlineCount.toLocaleString()},有效定位 ${locatedCount.toLocaleString()},先确认客户能看到的车辆范围。`,
action: '当前页',
label: '在线运营',
value: `${onlineCount.toLocaleString()} 在线`,
detail: `有效定位 ${locatedCount.toLocaleString()},先确认客户当前能看到和能调度的车辆。`,
action: '打开地图',
color: 'blue' as const,
disabled: false,
onClick: () => load(filters, pagination.currentPage, pagination.pageSize)
onClick: () => applyFilters({ ...filters, online: 'online' })
},
{
label: '异常优先',
value: `${mapAttentionRows.length.toLocaleString()} 辆`,
label: '异常处置',
value: `${mapAttentionRows.length.toLocaleString()} 关注`,
detail: mapAttentionRows[0] ? `${mapAttentionRows[0].plate || mapAttentionRows[0].vin}:${realtimeIssueLabels(mapAttentionRows[0]).join(';')}` : '当前筛选下暂无离线、定位或通道异常车辆。',
action: '关注车辆',
color: mapAttentionRows.length > 0 ? 'orange' as const : 'green' as const,
@@ -1639,7 +1639,7 @@ export function Realtime({
onClick: () => applyFilters({ ...filters, serviceStatus: 'degraded' })
},
{
label: '轨迹复盘',
label: '单车复盘',
value: selectedVehicleLabel,
detail: selectedMapRow ? '围绕选中车辆进入轨迹、统计和历史查询。' : '从地图或车辆列表选择一辆车后复盘。',
action: '选中车辆',
@@ -1648,8 +1648,8 @@ export function Realtime({
onClick: () => selectedMapRow && onOpenHistory?.(selectedMapRow.vin, selectedVehicleProtocol)
},
{
label: '交付导出',
value: `${rows.length.toLocaleString()} 辆`,
label: '报表交付',
value: `${rows.length.toLocaleString()} 当前页`,
detail: '导出当前地图车辆清单、在线状态和客户交付证据。',
action: '导出证据',
color: rows.length > 0 ? 'blue' as const : 'grey' as const,
@@ -2805,18 +2805,18 @@ export function Realtime({
</div>
</div>
<div className="vp-map-view-mode">
<div className="vp-map-view-mode" aria-label="客户常用地图视图">
<div className="vp-map-view-mode-summary">
<Space wrap>
<Tag color="blue">地图视图模式</Tag>
<Tag color="blue">客户常用地图视图</Tag>
<Tag color={mapAttentionRows.length > 0 ? 'orange' : 'green'}>
{mapAttentionRows.length > 0 ? '异常优先' : '运营稳定'}
</Tag>
<Tag color={selectedMapRow ? 'blue' : 'grey'}>{selectedVehicleLabel}</Tag>
</Space>
<Typography.Text strong>按客户现场使用场景切换地图重点:车辆总览、异常优先、轨迹复盘或交付导出。</Typography.Text>
<Typography.Text strong>把在线运营、异常处置、单车复盘和报表交付保存成客户常用地图入口。</Typography.Text>
<Typography.Text type="secondary">
视图模式只改变工作重点,底层仍围绕同一批车辆、同一个时间上下文和同一套服务动作。
常用视图只改变客户当下的工作重点,底层仍围绕同一批车辆、同一个时间上下文和同一套服务动作。
</Typography.Text>
</div>
<div className="vp-map-view-mode-grid">
@@ -2827,7 +2827,7 @@ export function Realtime({
className="vp-map-view-mode-item"
disabled={item.disabled}
onClick={item.onClick}
aria-label={`地图视图模式 ${item.label} ${item.value} ${item.action}`}
aria-label={`客户常用地图视图 ${item.label} ${item.value} ${item.action}`}
>
<Tag color={item.color}>{item.label}</Tag>
<strong>{item.value}</strong>