feat(platform): clarify customer data export flow

This commit is contained in:
lingniu
2026-07-05 13:24:19 +08:00
parent 9a16daae00
commit 2453d3e467
3 changed files with 15 additions and 14 deletions

View File

@@ -41,11 +41,11 @@ const navGroups = [
{
title: '轨迹里程',
audience: '客户',
description: '回放轨迹、核对里程、查询历史',
description: '回放轨迹、核对里程、导出数据',
items: [
{ itemKey: 'history', text: '轨迹回放', icon: <IconMapPin /> },
{ itemKey: 'mileage', text: '里程统计', icon: <IconBarChartHStroked /> },
{ itemKey: 'history-query', text: '历史数据', icon: <IconHistogram /> }
{ itemKey: 'history-query', text: '数据导出', icon: <IconHistogram /> }
]
},
{
@@ -152,7 +152,7 @@ export function AppShell({
{ label: '监控', ariaLabel: '顶部实时监控', page: 'realtime' as const },
{ label: '轨迹', ariaLabel: '顶部轨迹回放', page: 'history' as const },
{ label: '里程', ariaLabel: '顶部里程统计', page: 'mileage' as const },
{ label: '历史', ariaLabel: '顶部历史数据', page: 'history-query' as const },
{ label: '导出', ariaLabel: '顶部数据导出', page: 'history-query' as const },
{ label: '告警', ariaLabel: '顶部告警事件', page: 'alert-events' as const }
];

View File

@@ -1242,7 +1242,7 @@ export function History({
<Card bordered className="vp-history-customer-export-board" bodyStyle={{ padding: 0 }}>
<div className="vp-history-customer-export-summary">
<Space wrap>
<Tag color="blue"></Tag>
<Tag color="blue"></Tag>
<Tag color={deliveryStateColor}>{deliveryState}</Tag>
<Tag color={activeTab === 'location' ? 'green' : activeTab === 'raw' ? 'blue' : 'orange'}>
{activeTab === 'location' ? '位置历史' : activeTab === 'raw' ? '历史明细' : '字段明细'}
@@ -1250,7 +1250,7 @@ export function History({
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}></Typography.Title>
<Typography.Text type="secondary">
CSV
</Typography.Text>
<Space wrap>
<Button size="small" theme="solid" type="primary" onClick={() => openQueryTab('location')}></Button>
@@ -1318,7 +1318,7 @@ export function History({
className="vp-history-customer-export-step"
disabled={item.disabled}
onClick={item.onClick}
aria-label={`客户历史查询导出 ${item.title} ${item.action}`}
aria-label={`客户数据交付中心 ${item.title} ${item.action}`}
>
<span>{item.step}</span>
<Tag color={item.color}>{item.title}</Tag>

View File

@@ -27,7 +27,7 @@ test('renders vehicle platform shell', () => {
expect(screen.getAllByText('车辆服务').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('按 VIN、车牌、手机号管理车辆')).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.getAllByText('客户').length).toBeGreaterThanOrEqual(3);
@@ -205,7 +205,7 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
expect(window.location.hash).toBe('#/realtime');
fireEvent.click(screen.getByRole('button', { name: '顶部轨迹回放' }));
expect(window.location.hash.startsWith('#/history')).toBe(true);
fireEvent.click(screen.getByRole('button', { name: '顶部历史数据' }));
fireEvent.click(screen.getByRole('button', { name: '顶部数据导出' }));
expect(window.location.hash.startsWith('#/history-query')).toBe(true);
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('tab')).toBe('raw');
expect(await screen.findByRole('heading', { name: '历史查询导出' })).toBeInTheDocument();
@@ -6469,13 +6469,14 @@ test('shows parsed field history as a flattened evidence table', async () => {
render(<App />);
expect(await screen.findByRole('heading', { name: '历史查询导出' })).toBeInTheDocument();
expect(screen.getByText('客户历史查询导出')).toBeInTheDocument();
expect(screen.getByText('客户数据交付中心')).toBeInTheDocument();
expect(screen.getByText('面向客户的数据导出以车辆服务为中心同一个筛选范围可以交付位置历史、历史明细、字段明细、CSV 文件、轨迹复盘和里程复核。')).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();
expect(screen.getByRole('button', { name: '客户数据交付中心 交付说明 复制交付' })).toBeInTheDocument();
expect(screen.getByText('客户轨迹决策台')).toBeInTheDocument();
expect(screen.getAllByRole('button', { name: /复制决策说明/ }).length).toBeGreaterThanOrEqual(1);
expect(screen.getByRole('button', { name: '客户轨迹决策 明细复核 历史明细' })).toBeInTheDocument();