feat(platform): sharpen customer vehicle workspace
This commit is contained in:
@@ -397,7 +397,7 @@ export function Dashboard({
|
||||
}));
|
||||
const customerHeroActions = [
|
||||
{
|
||||
title: '实时车辆地图',
|
||||
title: '车辆地图',
|
||||
value: `${commandLocatedCount.toLocaleString()} 辆有定位`,
|
||||
detail: '按车查看实时位置、在线状态、速度和最新上报时间。',
|
||||
action: '进入地图',
|
||||
@@ -418,13 +418,50 @@ export function Dashboard({
|
||||
onClick: () => onOpenMileage({})
|
||||
},
|
||||
{
|
||||
title: '历史数据导出',
|
||||
title: '数据导出',
|
||||
value: `${formatCount(summary?.frameToday)} 今日数据`,
|
||||
detail: '按车辆、时间和字段裁剪查询历史位置与原始记录。',
|
||||
action: '查询导出',
|
||||
onClick: () => onOpenHistory({ tab: 'raw', includeFields: 'true' })
|
||||
}
|
||||
];
|
||||
const customerJourneySteps = [
|
||||
{
|
||||
step: '01',
|
||||
title: '定位车辆',
|
||||
detail: '先在地图上确认车辆是否在线、坐标是否可信。',
|
||||
action: '车辆地图',
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
step: '02',
|
||||
title: '查看状态',
|
||||
detail: '进入实时监控查看速度、SOC、里程和最新上报。',
|
||||
action: '实时监控',
|
||||
onClick: () => onOpenRealtime({ online: 'online' })
|
||||
},
|
||||
{
|
||||
step: '03',
|
||||
title: '复盘轨迹',
|
||||
detail: '按自定义时间窗回放位置、速度和里程断点。',
|
||||
action: '轨迹回放',
|
||||
onClick: () => onOpenHistory()
|
||||
},
|
||||
{
|
||||
step: '04',
|
||||
title: '统计里程',
|
||||
detail: '用同一时间窗核对区间里程和每日统计。',
|
||||
action: '里程统计',
|
||||
onClick: () => onOpenMileage({})
|
||||
},
|
||||
{
|
||||
step: '05',
|
||||
title: '导出交付',
|
||||
detail: '导出历史位置、原始记录、字段明细和告警证据。',
|
||||
action: '数据导出',
|
||||
onClick: () => openTimeMonitorRaw()
|
||||
}
|
||||
];
|
||||
const customerHealthItems = [
|
||||
{
|
||||
label: '在线车辆',
|
||||
@@ -1285,20 +1322,26 @@ export function Dashboard({
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
<PageHeader title="车辆运营监控台" description="面向客户的车辆地图、实时状态、轨迹回放、里程统计、历史查询和数据导出入口" />
|
||||
<PageHeader title="车辆服务工作台" description="面向客户的车辆地图、实时监控、轨迹回放、里程统计、自定义时间监控、历史查询、告警通知和数据导出" />
|
||||
<Spin spinning={loading}>
|
||||
<Card bordered className="vp-customer-hero" bodyStyle={{ padding: 0 }}>
|
||||
<div className="vp-customer-hero-map">
|
||||
<div className="vp-customer-hero-copy">
|
||||
<Typography.Title heading={3} style={{ margin: 0 }}>先看车辆服务</Typography.Title>
|
||||
<Space wrap>
|
||||
<Tag color="blue">客户工作台</Tag>
|
||||
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '地图可用' : '地图待配置'}</Tag>
|
||||
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} 告警车辆</Tag>
|
||||
</Space>
|
||||
<Typography.Title heading={3} style={{ margin: 0 }}>先看车在哪里,再看车发生了什么</Typography.Title>
|
||||
<Typography.Text type="secondary">
|
||||
车辆是主对象。32960、808 和宇通 MQTT 只是数据来源,客户每天需要先确认车辆在哪里、是否在线、今天跑了多少、异常能否追溯和导出。
|
||||
32960、808 和宇通 MQTT 只是车辆服务证据。客户每天要直接完成车辆地图监控、轨迹回放、里程统计、时间窗复盘、告警闭环和数据导出。
|
||||
</Typography.Text>
|
||||
<Space wrap>
|
||||
<Button theme="solid" type="primary" onClick={() => onOpenMap({ online: 'online' })}>打开实时地图</Button>
|
||||
<Button theme="light" type="primary" onClick={() => onOpenHistory()}>轨迹回放</Button>
|
||||
<Button theme="light" type="primary" onClick={() => onOpenMileage({})}>里程统计</Button>
|
||||
<Button theme="light" onClick={exportDashboardSnapshot}>导出概览</Button>
|
||||
<Button theme="light" type="primary" onClick={openTimeMonitorRaw}>历史导出</Button>
|
||||
<Button theme="light" onClick={copyCustomerServiceGuide}>复制客户说明</Button>
|
||||
</Space>
|
||||
</div>
|
||||
<VehicleMap
|
||||
@@ -1310,8 +1353,24 @@ export function Dashboard({
|
||||
</div>
|
||||
<div className="vp-customer-hero-side">
|
||||
<div className="vp-customer-hero-side-head">
|
||||
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '地图可用' : '地图待配置'}</Tag>
|
||||
<Tag color={(summary?.issueVehicles ?? 0) > 0 ? 'orange' : 'green'}>{formatCount(summary?.issueVehicles)} 个告警</Tag>
|
||||
<Typography.Text strong>车辆服务路径</Typography.Text>
|
||||
<Button size="small" theme="light" type="primary" onClick={copyCustomerServiceGuide}>复制说明</Button>
|
||||
</div>
|
||||
<div className="vp-customer-journey">
|
||||
{customerJourneySteps.map((item) => (
|
||||
<button
|
||||
key={item.step}
|
||||
type="button"
|
||||
className="vp-customer-journey-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`车辆服务路径 ${item.title} ${item.action}`}
|
||||
>
|
||||
<span>{item.step}</span>
|
||||
<strong>{item.title}</strong>
|
||||
<em>{item.action}</em>
|
||||
<small>{item.detail}</small>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="vp-customer-health-grid">
|
||||
{customerHealthItems.map((item) => (
|
||||
@@ -1324,7 +1383,7 @@ export function Dashboard({
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="车辆监控指挥台" style={{ marginBottom: 16 }}>
|
||||
<Card bordered title="车辆服务指挥台" style={{ marginBottom: 16 }}>
|
||||
<div className="vp-command-center-grid">
|
||||
{commandCenterItems.map((item) => (
|
||||
<div key={item.title} className="vp-command-center-item">
|
||||
@@ -1338,7 +1397,7 @@ export function Dashboard({
|
||||
size="small"
|
||||
theme="solid"
|
||||
type="primary"
|
||||
aria-label={`车辆监控指挥台 ${item.title} ${item.primaryAction}`}
|
||||
aria-label={`车辆服务指挥台 ${item.title} ${item.primaryAction}`}
|
||||
onClick={item.onPrimary}
|
||||
>
|
||||
{item.primaryAction}
|
||||
@@ -1347,7 +1406,7 @@ export function Dashboard({
|
||||
size="small"
|
||||
theme="light"
|
||||
type="primary"
|
||||
aria-label={`车辆监控指挥台 ${item.title} ${item.secondaryAction}`}
|
||||
aria-label={`车辆服务指挥台 ${item.title} ${item.secondaryAction}`}
|
||||
onClick={item.onSecondary}
|
||||
>
|
||||
{item.secondaryAction}
|
||||
@@ -1357,7 +1416,7 @@ export function Dashboard({
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
<Card bordered title="客户常用工作流" style={{ marginBottom: 16 }}>
|
||||
<Card bordered title="客户常用服务" style={{ marginBottom: 16 }}>
|
||||
<div className="vp-customer-workflow-grid">
|
||||
{customerHeroActions.map((item) => (
|
||||
<button key={item.title} type="button" className="vp-customer-workflow-item" onClick={item.onClick} aria-label={`客户工作流 ${item.title}`}>
|
||||
|
||||
Reference in New Issue
Block a user