routes.js 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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: '/cms',
  41. name: 'CMS管理',
  42. icon: 'AppstoreOutlined',
  43. menuCode: 'cms',
  44. component: '../layouts/BlankLayout',
  45. routes: [
  46. {
  47. path: '/cms/banner/list',
  48. name: 'Banner管理',
  49. menuCode: 'cms.banner',
  50. component: './Cms/Banner/List',
  51. },
  52. {
  53. path: '/cms/banner/edit',
  54. name: 'Banner编辑',
  55. menuCode: 'cms.banner',
  56. component: './Cms/Banner/Edit',
  57. hideInMenu: true,
  58. },
  59. {
  60. path: '/cms/hot/list',
  61. name: '热门管理',
  62. menuCode: 'cms.hot',
  63. component: './Cms/Hot/List',
  64. },
  65. {
  66. path: '/cms/hot/edit',
  67. name: '热门编辑',
  68. menuCode: 'cms.hot',
  69. component: './Cms/Hot/Edit',
  70. hideInMenu: true,
  71. },
  72. ],
  73. },
  74. {
  75. path: '/post',
  76. name: '科普管理',
  77. icon: 'ReadOutlined',
  78. menuCode: 'post',
  79. component: '../layouts/BlankLayout',
  80. routes: [
  81. {
  82. path: '/post/list',
  83. name: '科普管理',
  84. menuCode: 'post.post',
  85. component: './Post/List',
  86. },
  87. {
  88. path: '/post/edit',
  89. name: '科普编辑',
  90. menuCode: 'post.post',
  91. component: './Post/Edit',
  92. hideInMenu: true,
  93. },
  94. {
  95. path: '/post/post-type',
  96. name: '分类管理',
  97. menuCode: 'post.post-type',
  98. component: './Post/Type',
  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: './Student/Student/List',
  114. },
  115. {
  116. path: '/student/student/edit',
  117. name: '学生信息',
  118. menuCode: 'student.student',
  119. hideInMenu: true,
  120. component: './Student/Student/Edit',
  121. },
  122. {
  123. path: '/student/school',
  124. name: '学校管理',
  125. menuCode: 'student.school',
  126. component: './Student/School/List',
  127. },
  128. {
  129. path: '/student/school/edit',
  130. name: '学校编辑',
  131. menuCode: 'student.school',
  132. hideInMenu: true,
  133. component: './Student/School/Edit',
  134. },
  135. ],
  136. },
  137. {
  138. path: '/medical',
  139. name: '就医管理',
  140. icon: 'BranchesOutlined',
  141. menuCode: 'medical',
  142. component: '../layouts/BlankLayout',
  143. routes: [
  144. {
  145. path: '/medical/visit',
  146. name: '就诊管理',
  147. menuCode: 'medical.visit',
  148. component: './Medical/Visit/List',
  149. },
  150. {
  151. path: '/medical/visit/edit',
  152. name: '就诊记录',
  153. menuCode: 'medical.visit',
  154. hideInMenu: true,
  155. component: './Medical/Visit/Edit',
  156. },
  157. {
  158. path: '/medical/test',
  159. name: '体检管理',
  160. menuCode: 'medical.test',
  161. component: './Medical/Test/List',
  162. },
  163. {
  164. path: '/medical/test/edit',
  165. name: '体检记录',
  166. menuCode: 'medical.test',
  167. hideInMenu: true,
  168. component: './Medical/Test/Edit',
  169. },
  170. {
  171. path: '/medical/hospital',
  172. name: '诊室管理',
  173. menuCode: 'medical.hospital',
  174. component: './Medical/Hospital',
  175. },
  176. ],
  177. },
  178. {
  179. path: '/report',
  180. name: '数据统计',
  181. icon: 'BarChartOutlined',
  182. menuCode: 'report',
  183. component: '../layouts/BlankLayout',
  184. routes: [
  185. {
  186. path: '/report/post',
  187. name: '科普统计',
  188. menuCode: 'report.post',
  189. component: './Statistic/PostData',
  190. },
  191. {
  192. path: '/report/student',
  193. name: '阅读统计',
  194. menuCode: 'report.student',
  195. component: './Statistic/StudentData',
  196. },
  197. ],
  198. },
  199. {
  200. path: '/system',
  201. name: '系统设置',
  202. icon: 'SettingOutlined',
  203. menuCode: 'system',
  204. component: '../layouts/BlankLayout',
  205. routes: [
  206. {
  207. path: '/system/user',
  208. name: '用户管理',
  209. menuCode: 'system.user',
  210. component: './user/List',
  211. },
  212. {
  213. path: '/system/user/edit',
  214. name: '用户编辑',
  215. menuCode: 'system.user',
  216. component: './user/Edit',
  217. hideInMenu: true,
  218. },
  219. {
  220. path: '/system/role',
  221. name: '角色管理',
  222. menuCode: 'system.role',
  223. component: './System/Role',
  224. },
  225. {
  226. path: '/system/role/edit',
  227. name: '角色编辑',
  228. menuCode: 'system.role',
  229. component: './System/Role/Edit',
  230. hideInMenu: true,
  231. },
  232. {
  233. path: '/system/params',
  234. name: '系统参数',
  235. menuCode: 'system.params',
  236. component: './System/Params',
  237. },
  238. ],
  239. },
  240. {
  241. component: './404',
  242. },
  243. ],
  244. },
  245. {
  246. component: './404',
  247. },
  248. ],
  249. },
  250. ],
  251. },
  252. {
  253. component: './404',
  254. },
  255. ];