diff --git a/vehicle-data-platform/apps/web/src/styles/global.css b/vehicle-data-platform/apps/web/src/styles/global.css
index f4e4cb89..720fee60 100644
--- a/vehicle-data-platform/apps/web/src/styles/global.css
+++ b/vehicle-data-platform/apps/web/src/styles/global.css
@@ -8932,6 +8932,109 @@ button.vp-realtime-command-item:focus-visible {
white-space: nowrap;
}
+.vp-mileage-definition-strip {
+ margin-top: 12px;
+ border: 1px solid rgba(11, 159, 119, 0.18);
+ border-radius: var(--vp-radius);
+ background: #fff;
+ display: grid;
+ grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.28fr) minmax(190px, 0.5fr);
+ overflow: hidden;
+}
+
+.vp-mileage-definition-copy {
+ padding: 18px;
+ border-right: 1px solid var(--vp-border);
+ background: #f6fbf9;
+ display: grid;
+ gap: 10px;
+ align-content: start;
+}
+
+.vp-mileage-definition-metrics {
+ padding: 14px;
+ display: grid;
+ grid-template-columns: repeat(4, minmax(0, 1fr));
+ gap: 10px;
+}
+
+.vp-mileage-definition-metric {
+ min-height: 112px;
+ padding: 12px;
+ border: 1px solid rgba(11, 159, 119, 0.14);
+ border-radius: 8px;
+ background: #fbfefc;
+ color: inherit;
+ cursor: pointer;
+ font: inherit;
+ text-align: left;
+ display: grid;
+ gap: 8px;
+ align-content: start;
+}
+
+.vp-mileage-definition-metric:hover,
+.vp-mileage-definition-metric:focus-visible,
+.vp-mileage-definition-action:hover,
+.vp-mileage-definition-action:focus-visible {
+ border-color: rgba(11, 159, 119, 0.4);
+ background: #f5fbf8;
+ box-shadow: var(--vp-shadow-sm);
+ outline: none;
+}
+
+.vp-mileage-definition-metric strong {
+ color: var(--vp-text);
+ font-size: 19px;
+ line-height: 24px;
+ word-break: break-word;
+}
+
+.vp-mileage-definition-metric span {
+ color: var(--vp-text-muted);
+ font-size: 12px;
+ line-height: 18px;
+ word-break: break-word;
+}
+
+.vp-mileage-definition-actions {
+ padding: 14px;
+ border-left: 1px solid var(--vp-border);
+ background: #fbfefc;
+ display: grid;
+ grid-template-columns: 1fr;
+ gap: 8px;
+}
+
+.vp-mileage-definition-action {
+ min-height: 46px;
+ padding: 8px 10px;
+ border: 1px solid rgba(11, 159, 119, 0.14);
+ border-radius: 8px;
+ background: #fff;
+ color: inherit;
+ cursor: pointer;
+ font: inherit;
+ text-align: left;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+}
+
+.vp-mileage-definition-action:disabled {
+ cursor: not-allowed;
+ opacity: 0.62;
+}
+
+.vp-mileage-definition-action span {
+ color: var(--vp-success);
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ white-space: nowrap;
+}
+
.vp-mileage-customer-workbench {
margin-top: 16px;
border: 1px solid rgba(22, 100, 255, 0.18);
@@ -13699,6 +13802,8 @@ button.vp-realtime-command-item:focus-visible {
.vp-stat-insight-grid,
.vp-mileage-conclusion-strip,
.vp-mileage-conclusion-metrics,
+ .vp-mileage-definition-strip,
+ .vp-mileage-definition-metrics,
.vp-mileage-customer-workbench,
.vp-mileage-customer-workbench-grid,
.vp-mileage-reconciliation-conclusion,
@@ -13836,7 +13941,9 @@ button.vp-realtime-command-item:focus-visible {
}
.vp-mileage-conclusion-copy,
- .vp-mileage-conclusion-actions {
+ .vp-mileage-conclusion-actions,
+ .vp-mileage-definition-copy,
+ .vp-mileage-definition-actions {
border-left: 0;
border-right: 0;
border-bottom: 1px solid var(--vp-border);
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 cd62e0de..3bd240ec 100644
--- a/vehicle-data-platform/apps/web/src/test/App.test.tsx
+++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx
@@ -9157,8 +9157,8 @@ test('shows mileage statistics workspace with trend source and definition', asyn
expect(screen.getAllByText('140 km').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('统计闭合工作台')).toBeInTheDocument();
expect(screen.getByText('汇总总里程')).toBeInTheDocument();
- expect(screen.getByText('明细合计')).toBeInTheDocument();
- expect(screen.getByText('闭合差值')).toBeInTheDocument();
+ expect(screen.getAllByText('明细合计').length).toBeGreaterThanOrEqual(1);
+ expect(screen.getAllByText('闭合差值').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('记录覆盖率')).toBeInTheDocument();
expect(screen.getAllByText('闭合通过').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('当前筛选范围汇总总里程与明细合计一致,可作为统计证据。').length).toBeGreaterThanOrEqual(1);
@@ -9312,6 +9312,16 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getByRole('button', { name: '客户里程动作 轨迹复核 轨迹回放' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户里程动作 导出明细 导出CSV' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户里程动作 告警通知 在线态势' })).toBeInTheDocument();
+ expect(screen.getByText('客户里程口径交付条')).toBeInTheDocument();
+ expect(screen.getByText('日里程按当天首末总里程差值计算;区间总值必须等于每日里程之和,异常日进入轨迹和历史明细复核。')).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径交付 区间总值 210 km' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径交付 明细合计 170 km' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径交付 闭合差值 需全量' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径交付 异常记录 1 条' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径动作 复制口径 决策说明' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径动作 复制交付 交付包' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径动作 轨迹复核 轨迹' })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '客户里程口径动作 导出明细 CSV' })).toBeInTheDocument();
expect(screen.getByText('客户里程统计工作台')).toBeInTheDocument();
expect(screen.getByText('统计页先回答客户这段时间跑了多少、每日是否闭合、异常在哪里、能否导出。')).toBeInTheDocument();
expect(screen.getByText('来源证据只用于统计可信度:JT808')).toBeInTheDocument();