2025-07-09 22:44:18 +08:00
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
|
|
|
import Layout from '@/layout/index.vue'
|
|
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
|
{
|
|
|
|
|
path: '/login',
|
|
|
|
|
name: 'Login',
|
2025-07-10 10:02:51 +08:00
|
|
|
component: () => import('@/views/login/index.vue'),
|
|
|
|
|
meta: { title: '用户登录' }
|
2025-07-09 22:44:18 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
|
|
|
|
component: Layout,
|
|
|
|
|
redirect: '/dashboard',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'dashboard',
|
|
|
|
|
name: 'Dashboard',
|
|
|
|
|
component: () => import('@/views/dashboard/index.vue'),
|
|
|
|
|
meta: { title: '控制台' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'servers',
|
|
|
|
|
name: 'Servers',
|
|
|
|
|
component: () => import('@/views/servers/index.vue'),
|
|
|
|
|
meta: { title: '服务器管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'scripts',
|
|
|
|
|
name: 'Scripts',
|
|
|
|
|
component: () => import('@/views/scripts/index.vue'),
|
|
|
|
|
meta: { title: '脚本管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'execute',
|
|
|
|
|
name: 'Execute',
|
|
|
|
|
component: () => import('@/views/execute/index.vue'),
|
|
|
|
|
meta: { title: '批量执行' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'users',
|
|
|
|
|
name: 'Users',
|
|
|
|
|
component: () => import('@/views/users/index.vue'),
|
|
|
|
|
meta: { title: '用户管理' }
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
2025-07-10 10:02:51 +08:00
|
|
|
const router = createRouter({
|
2025-07-09 22:44:18 +08:00
|
|
|
history: createWebHistory(),
|
|
|
|
|
routes
|
2025-07-10 10:02:51 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default router
|