router.config.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. module.exports = [
  2. {
  3. path: '/',
  4. component: '../layouts/BlankLayout',
  5. routes: [
  6. // user
  7. {
  8. path: '/user',
  9. component: '../layouts/UserLayout',
  10. routes: [
  11. { path: '/user/login', name: 'login', component: './User/Login' },
  12. { path: '/user/register', name: 'register', component: './User/Register' },
  13. {
  14. path: '/user/register-result',
  15. name: 'register.result',
  16. component: './User/RegisterResult',
  17. },
  18. { path: '/user', redirect: '/user/login' },
  19. {
  20. component: '404',
  21. },
  22. ],
  23. },
  24. // app
  25. {
  26. path: '/',
  27. component: '../layouts/BasicLayout',
  28. Routes: ['src/pages/Authorized'],
  29. authority: ['admin', 'user'],
  30. routes: [
  31. // dashboard
  32. {
  33. path: '/dashboard',
  34. name: 'dashboard',
  35. icon: 'dashboard',
  36. routes: [
  37. {
  38. path: '/dashboard/analysis',
  39. name: 'analysis',
  40. component: './Dashboard/Analysis',
  41. },
  42. {
  43. path: '/dashboard/monitor',
  44. name: 'monitor',
  45. component: './Dashboard/Monitor',
  46. },
  47. {
  48. path: '/dashboard/workplace',
  49. name: 'workplace',
  50. component: './Dashboard/Workplace',
  51. },
  52. ],
  53. },
  54. // forms
  55. {
  56. path: '/form',
  57. icon: 'form',
  58. name: 'form',
  59. routes: [
  60. {
  61. path: '/form/basic-form',
  62. name: 'basicform',
  63. component: './Form/BasicForm',
  64. },
  65. {
  66. path: '/form/step-form',
  67. name: 'stepform',
  68. component: './Form/StepForm',
  69. },
  70. {
  71. path: '/form/advanced-form',
  72. name: 'advancedform',
  73. authority: ['admin'],
  74. component: './Form/AdvancedForm',
  75. },
  76. ],
  77. },
  78. // list
  79. {
  80. path: '/list',
  81. icon: 'table',
  82. name: 'list',
  83. routes: [
  84. {
  85. path: '/list/table-list',
  86. name: 'searchtable',
  87. component: './list/Tablelist',
  88. },
  89. {
  90. path: '/list/basic-list',
  91. name: 'basiclist',
  92. component: './list/Basiclist',
  93. },
  94. {
  95. path: '/list/card-list',
  96. name: 'cardlist',
  97. component: './list/Cardlist',
  98. },
  99. {
  100. path: '/list/search',
  101. name: 'search-list',
  102. component: './list/search',
  103. routes: [
  104. {
  105. path: '/list/search/articles',
  106. name: 'articles',
  107. component: './list/Articles',
  108. },
  109. {
  110. path: '/list/search/projects',
  111. name: 'projects',
  112. component: './list/Projects',
  113. },
  114. {
  115. path: '/list/search/applications',
  116. name: 'applications',
  117. component: './list/Applications',
  118. },
  119. {
  120. path: '/list/search',
  121. redirect: '/list/search/articles',
  122. },
  123. ],
  124. },
  125. ],
  126. },
  127. {
  128. path: '/profile',
  129. name: 'profile',
  130. icon: 'profile',
  131. routes: [
  132. // profile
  133. {
  134. path: '/profile/basic',
  135. name: 'basic',
  136. component: './Profile/BasicProfile',
  137. },
  138. {
  139. path: '/profile/basic/:id',
  140. hideInMenu: true,
  141. component: './Profile/BasicProfile',
  142. },
  143. {
  144. path: '/profile/advanced',
  145. name: 'advanced',
  146. authority: ['admin'],
  147. component: './Profile/AdvancedProfile',
  148. },
  149. ],
  150. },
  151. {
  152. name: 'result',
  153. icon: 'check-circle-o',
  154. path: '/result',
  155. routes: [
  156. // result
  157. {
  158. path: '/result/success',
  159. name: 'success',
  160. component: './Result/Success',
  161. },
  162. { path: '/result/fail', name: 'fail', component: './Result/Error' },
  163. ],
  164. },
  165. {
  166. name: 'exception',
  167. icon: 'warning',
  168. path: '/exception',
  169. routes: [
  170. // exception
  171. {
  172. path: '/exception/403',
  173. name: 'not-permission',
  174. component: './Exception/403',
  175. },
  176. {
  177. path: '/exception/404',
  178. name: 'not-find',
  179. component: './Exception/404',
  180. },
  181. {
  182. path: '/exception/500',
  183. name: 'server-error',
  184. component: './Exception/500',
  185. },
  186. ],
  187. },
  188. {
  189. name: 'account',
  190. icon: 'user',
  191. path: '/account',
  192. routes: [
  193. {
  194. path: '/account/center',
  195. name: 'center',
  196. component: './Account/Center/Center',
  197. },
  198. {
  199. path: '/account/settings',
  200. name: 'settings',
  201. component: './Account/Settings/Info',
  202. },
  203. ],
  204. },
  205. // editor
  206. {
  207. name: 'editor',
  208. icon: 'highlight',
  209. path: '/editor',
  210. routes: [
  211. {
  212. path: '/editor/flow',
  213. name: 'flow',
  214. component: './Editor/GGEditor/Flow',
  215. },
  216. {
  217. path: '/editor/mind',
  218. name: 'mind',
  219. component: './Editor/GGEditor/Mind',
  220. },
  221. {
  222. path: '/editor/koni',
  223. name: 'koni',
  224. component: './Editor/GGEditor/Koni',
  225. },
  226. ],
  227. },
  228. { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] },
  229. {
  230. component: '404',
  231. },
  232. ],
  233. },
  234. ],
  235. },
  236. ];