diff --git a/web/src/QueryPage.tsx b/web/src/QueryPage.tsx index ed4fdaa..47a48fb 100644 --- a/web/src/QueryPage.tsx +++ b/web/src/QueryPage.tsx @@ -774,14 +774,13 @@ export default function QueryPage({ page, onUnauthorized }: { <>
- setTrendStage(value as Stage)} aria-label="趋势阶段" />}> {currentTrendError && setTrendRevision(value => value + 1)}>重试} />} - {defectDrill.controls}
{trendMode === 'data' ? diff --git a/web/src/QueryPanels.tsx b/web/src/QueryPanels.tsx index 5b2d56d..5d539a1 100644 --- a/web/src/QueryPanels.tsx +++ b/web/src/QueryPanels.tsx @@ -7,18 +7,18 @@ type Granularity = 'month' | 'quarter' | 'year'; type TrendMode = 'production' | 'defects' | 'data'; type DefectDisplay = 'weight' | 'rate'; -export function QueryTrendPanel({ panelRef, id, mode, onMode, granularity, onGranularity, defectDisplay, onDefectDisplay, fullFields, onFullFields, object, onObject, objects, scopeName, stageSwitch, children }: { +export function QueryTrendPanel({ panelRef, id, mode, onMode, granularity, onGranularity, defectDisplay, onDefectDisplay, fullFields, onFullFields, object, onObject, objects, scopeName, stageSwitch, headingControls, children }: { panelRef?: Ref; id?: string; mode: TrendMode; onMode: (value: TrendMode) => void; granularity: Granularity; onGranularity: (value: Granularity) => void; defectDisplay: DefectDisplay; onDefectDisplay: (value: DefectDisplay) => void; fullFields: boolean; onFullFields: (value: boolean) => void; object?: string; onObject: (value?: string) => void; objects: Array<{ label: string; value: string }>; - scopeName: string; stageSwitch?: ReactNode; children: ReactNode; + scopeName: string; stageSwitch?: ReactNode; headingControls?: ReactNode; children: ReactNode; }) { const periodName = granularity === 'month' ? '月度' : granularity === 'quarter' ? '季度' : '年度'; return
-

{periodName}变化趋势

+

{periodName}变化趋势

{headingControls}
diff --git a/web/src/StageProductPage.tsx b/web/src/StageProductPage.tsx index d4341c2..578011a 100644 --- a/web/src/StageProductPage.tsx +++ b/web/src/StageProductPage.tsx @@ -138,11 +138,10 @@ export default function StageProductPage({stage,onUnauthorized}:{stage:Stage;onU openDetail(null,stage)}/>
- {trendError&&setTrendRevision(v=>v+1)}>重试}/>} - {defectDrill.controls}
{trendMode==='data' ? diff --git a/web/src/query-motion.css b/web/src/query-motion.css index 9dec8ae..9cecad2 100644 --- a/web/src/query-motion.css +++ b/web/src/query-motion.css @@ -54,6 +54,9 @@ .animated-metric-text { font-variant-numeric: tabular-nums lining-nums; } @media (prefers-reduced-motion: reduce) { .smooth-table-frame { transition: none; } } -.defect-drilldown-controls { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 8px;color:var(--ink);font-size:13px; } +.defect-drilldown-controls { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;color:var(--ink);font-size:13px;flex:1; } .defect-drilldown-controls > .ant-btn {padding-inline:0;} .defect-drilldown-notice {color:var(--muted-ink);font-size:12px;margin-left:auto;} + +.trend-heading-content {flex:1;align-items:center;flex-wrap:wrap;gap:6px 16px;} +.trend-heading-content h2 {flex-shrink:0;}