修改检测脚本新增页面路由权限
This commit is contained in:
@@ -1,138 +1,139 @@
|
|||||||
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,
|
|
||||||
name: "login",
|
|
||||||
component: () => import("@/views/login/index.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "登录",
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
path: LOGIN_URL,
|
||||||
path: "/layout",
|
name: 'login',
|
||||||
name: "layout",
|
component: () => import('@/views/login/index.vue'),
|
||||||
component: Layout,
|
meta: {
|
||||||
children: [
|
title: '登录'
|
||||||
{
|
}
|
||||||
path: "/plan",
|
},
|
||||||
name: "plan",
|
{
|
||||||
redirect: "/plan/planList",
|
path: '/layout',
|
||||||
|
name: 'layout',
|
||||||
|
component: Layout,
|
||||||
children: [
|
children: [
|
||||||
// {
|
{
|
||||||
// path: "/plan/planList",
|
path: '/plan',
|
||||||
// name: "planList",
|
name: 'plan',
|
||||||
// component: () => import("@/views/plan/planList/index.vue"),
|
redirect: '/plan/planList',
|
||||||
// meta: {
|
children: [
|
||||||
// title: "检测计划列表",
|
// {
|
||||||
// icon: "List",
|
// path: "/plan/planList",
|
||||||
// isLink: "",
|
// name: "planList",
|
||||||
// isHide: false,
|
// component: () => import("@/views/plan/planList/index.vue"),
|
||||||
// isFull: false,
|
// meta: {
|
||||||
// isAffix: false,
|
// title: "检测计划列表",
|
||||||
// isKeepAlive: true,//缓存改成true
|
// icon: "List",
|
||||||
// },
|
// isLink: "",
|
||||||
// },
|
// isHide: false,
|
||||||
// {
|
// isFull: false,
|
||||||
// path: "/plan/singlePlanList",
|
// isAffix: false,
|
||||||
// name: "singlePlanList",
|
// isKeepAlive: true,//缓存改成true
|
||||||
// component: () => import("@/views/plan/singlePlanList/index.vue"),
|
// },
|
||||||
// meta: {
|
// },
|
||||||
// title: "单个计划列表",
|
// {
|
||||||
// icon: "List",
|
// path: "/plan/singlePlanList",
|
||||||
// isLink: "",
|
// name: "singlePlanList",
|
||||||
// isHide: false,
|
// component: () => import("@/views/plan/singlePlanList/index.vue"),
|
||||||
// isFull: false,
|
// meta: {
|
||||||
// isAffix: false,
|
// title: "单个计划列表",
|
||||||
// isKeepAlive: true,
|
// icon: "List",
|
||||||
// },
|
// isLink: "",
|
||||||
// },
|
// isHide: false,
|
||||||
// {
|
// isFull: false,
|
||||||
// path: "/plan/preTest",
|
// isAffix: false,
|
||||||
// name: "preTest",
|
// isKeepAlive: true,
|
||||||
// component: () => import("@/views/plan/preTest/index.vue"),
|
// },
|
||||||
// meta: {
|
// },
|
||||||
// title: "预检测",
|
// {
|
||||||
// icon: "List",
|
// path: "/plan/preTest",
|
||||||
// isLink: "",
|
// name: "preTest",
|
||||||
// isHide: false,
|
// component: () => import("@/views/plan/preTest/index.vue"),
|
||||||
// isFull: false,
|
// meta: {
|
||||||
// isAffix: false,
|
// title: "预检测",
|
||||||
// isKeepAlive: false,
|
// icon: "List",
|
||||||
// },
|
// isLink: "",
|
||||||
// },
|
// isHide: false,
|
||||||
// {
|
// isFull: false,
|
||||||
// path: "/plan/autoTest",
|
// isAffix: false,
|
||||||
// name: "autoTest",
|
// isKeepAlive: false,
|
||||||
// component: () => import("@/views/plan/autoTest/index.vue"),
|
// },
|
||||||
// meta: {
|
// },
|
||||||
// title: "自动检测",
|
// {
|
||||||
// icon: "List",
|
// path: "/plan/autoTest",
|
||||||
// isLink: "",
|
// name: "autoTest",
|
||||||
// hideTab:true,
|
// component: () => import("@/views/plan/autoTest/index.vue"),
|
||||||
// parentPath:'/system/proTable',
|
// meta: {
|
||||||
// isHide: false,
|
// title: "自动检测",
|
||||||
// isFull: false,
|
// icon: "List",
|
||||||
// isAffix: false,
|
// isLink: "",
|
||||||
// isKeepAlive: true,
|
// hideTab:true,
|
||||||
// },
|
// parentPath:'/system/proTable',
|
||||||
// },
|
// isHide: false,
|
||||||
{
|
// isFull: false,
|
||||||
path: "/machine/testScriptAdd",
|
// isAffix: false,
|
||||||
name: "testScriptAdd",
|
// isKeepAlive: true,
|
||||||
component: () => import("@/views/machine/testScript/components/testScriptPopup.vue"),
|
// },
|
||||||
meta: {
|
// },
|
||||||
title: "检测脚本配置",
|
|
||||||
icon: "List",
|
// 错误页面路由
|
||||||
isLink: "",
|
{
|
||||||
hideTab:true,
|
path: '/403',
|
||||||
parentPath:'/machine/testScript',
|
name: '403',
|
||||||
isHide: false,
|
component: () => import('@/components/ErrorMessage/403.vue'),
|
||||||
isFull: false,
|
meta: {
|
||||||
isAffix: false,
|
title: '403页面'
|
||||||
isKeepAlive: true,
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/404',
|
||||||
|
name: '404',
|
||||||
|
component: () => import('@/components/ErrorMessage/404.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '404页面'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/500',
|
||||||
|
name: '500',
|
||||||
|
component: () => import('@/components/ErrorMessage/500.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '500页面'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// Resolve refresh page, route warnings
|
||||||
|
{
|
||||||
|
path: '/:pathMatch(.*)*',
|
||||||
|
component: () => import('@/components/ErrorMessage/404.vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
// 错误页面路由
|
path: '/machine/testScriptAdd',
|
||||||
{
|
name: 'testScriptAdd',
|
||||||
path: "/403",
|
component: () => import('@/views/machine/testScript/components/testScriptPopup.vue'),
|
||||||
name: "403",
|
meta: {
|
||||||
component: () => import("@/components/ErrorMessage/403.vue"),
|
title: '检测脚本配置',
|
||||||
meta: {
|
icon: 'List',
|
||||||
title: "403页面",
|
isLink: '',
|
||||||
},
|
hideTab: true,
|
||||||
},
|
parentPath: '/machine/testScript',
|
||||||
{
|
isHide: false,
|
||||||
path: "/404",
|
isFull: false,
|
||||||
name: "404",
|
isAffix: false,
|
||||||
component: () => import("@/components/ErrorMessage/404.vue"),
|
isKeepAlive: true
|
||||||
meta: {
|
}
|
||||||
title: "404页面",
|
}
|
||||||
},
|
]
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
path: "/500",
|
|
||||||
name: "500",
|
|
||||||
component: () => import("@/components/ErrorMessage/500.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "500页面",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Resolve refresh page, route warnings
|
|
||||||
{
|
|
||||||
path: "/:pathMatch(.*)*",
|
|
||||||
component: () => import("@/components/ErrorMessage/404.vue"),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|||||||
Reference in New Issue
Block a user