routes.js 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. // path: '/report/student/saveNum',
  199. // name: '收藏记录',
  200. // menuCode: 'report.student',
  201. // component: './Statistic/SaveNum',
  202. // hideInMenu: true,
  203. // },
  204. // {
  205. // path: '/report/student/readedNum',
  206. // name: '阅读记录',
  207. // menuCode: 'report.student',
  208. // component: './Statistic/ReadedNum',
  209. // hideInMenu: true,
  210. // },
  211. // {
  212. // path: '/report/student/pointNum',
  213. // name: '积分记录',
  214. // menuCode: 'report.student',
  215. // component: './Statistic/PointNum',
  216. // hideInMenu: true,
  217. // },
  218. ],
  219. },
  220. {
  221. path: '/system',
  222. name: '系统设置',
  223. icon: 'SettingOutlined',
  224. menuCode: 'system',
  225. component: '../layouts/BlankLayout',
  226. routes: [
  227. {
  228. path: '/system/user',
  229. name: '用户管理',
  230. menuCode: 'system.user',
  231. component: './user/List',
  232. },
  233. {
  234. path: '/system/user/edit',
  235. name: '用户编辑',
  236. menuCode: 'system.user',
  237. component: './user/Edit',
  238. hideInMenu: true,
  239. },
  240. {
  241. path: '/system/role',
  242. name: '角色管理',
  243. menuCode: 'system.role',
  244. component: './System/Role',
  245. },
  246. {
  247. path: '/system/role/edit',
  248. name: '角色编辑',
  249. menuCode: 'system.role',
  250. component: './System/Role/Edit',
  251. hideInMenu: true,
  252. },
  253. {
  254. path: '/system/params',
  255. name: '系统参数',
  256. menuCode: 'system.params',
  257. component: './System/Params',
  258. },
  259. ],
  260. },
  261. {
  262. component: './404',
  263. },
  264. ],
  265. },
  266. {
  267. component: './404',
  268. },
  269. ],
  270. },
  271. ],
  272. },
  273. {
  274. component: './404',
  275. },
  276. ];