diff --git a/vehicle-data-platform/apps/web/src/pages/History.tsx b/vehicle-data-platform/apps/web/src/pages/History.tsx index 2564f250..e4506e92 100644 --- a/vehicle-data-platform/apps/web/src/pages/History.tsx +++ b/vehicle-data-platform/apps/web/src/pages/History.tsx @@ -212,7 +212,7 @@ function mergeInitialFilters(initialVin: string, initialProtocol?: string, initi const locationExportColumns: CsvColumn[] = [ { title: 'VIN', value: (row) => row.vin }, { title: '车牌', value: (row) => row.plate }, - { title: '数据来源', value: (row) => row.protocol }, + { title: '证据来源', value: (row) => row.protocol }, { title: '经度', value: (row) => row.longitude }, { title: '纬度', value: (row) => row.latitude }, { title: '速度km/h', value: (row) => row.speedKmh }, @@ -225,7 +225,7 @@ const rawExportColumns: CsvColumn[] = [ { title: 'ID', value: (row) => row.id }, { title: 'VIN', value: (row) => row.vin }, { title: '车牌', value: (row) => row.plate }, - { title: '数据来源', value: (row) => row.protocol }, + { title: '证据来源', value: (row) => row.protocol }, { title: '帧类型', value: (row) => row.frameType }, { title: '大小B', value: (row) => row.rawSizeBytes }, { title: '设备时间', value: (row) => row.deviceTime }, @@ -237,7 +237,7 @@ const rawFieldExportColumns: CsvColumn[] = [ { title: '原始记录ID', value: (row) => row.rawId }, { title: 'VIN', value: (row) => row.vin }, { title: '车牌', value: (row) => row.plate }, - { title: '数据来源', value: (row) => row.protocol }, + { title: '证据来源', value: (row) => row.protocol }, { title: '帧类型', value: (row) => row.frameType }, { title: '字段', value: (row) => row.fieldPath }, { title: '值', value: (row) => formatFieldValue(row.fieldValue) }, @@ -302,7 +302,7 @@ function trajectorySummaryText({ return [ '【轨迹回放摘要】', `车辆:${vehicle}`, - `数据来源:${protocol}`, + `证据来源:${protocol}`, `查询范围:${range}`, `轨迹点:${totalPoints.toLocaleString()},有效定位:${validPointCount.toLocaleString()}`, `区间里程:${formatNumber(mileageDelta, ' km')}`, @@ -349,7 +349,7 @@ function historyEvidencePackageText({ return [ '【数据复核包】', `车辆:${vehicle || '全部车辆'}`, - `数据来源:${protocol || '全部来源'}`, + `证据来源:${protocol || '全部来源'}`, `查询范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `位置记录:${locationCount.toLocaleString()},有效定位:${validPointCount.toLocaleString()}`, `原始记录:${rawCount.toLocaleString()},字段明细:${fieldCount.toLocaleString()}`, @@ -400,7 +400,7 @@ function deliveryPackageText({ `交付状态:${deliveryState}`, '交付物:位置历史 / 轨迹回放 / 里程复核 / RAW证据 / 字段明细 / 质量提示', `车辆范围:${vehicle || '全部车辆'}`, - `数据来源:${protocol || '全部来源'}`, + `证据来源:${protocol || '全部来源'}`, `时间范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `位置历史:${locationCount.toLocaleString()} 条,有效定位 ${validPointCount.toLocaleString()},覆盖率 ${formatPercent(coverageRate)}`, `原始证据:${rawCount.toLocaleString()} 帧`, @@ -465,7 +465,7 @@ function trajectoryReviewPackageText({ return [ '【轨迹复盘交接包】', `车辆:${vehicle || '全部车辆'}`, - `数据来源:${protocol || '全部来源'}`, + `证据来源:${protocol || '全部来源'}`, `查询范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `轨迹规模:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 原始记录 ${rawCount.toLocaleString()} / 字段明细 ${fieldCount.toLocaleString()}`, `轨迹质量:定位覆盖率 ${formatPercent(coverageRate)} / 回放跨度 ${formatDurationMinutes(playbackSpanMinutes)} / 采样间隔 ${formatDurationMinutes(playbackIntervalMinutes, '/点')}`, @@ -526,7 +526,7 @@ function trajectoryImpactPackageText({ return [ '【轨迹运营影响】', `车辆:${vehicle || '全部车辆'}`, - `数据来源:${protocol || '全部来源'}`, + `证据来源:${protocol || '全部来源'}`, `查询范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `业务状态:${operationState}`, `轨迹范围:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 原始记录 ${rawCount.toLocaleString()} / 字段明细 ${fieldCount.toLocaleString()}`, @@ -590,7 +590,7 @@ function trajectoryCustomerDecisionText({ `决策结论:${decision}`, `交付状态:${deliveryState}`, `车辆范围:${vehicle || '全部车辆'}`, - `数据来源:${protocol || '全部来源'}`, + `证据来源:${protocol || '全部来源'}`, `时间范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `轨迹规模:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 原始记录 ${rawCount.toLocaleString()} / 字段明细 ${fieldCount.toLocaleString()}`, `定位覆盖:${formatPercent(coverageRate)}`, @@ -826,7 +826,7 @@ export function History({ const pageTitle = mode === 'query' ? '数据导出' : '轨迹回放'; const pageDescription = mode === 'query' ? '按车辆、时间和数据通道导出位置记录、原始记录和字段明细,支持分页、字段裁剪和 CSV 导出' - : '按车辆查询历史位置和轨迹回放,原始记录只作为复核证据,数据来源仅用于过滤'; + : '按车辆查询历史位置和轨迹回放,原始记录只作为复核证据,证据来源仅用于过滤'; const scopeDescription = mode === 'query' ? '位置记录、原始记录和字段明细按当前车辆与时间范围分页查询。' : '历史位置和原始记录按当前车辆与时间范围查询。'; @@ -848,7 +848,7 @@ export function History({ })); const filterSummary = [ currentVehicleKeyword ? `车辆:${currentVehicleKeyword}` : '', - currentProtocol ? `数据来源:${currentProtocol}` : '', + currentProtocol ? `证据来源:${currentProtocol}` : '', filters.dateFrom?.trim() ? `开始时间:${filters.dateFrom.trim()}` : '', filters.dateTo?.trim() ? `结束时间:${filters.dateTo.trim()}` : '', isIncludeFieldsEnabled(filters.includeFields) ? '返回字段明细' : '', @@ -1462,7 +1462,7 @@ export function History({
submit(values)}> - + GB32960 JT808 YUTONG_MQTT @@ -1858,7 +1858,7 @@ export function History({ }} columns={[ { title: 'VIN', dataIndex: 'vin', width: 190 }, - { title: '数据来源', dataIndex: 'protocol', width: 120 }, + { title: '证据来源', dataIndex: 'protocol', width: 120 }, { title: '经度', dataIndex: 'longitude', width: 120 }, { title: '纬度', dataIndex: 'latitude', width: 120 }, { title: '速度 km/h', dataIndex: 'speedKmh', width: 120 }, @@ -1905,7 +1905,7 @@ export function History({ { title: 'ID', dataIndex: 'id', width: 260 }, { title: 'VIN', dataIndex: 'vin', width: 190 }, { title: '车牌', dataIndex: 'plate', width: 120 }, - { title: '数据来源', dataIndex: 'protocol', width: 120 }, + { title: '证据来源', dataIndex: 'protocol', width: 120 }, { title: '帧类型', dataIndex: 'frameType', width: 190 }, { title: '大小 B', dataIndex: 'rawSizeBytes', width: 100 }, { title: '设备时间', dataIndex: 'deviceTime', width: 190 }, @@ -1949,7 +1949,7 @@ export function History({ }, { title: 'VIN', dataIndex: 'vin', width: 190 }, { title: '车牌', dataIndex: 'plate', width: 120 }, - { title: '数据来源', dataIndex: 'protocol', width: 120 }, + { title: '证据来源', dataIndex: 'protocol', width: 120 }, { title: '帧类型', dataIndex: 'frameType', width: 190 }, { title: '设备时间', dataIndex: 'deviceTime', width: 190 }, { title: '原始记录ID', dataIndex: 'rawId', width: 260 }, diff --git a/vehicle-data-platform/apps/web/src/pages/Vehicles.tsx b/vehicle-data-platform/apps/web/src/pages/Vehicles.tsx index 8a668f84..b5379ea0 100644 --- a/vehicle-data-platform/apps/web/src/pages/Vehicles.tsx +++ b/vehicle-data-platform/apps/web/src/pages/Vehicles.tsx @@ -77,7 +77,7 @@ const serviceStatusLabel: Record = { healthy: '服务正常', degraded: '来源不完整', offline: '车辆离线', - no_data: '暂无数据来源', + no_data: '暂无来源证据', identity_required: '身份未绑定' }; @@ -149,7 +149,7 @@ type VehicleActionQueueItem = { function vehicleFilterSummary(filters: Record) { return [ filters.keyword ? `关键词:${filters.keyword}` : '', - filters.protocol ? `数据来源:${filters.protocol}` : '', + filters.protocol ? `证据来源:${filters.protocol}` : '', filters.coverage ? `车辆覆盖:${coverageLabel[filters.coverage] ?? filters.coverage}` : '', filters.missingProtocol ? `缺失来源:${filters.missingProtocol}` : '', filters.serviceStatus ? `服务状态:${serviceStatusLabel[filters.serviceStatus] ?? filters.serviceStatus}` : '', @@ -920,7 +920,7 @@ export function Vehicles({ applyFilters(nextFilters); }}> - + GB32960 JT808 YUTONG_MQTT @@ -938,7 +938,7 @@ export function Vehicles({ 服务正常 来源不完整 车辆离线 - 暂无数据来源 + 暂无来源证据 身份未绑定 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 c34571c2..50aae1d7 100644 --- a/vehicle-data-platform/apps/web/src/test/App.test.tsx +++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx @@ -2471,7 +2471,7 @@ test('shows and clears current vehicle service filters', async () => { expect(await screen.findByText('当前车辆筛选')).toBeInTheDocument(); expect(screen.getByText('关键词:粤A')).toBeInTheDocument(); - expect(screen.getByText('数据来源:JT808')).toBeInTheDocument(); + expect(screen.getByText('证据来源:JT808')).toBeInTheDocument(); expect(screen.getByText('车辆覆盖:多源')).toBeInTheDocument(); expect(screen.getByText('缺失来源:YUTONG_MQTT')).toBeInTheDocument(); expect(screen.getByText('服务状态:来源不完整')).toBeInTheDocument(); @@ -5417,7 +5417,7 @@ test('copies trajectory playback summary from history page', async () => { expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【轨迹回放摘要】')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:VIN-HISTORY-SUMMARY')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:JT808')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('证据来源:JT808')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('查询范围:2026-07-03 至 2026-07-04')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹点:2,有效定位:2')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('区间里程:22.6 km')); @@ -5443,7 +5443,7 @@ test('copies trajectory playback summary from history page', async () => { expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【轨迹运营影响】')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:VIN-HISTORY-SUMMARY')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:JT808')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('证据来源:JT808')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('业务状态:需要复核')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹范围:位置 2 / 有效定位 2 / 原始记录 1 / 字段明细 2')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('定位覆盖率:100%')); @@ -6352,7 +6352,7 @@ test('shows and clears current history filters while keeping vehicle scope', asy expect(await screen.findByText('当前历史筛选')).toBeInTheDocument(); expect(screen.getByText('车辆:VIN-HISTORY-001')).toBeInTheDocument(); - expect(screen.getByText('数据来源:JT808')).toBeInTheDocument(); + expect(screen.getByText('证据来源:JT808')).toBeInTheDocument(); expect(screen.getByText('开始时间:2026-07-01 00:00:00')).toBeInTheDocument(); expect(screen.getByText('结束时间:2026-07-01 23:59:59')).toBeInTheDocument(); expect(screen.getAllByText('返回字段明细').length).toBeGreaterThanOrEqual(2);