feat(platform): expose amap service capabilities

This commit is contained in:
lingniu
2026-07-05 23:35:13 +08:00
parent 2e6d62c493
commit 07336e08bc
3 changed files with 102 additions and 0 deletions

View File

@@ -1665,6 +1665,32 @@ export function Dashboard({
onClick: openTimeMonitorRaw
}
];
const amapCapabilityItems = [
{
label: '实时底图',
value: amapConfigured ? '可用' : '降级',
detail: amapConfigured ? '车辆在线分布、最后位置和地图选车可直接使用高德底图。' : '未配置 Web JS Key 时保留坐标预览。',
color: amapConfigured ? 'green' as const : 'orange' as const
},
{
label: '轨迹路径',
value: amapConfigured ? '可回放' : '坐标线',
detail: amapConfigured ? '轨迹回放可叠加道路底图,辅助判断停留、绕行和断点。' : '缺少底图时只展示历史坐标证据。',
color: amapConfigured ? 'green' as const : 'orange' as const
},
{
label: '区域围栏',
value: amapApiConfigured ? '可扩展' : '待接入',
detail: amapApiConfigured ? '服务端 API 可承接围栏、区域、路线和位置服务扩展。' : '围栏和区域能力需要服务端地图 API。',
color: amapApiConfigured ? 'blue' as const : 'orange' as const
},
{
label: '地址解析',
value: amapSecurityProxyEnabled ? '代理可用' : '待代理',
detail: amapSecurityProxyEnabled ? '逆地理和路线请求可通过安全代理收敛密钥。' : '生产环境建议通过 /_AMapService 代理服务端能力。',
color: amapSecurityProxyEnabled ? 'green' as const : 'orange' as const
}
];
const customerQuestionActions = [
{
question: '这辆车现在在哪里?',
@@ -2676,6 +2702,21 @@ export function Dashboard({
<Typography.Text type="secondary">
32960808MQTT
</Typography.Text>
<div className="vp-amap-capability-list" aria-label="地图服务能力清单">
<div className="vp-amap-capability-head">
<strong></strong>
<span> Web JS API 使</span>
</div>
<div className="vp-amap-capability-grid">
{amapCapabilityItems.map((item) => (
<div key={item.label} className="vp-amap-capability-item">
<Tag color={item.color}>{item.label}</Tag>
<strong>{item.value}</strong>
<span>{item.detail}</span>
</div>
))}
</div>
</div>
</div>
<div className="vp-amap-service-foundation-grid">
{amapVehicleServiceItems.map((item) => (