优化小车卡片界面和车队编队的功能,优化首页菜单的快捷入口功能
This commit is contained in:
@@ -107,10 +107,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import {
|
||||
Fold, Expand, CaretBottom, Monitor, Setting, Histogram, Tools,
|
||||
MapLocation, Van, Promotion, Notebook
|
||||
} from '@element-plus/icons-vue'
|
||||
import { Fold, Expand, CaretBottom } from '@element-plus/icons-vue'
|
||||
import { ADMIN_MENU, MONITOR_MENU, type NavMenuItem } from '@/config/navMenu'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useUiStore } from '@/stores/ui'
|
||||
import ScopeSwitcher from '@/components/ScopeSwitcher.vue'
|
||||
@@ -139,45 +137,7 @@ const runModeLabel = computed(() => {
|
||||
|
||||
// key 即「权限页面 Key」(= vue-router route.name),用于按 auth.allowedPages 过滤菜单。
|
||||
// 分组节点(无 key)只要还有可见子项就保留。
|
||||
interface MenuItem { path: string; label: string; icon?: unknown; key?: string; children?: MenuItem[] }
|
||||
|
||||
const ADMIN_MENU: MenuItem[] = [
|
||||
{ path: '/admin/dashboard', label: '总览', icon: Histogram, key: 'admin-dashboard' },
|
||||
{ path: '/admin/map-monitor', label: '地图监控', icon: MapLocation, key: 'admin-map-monitor' },
|
||||
{
|
||||
path: '/admin/design', label: '设计与编排', icon: Tools,
|
||||
children: [
|
||||
{ path: '/admin/maps', label: '地图管理', key: 'admin-maps' },
|
||||
{ path: '/admin/map-editor', label: '地图编辑', key: 'admin-map-editor' },
|
||||
{ path: '/admin/project-properties', label: '项目属性', key: 'admin-project-properties' },
|
||||
{ path: '/admin/tracks', label: '场景管理', key: 'admin-tracks' },
|
||||
{ path: '/admin/cars', label: '车辆管理', key: 'admin-cars' },
|
||||
{ path: '/admin/processes', label: '进程管理', key: 'admin-processes' },
|
||||
{ path: '/admin/scripts', label: '脚本管理', key: 'admin-scripts' },
|
||||
{ path: '/admin/task-templates', label: '任务编排', key: 'admin-task-templates' },
|
||||
{ path: '/admin/simple-fields', label: '字段管理', key: 'admin-simple-fields' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/admin/config', label: '平台配置中心', icon: Setting,
|
||||
children: [
|
||||
{ path: '/admin/config/strategy', label: '调度策略', key: 'admin-config-strategy' },
|
||||
{ path: '/admin/config/vehicle-hub', label: '车辆运维', key: 'admin-vehicle-hub' },
|
||||
{ path: '/admin/config/facility', label: '设备与库位', key: 'admin-config-facility' },
|
||||
{ path: '/admin/config/business', label: '业务与集成', key: 'admin-config-business' },
|
||||
{ path: '/admin/config/ops-center', label: '运维与回放', key: 'admin-config-ops-center' },
|
||||
{ path: '/admin/config/system-center', label: '系统与权限', key: 'admin-config-system-center' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const MONITOR_MENU: MenuItem[] = [
|
||||
{ path: '/monitor/dashboard', label: '运营总览', icon: Monitor, key: 'monitor-dashboard' },
|
||||
{ path: '/monitor/vehicle-hub', label: '车辆运维', icon: Van, key: 'monitor-vehicle-hub' },
|
||||
{ path: '/monitor/map', label: '地图监控', icon: MapLocation, key: 'monitor-map' },
|
||||
{ path: '/monitor/ops', label: '运维操作', icon: Promotion, key: 'monitor-ops' },
|
||||
{ path: '/monitor/notes', label: '运营备注', icon: Notebook, key: 'monitor-notes' }
|
||||
]
|
||||
type MenuItem = NavMenuItem
|
||||
|
||||
function filterMenu(items: MenuItem[]): MenuItem[] {
|
||||
const out: MenuItem[] = []
|
||||
|
||||
Reference in New Issue
Block a user