routes.js 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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.school',
  140. component: './Student/School/List',
  141. },
  142. {
  143. path: '/student/school/edit',
  144. name: '学校编辑',
  145. menuCode: 'student.school',
  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: './Medical/Visit/List',
  163. },
  164. {
  165. path: '/medical/visit/edit',
  166. name: '就诊记录',
  167. menuCode: 'medical.visit',
  168. hideInMenu: true,
  169. component: './Medical/Visit/Edit',
  170. },
  171. {
  172. path: '/medical/test',
  173. name: '体检管理',
  174. menuCode: 'medical.test',
  175. component: './Medical/Test/List',
  176. },
  177. {
  178. path: '/medical/test/edit',
  179. name: '体检记录',
  180. menuCode: 'medical.test',
  181. hideInMenu: true,
  182. component: './Medical/Test/Edit',
  183. },
  184. {
  185. path: '/medical/hospital',
  186. name: '诊室管理',
  187. menuCode: 'medical.hospital',
  188. component: './Medical/Hospital',
  189. },
  190. ],
  191. },
  192. {
  193. path: '/report',
  194. name: '数据统计',
  195. icon: 'BarChartOutlined',
  196. menuCode: 'report',
  197. component: '../layouts/BlankLayout',
  198. routes: [
  199. {
  200. path: '/report/post',
  201. name: '科普统计',
  202. menuCode: 'report.post',
  203. component: './Statistic/PostData',
  204. },
  205. {
  206. path: '/report/student',
  207. name: '阅读统计',
  208. menuCode: 'report.student',
  209. component: './Statistic/StudentData',
  210. },
  211. ],
  212. },
  213. {
  214. path: '/system',
  215. name: '系统设置',
  216. icon: 'SettingOutlined',
  217. menuCode: 'system',
  218. component: '../layouts/BlankLayout',
  219. routes: [
  220. {
  221. path: '/system/user',
  222. name: '用户管理',
  223. menuCode: 'system.user',
  224. component: './user/List',
  225. },
  226. {
  227. path: '/system/user/edit',
  228. name: '用户编辑',
  229. menuCode: 'system.user',
  230. component: './user/Edit',
  231. hideInMenu: true,
  232. },
  233. {
  234. path: '/system/role',
  235. name: '角色管理',
  236. menuCode: 'system.role',
  237. component: './System/Role',
  238. },
  239. {
  240. path: '/system/role/edit',
  241. name: '角色编辑',
  242. menuCode: 'system.role',
  243. component: './System/Role/Edit',
  244. hideInMenu: true,
  245. },
  246. {
  247. path: '/system/params',
  248. name: '系统参数',
  249. menuCode: 'system.params',
  250. component: './System/Params',
  251. },
  252. ],
  253. },
  254. {
  255. component: './404',
  256. },
  257. ],
  258. },
  259. {
  260. component: './404',
  261. },
  262. ],
  263. },
  264. ],
  265. },
  266. {
  267. component: './404',
  268. },
  269. ];