feat(platform): add vehicle operations summary

This commit is contained in:
lingniu
2026-07-04 20:23:12 +08:00
parent fb4bcbaa55
commit 284d2e1741
2 changed files with 51 additions and 0 deletions
@@ -10556,6 +10556,28 @@ test('copies vehicle service diagnostic summary', async () => {
expect(copied).toContain('轨迹:http://localhost:3000/#/history?keyword=VIN-SUMMARY-001&protocol=JT808');
expect(copied).toContain('RAWhttp://localhost:3000/#/history-query?keyword=VIN-SUMMARY-001&protocol=JT808&tab=raw&includeFields=true');
expect(copied).toContain('里程:http://localhost:3000/#/mileage?keyword=VIN-SUMMARY-001&protocol=JT808');
fireEvent.click(screen.getByRole('button', { name: /复制运营摘要/ }));
await waitFor(() => {
expect(writeText.mock.calls.some((call) => String(call[0]).includes('【车辆服务运营摘要】'))).toBe(true);
});
const operationsCopied = String(writeText.mock.lastCall?.[0] ?? '');
expect(operationsCopied).toContain('【车辆服务运营摘要】');
expect(operationsCopied).toContain('车辆:粤A诊断1 / VIN-SUMMARY-001');
expect(operationsCopied).toContain('当前范围:单一来源:JT808');
expect(operationsCopied).toContain('服务状态:来源不完整');
expect(operationsCopied).toContain('在线来源:1/2');
expect(operationsCopied).toContain('定位来源:2');
expect(operationsCopied).toContain('质量问题:1 项');
expect(operationsCopied).toContain('下一步清单:');
expect(operationsCopied).toContain('补齐 YUTONG_MQTT 来源');
expect(operationsCopied).toContain('排查 GB32960 离线');
expect(operationsCopied).toContain('处理质量问题 1 项');
expect(operationsCopied).toContain('车辆服务:http://localhost:3000/#/detail?keyword=VIN-SUMMARY-001&protocol=JT808');
expect(operationsCopied).toContain('实时监控:http://localhost:3000/#/realtime?keyword=VIN-SUMMARY-001&protocol=JT808');
expect(operationsCopied).toContain('轨迹回放:http://localhost:3000/#/history?keyword=VIN-SUMMARY-001&protocol=JT808');
expect(operationsCopied).toContain('RAW证据:http://localhost:3000/#/history-query?keyword=VIN-SUMMARY-001&protocol=JT808&tab=raw&includeFields=true');
expect(operationsCopied).toContain('里程统计:http://localhost:3000/#/mileage?keyword=VIN-SUMMARY-001&protocol=JT808');
});
test('exports vehicle detail service dossier as csv', async () => {