feat(platform): align realtime time window review copy
This commit is contained in:
@@ -768,7 +768,7 @@ export function Realtime({
|
||||
onOpenQuality(timeWindowFilters());
|
||||
};
|
||||
const copyTimeWindowPackage = () => copyText([
|
||||
'【客户时间窗监控包】',
|
||||
'【客户时间窗复盘包】',
|
||||
`车辆:${timeWindowRow ? [timeWindowRow.plate, timeWindowRow.vin].filter(Boolean).join(' / ') : timeWindowKeyword || '-'}`,
|
||||
`数据通道:${timeWindowProtocol || '全部数据通道'}`,
|
||||
`时间窗:${timeWindow.dateFrom} 至 ${timeWindow.dateTo}`,
|
||||
@@ -778,7 +778,7 @@ export function Realtime({
|
||||
`历史数据:${timeWindowReady ? window.location.origin + window.location.pathname + buildAppHash({ page: 'history-query', keyword: timeWindowKeyword, protocol: timeWindowProtocol, filters: timeWindowFilters({ tab: 'raw', includeFields: 'true' }) }) : '-'}`,
|
||||
`统计查询:${timeWindowReady ? window.location.origin + window.location.pathname + buildAppHash({ page: 'mileage', keyword: timeWindowKeyword, protocol: timeWindowProtocol, filters: timeWindowFilters() }) : '-'}`,
|
||||
`告警通知:${timeWindowReady ? window.location.origin + window.location.pathname + buildAppHash({ page: 'alert-events', keyword: timeWindowKeyword, protocol: timeWindowProtocol, filters: timeWindowFilters() }) : '-'}`
|
||||
].join('\n'), '客户时间窗监控包');
|
||||
].join('\n'), '客户时间窗复盘包');
|
||||
const timeWindowWorkItems = [
|
||||
{
|
||||
title: '轨迹回放',
|
||||
@@ -1291,13 +1291,13 @@ export function Realtime({
|
||||
<Card bordered className="vp-time-window-monitor">
|
||||
<div className="vp-time-window-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">自定义时间监控</Tag>
|
||||
<Tag color="blue">自定义时间窗复盘</Tag>
|
||||
<Tag color={timeWindowReady ? 'green' : 'orange'}>{timeWindowReady ? '时间窗可用' : '先选车辆'}</Tag>
|
||||
<Tag color="grey">{timeWindowDuration}</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>按车辆和时间窗复盘发生了什么</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
客户问某辆车、某段时间发生了什么时,直接串起轨迹回放、历史数据、里程统计和告警通知。
|
||||
客户问某辆车、某段时间发生了什么时,直接串起轨迹回放、历史数据、统计查询和告警通知。
|
||||
</Typography.Text>
|
||||
<Space wrap>
|
||||
<Button size="small" theme="solid" type="primary" disabled={!timeWindowReady} onClick={openTimeWindowHistory}>轨迹回放</Button>
|
||||
@@ -1343,7 +1343,7 @@ export function Realtime({
|
||||
className="vp-time-window-action"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`时间窗监控 ${item.title} ${item.action}`}
|
||||
aria-label={`时间窗复盘 ${item.title} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.title}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
@@ -1731,7 +1731,7 @@ export function Realtime({
|
||||
</Space>
|
||||
<Typography.Title heading={5} style={{ margin: 0 }}>从实时列表直接完成车辆监控闭环</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
先筛在线车辆,再看地图位置,异常车辆优先处置,最后进入单车轨迹、里程、告警或导出当前页。
|
||||
先筛在线车辆,再看地图位置,异常车辆优先处置,最后进入单车轨迹、统计查询、告警或导出当前页。
|
||||
</Typography.Text>
|
||||
<Space wrap>
|
||||
<Button size="small" theme="solid" type="primary" onClick={() => applyFilters({ ...filters, online: 'online' })}>只看在线</Button>
|
||||
|
||||
@@ -9198,14 +9198,14 @@ test('frames realtime page as one vehicle service with source evidence', async (
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('定位影响:1 辆有有效坐标'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('服务影响:0 辆降级 / 1 辆超时'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('地图能力:高德地图未配置,使用坐标预览'));
|
||||
expect(screen.getByText('自定义时间监控')).toBeInTheDocument();
|
||||
expect(screen.getByText('自定义时间窗复盘')).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();
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制时间窗包/ }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户时间窗监控包】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户时间窗复盘包】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史数据:http://localhost:3000/#/history-query?keyword=VIN-RT-SERVICE&protocol=GB32960'));
|
||||
fireEvent.click(screen.getByRole('button', { name: '时间窗监控 历史数据 查询历史' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '时间窗复盘 历史数据 查询历史' }));
|
||||
await waitFor(() => {
|
||||
const params = new URLSearchParams(window.location.hash.split('?')[1] ?? '');
|
||||
expect(window.location.hash).toContain('#/history-query?');
|
||||
@@ -9436,12 +9436,12 @@ test('shows realtime freshness status for recently updated and stale vehicles',
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【地图客户决策说明】'));
|
||||
});
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('定位判断:2 辆有有效坐标 / 0 辆无坐标'));
|
||||
expect(screen.getByText('自定义时间监控')).toBeInTheDocument();
|
||||
expect(screen.getByText('自定义时间窗复盘')).toBeInTheDocument();
|
||||
expect(screen.getByText('按车辆和时间窗复盘发生了什么')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制时间窗包/ }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户时间窗监控包】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户时间窗复盘包】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('告警通知:http://localhost:3000/#/alert-events?keyword=VIN-STALE-001&protocol=JT808'));
|
||||
fireEvent.click(screen.getByRole('button', { name: '时间窗监控 告警通知 查看告警' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '时间窗复盘 告警通知 查看告警' }));
|
||||
await waitFor(() => {
|
||||
const params = new URLSearchParams(window.location.hash.split('?')[1] ?? '');
|
||||
expect(window.location.hash).toContain('#/alert-events?');
|
||||
|
||||
Reference in New Issue
Block a user