物联网问题解决,只差最后测试完善
This commit is contained in:
@@ -5,17 +5,6 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '',
|
||||
redirect: '/login',
|
||||
component: LayoutIndex,
|
||||
meta: {
|
||||
title: '登录',
|
||||
keepAlive: true,
|
||||
requireAuth: false,
|
||||
component: () => import('~/views/login.vue'),
|
||||
},
|
||||
children: [
|
||||
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
@@ -48,7 +37,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
],
|
||||
},
|
||||
// 添加对/system/post路径的处理
|
||||
// 系统管理路由
|
||||
{
|
||||
path: '/system',
|
||||
component: LayoutIndex,
|
||||
@@ -59,7 +48,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'post',
|
||||
path: '/system/post',
|
||||
name: 'Post',
|
||||
meta: {
|
||||
title: '岗位管理',
|
||||
@@ -68,6 +57,26 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
component: () => import('~/views/system/post.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/staff',
|
||||
name: 'Staff',
|
||||
meta: {
|
||||
title: '员工管理',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
component: () => import('~/views/system/staff.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/tenant',
|
||||
name: 'Tenant',
|
||||
meta: {
|
||||
title: '租户管理',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
component: () => import('~/views/system/tenant.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
// 权限管理路由
|
||||
@@ -81,7 +90,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu',
|
||||
path: '/permission/menu',
|
||||
name: 'MenuPermission',
|
||||
meta: {
|
||||
title: '菜单权限管理',
|
||||
@@ -91,7 +100,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
component: () => import('~/views/permission/menuPermission.vue'),
|
||||
},
|
||||
{
|
||||
path: 'operation',
|
||||
path: '/permission/operation',
|
||||
name: 'OperationPermission',
|
||||
meta: {
|
||||
title: '操作权限管理',
|
||||
@@ -113,7 +122,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'collar',
|
||||
path: '/hardware/collar',
|
||||
name: 'Collar',
|
||||
meta: {
|
||||
title: '智能项圈',
|
||||
@@ -123,7 +132,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
component: () => import('~/views/hardware/collar.vue'),
|
||||
},
|
||||
{
|
||||
path: 'eartag',
|
||||
path: '/hardware/eartag',
|
||||
name: 'Eartag',
|
||||
meta: {
|
||||
title: '智能耳标',
|
||||
@@ -133,7 +142,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
component: () => import('~/views/hardware/eartag.vue'),
|
||||
},
|
||||
{
|
||||
path: 'host',
|
||||
path: '/hardware/host',
|
||||
name: 'Host',
|
||||
meta: {
|
||||
title: '智能主机',
|
||||
@@ -144,6 +153,60 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
],
|
||||
},
|
||||
// 用户管理路由
|
||||
{
|
||||
path: '/userManage',
|
||||
component: LayoutIndex,
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/userManage/user',
|
||||
name: 'UserManage',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
component: () => import('~/views/userManage/user.vue'),
|
||||
},
|
||||
{
|
||||
path: '/userManage/driver',
|
||||
name: 'DriverManage',
|
||||
meta: {
|
||||
title: '司机管理',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
component: () => import('~/views/userManage/driver.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
// 早期预警路由
|
||||
{
|
||||
path: '/earlywarning',
|
||||
component: LayoutIndex,
|
||||
meta: {
|
||||
title: '早期预警',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/earlywarning/earlywarninglist',
|
||||
name: 'EarlyWarningList',
|
||||
meta: {
|
||||
title: '早期预警列表',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
component: () => import('~/views/earlywarning/list.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
// 运送清单路由
|
||||
{
|
||||
path: '/shipping',
|
||||
@@ -155,7 +218,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'loadingOrder',
|
||||
path: '/shipping/loadingOrder',
|
||||
name: 'LoadingOrder',
|
||||
meta: {
|
||||
title: '装车订单',
|
||||
@@ -164,7 +227,20 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
component: () => import('~/views/shipping/loadingOrder.vue'),
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: '/shipping/shippinglist',
|
||||
name: 'ShippingList',
|
||||
meta: {
|
||||
title: '运送清单',
|
||||
keepAlive: true,
|
||||
requireAuth: true,
|
||||
},
|
||||
component: () => import('~/views/entry/attestation.vue'),
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
];
|
||||
|
||||
@@ -184,7 +260,14 @@ export const dynamicRoutes = [
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: constantRoutes,
|
||||
scrollBehavior: () => ({ behavior: 'auto', left: 0, top: 0 }),
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
// 如果有保存的位置(浏览器前进/后退),使用保存的位置
|
||||
if (savedPosition) {
|
||||
return savedPosition;
|
||||
}
|
||||
// 否则滚动到顶部
|
||||
return { top: 0 };
|
||||
},
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user