routes.js 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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/student/edit',
  131. name: '学生管理',
  132. menuCode: 'student.student',
  133. hideInMenu: true,
  134. component: './Student/Student/Edit',
  135. },
  136. {
  137. path: '/student/school',
  138. name: '学校管理',
  139. menuCode: 'student.student',
  140. component: './Student/School/List',
  141. },
  142. {
  143. path: '/student/school/edit',
  144. name: '学校编辑',
  145. menuCode: 'student.student',
  146. hideInMenu: true,
  147. component: './Student/School/Edit',
  148. },
  149. ],
  150. },
  151. {
  152. path: '/medical',
  153. name: '就医管理',
  154. icon: 'BranchesOutlined',
  155. menuCode: 'medical',
  156. component: '../layouts/BlankLayout',
  157. routes: [
  158. {
  159. path: '/medical/visit',
  160. name: '就诊管理',
  161. menuCode: 'medical.visit',
  162. component: '../layouts/BlankLayout',
  163. },
  164. {
  165. path: '/medical/test',
  166. name: '体检管理',
  167. menuCode: 'medical.test',
  168. component: '../layouts/BlankLayout',
  169. },
  170. ],
  171. },
  172. {
  173. path: '/report',
  174. name: '数据统计',
  175. icon: 'BarChartOutlined',
  176. menuCode: 'report',
  177. component: '../layouts/BlankLayout',
  178. routes: [
  179. {
  180. path: '/report/post',
  181. name: '科普统计',
  182. menuCode: 'report.post',
  183. component: '../layouts/BlankLayout',
  184. },
  185. {
  186. path: '/report/student',
  187. name: '阅读统计',
  188. menuCode: 'report.student',
  189. component: '../layouts/BlankLayout',
  190. },
  191. ],
  192. },
  193. {
  194. path: '/system',
  195. name: '系统设置',
  196. icon: 'SettingOutlined',
  197. menuCode: 'system',
  198. component: '../layouts/BlankLayout',
  199. routes: [
  200. {
  201. path: '/system/user',
  202. name: '用户管理',
  203. menuCode: 'system.user',
  204. component: './user/List',
  205. },
  206. {
  207. path: '/system/user/edit',
  208. name: '用户编辑',
  209. menuCode: 'system.user',
  210. component: './user/Edit',
  211. hideInMenu: true,
  212. },
  213. {
  214. path: '/system/role',
  215. name: '角色管理',
  216. menuCode: 'system.role',
  217. component: '../layouts/BlankLayout',
  218. },
  219. {
  220. path: '/system/params',
  221. name: '系统参数',
  222. menuCode: 'system.params',
  223. component: '../layouts/BlankLayout',
  224. },
  225. {
  226. path: '/system/clinic',
  227. name: '诊室管理',
  228. menuCode: 'system.clinic',
  229. component: '../layouts/BlankLayout',
  230. },
  231. ],
  232. },
  233. {
  234. component: './404',
  235. },
  236. ],
  237. },
  238. {
  239. component: './404',
  240. },
  241. ],
  242. },
  243. ],
  244. },
  245. {
  246. component: './404',
  247. },
  248. ];