79 lines
1.6 KiB
JavaScript
79 lines
1.6 KiB
JavaScript
|
|
const FunName = 'BathroomPaint';
|
|
const FunTitle = '油漆管理';
|
|
const InvisibleRouters = 'Detail,Delete,BatchDelete,BatchUpdate,BatchCreate,ExportExcel,LogDetail,LogList,Settings,SettingsUpdate,ImportExcel'.split(',')
|
|
|
|
|
|
// 视图组件
|
|
const view = {
|
|
tabs: () => import('@/layouts/tabs'),
|
|
blank: () => import('@/layouts/BlankView'),
|
|
page: () => import('@/layouts/PageView')
|
|
}
|
|
|
|
// 路由组件注册
|
|
const routerMap = {
|
|
};
|
|
routerMap[FunName]= {
|
|
name: FunTitle,
|
|
icon: 'idcard',
|
|
component: view.blank,
|
|
meta: {
|
|
},
|
|
authority: {
|
|
permission: [],
|
|
}
|
|
};
|
|
|
|
routerMap[FunName + 'List']= {
|
|
name: FunTitle,
|
|
icon: 'idcard',
|
|
path: `/${FunName}/${FunName}List`,
|
|
meta:{
|
|
page:{ cacheAble:false}
|
|
},
|
|
component: () => import(`@/pages/Middle/bathroom/BathroomPaint/BathroomPaint/List`),
|
|
authority: {
|
|
permission: [],
|
|
}
|
|
};
|
|
|
|
routerMap[FunName + 'Create']= {
|
|
name: FunTitle,
|
|
icon: 'idcard',
|
|
path: `/${FunName}/${FunName}Add`,
|
|
component: () => import(`@/pages/Middle/bathroom/BathroomPaint/BathroomPaint/Edit`),
|
|
meta: {
|
|
invisible: true,
|
|
},
|
|
authority: {
|
|
permission: [],
|
|
}
|
|
};
|
|
routerMap[FunName + 'Update']= {
|
|
name: FunTitle,
|
|
icon: 'idcard',
|
|
path: `/${FunName}/${FunName}Update/:id`,
|
|
component: () => import(`@/pages/Middle/bathroom/BathroomPaint/BathroomPaint/Edit`),
|
|
meta: {
|
|
invisible: true,
|
|
},
|
|
authority: {
|
|
permission: [],
|
|
}
|
|
};
|
|
|
|
|
|
InvisibleRouters.forEach(item => {
|
|
let name = FunName + item;
|
|
if (!(name in routerMap)) {
|
|
routerMap[name] = {
|
|
meta: {
|
|
invisible: true
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
export default routerMap |