routes.js 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /**
  2. * path: 一定要设置绝对路径
  3. * menuCode: 服务端菜单编码, 用于权限校验
  4. */
  5. export default [
  6. {
  7. path: '/',
  8. component: '../layouts/BlankLayout',
  9. routes: [
  10. {
  11. path: '/user',
  12. component: '../layouts/UserLayout',
  13. routes: [
  14. {
  15. name: 'login',
  16. path: '/user/login',
  17. component: './User/login',
  18. },
  19. ],
  20. },
  21. {
  22. path: '/',
  23. component: '../layouts/SecurityLayout',
  24. routes: [
  25. {
  26. path: '/',
  27. component: '../layouts/BasicLayout',
  28. routes: [
  29. {
  30. path: '/',
  31. redirect: '/welcome',
  32. },
  33. {
  34. path: '/welcome',
  35. name: 'welcome',
  36. icon: 'smile',
  37. component: './Welcome',
  38. },
  39. {
  40. path: '/admin',
  41. name: 'admin',
  42. icon: 'crown',
  43. component: './Admin',
  44. routes: [
  45. {
  46. path: '/admin/sub-page',
  47. name: 'sub-page',
  48. icon: 'smile',
  49. component: './Welcome',
  50. },
  51. ],
  52. },
  53. {
  54. name: 'list.table-list',
  55. icon: 'table',
  56. path: '/list',
  57. component: './TableList',
  58. },
  59. {
  60. path: '/cms',
  61. name: 'CMS管理',
  62. icon: 'AppstoreOutlined',
  63. menuCode: 'cms',
  64. component: '../layouts/BlankLayout',
  65. routes: [
  66. {
  67. path: '/cms/banner/list',
  68. name: 'Banner管理',
  69. menuCode: 'cms.banner',
  70. component: './Cms/Banner/List',
  71. },
  72. {
  73. path: '/cms/banner/edit',
  74. name: 'Banner编辑',
  75. menuCode: 'cms.banner',
  76. component: './Cms/Banner/Edit',
  77. hideInMenu: true,
  78. },
  79. {
  80. path: '/cms/hot/list',
  81. name: '热门管理',
  82. menuCode: 'cms.hot',
  83. component: './Cms/Hot/List',
  84. },
  85. {
  86. path: '/cms/hot/edit',
  87. name: 'Banner编辑',
  88. menuCode: 'cms.hot',
  89. component: './Cms/Hot/Edit',
  90. hideInMenu: true,
  91. },
  92. ],
  93. },
  94. {
  95. path: '/post',
  96. name: '科普管理',
  97. icon: 'ReadOutlined',
  98. menuCode: 'post',
  99. component: '../layouts/BlankLayout',
  100. routes: [
  101. {
  102. path: '/post/list',
  103. name: '科普管理',
  104. menuCode: 'post.post',
  105. component: './Post/List',
  106. },
  107. {
  108. path: '/post/edit',
  109. name: '科普编辑',
  110. menuCode: 'post.post',
  111. component: './Post/Edit',
  112. hideInMenu: true,
  113. },
  114. ],
  115. },
  116. {
  117. path: '/student',
  118. name: '学生管理',
  119. icon: 'UserOutlined',
  120. menuCode: 'student',
  121. component: '../layouts/BlankLayout',
  122. routes: [
  123. {
  124. path: '/student/student',
  125. name: '学生管理',
  126. menuCode: 'student.student',
  127. component: './Student/Student/List',
  128. },
  129. {
  130. path: '/student/school',
  131. name: '学校管理',
  132. menuCode: 'student.student',
  133. component: './Student/School/List',
  134. },
  135. {
  136. path: '/student/school/edit',
  137. name: '学校编辑',
  138. menuCode: 'student.student',
  139. hideInMenu: true,
  140. component: './Student/School/Edit',
  141. },
  142. ],
  143. },
  144. {
  145. path: '/medical',
  146. name: '就医管理',
  147. icon: 'BranchesOutlined',
  148. menuCode: 'medical',
  149. component: '../layouts/BlankLayout',
  150. routes: [
  151. {
  152. path: '/medical/visit',
  153. name: '就诊管理',
  154. menuCode: 'medical.visit',
  155. component: '../layouts/BlankLayout',
  156. },
  157. {
  158. path: '/medical/test',
  159. name: '体检管理',
  160. menuCode: 'medical.test',
  161. component: '../layouts/BlankLayout',
  162. },
  163. ],
  164. },
  165. {
  166. path: '/report',
  167. name: '数据统计',
  168. icon: 'BarChartOutlined',
  169. menuCode: 'report',
  170. component: '../layouts/BlankLayout',
  171. routes: [
  172. {
  173. path: '/report/post',
  174. name: '科普统计',
  175. menuCode: 'report.post',
  176. component: '../layouts/BlankLayout',
  177. },
  178. {
  179. path: '/report/student',
  180. name: '阅读统计',
  181. menuCode: 'report.student',
  182. component: '../layouts/BlankLayout',
  183. },
  184. ],
  185. },
  186. {
  187. path: '/system',
  188. name: '系统设置',
  189. icon: 'SettingOutlined',
  190. menuCode: 'system',
  191. component: '../layouts/BlankLayout',
  192. routes: [
  193. {
  194. path: '/system/user',
  195. name: '用户管理',
  196. menuCode: 'system.user',
  197. component: '../layouts/BlankLayout',
  198. },
  199. {
  200. path: '/system/role',
  201. name: '角色管理',
  202. menuCode: 'system.role',
  203. component: '../layouts/BlankLayout',
  204. },
  205. {
  206. path: '/system/params',
  207. name: '系统参数',
  208. menuCode: 'system.params',
  209. component: '../layouts/BlankLayout',
  210. },
  211. {
  212. path: '/system/school',
  213. name: '学校管理',
  214. menuCode: 'system.school',
  215. component: '../layouts/BlankLayout',
  216. },
  217. {
  218. path: '/system/clinic',
  219. name: '诊室管理',
  220. menuCode: 'system.clinic',
  221. component: '../layouts/BlankLayout',
  222. },
  223. ],
  224. },
  225. {
  226. component: './404',
  227. },
  228. ],
  229. },
  230. {
  231. component: './404',
  232. },
  233. ],
  234. },
  235. ],
  236. },
  237. {
  238. component: './404',
  239. },
  240. ];