修改检测脚本新增页面路由权限

This commit is contained in:
GGJ
2025-02-18 08:51:20 +08:00
parent 6db4d79839
commit f860630bfb

View File

@@ -1,31 +1,31 @@
import { RouteRecordRaw } from "vue-router"; import { RouteRecordRaw } from 'vue-router'
import { HOME_URL, LOGIN_URL } from "@/config"; import { HOME_URL, LOGIN_URL } from '@/config'
export const Layout = () => import('@/layouts/index.vue'); export const Layout = () => import('@/layouts/index.vue')
/** /**
* staticRouter (静态路由) * staticRouter (静态路由)
*/ */
export const staticRouter: RouteRecordRaw[] = [ export const staticRouter: RouteRecordRaw[] = [
{ {
path: "/", path: '/',
redirect: HOME_URL, redirect: HOME_URL
}, },
{ {
path: LOGIN_URL, path: LOGIN_URL,
name: "login", name: 'login',
component: () => import("@/views/login/index.vue"), component: () => import('@/views/login/index.vue'),
meta: { meta: {
title: "登录", title: '登录'
}, }
}, },
{ {
path: "/layout", path: '/layout',
name: "layout", name: 'layout',
component: Layout, component: Layout,
children: [ children: [
{ {
path: "/plan", path: '/plan',
name: "plan", name: 'plan',
redirect: "/plan/planList", redirect: '/plan/planList',
children: [ children: [
// { // {
// path: "/plan/planList", // path: "/plan/planList",
@@ -85,54 +85,55 @@ export const staticRouter: RouteRecordRaw[] = [
// isKeepAlive: true, // isKeepAlive: true,
// }, // },
// }, // },
{
path: "/machine/testScriptAdd",
name: "testScriptAdd",
component: () => import("@/views/machine/testScript/components/testScriptPopup.vue"),
meta: {
title: "检测脚本配置",
icon: "List",
isLink: "",
hideTab:true,
parentPath:'/machine/testScript',
isHide: false,
isFull: false,
isAffix: false,
isKeepAlive: true,
},
},
// 错误页面路由 // 错误页面路由
{ {
path: "/403", path: '/403',
name: "403", name: '403',
component: () => import("@/components/ErrorMessage/403.vue"), component: () => import('@/components/ErrorMessage/403.vue'),
meta: { meta: {
title: "403页面", title: '403页面'
}, }
}, },
{ {
path: "/404", path: '/404',
name: "404", name: '404',
component: () => import("@/components/ErrorMessage/404.vue"), component: () => import('@/components/ErrorMessage/404.vue'),
meta: { meta: {
title: "404页面", title: '404页面'
}, }
}, },
{ {
path: "/500", path: '/500',
name: "500", name: '500',
component: () => import("@/components/ErrorMessage/500.vue"), component: () => import('@/components/ErrorMessage/500.vue'),
meta: { meta: {
title: "500页面", title: '500页面'
}, }
}, },
// Resolve refresh page, route warnings // Resolve refresh page, route warnings
{ {
path: "/:pathMatch(.*)*", path: '/:pathMatch(.*)*',
component: () => import("@/components/ErrorMessage/404.vue"), component: () => import('@/components/ErrorMessage/404.vue')
},
],
} }
], ]
}, },
]; {
path: '/machine/testScriptAdd',
name: 'testScriptAdd',
component: () => import('@/views/machine/testScript/components/testScriptPopup.vue'),
meta: {
title: '检测脚本配置',
icon: 'List',
isLink: '',
hideTab: true,
parentPath: '/machine/testScript',
isHide: false,
isFull: false,
isAffix: false,
isKeepAlive: true
}
}
]
}
]