router.config.js 7.6 KB

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