/** * path: 一定要设置绝对路径 * menuCode: 服务端菜单编码, 用于权限校验 */ export default [ { path: '/', component: '../layouts/BlankLayout', routes: [ { path: '/user', component: '../layouts/UserLayout', routes: [ { name: 'login', path: '/user/login', component: './User/login', }, ], }, { path: '/', component: '../layouts/SecurityLayout', routes: [ { path: '/', component: '../layouts/BasicLayout', routes: [ { path: '/', redirect: '/welcome', }, { path: '/welcome', name: 'welcome', icon: 'smile', component: './Welcome', }, { path: '/cms', name: 'CMS管理', icon: 'AppstoreOutlined', menuCode: 'cms', component: '../layouts/BlankLayout', routes: [ { path: '/cms/banner/list', name: 'Banner管理', menuCode: 'cms.banner', component: './Cms/Banner/List', }, { path: '/cms/banner/edit', name: 'Banner编辑', menuCode: 'cms.banner', component: './Cms/Banner/Edit', hideInMenu: true, }, { path: '/cms/hot/list', name: '热门管理', menuCode: 'cms.hot', component: './Cms/Hot/List', }, { path: '/cms/hot/edit', name: '热门编辑', menuCode: 'cms.hot', component: './Cms/Hot/Edit', hideInMenu: true, }, ], }, { path: '/post', name: '科普管理', icon: 'ReadOutlined', menuCode: 'post', component: '../layouts/BlankLayout', routes: [ { path: '/post/list', name: '科普管理', menuCode: 'post.post', component: './Post/List', }, { path: '/post/edit', name: '科普编辑', menuCode: 'post.post', component: './Post/Edit', hideInMenu: true, }, { path: '/post/post-type', name: '分类管理', menuCode: 'post.post-type', component: './Post/Type', }, ], }, { path: '/student', name: '学生管理', icon: 'UserOutlined', menuCode: 'student', component: '../layouts/BlankLayout', routes: [ { path: '/student/student', name: '学生管理', menuCode: 'student.student', component: './Student/Student/List', }, { path: '/student/student/edit', name: '学生信息', menuCode: 'student.student', hideInMenu: true, component: './Student/Student/Edit', }, { path: '/student/school', name: '学校管理', menuCode: 'student.school', component: './Student/School/List', }, { path: '/student/school/edit', name: '学校编辑', menuCode: 'student.school', hideInMenu: true, component: './Student/School/Edit', }, ], }, { path: '/medical', name: '就医管理', icon: 'BranchesOutlined', menuCode: 'medical', component: '../layouts/BlankLayout', routes: [ { path: '/medical/visit', name: '就诊管理', menuCode: 'medical.visit', component: './Medical/Visit/List', }, { path: '/medical/visit/edit', name: '就诊记录', menuCode: 'medical.visit', hideInMenu: true, component: './Medical/Visit/Edit', }, { path: '/medical/test', name: '体检管理', menuCode: 'medical.test', component: './Medical/Test/List', }, { path: '/medical/test/edit', name: '体检记录', menuCode: 'medical.test', hideInMenu: true, component: './Medical/Test/Edit', }, { path: '/medical/hospital', name: '诊室管理', menuCode: 'medical.hospital', component: './Medical/Hospital', }, ], }, { path: '/report', name: '数据统计', icon: 'BarChartOutlined', menuCode: 'report', component: '../layouts/BlankLayout', routes: [ { path: '/report/post', name: '科普统计', menuCode: 'report.post', component: './Statistic/PostData', }, { path: '/report/student', name: '阅读统计', menuCode: 'report.student', component: './Statistic/StudentData', }, ], }, { path: '/system', name: '系统设置', icon: 'SettingOutlined', menuCode: 'system', component: '../layouts/BlankLayout', routes: [ { path: '/system/user', name: '用户管理', menuCode: 'system.user', component: './user/List', }, { path: '/system/user/edit', name: '用户编辑', menuCode: 'system.user', component: './user/Edit', hideInMenu: true, }, { path: '/system/role', name: '角色管理', menuCode: 'system.role', component: './System/Role', }, { path: '/system/role/edit', name: '角色编辑', menuCode: 'system.role', component: './System/Role/Edit', hideInMenu: true, }, { path: '/system/params', name: '系统参数', menuCode: 'system.params', component: './System/Params', }, ], }, { component: './404', }, ], }, { component: './404', }, ], }, ], }, { component: './404', }, ];