routes.js 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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',
  68. name: 'Banner管理',
  69. menuCode: 'cms.banner',
  70. component: '../layouts/BlankLayout',
  71. },
  72. {
  73. path: '/cms/hot',
  74. name: '热门管理',
  75. menuCode: 'cms.hot',
  76. component: '../layouts/BlankLayout',
  77. },
  78. ]
  79. },
  80. {
  81. path: '/post',
  82. name: '科普管理',
  83. icon: 'ReadOutlined',
  84. menuCode: 'post',
  85. component: '../layouts/BlankLayout',
  86. routes: [
  87. {
  88. path: '/post/list',
  89. name: '科普管理',
  90. menuCode: 'post.post',
  91. component: './Post/List',
  92. },
  93. {
  94. path: '/post/edit',
  95. name: '科普编辑',
  96. menuCode: 'post.post',
  97. component: './Post/Edit',
  98. hideInMenu: true,
  99. },
  100. ]
  101. },
  102. {
  103. path: '/student',
  104. name: '学生管理',
  105. icon: 'UserOutlined',
  106. menuCode: 'student',
  107. component: '../layouts/BlankLayout',
  108. routes: [
  109. {
  110. path: '/student/student',
  111. name: '学生管理',
  112. menuCode: 'student.student',
  113. component: '../layouts/BlankLayout',
  114. },
  115. ]
  116. },
  117. {
  118. path: '/medical',
  119. name: '就医管理',
  120. icon: 'BranchesOutlined',
  121. menuCode: 'medical',
  122. component: '../layouts/BlankLayout',
  123. routes: [
  124. {
  125. path: '/medical/visit',
  126. name: '就诊管理',
  127. menuCode: 'medical.visit',
  128. component: '../layouts/BlankLayout',
  129. },
  130. {
  131. path: '/medical/test',
  132. name: '体检管理',
  133. menuCode: 'medical.test',
  134. component: '../layouts/BlankLayout',
  135. },
  136. ]
  137. },
  138. {
  139. path: '/report',
  140. name: '数据统计',
  141. icon: 'BarChartOutlined',
  142. menuCode: 'report',
  143. component: '../layouts/BlankLayout',
  144. routes: [
  145. {
  146. path: '/report/post',
  147. name: '科普统计',
  148. menuCode: 'report.post',
  149. component: '../layouts/BlankLayout',
  150. },
  151. {
  152. path: '/report/student',
  153. name: '阅读统计',
  154. menuCode: 'report.student',
  155. component: '../layouts/BlankLayout',
  156. },
  157. ]
  158. },
  159. {
  160. path: '/system',
  161. name: '系统设置',
  162. icon: 'SettingOutlined',
  163. menuCode: 'system',
  164. component: '../layouts/BlankLayout',
  165. routes: [
  166. {
  167. path: '/system/user',
  168. name: '用户管理',
  169. menuCode: 'system.user',
  170. component: '../layouts/BlankLayout',
  171. },
  172. {
  173. path: '/system/role',
  174. name: '角色管理',
  175. menuCode: 'system.role',
  176. component: '../layouts/BlankLayout',
  177. },
  178. {
  179. path: '/system/params',
  180. name: '系统参数',
  181. menuCode: 'system.params',
  182. component: '../layouts/BlankLayout',
  183. },
  184. {
  185. path: '/system/school',
  186. name: '学校管理',
  187. menuCode: 'system.school',
  188. component: '../layouts/BlankLayout',
  189. },
  190. {
  191. path: '/system/clinic',
  192. name: '诊室管理',
  193. menuCode: 'system.clinic',
  194. component: '../layouts/BlankLayout',
  195. },
  196. ]
  197. },
  198. {
  199. component: './404',
  200. },
  201. ],
  202. },
  203. {
  204. component: './404',
  205. },
  206. ],
  207. },
  208. ],
  209. },
  210. {
  211. component: './404',
  212. },
  213. ];