首页跳转修改

This commit is contained in:
打豆豆 2024-02-21 13:51:58 +08:00
parent 944e108fb0
commit e8c4f22157

View File

@ -61,6 +61,19 @@ export const constantRoutes = [
component: () => import("@/views/error/401"), component: () => import("@/views/error/401"),
hidden: true, hidden: true,
}, },
// {
// path: "",
// component: Layout,
// redirect: "index",
// children: [
// {
// path: "index",
// component: () => import("@/views/index"),
// name: "Index",
// meta: { title: "首页", icon: "dashboard", affix: true },
// },
// ],
// },
{ {
path: "", path: "",
component: Layout, component: Layout,
@ -68,9 +81,9 @@ export const constantRoutes = [
children: [ children: [
{ {
path: "index", path: "index",
component: () => import("@/views/index"), component: () => import("@/views/mes/pro/production/index"),
name: "Index", name: "Index",
meta: { title: "首页", icon: "dashboard", affix: true }, // meta: { title: "首页", icon: "dashboard", affix: true },
}, },
], ],
}, },
@ -180,7 +193,7 @@ export const dynamicRoutes = [
path: "/mes/pro/schedule", path: "/mes/pro/schedule",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['mes:pro:protask:edit'], permissions: ["mes:pro:protask:edit"],
children: [ children: [
{ {
path: "ganttedit", path: "ganttedit",
@ -211,43 +224,43 @@ export const dynamicRoutes = [
permissions: ["tool:gen:edit"], permissions: ["tool:gen:edit"],
children: [ children: [
{ {
path: 'index/:tableId(\\d+)', path: "index/:tableId(\\d+)",
component: () => import('@/views/tool/gen/editTable'), component: () => import("@/views/tool/gen/editTable"),
name: 'GenEdit', name: "GenEdit",
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
} },
] ],
}, },
{ {
path: '/mes/qc/pendinginspect/add', path: "/mes/qc/pendinginspect/add",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['mes:qc:pending'], permissions: ["mes:qc:pending"],
children: [ children: [
{ {
path: 'iqc', path: "iqc",
component: () => import('@/views/mes/qc/pendinginspect/iqc'), component: () => import("@/views/mes/qc/pendinginspect/iqc"),
name: 'iqcadd', name: "iqcadd",
props: true, props: true,
meta: {title: '来料检验', activeMenu: '/mes/qc/pendinginspect/iqc'} meta: { title: "来料检验", activeMenu: "/mes/qc/pendinginspect/iqc" },
}, },
{ {
path: 'pqc', path: "pqc",
component: () => import('@/views/mes/qc/pendinginspect/pqc'), component: () => import("@/views/mes/qc/pendinginspect/pqc"),
name: 'pqcadd', name: "pqcadd",
props: true, props: true,
meta: {title: '过程检验', activeMenu: '/mes/qc/pendinginspect/pqc'} meta: { title: "过程检验", activeMenu: "/mes/qc/pendinginspect/pqc" },
}, },
{ {
path: 'oqc', path: "oqc",
component: () => import('@/views/mes/qc/oqc/index'), component: () => import("@/views/mes/qc/oqc/index"),
name: 'oqcadd', name: "oqcadd",
props: true, props: true,
meta: {title: '出厂检验', activeMenu: '/mes/qc/pendinginspect/oqc'} meta: { title: "出厂检验", activeMenu: "/mes/qc/pendinginspect/oqc" },
} },
] ],
} },
] ];
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
let routerPush = Router.prototype.push; let routerPush = Router.prototype.push;
@ -262,6 +275,6 @@ export default new Router({
}); });
export function resetRouter() { export function resetRouter() {
const newRouter = createRouter() const newRouter = createRouter();
Router.matcher = newRouter.matcher // 重制 router Router.matcher = newRouter.matcher; // 重制 router
} }