feat(platform): add single vehicle time window delivery

This commit is contained in:
lingniu
2026-07-06 01:38:00 +08:00
parent af95f69388
commit 442afb8aa5
4 changed files with 272 additions and 1 deletions

View File

@@ -13320,6 +13320,8 @@ test('copies vehicle service diagnostic summary', async () => {
expect(screen.getByRole('button', { name: '客户服务交付 历史数据查询 查询历史' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户服务交付 告警通知 告警闭环' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户服务交付 统计查询 统计复核' })).toBeInTheDocument();
expect(screen.getAllByText('单车时间窗交付').length).toBeGreaterThan(0);
expect(screen.getByText('把同一辆车和同一段时间带入轨迹回放、里程统计、历史导出和告警通知,客户复盘时不需要跨页面重复输入。')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /复制归一摘要/ }));
await waitFor(() => {
expect(writeText.mock.calls.some((call) => String(call[0]).includes('【统一车辆服务摘要】'))).toBe(true);
@@ -13423,6 +13425,18 @@ test('copies vehicle service diagnostic summary', async () => {
expect(runbookCopied).toContain('验收:车辆在线状态、最新时间、有效坐标均可解释。');
expect(runbookCopied).toContain('告警事件http://localhost:3000/#/alert-events?keyword=VIN-SUMMARY-001&protocol=JT808');
expect(runbookCopied).toContain('统计查询http://localhost:3000/#/mileage?keyword=VIN-SUMMARY-001&protocol=JT808');
fireEvent.change(screen.getByPlaceholderText('单车开始日期'), { target: { value: '2026-07-01' } });
fireEvent.change(screen.getByPlaceholderText('单车结束日期'), { target: { value: '2026-07-03' } });
fireEvent.click(screen.getByRole('button', { name: '单车时间窗交付 历史数据导出 2026-07-01 至 2026-07-03' }));
expect(window.location.hash.startsWith('#/history-query?')).toBe(true);
const windowParams = new URLSearchParams(window.location.hash.split('?')[1] ?? '');
expect(windowParams.get('keyword')).toBe('VIN-SUMMARY-001');
expect(windowParams.get('protocol')).toBe('JT808');
expect(windowParams.get('dateFrom')).toBe('2026-07-01');
expect(windowParams.get('dateTo')).toBe('2026-07-03');
expect(windowParams.get('tab')).toBe('raw');
expect(windowParams.get('includeFields')).toBe('true');
});
test('exports vehicle detail service dossier as csv', async () => {