feat(platform): add customer problem desk
This commit is contained in:
@@ -1463,6 +1463,48 @@ export function Dashboard({
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
const customerProblemDesk = [
|
||||
{
|
||||
question: '现在车辆在哪里',
|
||||
answer: `${commandLocatedCount.toLocaleString()} 辆有可用坐标,先进入实时地图确认分布和最新上报。`,
|
||||
metric: `${formatCount(serviceSummary?.onlineVehicles ?? summary?.onlineVehicles)} 在线`,
|
||||
action: '打开实时地图',
|
||||
color: 'green' as const,
|
||||
onClick: () => onOpenMap({ online: 'online' })
|
||||
},
|
||||
{
|
||||
question: '这段时间跑了多少',
|
||||
answer: `${dayRangeText(timeMonitorScopeValue.dateFrom, timeMonitorScopeValue.dateTo)},用同一时间窗核对区间里程和每日统计。`,
|
||||
metric: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
|
||||
action: '查统计查询',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorMileage
|
||||
},
|
||||
{
|
||||
question: '轨迹能不能回放',
|
||||
answer: `今日活跃 ${formatCount(summary?.activeToday)},可回放位置、速度、停驶和里程断点。`,
|
||||
metric: `${formatCount(summary?.activeToday)} 活跃`,
|
||||
action: '打开轨迹回放',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorHistory
|
||||
},
|
||||
{
|
||||
question: '需要导出哪些证据',
|
||||
answer: `今日数据 ${formatCount(summary?.frameToday)},按车辆、时间、字段裁剪导出位置和原始证据。`,
|
||||
metric: `${formatCount(summary?.frameToday)} 数据`,
|
||||
action: '查询历史导出',
|
||||
color: 'blue' as const,
|
||||
onClick: openTimeMonitorRaw
|
||||
},
|
||||
{
|
||||
question: '哪些车需要通知处理',
|
||||
answer: highPriorityIssue ? `${qualityIssueLabel(highPriorityIssue.issueType)} / ${priorityIssueVehicleLabel(highPriorityIssue)}` : '暂无高优先级告警,保持日常巡检。',
|
||||
metric: `${formatCount(summary?.issueVehicles)} 告警`,
|
||||
action: '查看告警事件',
|
||||
color: (summary?.issueVehicles ?? 0) > 0 ? 'orange' as const : 'green' as const,
|
||||
onClick: () => onOpenQuality(highPriorityIssue?.issueType ? { issueType: highPriorityIssue.issueType } : {})
|
||||
}
|
||||
];
|
||||
const customerNextActions = [
|
||||
{
|
||||
level: (summary?.issueVehicles ?? 0) > 0 ? '优先' : '巡检',
|
||||
@@ -1599,6 +1641,36 @@ export function Dashboard({
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-customer-problem-desk">
|
||||
<div className="vp-customer-problem-head">
|
||||
<div>
|
||||
<Typography.Text strong>客户问题处理台</Typography.Text>
|
||||
<Typography.Text type="secondary">先回答客户问题,再下钻到车辆、轨迹、统计和证据。</Typography.Text>
|
||||
</div>
|
||||
<Tag color="blue">车辆服务优先</Tag>
|
||||
</div>
|
||||
<Typography.Text type="secondary" className="vp-customer-problem-principle">
|
||||
客户首先关心的是车辆、位置、时间、里程、告警和导出;GB32960、JT808、MQTT 只放在证据层。
|
||||
</Typography.Text>
|
||||
<div className="vp-customer-problem-grid">
|
||||
{customerProblemDesk.map((item) => (
|
||||
<button
|
||||
key={item.question}
|
||||
type="button"
|
||||
className="vp-customer-problem-item"
|
||||
onClick={item.onClick}
|
||||
aria-label={`客户问题处理台 ${item.question} ${item.action}`}
|
||||
>
|
||||
<div>
|
||||
<strong>{item.question}</strong>
|
||||
<span>{item.answer}</span>
|
||||
</div>
|
||||
<Tag color={item.color}>{item.metric}</Tag>
|
||||
<em>{item.action}</em>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="vp-fleet-monitor-panel-head">
|
||||
<Typography.Text strong>今日先处理</Typography.Text>
|
||||
<Button size="small" theme="light" type="primary" onClick={copyCustomerServiceGuide}>复制说明</Button>
|
||||
|
||||
Reference in New Issue
Block a user