feat(platform): align dashboard copy with vehicle service delivery

This commit is contained in:
lingniu
2026-07-06 04:49:42 +08:00
parent b9b5409acb
commit 7ac1390394
2 changed files with 23 additions and 23 deletions

View File

@@ -1330,7 +1330,7 @@ export function Dashboard({
const highPriorityLookupKey = highPriorityLookup?.key;
const highPriorityFilters = highPriorityEvidenceFilters;
const lines = [
'【车辆服务中台运营交接摘要】',
'【车辆服务中台客户交付摘要】',
`在线车辆:${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} / ${formatCount(serviceSummary?.totalVehicles)}`,
`今日活跃:${formatCount(summary?.activeToday)}`,
`今日帧量:${formatCount(summary?.frameToday)}`,
@@ -1348,7 +1348,7 @@ export function Dashboard({
`统计查询:${appURL(buildAppHash({ page: 'mileage', keyword: highPriorityLookupKey, protocol: highPriorityIssue?.protocol }))}`,
`车辆服务:${appURL(buildAppHash({ page: 'detail', keyword: highPriorityLookupKey, protocol: highPriorityIssue?.protocol }))}`
].filter(Boolean);
copyText(lines.join('\n'), '运营交接摘要');
copyText(lines.join('\n'), '客户交付摘要');
};
const copyScenarioBlueprint = () => {
const lines = [
@@ -3635,7 +3635,7 @@ export function Dashboard({
<div className="vp-vehicle-priority-queue">
<div className="vp-vehicle-priority-queue-head">
<div>
<Typography.Text strong></Typography.Text>
<Typography.Text strong></Typography.Text>
<Typography.Text type="secondary"></Typography.Text>
</div>
<Tag color="blue"></Tag>
@@ -3647,7 +3647,7 @@ export function Dashboard({
type="button"
className="vp-vehicle-priority-queue-item"
onClick={item.onClick}
aria-label={`车辆运营优先级队列 ${item.title} ${item.value} ${item.action}`}
aria-label={`车辆服务优先级队列 ${item.title} ${item.value} ${item.action}`}
>
<Tag color={item.color}>{item.title}</Tag>
<strong>{item.value}</strong>
@@ -3668,7 +3668,7 @@ export function Dashboard({
type="button"
className="vp-fleet-next-action"
onClick={item.onClick}
aria-label={`车辆运营建议 ${item.title} ${item.action}`}
aria-label={`车辆服务建议 ${item.title} ${item.action}`}
>
<Tag color={item.color}>{item.level}</Tag>
<strong>{item.title}</strong>
@@ -4103,7 +4103,7 @@ export function Dashboard({
<Button size="small" theme="solid" type="primary" onClick={() => onOpenVehicles({ online: 'online' })}>线</Button>
<Button size="small" theme="light" type="primary" onClick={copyCustomerServiceGuide}></Button>
<Button size="small" theme="light" type="primary" onClick={exportDashboardSnapshot}> CSV</Button>
<Button size="small" theme="light" type="tertiary" onClick={copyOperationsHandoff}></Button>
<Button size="small" theme="light" type="tertiary" onClick={copyOperationsHandoff}></Button>
</Space>
</div>
<div className="vp-service-entry-grid">
@@ -4132,7 +4132,7 @@ export function Dashboard({
<small></small>
</summary>
<div className="vp-dashboard-evidence-body">
<Card bordered title="地图运营能力" style={{ marginBottom: 16 }}>
<Card bordered title="地图监控能力" style={{ marginBottom: 16 }}>
<div className="vp-map-ops-board">
<div className="vp-map-ops-readiness">
{mapReadiness.map((item) => (
@@ -4193,7 +4193,7 @@ export function Dashboard({
</div>
</Card>
) : null}
<Card bordered title="车辆运营工作台" style={{ marginBottom: 16 }}>
<Card bordered title="车辆服务工作台" style={{ marginBottom: 16 }}>
<div className="vp-workbench-grid">
{operationWorkbench.map((item) => (
<div key={item.title} className="vp-workbench-item">
@@ -4317,7 +4317,7 @@ export function Dashboard({
</div>
</Card>
) : null}
<Card bordered title="车辆运营能力矩阵" style={{ marginBottom: 16 }}>
<Card bordered title="车辆服务能力矩阵" style={{ marginBottom: 16 }}>
<div className="vp-capability-grid">
{capabilities.map((item) => (
<div key={item.title} className="vp-capability-item">

View File

@@ -1933,11 +1933,11 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
const renderDashboard = async () => {
window.history.replaceState(null, '', '/#/dashboard');
render(<App />);
expect(await screen.findByText('车辆运营能力矩阵')).toBeInTheDocument();
expect(await screen.findByText('车辆服务能力矩阵')).toBeInTheDocument();
};
await renderDashboard();
expect(screen.getByText('车辆服务工作台')).toBeInTheDocument();
expect(screen.getAllByText('车辆服务工作台').length).toBeGreaterThanOrEqual(1);
expect(screen.getByRole('region', { name: '客户车辆服务驾驶舱' })).toBeInTheDocument();
expect(screen.getByText('客户进来先看车辆,不先看协议。')).toBeInTheDocument();
expect(screen.getByText('把实时地图、轨迹回放、里程统计、历史导出和告警通知收敛成一个可交付的车辆服务入口。')).toBeInTheDocument();
@@ -1996,16 +1996,16 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
expect(screen.getByRole('button', { name: '客户问题处理台 轨迹能不能回放 打开轨迹回放' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户问题处理台 需要导出哪些证据 查询历史导出' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户问题处理台 哪些车需要通知处理 查看告警事件' })).toBeInTheDocument();
expect(screen.getByText('车辆运营优先级队列')).toBeInTheDocument();
expect(screen.getByText('车辆服务优先级队列')).toBeInTheDocument();
expect(screen.getByText('先处理影响客户看车、查轨迹、算里程和收通知的问题车辆。')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营优先级队列 告警待处理 7 辆 告警事件' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营优先级队列 无有效定位 208 辆 打开地图' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营优先级队列 身份未绑定 9 辆 维护绑定' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营优先级队列 暂无数据 461 辆 车辆列表' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务优先级队列 告警待处理 7 辆 告警事件' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务优先级队列 无有效定位 208 辆 打开地图' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务优先级队列 身份未绑定 9 辆 维护绑定' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务优先级队列 暂无数据 461 辆 车辆列表' })).toBeInTheDocument();
expect(screen.getByText('今日先处理')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营建议 先处理告警车辆 进入告警' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营建议 选择一辆车复盘 车辆中心' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆运营建议 按同一范围交付数据 复制复盘包' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务建议 先处理告警车辆 进入告警' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务建议 选择一辆车复盘 车辆中心' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务建议 按同一范围交付数据 复制复盘包' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车辆工作流 实时看车 实时地图' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车辆工作流 轨迹复盘 轨迹回放' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车辆工作流 统计查询 统计查询' })).toBeInTheDocument();
@@ -2095,8 +2095,8 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
expect(screen.getAllByText('告警复盘').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('运维和证据层')).toBeInTheDocument();
expect(screen.getByText('来源覆盖、地图配置、告警预览和实时证据默认收起,客户主流程先看车辆监控、轨迹、统计、告警和导出。')).toBeInTheDocument();
expect(screen.getByText('车辆运营工作台')).toBeInTheDocument();
expect(screen.getByText('地图运营能力')).toBeInTheDocument();
expect(screen.getAllByText('车辆服务工作台').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('地图监控能力')).toBeInTheDocument();
expect(screen.getByText('车联网场景导航')).toBeInTheDocument();
expect(screen.getByText('高德 Web JS')).toBeInTheDocument();
expect(screen.getByText('服务端 API')).toBeInTheDocument();
@@ -2951,10 +2951,10 @@ test('dashboard copies highest priority quality issue notification text', async
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹证据http://localhost:3000/#/history?keyword=%E7%B2%A4A%E5%91%8A%E8%AD%A61&protocol=JT808&dateFrom=2026-07-03&dateTo=2026-07-04'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('原始记录http://localhost:3000/#/history-query?keyword=%E7%B2%A4A%E5%91%8A%E8%AD%A61&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true'));
fireEvent.click(screen.getByRole('button', { name: '复制运营交接摘要' }));
fireEvent.click(screen.getByRole('button', { name: '复制客户交付摘要' }));
await waitFor(() => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆服务中台运营交接摘要】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆服务中台客户交付摘要】'));
});
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线车辆88 / 1,033'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('今日活跃96'));