feat(platform): add customer saved view library

This commit is contained in:
lingniu
2026-07-06 00:28:46 +08:00
parent cca574d5eb
commit 2299588df6
3 changed files with 155 additions and 0 deletions

View File

@@ -1673,6 +1673,40 @@ export function Dashboard({
onClick: () => onOpenVehicles({})
}
];
const customerSavedViewItems = [
{
label: '在线车队视图',
value: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
detail: '默认进入车辆地图,按在线车辆、最新位置和定位有效性巡检。',
action: '打开地图',
color: 'green' as const,
onClick: () => onOpenMap({ online: 'online' })
},
{
label: '轨迹日报模板',
value: `${formatCount(summary?.activeToday)} 活跃`,
detail: '按当前时间窗复用轨迹回放和历史位置查询,处理每日客户问询。',
action: '历史导出',
color: 'blue' as const,
onClick: openTimeMonitorHistory
},
{
label: '里程周报模板',
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
detail: '按车辆口径复用里程统计,支撑周报、对账和 BI 复核。',
action: '统计查询',
color: 'blue' as const,
onClick: openTimeMonitorMileage
},
{
label: '告警订阅视图',
value: `${formatCount(summary?.issueVehicles)} 告警`,
detail: '围绕断链、离线、定位异常和字段缺失形成通知闭环。',
action: '通知闭环',
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
}
];
const amapVehicleServiceItems = [
{
label: '实时看车',
@@ -2392,6 +2426,36 @@ export function Dashboard({
))}
</div>
</section>
<section className="vp-customer-saved-view-library" aria-label="客户常用视图库">
<div className="vp-customer-saved-view-library-copy">
<Space wrap>
<Tag color="blue"></Tag>
<Tag color="green"></Tag>
</Space>
<Typography.Title heading={5} style={{ margin: 0 }}>
</Typography.Title>
<Typography.Text type="secondary">
</Typography.Text>
</div>
<div className="vp-customer-saved-view-library-grid">
{customerSavedViewItems.map((item) => (
<button
key={item.label}
type="button"
className="vp-customer-saved-view-library-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-service-journey" aria-label="车辆服务闭环">
<div className="vp-customer-service-journey-copy">
<Tag color="blue"></Tag>