router.config.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. export default [
  2. // user
  3. {
  4. path: '/user',
  5. component: '../layouts/UserLayout',
  6. routes: [
  7. { path: '/user', redirect: '/user/login' },
  8. { path: '/user/login', name: 'login', component: './User/Login' },
  9. { path: '/user/register', name: 'register', component: './User/Register' },
  10. {
  11. path: '/user/register-result',
  12. name: 'register.result',
  13. component: './User/RegisterResult',
  14. },
  15. {
  16. component: '404',
  17. },
  18. ],
  19. },
  20. // app
  21. {
  22. path: '/',
  23. component: '../layouts/BasicLayout',
  24. Routes: ['src/pages/Authorized'],
  25. routes: [
  26. // dashboard
  27. { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] },
  28. {
  29. path: '/dashboard',
  30. name: 'dashboard',
  31. icon: 'dashboard',
  32. routes: [
  33. {
  34. path: '/dashboard/analysis',
  35. name: 'analysis',
  36. component: './Dashboard/Analysis',
  37. },
  38. {
  39. path: '/dashboard/monitor',
  40. name: 'monitor',
  41. component: './Dashboard/Monitor',
  42. },
  43. {
  44. path: '/dashboard/workplace',
  45. name: 'workplace',
  46. component: './Dashboard/Workplace',
  47. },
  48. ],
  49. },
  50. // forms
  51. {
  52. path: '/form',
  53. icon: 'form',
  54. name: 'form',
  55. routes: [
  56. {
  57. path: '/form/basic-form',
  58. name: 'basicform',
  59. component: './Forms/BasicForm',
  60. },
  61. {
  62. path: '/form/step-form',
  63. name: 'stepform',
  64. component: './Forms/StepForm',
  65. hideChildrenInMenu: true,
  66. routes: [
  67. {
  68. path: '/form/step-form',
  69. redirect: '/form/step-form/info',
  70. },
  71. {
  72. path: '/form/step-form/info',
  73. name: 'info',
  74. component: './Forms/StepForm/Step1',
  75. },
  76. {
  77. path: '/form/step-form/confirm',
  78. name: 'confirm',
  79. component: './Forms/StepForm/Step2',
  80. },
  81. {
  82. path: '/form/step-form/result',
  83. name: 'result',
  84. component: './Forms/StepForm/Step3',
  85. },
  86. ],
  87. },
  88. {
  89. path: '/form/advanced-form',
  90. name: 'advancedform',
  91. authority: ['admin'],
  92. component: './Forms/AdvancedForm',
  93. },
  94. ],
  95. },
  96. // list
  97. {
  98. path: '/list',
  99. icon: 'table',
  100. name: 'list',
  101. routes: [
  102. {
  103. path: '/list/table-list',
  104. name: 'searchtable',
  105. component: './List/TableList',
  106. },
  107. {
  108. path: '/list/basic-list',
  109. name: 'basiclist',
  110. component: './List/BasicList',
  111. },
  112. {
  113. path: '/list/card-list',
  114. name: 'cardlist',
  115. component: './List/CardList',
  116. },
  117. {
  118. path: '/list/search',
  119. name: 'searchlist',
  120. component: './List/List',
  121. routes: [
  122. {
  123. path: '/list/search',
  124. redirect: '/list/search/articles',
  125. },
  126. {
  127. path: '/list/search/articles',
  128. name: 'articles',
  129. component: './List/Articles',
  130. },
  131. {
  132. path: '/list/search/projects',
  133. name: 'projects',
  134. component: './List/Projects',
  135. },
  136. {
  137. path: '/list/search/applications',
  138. name: 'applications',
  139. component: './List/Applications',
  140. },
  141. ],
  142. },
  143. ],
  144. },
  145. {
  146. path: '/profile',
  147. name: 'profile',
  148. icon: 'profile',
  149. routes: [
  150. // profile
  151. {
  152. path: '/profile/basic',
  153. name: 'basic',
  154. component: './Profile/BasicProfile',
  155. },
  156. {
  157. path: '/profile/basic/:id',
  158. hideInMenu: true,
  159. component: './Profile/BasicProfile',
  160. },
  161. {
  162. path: '/profile/advanced',
  163. name: 'advanced',
  164. authority: ['admin'],
  165. component: './Profile/AdvancedProfile',
  166. },
  167. ],
  168. },
  169. {
  170. name: 'result',
  171. icon: 'check-circle-o',
  172. path: '/result',
  173. routes: [
  174. // result
  175. {
  176. path: '/result/success',
  177. name: 'success',
  178. component: './Result/Success',
  179. },
  180. { path: '/result/fail', name: 'fail', component: './Result/Error' },
  181. ],
  182. },
  183. {
  184. name: 'exception',
  185. icon: 'warning',
  186. path: '/exception',
  187. routes: [
  188. // exception
  189. {
  190. path: '/exception/403',
  191. name: 'not-permission',
  192. component: './Exception/403',
  193. },
  194. {
  195. path: '/exception/404',
  196. name: 'not-find',
  197. component: './Exception/404',
  198. },
  199. {
  200. path: '/exception/500',
  201. name: 'server-error',
  202. component: './Exception/500',
  203. },
  204. {
  205. path: '/exception/trigger',
  206. name: 'trigger',
  207. hideInMenu: true,
  208. component: './Exception/TriggerException',
  209. },
  210. ],
  211. },
  212. {
  213. name: 'account',
  214. icon: 'user',
  215. path: '/account',
  216. routes: [
  217. {
  218. path: '/account/center',
  219. name: 'center',
  220. component: './Account/Center/Center',
  221. routes: [
  222. {
  223. path: '/account/center',
  224. redirect: '/account/center/articles',
  225. },
  226. {
  227. path: '/account/center/articles',
  228. component: './Account/Center/Articles',
  229. },
  230. {
  231. path: '/account/center/applications',
  232. component: './Account/Center/Applications',
  233. },
  234. {
  235. path: '/account/center/projects',
  236. component: './Account/Center/Projects',
  237. },
  238. ],
  239. },
  240. {
  241. path: '/account/settings',
  242. name: 'settings',
  243. component: './Account/Settings/Info',
  244. routes: [
  245. {
  246. path: '/account/settings',
  247. redirect: '/account/settings/base',
  248. },
  249. {
  250. path: '/account/settings/base',
  251. component: './Account/Settings/BaseView',
  252. },
  253. {
  254. path: '/account/settings/security',
  255. component: './Account/Settings/SecurityView',
  256. },
  257. {
  258. path: '/account/settings/binding',
  259. component: './Account/Settings/BindingView',
  260. },
  261. {
  262. path: '/account/settings/notification',
  263. component: './Account/Settings/NotificationView',
  264. },
  265. ],
  266. },
  267. ],
  268. },
  269. // editor
  270. {
  271. name: 'editor',
  272. icon: 'highlight',
  273. path: '/editor',
  274. routes: [
  275. {
  276. path: '/editor/flow',
  277. name: 'flow',
  278. component: './Editor/GGEditor/Flow',
  279. },
  280. {
  281. path: '/editor/mind',
  282. name: 'mind',
  283. component: './Editor/GGEditor/Mind',
  284. },
  285. {
  286. path: '/editor/koni',
  287. name: 'koni',
  288. component: './Editor/GGEditor/Koni',
  289. },
  290. ],
  291. },
  292. {
  293. component: '404',
  294. },
  295. ],
  296. },
  297. ];