2025-03-05 23:13:24 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
|
|
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
|
|
|
|
name: 'welcome',
|
2025-03-14 23:48:59 +08:00
|
|
|
component: function () {
|
|
|
|
|
return import('../views/login.vue')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/role-config',
|
|
|
|
|
name: 'RoleConfig',
|
|
|
|
|
component: function () {
|
|
|
|
|
return import('../views/roleConfig.vue')
|
|
|
|
|
}
|
2025-03-05 23:13:24 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/login',
|
|
|
|
|
name: 'login',
|
|
|
|
|
component: function () {
|
2025-03-14 23:48:59 +08:00
|
|
|
return import('../views/login.vue')
|
2025-03-05 23:13:24 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/home',
|
|
|
|
|
name: 'home',
|
|
|
|
|
component: function () {
|
2025-03-14 23:48:59 +08:00
|
|
|
return import('../views/home.vue')
|
2025-03-05 23:13:24 +08:00
|
|
|
}
|
2025-03-12 13:38:44 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/register',
|
|
|
|
|
name: 'Register',
|
|
|
|
|
component: function () {
|
2025-03-14 23:48:59 +08:00
|
|
|
return import('../views/register.vue')
|
2025-03-12 13:38:44 +08:00
|
|
|
}
|
|
|
|
|
},
|
2025-03-20 14:08:38 +08:00
|
|
|
// 设备管理页面路由
|
2025-03-18 21:49:57 +08:00
|
|
|
{
|
|
|
|
|
path: '/device-management',
|
|
|
|
|
name: 'DeviceManagement',
|
|
|
|
|
component: function () {
|
|
|
|
|
return import('../views/DeviceManagement.vue')
|
|
|
|
|
}
|
2025-03-20 14:08:38 +08:00
|
|
|
},
|
|
|
|
|
// 添加用户管理路由
|
|
|
|
|
{
|
|
|
|
|
path: '/user-management',
|
|
|
|
|
name: 'UserManagement',
|
|
|
|
|
component: function () {
|
|
|
|
|
return import('../views/UserManagement.vue')
|
|
|
|
|
}
|
2025-03-20 18:11:37 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/model-config',
|
|
|
|
|
name: 'ModelConfig',
|
|
|
|
|
component: function () {
|
|
|
|
|
return import('../views/ModelConfig.vue')
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-03-18 21:49:57 +08:00
|
|
|
|
2025-03-05 23:13:24 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
|
routes
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default router
|