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

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 { HOME_URL, LOGIN_URL } from "@/config";
export const Layout = () => import('@/layouts/index.vue');
import { RouteRecordRaw } from 'vue-router'
import { HOME_URL, LOGIN_URL } from '@/config'
export const Layout = () => import('@/layouts/index.vue')
/**
* staticRouter (静态路由)
*/
export const staticRouter: RouteRecordRaw[] = [
{
path: "/",
redirect: HOME_URL,
path: '/',
redirect: HOME_URL
},
{
path: LOGIN_URL,
name: "login",
component: () => import("@/views/login/index.vue"),
name: 'login',
component: () => import('@/views/login/index.vue'),
meta: {
title: "登录",
},
title: '登录'
}
},
{
path: "/layout",
name: "layout",
path: '/layout',
name: 'layout',
component: Layout,
children: [
{
path: "/plan",
name: "plan",
redirect: "/plan/planList",
path: '/plan',
name: 'plan',
redirect: '/plan/planList',
children: [
// {
// path: "/plan/planList",
@@ -85,54 +85,55 @@ export const staticRouter: RouteRecordRaw[] = [
// 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",
name: "403",
component: () => import("@/components/ErrorMessage/403.vue"),
path: '/403',
name: '403',
component: () => import('@/components/ErrorMessage/403.vue'),
meta: {
title: "403页面",
},
title: '403页面'
}
},
{
path: "/404",
name: "404",
component: () => import("@/components/ErrorMessage/404.vue"),
path: '/404',
name: '404',
component: () => import('@/components/ErrorMessage/404.vue'),
meta: {
title: "404页面",
},
title: '404页面'
}
},
{
path: "/500",
name: "500",
component: () => import("@/components/ErrorMessage/500.vue"),
path: '/500',
name: '500',
component: () => import('@/components/ErrorMessage/500.vue'),
meta: {
title: "500页面",
},
title: '500页面'
}
},
// Resolve refresh page, route warnings
{
path: "/:pathMatch(.*)*",
component: () => import("@/components/ErrorMessage/404.vue"),
},
],
path: '/:pathMatch(.*)*',
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
}
}
]
}
]