feat: unify filter workbenches

This commit is contained in:
lingniu
2026-07-19 07:36:08 +08:00
parent af608b35e0
commit 3e80da1b73
16 changed files with 281 additions and 78 deletions

View File

@@ -22,7 +22,6 @@ import { WorkspaceSideSheet } from '../shared/WorkspaceSideSheet';
import { QUERY_MEMORY, retainPreviousPageWithinScope } from '../queryPolicy';
import { monitorReturnFromParams, preserveMonitorReturn } from '../routing/monitorContext';
import { useMobileLayout } from '../hooks/useMobileLayout';
import { useSideSheetA11y } from '../hooks/useSideSheetA11y';
const DAY = 86_400_000;
const DETAIL_LIMIT = 10_000;
@@ -386,7 +385,6 @@ export default function StatisticsPage() {
const pageRef = useRef<HTMLDivElement>(null);
const tableScrollRef = useRef<HTMLDivElement>(null);
const mountedRef = useRef(true);
useSideSheetA11y(mobileFiltersOpen, '.v2-mileage-filter-sidesheet', 'v2-mileage-filter-panel', '里程范围筛选', '关闭里程范围筛选');
useEffect(() => {
mountedRef.current = true;
return () => {
@@ -604,6 +602,7 @@ export default function StatisticsPage() {
title="里程范围"
summary={rangeSummary}
expanded={mobileFiltersOpen}
controls="v2-mileage-filter-panel"
expandedLabel="关闭"
collapsedLabel="修改"
onToggle={toggleFilters}
@@ -614,6 +613,8 @@ export default function StatisticsPage() {
visible={mobileFiltersOpen}
height="min(82dvh, 690px)"
ariaLabel="里程范围筛选"
dialogId="v2-mileage-filter-panel"
closeLabel="关闭里程范围筛选"
title="里程范围"
description="选择车辆、自然日与数据源"
onCancel={closeMobileFilters}