feat(platform): add customer export workbench

This commit is contained in:
lingniu
2026-07-05 21:57:52 +08:00
parent a68db5e0eb
commit 7580fce07e
3 changed files with 264 additions and 0 deletions

View File

@@ -2002,6 +2002,41 @@ export function Dashboard({
onClick: openTimeMonitorRaw
}
];
const deliveryScopeText = `${timeMonitorScopeValue.keyword || '全部车辆'} / ${timeMonitorScopeValue.protocol || '全部数据通道'} / ${timeMonitorScopeValue.dateFrom || '-'}${timeMonitorScopeValue.dateTo || '-'}`;
const customerDeliveryWorkbenchItems = [
{
label: '轨迹回放',
value: `${formatCount(summary?.activeToday)} 活跃`,
detail: '回放同一时间窗内的路线、速度、停驶和里程断点。',
action: '回放轨迹',
color: 'blue' as const,
onClick: openTimeMonitorHistory
},
{
label: '里程统计',
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
detail: '核对区间里程、每日统计和 BI 展示口径。',
action: '统计查询',
color: 'green' as const,
onClick: openTimeMonitorMileage
},
{
label: '历史明细',
value: `${formatCount(summary?.frameToday)}`,
detail: '查询位置历史、原始记录和解析字段,作为客户证据。',
action: '历史导出',
color: 'blue' as const,
onClick: openTimeMonitorRaw
},
{
label: '告警说明',
value: `${formatCount(summary?.issueVehicles)} 告警`,
detail: highPriorityIssue ? `${qualityIssueLabel(highPriorityIssue.issueType)} / ${priorityIssueVehicleLabel(highPriorityIssue)}` : '当前没有高优先级告警,可作为无异常说明。',
action: '告警通知',
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
onClick: openTimeMonitorAlerts
}
];
return (
<div className="vp-page">
@@ -2091,6 +2126,38 @@ export function Dashboard({
</div>
</div>
</section>
<section className="vp-customer-delivery-workbench" aria-label="客户查询导出交付台">
<div className="vp-customer-delivery-workbench-copy">
<Space wrap>
<Tag color="blue"></Tag>
<Tag color={timeMonitorHasRange ? 'green' : 'orange'}>{dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo)}</Tag>
<Tag color={timeMonitorDeliveryStatus.color}>{timeMonitorDeliveryStatus.label}</Tag>
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}>
</Typography.Title>
<div className="vp-customer-delivery-scope">
<span></span>
<strong>{deliveryScopeText}</strong>
</div>
</div>
<div className="vp-customer-delivery-workbench-grid">
{customerDeliveryWorkbenchItems.map((item) => (
<button
key={item.label}
type="button"
className="vp-customer-delivery-workbench-item"
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>
<section className="vp-customer-map-situation" aria-label="车辆地图态势">
<div className="vp-customer-map-situation-map">
<VehicleMap