diff --git a/src/layout/AdminLayout.vue b/src/layout/AdminLayout.vue index d3b8dbc..bced570 100644 --- a/src/layout/AdminLayout.vue +++ b/src/layout/AdminLayout.vue @@ -1,13 +1,13 @@ diff --git a/src/router/index.js b/src/router/index.js index 88aea92..eb047b8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -16,7 +16,8 @@ const router = createRouter({ { path: '/login', name: 'Login', - component: () => import('../views/login/index.vue') + component: () => import('../views/login/index.vue'), + meta: { title: '登录' } }, { path: '/screen', @@ -36,168 +37,257 @@ const router = createRouter({ { path: 'dashboard', name: 'Dashboard', - component: () => import('../views/dashboard/index.vue') + component: () => import('../views/dashboard/index.vue'), + meta: { title: '控制台', icon: 'HomeFilled' } }, + // 系统管理 { - path: 'system/users', - name: 'UserManagement', - component: () => import('../views/system/users/index.vue') + path: 'system', + name: 'System', + meta: { title: '系统管理', icon: 'Setting' }, + redirect: '/system/users', + children: [ + { + path: 'users', + name: 'UserManagement', + component: () => import('../views/system/users/index.vue'), + meta: { title: '用户管理' } + }, + { + path: 'roles', + name: 'RoleManagement', + component: () => import('../views/system/roles/index.vue'), + meta: { title: '角色管理' } + }, + { + path: 'permissions', + name: 'PermissionManagement', + component: () => import('../views/system/permissions/index.vue'), + meta: { title: '权限管理' } + }, + { + path: 'settings', + name: 'SystemSettings', + component: () => import('../views/system/settings/index.vue'), + meta: { title: '系统设置' } + }, + { + path: 'logs', + name: 'SystemLogs', + component: () => import('../views/system/logs/index.vue'), + meta: { title: '系统日志' } + }, + { + path: 'data', + name: 'DataManagement', + component: () => import('@/views/system/data/index.vue'), + meta: { title: '数据管理' } + }, + { + path: 'carousel', + name: 'SystemCarousel', + component: () => import('../views/system/carousel/index.vue'), + meta: { title: '轮播图管理' } + } + ] }, + // 监测管理 { - path: 'system/roles', - name: 'RoleManagement', - component: () => import('../views/system/roles/index.vue') + path: 'monitor', + name: 'Monitor', + meta: { title: '监测管理', icon: 'DataAnalysis' }, + redirect: '/monitor/species', + children: [ + { + path: 'species', + name: 'SpeciesMonitor', + component: () => import('../views/monitor/species/index.vue'), + meta: { title: '物种监测' } + }, + { + path: 'environment', + name: 'EnvironmentMonitor', + component: () => import('../views/monitor/environment/index.vue'), + meta: { title: '环境监测' } + }, + { + path: 'observations', + name: 'ObservationsMonitor', + component: () => import('../views/monitor/observations/index.vue'), + meta: { title: '观测管理' } + } + ] }, + // 巡护管理 { - path: 'system/permissions', - name: 'PermissionManagement', - component: () => import('../views/system/permissions/index.vue') + path: 'patrol', + name: 'Patrol', + meta: { title: '巡护管理', icon: 'Location' }, + redirect: '/patrol/plans', + children: [ + { + path: 'plans', + name: 'PatrolPlans', + component: () => import('../views/patrol/plans/index.vue'), + meta: { title: '巡护计划' } + }, + { + path: 'tasks', + name: 'PatrolTasks', + component: () => import('../views/patrol/tasks/index.vue'), + meta: { title: '巡护任务' } + }, + { + path: 'records', + name: 'PatrolRecords', + component: () => import('../views/patrol/records/index.vue'), + meta: { title: '巡护记录' } + }, + { + path: 'events', + name: 'PatrolEvents', + component: () => import('../views/patrol/events/index.vue'), + meta: { title: '安防事件' } + } + ] }, + // AI巡护 { - path: 'monitor/species', - name: 'SpeciesMonitor', - component: () => import('../views/monitor/species/index.vue') + path: 'AIPatrol', + name: 'AIPatrol', + meta: { title: 'AI巡护', icon: 'Monitor' }, + redirect: '/AIPatrol/camera', + children: [ + { + path: 'camera', + name: 'CameraManagement', + component: () => import('../views/AIPatrol/Camera/index.vue'), + meta: { title: '摄像头管理' } + }, + { + path: 'sensor', + name: 'SensorManagement', + component: () => import('../views/AIPatrol/sensor/index.vue'), + meta: { title: '传感器管理' } + }, + { + path: 'drone', + name: 'DroneManagement', + component: () => import('../views/AIPatrol/drone/index.vue'), + meta: { title: '无人机管理' } + } + ] }, + // 报告管理 { - path: 'monitor/environment', - name: 'EnvironmentMonitor', - component: () => import('../views/monitor/environment/index.vue') + path: 'report', + name: 'Report', + meta: { title: '报告管理', icon: 'Document' }, + redirect: '/report/daily', + children: [ + { + path: 'daily', + name: 'DailyReports', + component: () => import('../views/report/daily/index.vue'), + meta: { title: '报告管理' } + }, + { + path: 'reportTemplates', + name: 'ReportTemplates', + component: () => import('../views/report/reportTemplates/index.vue'), + meta: { title: '报告模板' } + }, + { + path: 'analysis', + name: 'AnalysisReports', + component: () => import('../views/report/analysis/index.vue'), + meta: { title: '分析报告' } + } + ] }, + // 活动管理 { - path: 'monitor/observations', - name: 'ObservationsMonitor', - component: () => import('../views/monitor/observations/index.vue') + path: 'activity', + name: 'Activity', + meta: { title: '活动管理', icon: 'Collection' }, + redirect: '/activity/study', + children: [ + { + path: 'study', + name: 'StudyManagement', + component: () => import('../views/activity/study/index.vue'), + meta: { title: '研学管理' } + }, + { + path: 'knowledge', + name: 'KnowledgeManagement', + component: () => import('../views/activity/knowledge/index.vue'), + meta: { title: '知识库管理' } + } + ] }, + // 课程管理 { - path: 'patrol/tasks', - name: 'PatrolTasks', - component: () => import('../views/patrol/tasks/index.vue') + path: 'course', + name: 'Course', + meta: { title: '课程管理', icon: 'DataLine' }, + redirect: '/course/index', + children: [ + { + path: 'index', + name: 'CourseManagement', + component: () => import('../views/course/index.vue'), + meta: { title: '课程管理' } + }, + { + path: 'application', + name: 'CourseApplication', + component: () => import('../views/course/Application.vue'), + meta: { title: '报名管理' } + } + ] }, + // 用户反馈 { - path: 'patrol/events', - name: 'PatrolEvents', - component: () => import('../views/patrol/events/index.vue') + path: 'feedback', + name: 'Feedback', + meta: { title: '用户反馈', icon: 'ChatLineRound' }, + redirect: '/feedback/suggestions', + children: [ + { + path: 'suggestions', + name: 'FeedbackSuggestions', + component: () => import('../views/feedback/suggestions/index.vue'), + meta: { title: '意见反馈' } + }, + { + path: 'satisfaction', + name: 'FeedbackSatisfaction', + component: () => import('../views/feedback/satisfaction/index.vue'), + meta: { title: '满意度调查' } + } + ] }, + // 关于我们 { - path: 'patrol/plans', - name: 'PatrolPlans', - component: () => import('../views/patrol/plans/index.vue') - }, - { - path: 'patrol/records', - name: 'PatrolRecords', - component: () => import('../views/patrol/records/index.vue') - }, - { - path: 'patrol/points', - name: 'PatrolPoints', - component: () => import('../views/patrol/points/index.vue'), - }, - { - path: 'report/daily', - name: 'DailyReports', - component: () => import('../views/report/daily/index.vue') - }, - { - path: 'report/reportTemplates', - name: 'ReportTemplates', - component: () => import('../views/report/reportTemplates/index.vue') - }, - { - path: 'report/analysis', - name: 'AnalysisReports', - component: () => import('../views/report/analysis/index.vue') - }, - { - path: 'report/about', - name: 'ProjectAbout', - component: () => import('../views/report/about/index.vue') - }, - { - path: 'system/settings', - name: 'SystemSettings', - component: () => import('../views/system/settings/index.vue') - }, - { - path: 'system/logs', - name: 'SystemLogs', - component: () => import('../views/system/logs/index.vue') - }, - { - path: 'system/data', - name: 'DataManagement', - component: () => import('@/views/system/data/index.vue'), - meta: { title: '数据管理', icon: 'data' } - }, - { - path: 'system/carousel', - name: 'SystemCarousel', - component: () => import('../views/system/carousel/index.vue'), - meta: { title: '轮播图管理', icon: 'picture' } - }, - { - path: 'course/index', - name: 'CourseManagement', - component: () => import('../views/course/index.vue'), - meta: { title: '课程管理', icon: 'reading' } - }, - { - path: 'course/application', - name: 'CourseApplication', - component: () => import('../views/course/Application.vue') - }, - { - path: 'activity/study', - name: 'StudyManagement', - component: () => import('../views/activity/study/index.vue') - }, - { - path: 'activity/knowledge', - name: 'KnowledgeManagement', - component: () => import('../views/activity/knowledge/index.vue') - }, - { - path: 'AIPatrol/sensor', - name: 'SensorManagement', - component: () => import('../views/AIPatrol/sensor/index.vue') - }, - { - path: 'AIPatrol/camera', - name: 'CameraManagement', - component: () => import('../views/AIPatrol/Camera/index.vue') - }, - { - path: 'AIPatrol/drone', - name: 'DroneManagement', - component: () => import('../views/AIPatrol/drone/index.vue') - }, - { - path: 'feedback/suggestions', - name: 'FeedbackSuggestions', - component: () => import('../views/feedback/suggestions/index.vue') - }, - { - path: 'feedback/satisfaction', - name: 'FeedbackSatisfaction', - component: () => import('../views/feedback/satisfaction/index.vue') - }, - { - path: 'data', - name: 'SystemData', - component: () => import('@/views/system/data/index.vue'), - meta: { title: '数据管理', icon: 'data' } - }, - { - path: 'about/projects', - name: 'Projects', - component: () => import('@/views/about/projects/index.vue'), - meta: { title: '项目简介', icon: 'data' } - }, - { - path: 'about/needToKnow', - name: 'NeedToKnow', - component: () => import('@/views/about/needToKnow/index.vue'), - meta: { title: '游园需知', icon: 'data' } + path: 'about', + name: 'About', + meta: { title: '关于我们', icon: 'InfoFilled' }, + redirect: '/about/projects', + children: [ + { + path: 'projects', + name: 'Projects', + component: () => import('@/views/about/projects/index.vue'), + meta: { title: '项目简介' } + }, + { + path: 'needToKnow', + name: 'NeedToKnow', + component: () => import('@/views/about/needToKnow/index.vue'), + meta: { title: '游园需知' } + } + ] } ] }