middle-admin-ant/src/router/Middle/bathroom/BathroomScheme/router.map.js

75 lines
2.9 KiB
JavaScript

const FunName = 'BathroomScheme';
const FunTitle = '设计方案';
const InvisibleRouters = 'Detail,Delete,BatchDelete,BatchUpdate,BatchCreate,ExportExcel,LogDetail,LogList,Settings,SettingsUpdate,ImportExcel,FittingsBatchCreate,FittingsBatchDelete,FittingsBatchUpdate,FittingsCreate,FittingsDetail,FittingsDelete,FittingsExportExcel,FittingsImportExcel,FittingsList,FittingsUpdate,LaborBatchCreate,LaborBatchDelete,LaborBatchUpdate,LaborCreate,LaborDetail,LaborDelete,LaborExportExcel,LaborImportExcel,LaborList,LaborUpdate,,MaterialBatchCreate,MaterialBatchDelete,MaterialBatchUpdate,MaterialCreate,MaterialDetail,MaterialDelete,MaterialExportExcel,MaterialImportExcel,MaterialList,MaterialUpdate,OutsourcingBatchCreate,OutsourcingBatchDelete,OutsourcingBatchUpdate,OutsourcingCreate,OutsourcingDetail,OutsourcingDelete,OutsourcingExportExcel,OutsourcingImportExcel,OutsourcingList,OutsourcingUpdate,PackagingBatchCreate,PackagingBatchDelete,PackagingBatchUpdate,PackagingCreate,PackagingDetail,PackagingDelete,PackagingExportExcel,PackagingImportExcel,PackagingList,PackagingUpdate,PaintBatchCreate,PaintBatchDelete,PaintBatchUpdate,PaintCreate,PaintDetail,PaintDelete,PaintExportExcel,PaintImportExcel,PaintList,PaintUpdate,PartsBatchCreate,PartsBatchDelete,PartsBatchUpdate,PartsCreate,PartsDetail,PartsDelete,PartsExportExcel,PartsImportExcel,PartsList,PartsUpdate,ProcessBatchCreate,ProcessBatchDelete,ProcessBatchUpdate,ProcessCreate,ProcessDetail,ProcessDelete,ProcessExportExcel,ProcessImportExcel,ProcessList,ProcessUpdate'.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`,
component: () => import(`@/pages/Middle/bathroom/BathroomScheme/BathroomScheme/List`),
authority: {
permission: [],
}
};
routerMap[FunName + 'Create']= {
name: FunTitle,
icon: 'idcard',
path: `/${FunName}/${FunName}Add`,
component: () => import(`@/pages/Middle/bathroom/BathroomScheme/BathroomScheme/Edit`),
meta: {
invisible: true,
},
authority: {
permission: [],
}
};
routerMap[FunName + 'Update']= {
name: FunTitle,
icon: 'idcard',
path: `/${FunName}/${FunName}Update/:id`,
component: () => import(`@/pages/Middle/bathroom/BathroomScheme/BathroomScheme/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