下面这个是这样实现的,import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
// import PageView from '@/layouts/PageView'
console.log(process.env.NODE_ENV, '----')
//const groupLink = process.env.NODE_ENV === 'production' ? window.g.groupLink : 'http://10.105.191.35:12024//#/App'
//console.log('groupLink', groupLink)
// 路由配置
const options = {
routes: [
{
path: '/login',
name: '登录页',
component: () => import('@/pages/login')
},
{
path: '*',
name: '404',
component: () => import('@/pages/exception/404')
},
{
path: '/403',
name: '403',
component: () => import('@/pages/exception/403')
},
{
path: '/',
name: '首页',
component: TabsView,
redirect: '/login',
children: [
{
path: 'dashboard',
name: '首页',
component: () => import('@/pages/dashboard/index'),
},
{
path: 'WoManage',
name: '工单管理',
meta: {
authority: {
role: 'WoAdmin'
}
},
component: BlankView,
children: [
{
path: 'search',
name: 'Search',
meta: {
authority: { permission: 'ViewSearch' }
},
component: () => import('@/pages/workorderManage/Search')
},
{
path: 'woList',
name: '工单处理',
meta: {
authority: { permission: 'ViewWorkOrderList' }
},
component: () => import('@/pages/workorderManage/WorkOrderList')
},
{
path: 'woDetail',
name: '工单详情',
meta: {
invisible: true // 不渲染到菜单栏
},
component: () => import('@/pages/workorderManage/WorkOrderDetail')
}
]
},
{
path: 'SysManage',
name: '系统管理',
component: BlankView,
meta: {
authority: {
role: 'SysAdmin'
}
},
children: [
{
path: 'product',
name: '非转贴Product维护',
meta: {
authority: { permission: 'ViewProduct' }
},
component: () => import('@/pages/sysManage/Product')
},
{
path: 'markRule',
name: 'ShenNongMark取值规则维护',
meta: {
authority: { permission: 'ViewMarkRules' }
},
component: () => import('@/pages/sysManage/MarkRules')
},
{
path: 'sjWoVersionConfig',
name: 'AB2升版卡控维护',
meta: {
authority: { permission: 'ViewSjWoVersionConfig' }
},
component: () => import('@/pages/sysManage/SjWoVersionConfig')
}
]
},
{
path: 'DieManage',
name: '配DIE工单管理',
meta: {
authority: {
role: 'DieAdmin'
}
},
component: BlankView,
children: [
{
path: 'productBom',
name: '产品型号BOM',
meta: {
authority: { permission: 'ViewProductBom' }
},
component: () => import('@/pages/dieManage/ProductBom')
},
{
path: 'woInventory',
name: '主料待工单库存',
meta: {
authority: { permission: 'ViewWoInventory' }
},
component: () => import('@/pages/dieManage/WoInventory')
},
{
path: 'topDieInventory',
name: 'TOP DIE库存',
meta: {
authority: { permission: 'ViewTopDieInventory' }
},
component: () => import('@/pages/dieManage/TopDieInventory')
}, {
path: 'dieConfig',
name: 'AB1开单管理',
meta: {
authority: { permission: 'ViewDieConfig' }
},
component: () => import('@/pages/dieManage/DieConfig')
},
{
path: 'createdWoManage',
name: '已创建工单管理',
meta: {
authority: { permission: 'ViewCreatedWoManage' }
},
component: () => import('@/pages/dieManage/CreatedWoManage')
},
{
path: 'assistMaintainInterface',
name: '产品物料维护',
meta: {
invisible: true // 不渲染到菜单栏
},
component: () => import('@/pages/dieManage/AssistMaintainInterface')
},
{
path: 'ingredientBinding',
name: '配料绑定界面',
meta: {
invisible: true // 不渲染到菜单栏
},
component: () => import('@/pages/dieManage/IngredientBinding')
},
{
path: 'woDetails',
name: '工单详情',
meta: {
invisible: true // 不渲染到菜单栏
},
component: () => import('@/pages/dieManage/WoDetails')
}
]
},
{
path: 'SocWoManage',
name: '转贴工单管理',
meta: {
authority: {
role: 'SocAdmin'
}
},
component: BlankView,
children: [
{
path: 'socProductMaintain',
name: '转贴Product维护',
meta: {
authority: { permission: 'ViewSocProduct' }
},
component: () => import('@/pages/socWoManage/SocProductMaintain')
},
{
path: 'socLotInventory',
name: '待转贴Lot库存',
meta: {
authority: { permission: 'ViewSocLotInventory' }
},
component: () => import('@/pages/socWoManage/MesLotInventory')
},
{
path: 'socWoSearch',
name: '转贴工单查询',
meta: {
authority: { permission: 'ViewSocWoSearch' }
},
component: () => import('@/pages/socWoManage/SocWoSearch')
},
{
path: 'multipleRepost',
name: '多次转贴工单维护',
meta: {
authority: { permission: 'ViewMultipleRepost' }
},
component: () => import('@/pages/socWoManage/MuitipleRepost')
}
]
}
]
}
]
}
export default options
最新发布