diff --git a/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.test.tsx b/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.test.tsx
index 7e76eed5..ed16b1e1 100644
--- a/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.test.tsx
+++ b/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.test.tsx
@@ -202,10 +202,14 @@ test('uses one focused Semi bottom SideSheet for the complete mobile history que
mocks.historyExports.mockResolvedValue([]);
renderPage('/history');
- await screen.findByText('等待查询历史数据');
+ await screen.findByText('选择车辆开始查询');
const trigger = screen.getByRole('button', { name: '修改查询范围:请选择车辆' });
expect(trigger).toHaveAttribute('aria-expanded', 'false');
- fireEvent.click(trigger);
+ expect(screen.queryByRole('button', { name: '展开趋势' })).not.toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: '打开历史数据工具' })).not.toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: 'Previous' })).not.toBeInTheDocument();
+ fireEvent.click(screen.getByRole('button', { name: '选择车辆并查询' }));
+ expect(trigger).toHaveAttribute('aria-expanded', 'true');
const dialog = await screen.findByRole('dialog', { name: '历史查询范围' });
expect(document.querySelector('.v2-history-filter-sidesheet')).toHaveClass('semi-sidesheet-bottom');
diff --git a/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.tsx b/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.tsx
index 61c6fd17..1c0e99ac 100644
--- a/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.tsx
+++ b/vehicle-data-platform/apps/web/src/v2/pages/HistoryPage.tsx
@@ -483,7 +483,7 @@ export default function HistoryPage() {
description={keywords.length ? `${(result?.total ?? 0).toLocaleString('zh-CN')} 条记录 · ${resultSummary?.vehicleCount ?? 0} 辆车辆 · ${summarySources}` : '选择车辆和时间范围后查询'}
meta={{visibleMetrics.length} / {allMetrics.length} 字段{resultSummary ? {resultSummary.queryDurationMs} ms : null}}
actionsClassName={`v2-history-result-actions${mobileLayout ? ' is-mobile-actions' : ''}`}
- actions={mobileLayout ? <>
+ actions={mobileLayout ? keywords.length ? <>
} onClick={() => setTrendExpanded((value) => !value)}>{trendExpanded ? '收起' : '趋势'}
}>工具
- > : <>
+ > : null : <>
} onClick={() => setTrendExpanded((value) => !value)}>{trendExpanded ? '收起趋势' : '聚合趋势'}
} onClick={() => setColumnSettingsOpen((value) => !value)}>列设置
{exportAllowed ? } onClick={() => setExportJobsOpen(true)}>导出任务 : null}
@@ -516,14 +516,18 @@ export default function HistoryPage() {
>
{mobileLayout
?
{resultRows.map((row) =>
)}
- : }
+ : resultRows.length ? : null}
{dataQuery.isPending && keywords.length
?
: !resultRows.length
- ?
+ ? } aria-label={keywords.length ? '调整查询范围' : '选择车辆并查询'} onClick={() => setFiltersCollapsed(false)}>{keywords.length ? '调整查询范围' : '选择车辆并查询'} : null}
+ />
: null}
-
+ {keywords.length ? : null}
{!mobileLayout && selectedRow ? : null}
diff --git a/vehicle-data-platform/apps/web/src/v2/styles/workspace.css b/vehicle-data-platform/apps/web/src/v2/styles/workspace.css
index 610dd96c..ddbe6ab0 100644
--- a/vehicle-data-platform/apps/web/src/v2/styles/workspace.css
+++ b/vehicle-data-platform/apps/web/src/v2/styles/workspace.css
@@ -17133,10 +17133,17 @@
}
.v2-history-mobile-discovery > .v2-mobile-filter-toggle.semi-button {
- min-height: 58px;
+ min-height: 52px;
margin: 0;
}
+ .v2-history-empty .v2-history-empty-action.semi-button {
+ min-width: 156px;
+ min-height: 42px;
+ border-radius: 9px;
+ font-weight: 700;
+ }
+
.v2-history-filter-sidesheet .semi-sidesheet-inner {
width: 100vw !important;
max-width: 100%;