feat(platform): refine mileage evidence wording
This commit is contained in:
@@ -163,7 +163,7 @@ function mileageSummaryText({
|
||||
return [
|
||||
'【里程统计摘要】',
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`日期范围:${dateRange}`,
|
||||
`统计车辆:${summary.vehicleCount.toLocaleString()},记录:${summary.recordCount.toLocaleString()},来源:${summary.sourceCount.toLocaleString()}`,
|
||||
`累计里程:${formatKm(summary.totalMileageKm)} km`,
|
||||
@@ -221,7 +221,7 @@ function mileageDeliveryPackageText({
|
||||
'【客户里程复核交付包】',
|
||||
`交付状态:${deliveryState}`,
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`日期范围:${dateRange}`,
|
||||
`累计里程:${formatKm(summary.totalMileageKm)} km`,
|
||||
`当前页明细合计:${formatKm(pageMileageTotal)} km`,
|
||||
@@ -284,7 +284,7 @@ function mileageCustomerDecisionText({
|
||||
'【客户里程决策说明】',
|
||||
`决策结论:${deliveryState}`,
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`时间范围:${dateRange}`,
|
||||
`区间总里程:${formatKm(summary.totalMileageKm)} km`,
|
||||
`当前明细合计:${formatKm(pageMileageTotal)} km`,
|
||||
@@ -342,7 +342,7 @@ function mileageBIPublishText({
|
||||
'【BI里程发布口径】',
|
||||
`发布结论:${publishable ? '可发布' : '需复核后发布'}`,
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`日期范围:${dateRange}`,
|
||||
`统计口径:日里程按首末总里程差值计算,区间总值等于每日里程之和`,
|
||||
`累计里程:${formatKm(summary.totalMileageKm)} km`,
|
||||
@@ -389,7 +389,7 @@ function statisticsImpactText({
|
||||
return [
|
||||
'【统计影响范围】',
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`日期范围:${dateRange}`,
|
||||
`影响车辆:${summary.vehicleCount.toLocaleString()} 辆`,
|
||||
`统计记录:${summary.recordCount.toLocaleString()} 条`,
|
||||
@@ -449,7 +449,7 @@ function mileagePublishAuditReport({
|
||||
'【统计发布审计】',
|
||||
`发布结论:${blocked > 0 ? '阻断发布' : review > 0 ? '复核后发布' : '可发布'}`,
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`统计规模:${summary.vehicleCount.toLocaleString()} 车 / ${summary.recordCount.toLocaleString()} 条 / ${summary.sourceCount.toLocaleString()} 来源`,
|
||||
`审计结果:通过 ${pass.toLocaleString()} / 复核 ${review.toLocaleString()} / 阻断 ${blocked.toLocaleString()}`,
|
||||
'',
|
||||
@@ -475,7 +475,7 @@ function mileageEvidencePackageText(row: DailyMileageRow) {
|
||||
return [
|
||||
'【里程异常证据包】',
|
||||
`车辆:${vehicle}`,
|
||||
`数据来源:${row.source || '未知来源'}`,
|
||||
`证据来源:${row.source || '未知来源'}`,
|
||||
`统计日期:${row.date || '-'}`,
|
||||
`起始里程:${formatKm(row.startMileageKm)} km`,
|
||||
`结束里程:${formatKm(row.endMileageKm)} km`,
|
||||
@@ -511,7 +511,7 @@ function onlineStatusHandoffText({
|
||||
return [
|
||||
'【车辆在线状态交接】',
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`在线概览:${summary.onlineVehicleCount.toLocaleString()} 在线 / ${summary.offlineVehicleCount.toLocaleString()} 离线 / 在线率 ${formatPercent(summary.onlineRatePercent)}`,
|
||||
`Redis 在线 Key:${summary.redisOnlineKeys == null ? '-' : summary.redisOnlineKeys.toLocaleString()}`,
|
||||
`协议在线:${protocolLines}`,
|
||||
@@ -555,7 +555,7 @@ function onlineOperationsReportText({
|
||||
return [
|
||||
'【在线统计运营态势】',
|
||||
`车辆范围:${keyword}`,
|
||||
`数据来源:${protocol}`,
|
||||
`证据来源:${protocol}`,
|
||||
`在线概览:${summary.onlineVehicleCount.toLocaleString()} 在线 / ${summary.offlineVehicleCount.toLocaleString()} 离线 / 在线率 ${formatPercent(summary.onlineRatePercent)}`,
|
||||
`Redis 在线 Key:${summary.redisOnlineKeys == null ? '-' : summary.redisOnlineKeys.toLocaleString()}`,
|
||||
`统计证据:${summary.evidence || '-'}`,
|
||||
@@ -788,7 +788,7 @@ export function Mileage({
|
||||
const maxSourceMileage = Math.max(...sourceSeries.map((item) => item.value), 0);
|
||||
const filterSummary = [
|
||||
currentVehicleKeyword ? `车辆:${currentVehicleKeyword}` : '',
|
||||
currentProtocol ? `数据来源:${currentProtocol}` : '',
|
||||
currentProtocol ? `证据来源:${currentProtocol}` : '',
|
||||
filters.dateFrom?.trim() ? `开始日期:${filters.dateFrom.trim()}` : '',
|
||||
filters.dateTo?.trim() ? `结束日期:${filters.dateTo.trim()}` : ''
|
||||
].filter(Boolean);
|
||||
@@ -1375,7 +1375,7 @@ export function Mileage({
|
||||
applyFilters(nextFilters);
|
||||
}}>
|
||||
<Form.Input field="keyword" label="车辆关键词" placeholder="VIN / 车牌 / 手机号 / OEM" style={{ width: 260 }} />
|
||||
<Form.Select field="protocol" label="数据来源" placeholder="全部来源" style={{ width: 180 }}>
|
||||
<Form.Select field="protocol" label="证据来源" placeholder="全部来源" style={{ width: 180 }}>
|
||||
<Select.Option value="GB32960">GB32960</Select.Option>
|
||||
<Select.Option value="JT808">JT808</Select.Option>
|
||||
<Select.Option value="YUTONG_MQTT">YUTONG_MQTT</Select.Option>
|
||||
|
||||
@@ -7304,7 +7304,7 @@ test('shows and clears current mileage filters while keeping vehicle scope', asy
|
||||
|
||||
expect(await screen.findByText('当前里程筛选')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆:VIN-MILEAGE-002')).toBeInTheDocument();
|
||||
expect(screen.getByText('数据来源:JT808')).toBeInTheDocument();
|
||||
expect(screen.getByText('证据来源:JT808')).toBeInTheDocument();
|
||||
expect(screen.getByText('开始日期:2026-07-01')).toBeInTheDocument();
|
||||
expect(screen.getByText('结束日期:2026-07-03')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '清空筛选' }));
|
||||
@@ -7744,7 +7744,7 @@ test('shows mileage anomaly action guidance', async () => {
|
||||
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【里程异常证据包】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:粤A异常1 / VIN-MILEAGE-ANOMALY'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:GB32960'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('证据来源:GB32960'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('统计日期:2026-07-03'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('日里程:-3.2 km'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常等级:warning'));
|
||||
@@ -8019,7 +8019,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制影响范围' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【统计影响范围】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围:VIN-STATS-SERVICE'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('证据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('影响车辆:3 辆'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('统计记录:6 条'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('累计里程:210 km'));
|
||||
@@ -8034,7 +8034,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制在线态势' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【在线统计运营态势】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围:VIN-STATS-SERVICE'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('证据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线概览:3 在线 / 1 离线 / 在线率 75%'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('Redis 在线 Key:92'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前页车辆:2 / 当前筛选 2'));
|
||||
@@ -8127,7 +8127,7 @@ test('copies mileage statistics summary for operations reporting', async () => {
|
||||
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【里程统计摘要】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围:VIN-MILEAGE-COPY'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('证据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('日期范围:2026-07-01 至 2026-07-03'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('累计里程:140 km'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前页里程:140 km'));
|
||||
|
||||
Reference in New Issue
Block a user