router.config.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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. name: 'basic',
  159. hideInMenu: true,
  160. component: './Profile/BasicProfile',
  161. },
  162. {
  163. path: '/profile/advanced',
  164. name: 'advanced',
  165. authority: ['admin'],
  166. component: './Profile/AdvancedProfile',
  167. },
  168. ],
  169. },
  170. {
  171. name: 'result',
  172. icon: 'check-circle-o',
  173. path: '/result',
  174. routes: [
  175. // result
  176. {
  177. path: '/result/success',
  178. name: 'success',
  179. component: './Result/Success',
  180. },
  181. { path: '/result/fail', name: 'fail', component: './Result/Error' },
  182. ],
  183. },
  184. {
  185. name: 'exception',
  186. icon: 'warning',
  187. path: '/exception',
  188. routes: [
  189. // exception
  190. {
  191. path: '/exception/403',
  192. name: 'not-permission',
  193. component: './Exception/403',
  194. },
  195. {
  196. path: '/exception/404',
  197. name: 'not-find',
  198. component: './Exception/404',
  199. },
  200. {
  201. path: '/exception/500',
  202. name: 'server-error',
  203. component: './Exception/500',
  204. },
  205. {
  206. path: '/exception/trigger',
  207. name: 'trigger',
  208. hideInMenu: true,
  209. component: './Exception/TriggerException',
  210. },
  211. ],
  212. },
  213. {
  214. name: 'account',
  215. icon: 'user',
  216. path: '/account',
  217. routes: [
  218. {
  219. path: '/account/center',
  220. name: 'center',
  221. component: './Account/Center/Center',
  222. routes: [
  223. {
  224. path: '/account/center',
  225. redirect: '/account/center/articles',
  226. },
  227. {
  228. path: '/account/center/articles',
  229. component: './Account/Center/Articles',
  230. },
  231. {
  232. path: '/account/center/applications',
  233. component: './Account/Center/Applications',
  234. },
  235. {
  236. path: '/account/center/projects',
  237. component: './Account/Center/Projects',
  238. },
  239. ],
  240. },
  241. {
  242. path: '/account/settings',
  243. name: 'settings',
  244. component: './Account/Settings/Info',
  245. routes: [
  246. {
  247. path: '/account/settings',
  248. redirect: '/account/settings/base',
  249. },
  250. {
  251. path: '/account/settings/base',
  252. component: './Account/Settings/BaseView',
  253. },
  254. {
  255. path: '/account/settings/security',
  256. component: './Account/Settings/SecurityView',
  257. },
  258. {
  259. path: '/account/settings/binding',
  260. component: './Account/Settings/BindingView',
  261. },
  262. {
  263. path: '/account/settings/notification',
  264. component: './Account/Settings/NotificationView',
  265. },
  266. ],
  267. },
  268. ],
  269. },
  270. // editor
  271. {
  272. name: 'editor',
  273. icon: 'highlight',
  274. path: '/editor',
  275. routes: [
  276. {
  277. path: '/editor/flow',
  278. name: 'flow',
  279. component: './Editor/GGEditor/Flow',
  280. },
  281. {
  282. path: '/editor/mind',
  283. name: 'mind',
  284. component: './Editor/GGEditor/Mind',
  285. },
  286. {
  287. path: '/editor/koni',
  288. name: 'koni',
  289. component: './Editor/GGEditor/Koni',
  290. },
  291. ],
  292. },
  293. {
  294. component: '404',
  295. },
  296. ],
  297. },
  298. ];