feat(platform): surface amap operations shortcuts

This commit is contained in:
lingniu
2026-07-04 13:12:44 +08:00
parent 2cff1637ae
commit 47dfd18462
2 changed files with 39 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import {
import type { ReactNode } from 'react';
import { useState } from 'react';
import type { VehicleSourceConsistency, VehicleServiceStatus } from '../api/types';
import { isAMapConfigured } from '../config/appConfig';
export type PageKey = 'dashboard' | 'vehicles' | 'realtime' | 'detail' | 'history' | 'mileage' | 'quality';
@@ -53,6 +54,7 @@ export function AppShell({
}) {
const [keyword, setKeyword] = useState('');
const [searching, setSearching] = useState(false);
const amapConfigured = isAMapConfigured();
const search = () => {
const value = keyword.trim();
@@ -106,6 +108,9 @@ export function AppShell({
) : null}
<Tag color="blue"></Tag>
<Tag color="grey"> / </Tag>
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '地图就绪' : '地图待配置'}</Tag>
<Button size="small" onClick={() => onChange('realtime')}></Button>
<Button size="small" onClick={() => onChange('history')}></Button>
<Button size="small" className={linkHealthClassName(linkIssueCount)} onClick={() => onChange('quality')}>
{linkIssueCount == null ? '链路监控' : linkIssueCount > 0 ? `链路 ${linkIssueCount} 项关注` : '链路正常'}
</Button>