diff --git a/vehicle-data-platform/apps/web/src/styles/global.css b/vehicle-data-platform/apps/web/src/styles/global.css
index fb191b0a..aabecb27 100644
--- a/vehicle-data-platform/apps/web/src/styles/global.css
+++ b/vehicle-data-platform/apps/web/src/styles/global.css
@@ -238,13 +238,25 @@ body {
min-width: 0;
}
+.vp-sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ border: 0;
+}
+
.vp-topbar {
- height: var(--vp-shell-header);
+ min-height: 72px;
display: grid;
- grid-template-columns: minmax(380px, 0.8fr) minmax(0, 1.2fr);
+ grid-template-columns: minmax(350px, 0.62fr) minmax(0, 1.38fr);
align-items: center;
- gap: 16px;
- padding: 0 24px;
+ gap: 12px;
+ padding: 8px 24px;
background: rgba(255, 255, 255, 0.9);
border-bottom: 1px solid var(--vp-border);
backdrop-filter: blur(12px);
@@ -261,26 +273,55 @@ body {
min-width: 0;
display: flex;
align-items: center;
- justify-content: flex-end;
- gap: 8px;
- white-space: nowrap;
+ align-content: center;
+ justify-content: flex-start;
+ gap: 6px;
+ overflow: hidden;
+ white-space: normal;
+ flex-wrap: wrap;
}
.vp-topbar-time-window {
display: inline-flex;
align-items: center;
- gap: 4px;
- padding: 2px;
+ gap: 6px;
+ min-width: 0;
+ max-width: 100%;
+ padding: 4px 6px;
border: 1px solid var(--vp-border);
border-radius: 8px;
background: #f8fafc;
}
+.vp-topbar-time-window-copy {
+ display: inline-flex;
+ flex-direction: column;
+ justify-content: center;
+ width: 136px;
+ flex: 0 0 auto;
+ line-height: 1.1;
+}
+
+.vp-topbar-time-window-copy strong {
+ color: var(--vp-text);
+ font-size: 12px;
+ font-weight: 700;
+}
+
+.vp-topbar-time-window-copy span {
+ max-width: 136px;
+ overflow: hidden;
+ color: var(--vp-text-muted);
+ font-size: 10px;
+ text-overflow: ellipsis;
+}
+
.vp-topbar-time-window-presets {
display: inline-flex;
align-items: center;
gap: 2px;
padding-left: 2px;
+ flex: 0 0 auto;
}
.vp-topbar-time-window-presets button {
@@ -305,20 +346,23 @@ body {
.vp-topbar-time-window label {
display: inline-flex;
align-items: center;
+ flex: 0 0 auto;
gap: 4px;
height: 28px;
- padding: 0 6px;
+ padding: 0 4px 0 6px;
+ border-radius: 6px;
+ background: #ffffff;
color: var(--vp-text-muted);
font-size: 12px;
font-weight: 600;
}
.vp-topbar-time-window input {
- width: 118px;
+ width: 114px;
height: 24px;
border: 0;
- border-radius: 6px;
- background: #ffffff;
+ border-radius: 4px;
+ background: #f8fafc;
color: var(--vp-text);
font-size: 12px;
outline: none;
@@ -332,6 +376,7 @@ body {
height: 32px;
display: inline-flex;
align-items: center;
+ flex: 0 0 auto;
padding: 2px;
border: 1px solid var(--vp-border);
border-radius: 8px;
diff --git a/vehicle-data-platform/apps/web/src/test/App.test.tsx b/vehicle-data-platform/apps/web/src/test/App.test.tsx
index 19396a6c..45956684 100644
--- a/vehicle-data-platform/apps/web/src/test/App.test.tsx
+++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx
@@ -6706,9 +6706,14 @@ test('topbar customer time window scopes vehicle service tasks', async () => {
render(
);
+ expect(screen.getByText('客户时间窗')).toBeInTheDocument();
+ expect(screen.getByText('同步约束地图、轨迹、统计、导出和告警')).toBeInTheDocument();
+ expect(screen.getByLabelText('客户时间窗开始日期')).toHaveAttribute('placeholder', 'YYYY-MM-DD');
+ expect(screen.getByLabelText('客户时间窗结束日期')).toHaveAttribute('placeholder', 'YYYY-MM-DD');
+
fireEvent.change(screen.getByPlaceholderText('搜索 VIN / 车牌 / 手机号'), { target: { value: '粤A时间窗' } });
- fireEvent.change(screen.getByLabelText('顶部时间窗开始'), { target: { value: '2026-07-01' } });
- fireEvent.change(screen.getByLabelText('顶部时间窗结束'), { target: { value: '2026-07-03' } });
+ fireEvent.change(screen.getByLabelText('客户时间窗开始日期'), { target: { value: '2026-07-01' } });
+ fireEvent.change(screen.getByLabelText('客户时间窗结束日期'), { target: { value: '2026-07-03' } });
fireEvent.click(screen.getByRole('button', { name: '查询车辆' }));
expect(await screen.findByText('粤A时间窗 / VIN-TOPBAR-WINDOW')).toBeInTheDocument();