diff --git a/vehicle-data-platform/apps/web/src/pages/History.tsx b/vehicle-data-platform/apps/web/src/pages/History.tsx index d7835561..7ff1eae6 100644 --- a/vehicle-data-platform/apps/web/src/pages/History.tsx +++ b/vehicle-data-platform/apps/web/src/pages/History.tsx @@ -352,15 +352,15 @@ function historyEvidencePackageText({ `数据通道:${protocol || '全部数据通道'}`, `查询范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `位置记录:${locationCount.toLocaleString()},有效定位:${validPointCount.toLocaleString()}`, - `历史明细:${rawCount.toLocaleString()},字段明细:${fieldCount.toLocaleString()}`, + `明细证据:${rawCount.toLocaleString()},字段裁剪:${fieldCount.toLocaleString()}`, `区间里程:${formatNumber(mileageDelta, ' km')},最高速度:${formatNumber(maxSpeed, ' km/h')}`, `起点:${firstLocation?.deviceTime || firstLocation?.serverTime || '-'}`, `终点:${lastLocation?.deviceTime || lastLocation?.serverTime || '-'}`, `异常:断点 ${anomalySummary.gapCount.toLocaleString()} / 里程回退 ${anomalySummary.mileageRollbackCount.toLocaleString()} / 超速 ${anomalySummary.overspeedCount.toLocaleString()}`, `轨迹回放:${appURL(buildAppHash({ page: 'history', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `历史位置:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'location' } }))}`, - `历史明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, - `字段明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, + `明细证据:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, + `字段裁剪:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, `统计查询:${appURL(buildAppHash({ page: 'mileage', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `车辆服务:${appURL(buildAppHash({ page: 'detail', keyword: vehicle, protocol }))}` ].join('\n'); @@ -398,18 +398,18 @@ function deliveryPackageText({ return [ '【客户查询导出包】', `交付状态:${deliveryState}`, - '交付物:位置历史 / 轨迹回放 / 统计查询 / 历史明细 / 字段明细 / 质量提示', + '交付物:轨迹报告 / 位置历史 / 统计查询 / 明细证据 / 字段裁剪 / 质量提示', `车辆范围:${vehicle || '全部车辆'}`, `数据通道:${protocol || '全部数据通道'}`, `时间范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `位置历史:${locationCount.toLocaleString()} 条,有效定位 ${validPointCount.toLocaleString()},覆盖率 ${formatPercent(coverageRate)}`, - `历史明细:${rawCount.toLocaleString()} 帧`, - `字段明细:${fieldCount.toLocaleString()} 个字段`, + `明细证据:${rawCount.toLocaleString()} 帧`, + `字段裁剪:${fieldCount.toLocaleString()} 个字段`, `区间里程:${formatNumber(mileageDelta, ' km')}`, `质量提示:断点 ${anomalySummary.gapCount.toLocaleString()} / 里程回退 ${anomalySummary.mileageRollbackCount.toLocaleString()} / 超速 ${anomalySummary.overspeedCount.toLocaleString()}`, `位置导出:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'location' } }))}`, - `导出明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, - `导出字段:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, + `明细证据:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, + `字段裁剪:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, `轨迹回放:${appURL(buildAppHash({ page: 'history', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `统计查询:${appURL(buildAppHash({ page: 'mileage', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `车辆服务:${appURL(buildAppHash({ page: 'detail', keyword: vehicle, protocol }))}` @@ -443,14 +443,14 @@ function scheduledHistoryReportPlanText({ `数据通道:${protocol || '全部数据通道'}`, `时间范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, '推荐频率:日报用于运营复盘,周报用于客户对账,临时导出用于问题解释。', - '交付内容:轨迹报告 / 位置历史 CSV / 历史明细 CSV / 字段明细 CSV / 统计查询链接 / 质量提示。', - `当前数据量:位置 ${locationCount.toLocaleString()} 条,有效定位 ${validPointCount.toLocaleString()},历史明细 ${rawCount.toLocaleString()} 帧,字段 ${fieldCount.toLocaleString()} 个。`, + '交付内容:轨迹报告 / 位置历史 CSV / 明细证据 CSV / 字段裁剪 CSV / 统计查询链接 / 质量提示。', + `当前数据量:位置 ${locationCount.toLocaleString()} 条,有效定位 ${validPointCount.toLocaleString()},明细证据 ${rawCount.toLocaleString()} 帧,字段裁剪 ${fieldCount.toLocaleString()} 个。`, `质量提示:断点 ${anomalySummary.gapCount.toLocaleString()} / 里程回退 ${anomalySummary.mileageRollbackCount.toLocaleString()} / 超速 ${anomalySummary.overspeedCount.toLocaleString()}`, '交付前检查:先锁定车辆和时间窗,再确认字段裁剪、分页覆盖和异常说明。', `轨迹报告:${appURL(buildAppHash({ page: 'history', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `位置历史:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'location' } }))}`, - `历史明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, - `字段明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, + `明细证据:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, + `字段裁剪:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, `统计查询:${appURL(buildAppHash({ page: 'mileage', keyword: vehicle, protocol, filters: evidenceFilters }))}` ].join('\n'); } @@ -499,14 +499,14 @@ function trajectoryReviewPackageText({ ...(filters.dateTo?.trim() ? { dateTo: filters.dateTo.trim() } : {}) }; const anomalyAction = anomalySummary.gapCount > 0 || anomalySummary.mileageRollbackCount > 0 || anomalySummary.overspeedCount > 0 - ? '建议核对历史明细、字段明细、当日统计查询,并确认平台是否存在断链或补发。' + ? '建议核对明细证据、字段裁剪、当日统计查询,并确认平台是否存在断链或补发。' : '当前页未发现明显断点、里程回退或速度异常,可作为轨迹复盘依据使用。'; return [ '【轨迹复盘交接包】', `车辆:${vehicle || '全部车辆'}`, `数据通道:${protocol || '全部数据通道'}`, `查询范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, - `轨迹规模:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 历史明细 ${rawCount.toLocaleString()} / 字段明细 ${fieldCount.toLocaleString()}`, + `轨迹规模:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 明细证据 ${rawCount.toLocaleString()} / 字段裁剪 ${fieldCount.toLocaleString()}`, `轨迹质量:定位覆盖率 ${formatPercent(coverageRate)} / 回放跨度 ${formatDurationMinutes(playbackSpanMinutes)} / 采样间隔 ${formatDurationMinutes(playbackIntervalMinutes, '/点')}`, `里程速度:区间里程 ${formatNumber(mileageDelta, ' km')} / 最高速度 ${formatNumber(maxSpeed, ' km/h')}`, `起点:${firstLocation?.deviceTime || firstLocation?.serverTime || '-'}`, @@ -520,8 +520,8 @@ function trajectoryReviewPackageText({ `下一步:${anomalyAction}`, `轨迹回放:${appURL(buildAppHash({ page: 'history', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `历史位置:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'location' } }))}`, - `历史明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, - `字段明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, + `明细证据:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, + `字段裁剪:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, `统计查询:${appURL(buildAppHash({ page: 'mileage', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `车辆服务:${appURL(buildAppHash({ page: 'detail', keyword: vehicle, protocol }))}` ].join('\n'); @@ -568,7 +568,7 @@ function trajectoryImpactPackageText({ `数据通道:${protocol || '全部数据通道'}`, `查询范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, `业务状态:${operationState}`, - `轨迹范围:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 历史明细 ${rawCount.toLocaleString()} / 字段明细 ${fieldCount.toLocaleString()}`, + `轨迹范围:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 明细证据 ${rawCount.toLocaleString()} / 字段裁剪 ${fieldCount.toLocaleString()}`, `定位覆盖率:${formatPercent(coverageRate)}`, `回放跨度:${formatDurationMinutes(playbackSpanMinutes)},采样间隔:${formatDurationMinutes(playbackIntervalMinutes, '/点')}`, `里程速度:${formatNumber(mileageDelta, ' km')} / ${formatNumber(maxSpeed, ' km/h')}`, @@ -576,7 +576,7 @@ function trajectoryImpactPackageText({ `地图能力:${amapConfigured ? '高德 JS API 已配置' : '高德 JS API 待配置'}`, `轨迹回放:${appURL(buildAppHash({ page: 'history', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `历史查询导出:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'location' } }))}`, - `历史明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, + `明细证据:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, `车辆服务:${appURL(buildAppHash({ page: 'detail', keyword: vehicle, protocol }))}` ].join('\n'); } @@ -631,7 +631,7 @@ function trajectoryCustomerDecisionText({ `车辆范围:${vehicle || '全部车辆'}`, `数据通道:${protocol || '全部数据通道'}`, `时间范围:${filters.dateFrom?.trim() || '-'} 至 ${filters.dateTo?.trim() || '-'}`, - `轨迹规模:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 历史明细 ${rawCount.toLocaleString()} / 字段明细 ${fieldCount.toLocaleString()}`, + `轨迹规模:位置 ${locationCount.toLocaleString()} / 有效定位 ${validPointCount.toLocaleString()} / 明细证据 ${rawCount.toLocaleString()} / 字段裁剪 ${fieldCount.toLocaleString()}`, `定位覆盖:${formatPercent(coverageRate)}`, `回放跨度:${formatDurationMinutes(playbackSpanMinutes)},采样间隔:${formatDurationMinutes(playbackIntervalMinutes, '/点')}`, `区间里程:${formatNumber(mileageDelta, ' km')},最高速度:${formatNumber(maxSpeed, ' km/h')}`, @@ -644,11 +644,11 @@ function trajectoryCustomerDecisionText({ '1. 先看轨迹覆盖:确认是否有足够有效坐标。', '2. 再看时间断点:断点会影响定位连续性和客户解释。', '3. 再看里程速度:区间里程、速度和轨迹方向需要能互相解释。', - '4. 最后回到依据:异常点必须打开历史明细、字段明细和统计查询复核。', + '4. 最后回到依据:异常点必须打开明细证据、字段裁剪和统计查询复核。', `轨迹回放:${appURL(buildAppHash({ page: 'history', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `历史查询导出:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'location' } }))}`, - `历史明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, - `字段明细:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, + `明细证据:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'raw', includeFields: 'true' } }))}`, + `字段裁剪:${appURL(buildAppHash({ page: 'history-query', keyword: vehicle, protocol, filters: { ...evidenceFilters, tab: 'fields', includeFields: 'true', ...(filters.fields?.trim() ? { fields: filters.fields.trim() } : {}) } }))}`, `统计查询:${appURL(buildAppHash({ page: 'mileage', keyword: vehicle, protocol, filters: evidenceFilters }))}`, `车辆服务:${appURL(buildAppHash({ page: 'detail', keyword: vehicle, protocol }))}` ].join('\n'); @@ -864,11 +864,11 @@ export function History({ const currentProtocol = filters.protocol?.trim() ?? ''; const pageTitle = mode === 'query' ? '历史查询导出' : '轨迹回放'; const pageDescription = mode === 'query' - ? '按车辆、时间和数据通道导出位置记录、历史明细和字段明细,支持分页、字段裁剪和 CSV 导出' - : '按车辆查询历史位置和轨迹回放,历史明细只作为复核依据,数据通道仅用于过滤'; + ? '按车辆和时间窗交付轨迹报告、位置记录、明细证据和字段裁剪,支持分页、字段裁剪和 CSV 导出' + : '按车辆查询历史位置和轨迹回放,明细证据只作为复核依据,数据通道仅用于过滤'; const scopeDescription = mode === 'query' - ? '位置记录、历史明细和字段明细按当前车辆与时间范围分页查询。' - : '历史位置和历史明细按当前车辆与时间范围查询。'; + ? '位置记录、明细证据和字段裁剪按当前车辆与时间范围分页查询。' + : '历史位置和明细证据按当前车辆与时间范围查询。'; const amapConfigured = isAMapConfigured(); const selectedFieldCount = splitFields(filters.fields).length; const playbackRows = validLocations.length > 0 ? validLocations : locationItems; @@ -943,9 +943,9 @@ export function History({ { label: '明细复核', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, - detail: rawFieldRows.length > 0 ? `${rawFieldRows.length.toLocaleString()} 个字段明细可导出。` : '异常点需要回到历史明细和字段明细。', + detail: rawFieldRows.length > 0 ? `${rawFieldRows.length.toLocaleString()} 个字段裁剪可导出。` : '异常点需要回到明细证据和字段裁剪。', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const, - action: '历史明细', + action: '明细证据', disabled: false, onClick: () => openQueryTab('raw') } @@ -979,20 +979,20 @@ export function History({ onClick: () => onOpenMileage?.({ keyword: currentVehicleKeyword, protocol: currentProtocol, ...(filters.dateFrom ? { dateFrom: filters.dateFrom } : {}), ...(filters.dateTo ? { dateTo: filters.dateTo } : {}) }) }, { - title: '历史明细', + title: '明细证据', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, - detail: '保留接入明细,用于解释字段值来源。', + detail: '保留接入证据,用于解释字段值来源。', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const, - action: '导出明细', + action: '导出证据', disabled: rawFrames.items.length === 0, onClick: () => exportRawFrames() }, { - title: '字段明细', + title: '字段裁剪', value: `${rawFieldRows.length.toLocaleString()} 个`, - detail: selectedFieldCount > 0 ? `按 ${selectedFieldCount.toLocaleString()} 个字段裁剪。` : '可切换字段明细生成字段级交付。', + detail: selectedFieldCount > 0 ? `按 ${selectedFieldCount.toLocaleString()} 个字段裁剪。` : '可切换字段裁剪生成字段级交付。', color: rawFieldRows.length > 0 ? 'green' as const : 'orange' as const, - action: '字段明细', + action: '字段配置', disabled: false, onClick: () => openQueryTab('fields') }, @@ -1017,18 +1017,18 @@ export function History({ onClick: () => copyTrajectoryReviewPackage() }, { - title: '历史明细包', + title: '明细证据包', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, detail: '适合客户或BI追溯位置、里程、速度、SOC等字段来源。', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const, - action: '明细导出', + action: '导出证据', disabled: false, onClick: () => openQueryTab('raw') }, { title: '字段裁剪包', value: selectedFieldCount > 0 ? `${selectedFieldCount.toLocaleString()} 字段` : `${rawFieldRows.length.toLocaleString()} 字段`, - detail: selectedFieldCount > 0 ? '按客户指定字段裁剪,减少导出体积。' : '先填写字段裁剪或切换字段明细,再生成字段级交付。', + detail: selectedFieldCount > 0 ? '按客户指定字段裁剪,减少导出体积。' : '先填写字段裁剪或切换字段裁剪页,再生成字段级交付。', color: rawFieldRows.length > 0 || selectedFieldCount > 0 ? 'green' as const : 'orange' as const, action: '字段配置', disabled: false, @@ -1332,20 +1332,20 @@ export function History({
- 客户数据交付中心 + 客户数据交付台 {deliveryState} - {activeTab === 'location' ? '位置历史' : activeTab === 'raw' ? '历史明细' : '字段明细'} + {activeTab === 'location' ? '位置历史' : activeTab === 'raw' ? '明细证据' : '字段裁剪'} 先锁定车辆和时间窗,再选择交付物并导出 - 面向客户的数据导出以车辆服务为中心:同一个筛选范围可以交付位置历史、历史明细、字段明细、CSV 文件、轨迹复盘和统计查询。 + 面向客户的数据导出以车辆服务为中心:同一个筛选范围可以交付轨迹报告、位置历史、明细证据、字段裁剪、CSV 文件和统计查询。 - - + +
@@ -1373,20 +1373,20 @@ export function History({ }, { step: '03', - title: '历史明细', + title: '明细证据', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, - detail: '保留接入明细,用于解释位置、里程和字段来源。', - action: '导出明细', + detail: '保留接入证据,用于解释位置、里程和字段来源。', + action: '导出证据', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const, disabled: rawFrames.items.length === 0, onClick: exportRawFrames }, { step: '04', - title: '字段明细', + title: '字段裁剪', value: `${rawFieldRows.length.toLocaleString()} 个`, - detail: selectedFieldCount > 0 ? `已裁剪 ${selectedFieldCount.toLocaleString()} 个字段。` : '需要字段级交付时切换字段明细或填写字段裁剪。', - action: '字段明细', + detail: selectedFieldCount > 0 ? `已裁剪 ${selectedFieldCount.toLocaleString()} 个字段。` : '需要字段级交付时切换字段裁剪或填写字段裁剪。', + action: '字段配置', color: rawFieldRows.length > 0 ? 'green' as const : 'orange' as const, disabled: false, onClick: () => openQueryTab('fields') @@ -1408,7 +1408,7 @@ export function History({ className="vp-history-customer-export-step" disabled={item.disabled} onClick={item.onClick} - aria-label={`客户数据交付中心 ${item.title} ${item.action}`} + aria-label={`客户数据交付台 ${item.title} ${item.action}`} > {item.step} {item.title} @@ -1433,7 +1433,7 @@ export function History({ 按客户问题选择导出模板 - 车队报表不只是下载 CSV:先选择用途,再生成轨迹报告、历史明细包、字段裁剪包或周期交付计划。 + 车队报表不只是下载 CSV:先选择用途,再生成轨迹报告、明细证据包、字段裁剪包或周期交付计划。
@@ -1466,7 +1466,7 @@ export function History({ 按车辆和时间窗复盘每一段行程 - 客户需要看到路线、起止时间、里程变化、速度异常和可导出的证据。历史明细和字段只作为轨迹复盘的依据。 + 客户需要看到路线、起止时间、里程变化、速度异常和可导出的证据。明细证据和字段裁剪只作为轨迹复盘的依据。
{[ { title: '轨迹复盘', value: validLocations.length > 0 ? '可播放' : '待查询', detail: '回放路线、速度和里程断点。', action: '播放轨迹', color: validLocations.length > 0 ? 'green' as const : 'orange' as const, disabled: validLocations.length === 0, onClick: () => openQueryTab('location') }, - { title: '历史明细', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, detail: '查看轨迹背后的原始接入证据。', action: '查看明细', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const, disabled: false, onClick: () => openQueryTab('raw') }, + { title: '明细证据', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, detail: '查看轨迹背后的接入证据。', action: '查看证据', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const, disabled: false, onClick: () => openQueryTab('raw') }, { title: '统计查询', value: formatNumber(mileageDelta, ' km'), detail: '进入同一时间窗的统计查询。', action: '统计复核', color: isFiniteNumber(mileageDelta) ? 'green' as const : 'grey' as const, disabled: !onOpenMileage, onClick: () => onOpenMileage?.({ keyword: currentVehicleKeyword, protocol: currentProtocol, ...(filters.dateFrom ? { dateFrom: filters.dateFrom } : {}), ...(filters.dateTo ? { dateTo: filters.dateTo } : {}) }) }, { title: '客户导出', value: deliveryState, detail: '复制交付说明或导出 CSV 证据。', action: '复制交付', color: deliveryStateColor, disabled: false, onClick: copyDeliveryPackage } ].map((item) => ( @@ -1543,14 +1543,14 @@ export function History({ {deliveryState} {amapConfigured ? '高德地图可用' : '坐标预览'} - 先判断轨迹能否复盘,再进入明细、字段和统计查询 + 先判断轨迹能否复盘,再进入证据、字段和统计查询 - 客户问某辆车某段时间发生了什么时,先看定位覆盖、时间断点、里程速度和历史明细,避免把内部排查过程当成客户主流程。 + 客户问某辆车某段时间发生了什么时,先看定位覆盖、时间断点、里程速度和明细证据,避免把内部排查过程当成客户主流程。 - + @@ -1580,20 +1580,20 @@ export function History({ 客户查询 - {activeTab === 'location' ? '位置历史' : activeTab === 'raw' ? '历史明细' : '字段明细'} + {activeTab === 'location' ? '位置历史' : activeTab === 'raw' ? '明细证据' : '字段裁剪'} {currentVehicleKeyword || '全部车辆'} - 面向车辆服务的历史数据检索入口。先按车辆和时间缩小范围,再导出位置、历史明细或字段明细,用于客户问询、BI 核对和问题追溯。 + 面向车辆服务的历史数据检索入口。先按车辆和时间缩小范围,再导出位置、明细证据或字段裁剪,用于客户问询、BI 核对和问题追溯。 默认查询最近一天,不预置任何车辆;输入 VIN、车牌或手机号后进入单车查询导出。 - - + +
@@ -1607,17 +1607,17 @@ export function History({ onClick: exportLocations }, { - label: '历史明细', + label: '明细证据', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, - detail: '保存协议接入后的历史明细,可按车辆和时间追溯。', - action: '导出明细', + detail: '保存接入后的证据明细,可按车辆和时间追溯。', + action: '导出证据', color: 'blue' as const, onClick: exportRawFrames }, { - label: '字段明细', + label: '字段裁剪', value: rawFieldRows.length.toLocaleString(), - detail: selectedFieldCount > 0 ? `已裁剪 ${selectedFieldCount.toLocaleString()} 个字段。` : '可勾选字段明细或填写字段裁剪后查询。', + detail: selectedFieldCount > 0 ? `已裁剪 ${selectedFieldCount.toLocaleString()} 个字段。` : '可勾选字段裁剪或填写字段裁剪后查询。', action: '导出字段', color: rawFieldRows.length > 0 ? 'green' as const : 'grey' as const, onClick: exportRawFields @@ -1652,7 +1652,7 @@ export function History({ {deliveryScopeText} - 面向客户交付时,先确认车辆、时间、交付物和质量提示,再导出位置、历史明细或字段明细,避免把内部排查过程直接暴露给客户。 + 面向客户交付时,先确认车辆、时间、交付物和质量提示,再导出位置、明细证据或字段裁剪,避免把内部排查过程直接暴露给客户。 @@ -1906,9 +1906,9 @@ export function History({ color: hasTrajectoryAnomaly ? 'orange' as const : 'green' as const }, { - label: '历史明细', + label: '明细证据', value: `${(rawFrames.total ?? 0).toLocaleString()} 帧`, - detail: rawFieldRows.length > 0 ? `${rawFieldRows.length.toLocaleString()} 个字段明细可直接导出。` : '可切换历史明细并请求字段明细。', + detail: rawFieldRows.length > 0 ? `${rawFieldRows.length.toLocaleString()} 个字段裁剪可直接导出。` : '可切换明细证据并请求字段裁剪。', color: (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const }, { @@ -2116,9 +2116,9 @@ export function History({ ))}
- {hasTrajectoryAnomaly ? '建议核对历史明细和当日统计查询' : '轨迹质量可用'} + {hasTrajectoryAnomaly ? '建议核对明细证据和当日统计查询' : '轨迹质量可用'} - {hasTrajectoryAnomaly ? '异常点会影响轨迹回放、定位复盘和区间里程判断,请结合字段明细与统计查询交叉确认。' : '当前页轨迹未发现明显断点、里程回退或速度异常。'} + {hasTrajectoryAnomaly ? '异常点会影响轨迹回放、定位复盘和区间里程判断,请结合字段裁剪与统计查询交叉确认。' : '当前页轨迹未发现明显断点、里程回退或速度异常。'}
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 f53d8da7..f9e05a17 100644 --- a/vehicle-data-platform/apps/web/src/test/App.test.tsx +++ b/vehicle-data-platform/apps/web/src/test/App.test.tsx @@ -5479,22 +5479,22 @@ test('copies trajectory playback summary from history page', async () => { expect((await screen.findAllByText('VIN-HISTORY-SUMMARY')).length).toBeGreaterThan(0); expect(screen.getByText('轨迹回放工作台')).toBeInTheDocument(); expect(screen.getByText('按车辆和时间窗复盘每一段行程')).toBeInTheDocument(); - expect(screen.getByText('客户需要看到路线、起止时间、里程变化、速度异常和可导出的证据。历史明细和字段只作为轨迹复盘的依据。')).toBeInTheDocument(); + expect(screen.getByText('客户需要看到路线、起止时间、里程变化、速度异常和可导出的证据。明细证据和字段裁剪只作为轨迹复盘的依据。')).toBeInTheDocument(); expect(screen.getByRole('button', { name: '轨迹回放指标 轨迹点 2' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '轨迹回放工作台 轨迹复盘 播放轨迹' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '轨迹回放工作台 客户导出 复制交付' })).toBeInTheDocument(); expect(screen.getByText('客户轨迹决策台')).toBeInTheDocument(); - expect(screen.getByText('先判断轨迹能否复盘,再进入明细、字段和统计查询')).toBeInTheDocument(); + expect(screen.getByText('先判断轨迹能否复盘,再进入证据、字段和统计查询')).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户轨迹决策 复盘结论 复制决策' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户轨迹决策 定位覆盖 播放轨迹' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户轨迹决策 时间断点 复盘包' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户轨迹决策 里程速度 统计查询' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户轨迹决策 明细复核 历史明细' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户轨迹决策 明细复核 明细证据' })).toBeInTheDocument(); fireEvent.click(screen.getAllByRole('button', { name: /复制决策说明/ })[0]); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户轨迹决策说明】')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('决策结论:可复盘,需附异常说明')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('客户复盘路径:')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('4. 最后回到依据:异常点必须打开历史明细、字段明细和统计查询复核。')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('4. 最后回到依据:异常点必须打开明细证据、字段裁剪和统计查询复核。')); fireEvent.click(screen.getByRole('button', { name: /复制轨迹摘要/ })); @@ -5513,12 +5513,12 @@ 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('位置记录:2,有效定位:2')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史明细:1,字段明细:2')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('明细证据:1,字段裁剪:2')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常:断点 1 / 里程回退 0 / 超速 0')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹回放:http://localhost:3000/#/history?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&dateFrom=2026-07-03&dateTo=2026-07-04')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史位置:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=location&dateFrom=2026-07-03&dateTo=2026-07-04')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史明细:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('字段明细:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=fields&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('明细证据:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('字段裁剪:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=fields&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('统计查询:http://localhost:3000/#/mileage?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&dateFrom=2026-07-03&dateTo=2026-07-04')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务:http://localhost:3000/#/detail?keyword=VIN-HISTORY-SUMMARY&protocol=JT808')); @@ -5528,25 +5528,25 @@ test('copies trajectory playback summary from history page', async () => { expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:VIN-HISTORY-SUMMARY')); 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('轨迹范围:位置 2 / 有效定位 2 / 明细证据 1 / 字段裁剪 2')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('定位覆盖率:100%')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('回放跨度:60 分钟,采样间隔:60 分钟/点')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常影响:断点 1 / 里程回退 0 / 超速 0')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('地图能力:高德 JS API 待配置')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史查询导出:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=location&dateFrom=2026-07-03&dateTo=2026-07-04')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史明细:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('明细证据:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); fireEvent.click(screen.getByRole('button', { name: /复制轨迹复盘包/ })); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【轨迹复盘交接包】')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:VIN-HISTORY-SUMMARY')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹规模:位置 2 / 有效定位 2 / 历史明细 1 / 字段明细 2')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹规模:位置 2 / 有效定位 2 / 明细证据 1 / 字段裁剪 2')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹质量:定位覆盖率 100% / 回放跨度 60 分钟 / 采样间隔 60 分钟/点')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('里程速度:区间里程 22.6 km / 最高速度 58.8 km/h')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前回放点:点 1/2,2026-07-03 10:00:00,12.5 km/h,1,000 km')); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常判读:断点 1 / 里程回退 0 / 超速 0')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('下一步:建议核对历史明细、字段明细、当日统计查询,并确认平台是否存在断链或补发。')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史明细:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('下一步:建议核对明细证据、字段裁剪、当日统计查询,并确认平台是否存在断链或补发。')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('明细证据:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true')); }); test('opens same-day mileage statistics from quality issue row', async () => { @@ -6522,50 +6522,50 @@ test('shows parsed field history as a flattened evidence table', async () => { render(); expect(await screen.findByRole('heading', { name: '历史查询导出' })).toBeInTheDocument(); - expect(screen.getByText('客户数据交付中心')).toBeInTheDocument(); + expect(screen.getByText('客户数据交付台')).toBeInTheDocument(); expect(screen.getByText('轨迹回放工作台')).toBeInTheDocument(); expect(screen.getByText('按车辆和时间窗复盘每一段行程')).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '轨迹回放工作台 历史明细 查看明细' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '轨迹回放工作台 明细证据 查看证据' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '轨迹回放工作台 客户导出 复制交付' })).toBeInTheDocument(); - expect(screen.getByText('面向客户的数据导出以车辆服务为中心:同一个筛选范围可以交付位置历史、历史明细、字段明细、CSV 文件、轨迹复盘和统计查询。')).toBeInTheDocument(); + expect(screen.getByText('面向客户的数据导出以车辆服务为中心:同一个筛选范围可以交付轨迹报告、位置历史、明细证据、字段裁剪、CSV 文件和统计查询。')).toBeInTheDocument(); expect(screen.getByText('先锁定车辆和时间窗,再选择交付物并导出')).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户数据交付中心 选择范围 调整筛选' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户数据交付中心 位置历史 导出位置' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户数据交付中心 历史明细 导出明细' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户数据交付中心 字段明细 字段明细' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户数据交付中心 交付说明 复制交付' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户数据交付台 选择范围 调整筛选' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户数据交付台 位置历史 导出位置' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户数据交付台 明细证据 导出证据' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户数据交付台 字段裁剪 字段配置' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户数据交付台 交付说明 复制交付' })).toBeInTheDocument(); expect(screen.getByText('报表交付模板')).toBeInTheDocument(); expect(screen.getByText('按客户问题选择导出模板')).toBeInTheDocument(); - expect(screen.getByText('车队报表不只是下载 CSV:先选择用途,再生成轨迹报告、历史明细包、字段裁剪包或周期交付计划。')).toBeInTheDocument(); + expect(screen.getByText('车队报表不只是下载 CSV:先选择用途,再生成轨迹报告、明细证据包、字段裁剪包或周期交付计划。')).toBeInTheDocument(); expect(screen.getByRole('button', { name: '报表交付模板 轨迹报告 复制报告' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '报表交付模板 历史明细包 明细导出' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '报表交付模板 明细证据包 导出证据' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '报表交付模板 字段裁剪包 字段配置' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '报表交付模板 周期交付计划 复制计划' })).toBeInTheDocument(); expect(screen.getByText('客户轨迹决策台')).toBeInTheDocument(); expect(screen.getAllByRole('button', { name: /复制决策说明/ }).length).toBeGreaterThanOrEqual(1); - expect(screen.getByRole('button', { name: '客户轨迹决策 明细复核 历史明细' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户轨迹决策 明细复核 明细证据' })).toBeInTheDocument(); expect(screen.getByText('客户查询导出包')).toBeInTheDocument(); - expect(screen.getByText('面向客户交付时,先确认车辆、时间、交付物和质量提示,再导出位置、历史明细或字段明细,避免把内部排查过程直接暴露给客户。')).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户查询导出 历史明细 导出明细' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户查询导出 字段明细 字段明细' })).toBeInTheDocument(); + expect(screen.getByText('面向客户交付时,先确认车辆、时间、交付物和质量提示,再导出位置、明细证据或字段裁剪,避免把内部排查过程直接暴露给客户。')).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户查询导出 明细证据 导出证据' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户查询导出 字段裁剪 字段配置' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户查询导出 质量提示 复制说明' })).toBeInTheDocument(); expect(screen.getByText('客户交付物清单')).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户交付清单 位置历史 导出位置' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户交付清单 轨迹回放 查看轨迹' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户交付清单 统计查询 统计查询' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户交付清单 历史明细 导出明细' })).toBeInTheDocument(); - expect(screen.getByRole('button', { name: '客户交付清单 字段明细 字段明细' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户交付清单 明细证据 导出证据' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: '客户交付清单 字段裁剪 字段配置' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: '客户交付清单 质量提示 复制清单' })).toBeInTheDocument(); fireEvent.click(screen.getByRole('button', { name: /复制交付清单/ })); await waitFor(() => { - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付物:位置历史 / 轨迹回放 / 统计查询 / 历史明细 / 字段明细 / 质量提示')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付物:轨迹报告 / 位置历史 / 统计查询 / 明细证据 / 字段裁剪 / 质量提示')); }); fireEvent.click(screen.getByRole('button', { name: '报表交付模板 周期交付计划 复制计划' })); await waitFor(() => { expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【历史数据周期交付计划】')); }); expect(writeText).toHaveBeenCalledWith(expect.stringContaining('推荐频率:日报用于运营复盘,周报用于客户对账,临时导出用于问题解释。')); - expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付内容:轨迹报告 / 位置历史 CSV / 历史明细 CSV / 字段明细 CSV / 统计查询链接 / 质量提示。')); + expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付内容:轨迹报告 / 位置历史 CSV / 明细证据 CSV / 字段裁剪 CSV / 统计查询链接 / 质量提示。')); expect(await screen.findByRole('tab', { name: '字段明细' })).toHaveAttribute('aria-selected', 'true'); expect(fetchMock).toHaveBeenCalledWith('/api/history/raw-frames/query', expect.objectContaining({ method: 'POST', @@ -6837,7 +6837,7 @@ test('flags trajectory playback anomalies for gap mileage and speed review', asy expect(screen.getByText('2 km')).toBeInTheDocument(); expect(screen.getByText('速度异常')).toBeInTheDocument(); expect(screen.getAllByText('132 km/h').length).toBeGreaterThan(0); - expect(screen.getByText('建议核对历史明细和当日统计查询')).toBeInTheDocument(); + expect(screen.getByText('建议核对明细证据和当日统计查询')).toBeInTheDocument(); }); test('opens amap route from trajectory playback workspace', async () => {