feat(platform): add customer evidence package overview
This commit is contained in:
@@ -1216,6 +1216,44 @@ export function History({
|
||||
onClick: () => copyDeliveryPackage()
|
||||
}
|
||||
];
|
||||
const customerEvidencePackageOverviewItems = [
|
||||
{
|
||||
label: '交付范围',
|
||||
value: `${currentVehicleKeyword || '全部车辆'} / ${currentProtocol || '全部数据通道'}`,
|
||||
detail: `${filters.dateFrom || '-'} 至 ${filters.dateTo || '-'},先确认客户要查的车辆和时间窗。`,
|
||||
action: '查看范围',
|
||||
color: currentVehicleKeyword ? 'green' as const : 'blue' as const,
|
||||
disabled: false,
|
||||
onClick: () => document.querySelector<HTMLInputElement>('input[name="keyword"]')?.focus()
|
||||
},
|
||||
{
|
||||
label: '轨迹证据',
|
||||
value: validLocations.length > 0 ? `${validLocations.length.toLocaleString()} 点` : '0 点',
|
||||
detail: validLocations.length > 0 ? '可进入轨迹回放和位置历史导出。' : '当前范围没有有效轨迹点,需要补查位置历史。',
|
||||
action: '查询轨迹',
|
||||
color: validLocations.length > 0 ? 'green' as const : 'orange' as const,
|
||||
disabled: false,
|
||||
onClick: () => openQueryTab('location')
|
||||
},
|
||||
{
|
||||
label: '明细字段',
|
||||
value: fieldEvidenceCount > 0 ? `${fieldEvidenceCount.toLocaleString()} 字段` : `${(rawFrames.total ?? 0).toLocaleString()} 帧`,
|
||||
detail: fieldEvidenceCount > 0 ? '字段证据已裁剪,可按客户口径导出。' : '可查看历史明细并配置字段裁剪。',
|
||||
action: fieldEvidenceCount > 0 ? '字段导出' : '明细证据',
|
||||
color: fieldEvidenceCount > 0 ? 'green' as const : (rawFrames.total ?? 0) > 0 ? 'blue' as const : 'grey' as const,
|
||||
disabled: false,
|
||||
onClick: () => fieldEvidenceCount > 0 ? openQueryTab('fields') : openQueryTab('raw')
|
||||
},
|
||||
{
|
||||
label: '交付说明',
|
||||
value: deliveryState,
|
||||
detail: anomalyTotal > 0 ? `存在 ${anomalyTotal.toLocaleString()} 项质量提示,交付说明需附带异常解释。` : '当前范围可生成客户可读的证据说明。',
|
||||
action: '复制说明',
|
||||
color: deliveryStateColor,
|
||||
disabled: false,
|
||||
onClick: () => copyDeliveryPackage()
|
||||
}
|
||||
];
|
||||
const customerReportCadenceItems = [
|
||||
{
|
||||
title: '每日运营复盘',
|
||||
@@ -1802,6 +1840,35 @@ export function History({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
{mode === 'query' ? (
|
||||
<section className="vp-history-evidence-package-overview" aria-label="客户证据包交付总览">
|
||||
<div className="vp-history-evidence-package-summary">
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户证据包交付总览</Tag>
|
||||
<Tag color={deliveryStateColor}>{deliveryState}</Tag>
|
||||
<Tag color={fieldEvidenceCount > 0 ? 'green' : 'orange'}>{fieldEvidenceCount.toLocaleString()} 字段</Tag>
|
||||
</Space>
|
||||
<Typography.Text strong>先给客户一个结论:当前筛选能交付哪些证据、还缺哪一类证据、下一步应该导出还是补查。</Typography.Text>
|
||||
</div>
|
||||
<div className="vp-history-evidence-package-grid">
|
||||
{customerEvidencePackageOverviewItems.map((item) => (
|
||||
<button
|
||||
key={item.label}
|
||||
type="button"
|
||||
className="vp-history-evidence-package-item"
|
||||
disabled={item.disabled}
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户证据包交付总览 ${item.label} ${item.value} ${item.action}`}
|
||||
>
|
||||
<Tag color={item.color}>{item.label}</Tag>
|
||||
<strong>{item.value}</strong>
|
||||
<span>{item.detail}</span>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
) : null}
|
||||
{mode === 'query' ? (
|
||||
<section className="vp-history-service-desk" aria-label="车辆历史服务台">
|
||||
<div className="vp-history-service-desk-summary">
|
||||
|
||||
Reference in New Issue
Block a user