feat(platform): add customer export workbench
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user