router.config.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. // eslint-disable-next-line
  2. import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
  3. // import { bxAnaalyse } from '@/core/icons'
  4. // const RouteView = {
  5. // name: 'RouteView',
  6. // render: h => h('router-view')
  7. // }
  8. export const asyncRouterMap = [
  9. {
  10. path: '/',
  11. name: 'list',
  12. component: BasicLayout,
  13. meta: { title: '订单' },
  14. redirect: '/manager/list/table-list',
  15. children: [
  16. {
  17. path: '/manager/list/table-list/:pageNo([1-9]\\d*)?',
  18. name: 'TableListWrapper',
  19. hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
  20. component: () => import('@/views/list/TableList'),
  21. meta: { title: '订单列表', keepAlive: true }
  22. }
  23. // dashboard
  24. // {
  25. // path: '/dashboard',
  26. // name: 'dashboard',
  27. // redirect: '/dashboard/workplace',
  28. // component: RouteView,
  29. // meta: { title: 'menu.dashboard', keepAlive: true, icon: bxAnaalyse, permission: ['dashboard'] },
  30. // children: [
  31. // {
  32. // path: '/dashboard/analysis/:pageNo([1-9]\\d*)?',
  33. // name: 'Analysis',
  34. // component: () => import('@/views/dashboard/Analysis'),
  35. // meta: { title: 'menu.dashboard.analysis', keepAlive: false, permission: ['dashboard'] }
  36. // }
  37. // // 外部链接
  38. // // {
  39. // // path: 'https://www.baidu.com/',
  40. // // name: 'Monitor',
  41. // // meta: { title: 'menu.dashboard.monitor', target: '_blank' }
  42. // // },
  43. // {
  44. // path: '/dashboard/workplace',
  45. // name: 'Workplace',
  46. // component: () => import('@/views/dashboard/Workplace'),
  47. // meta: { title: 'menu.dashboard.workplace', keepAlive: true, permission: ['dashboard'] }
  48. // }
  49. // ]
  50. // },
  51. // // forms
  52. // {
  53. // path: '/form',
  54. // redirect: '/form/base-form',
  55. // component: RouteView,
  56. // meta: { title: 'menu.form', icon: 'form', permission: ['form'] },
  57. // children: [
  58. // {
  59. // path: '/form/base-form',
  60. // name: 'BaseForm',
  61. // component: () => import('@/views/form/basicForm'),
  62. // meta: { title: 'menu.form.basic-form', keepAlive: true, permission: ['form'] }
  63. // },
  64. // {
  65. // path: '/form/step-form',
  66. // name: 'StepForm',
  67. // component: () => import('@/views/form/stepForm/StepForm'),
  68. // meta: { title: 'menu.form.step-form', keepAlive: true, permission: ['form'] }
  69. // },
  70. // {
  71. // path: '/form/advanced-form',
  72. // name: 'AdvanceForm',
  73. // component: () => import('@/views/form/advancedForm/AdvancedForm'),
  74. // meta: { title: 'menu.form.advanced-form', keepAlive: true, permission: ['form'] }
  75. // }
  76. // ]
  77. // },
  78. // list
  79. // {
  80. // path: '/list',
  81. // name: 'list',
  82. // component: RouteView,
  83. // redirect: '/list/table-list',
  84. // meta: { title: '订单', icon: 'table' },
  85. // children: [
  86. // {
  87. // path: '/list/table-list/:pageNo([1-9]\\d*)?',
  88. // name: 'TableListWrapper',
  89. // hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
  90. // component: () => import('@/views/list/TableList'),
  91. // meta: { title: '订单列表', keepAlive: true }
  92. // }
  93. // ,
  94. // {
  95. // path: '/list/basic-list',
  96. // name: 'BasicList',
  97. // component: () => import('@/views/list/BasicList'),
  98. // meta: { title: 'menu.list.basic-list', keepAlive: true, permission: ['table'] }
  99. // },
  100. // {
  101. // path: '/list/card',
  102. // name: 'CardList',
  103. // component: () => import('@/views/list/CardList'),
  104. // meta: { title: 'menu.list.card-list', keepAlive: true, permission: ['table'] }
  105. // },
  106. // {
  107. // path: '/list/search',
  108. // name: 'SearchList',
  109. // component: () => import('@/views/list/search/SearchLayout'),
  110. // redirect: '/list/search/article',
  111. // meta: { title: 'menu.list.search-list', keepAlive: true, permission: ['table'] },
  112. // children: [
  113. // {
  114. // path: '/list/search/article',
  115. // name: 'SearchArticles',
  116. // component: () => import('../views/list/search/Article'),
  117. // meta: { title: 'menu.list.search-list.articles', permission: ['table'] }
  118. // },
  119. // {
  120. // path: '/list/search/project',
  121. // name: 'SearchProjects',
  122. // component: () => import('../views/list/search/Projects'),
  123. // meta: { title: 'menu.list.search-list.projects', permission: ['table'] }
  124. // },
  125. // {
  126. // path: '/list/search/application',
  127. // name: 'SearchApplications',
  128. // component: () => import('../views/list/search/Applications'),
  129. // meta: { title: 'menu.list.search-list.applications', permission: ['table'] }
  130. // }
  131. // ]
  132. // }
  133. // ]
  134. // }
  135. // ,
  136. // profile
  137. // {
  138. // path: '/profile',
  139. // name: 'profile',
  140. // component: RouteView,
  141. // redirect: '/profile/basic',
  142. // meta: { title: 'menu.profile', icon: 'profile', permission: ['profile'] },
  143. // children: [
  144. // {
  145. // path: '/profile/basic',
  146. // name: 'ProfileBasic',
  147. // component: () => import('@/views/profile/basic'),
  148. // meta: { title: 'menu.profile.basic', permission: ['profile'] }
  149. // },
  150. // {
  151. // path: '/profile/advanced',
  152. // name: 'ProfileAdvanced',
  153. // component: () => import('@/views/profile/advanced/Advanced'),
  154. // meta: { title: 'menu.profile.advanced', permission: ['profile'] }
  155. // }
  156. // ]
  157. // },
  158. // // result
  159. // {
  160. // path: '/result',
  161. // name: 'result',
  162. // component: RouteView,
  163. // redirect: '/result/success',
  164. // meta: { title: 'menu.result', icon: 'check-circle-o', permission: ['result'] },
  165. // children: [
  166. // {
  167. // path: '/result/success',
  168. // name: 'ResultSuccess',
  169. // component: () => import(/* webpackChunkName: "result" */ '@/views/result/Success'),
  170. // meta: { title: 'menu.result.success', keepAlive: false, hiddenHeaderContent: true, permission: ['result'] }
  171. // },
  172. // {
  173. // path: '/result/fail',
  174. // name: 'ResultFail',
  175. // component: () => import(/* webpackChunkName: "result" */ '@/views/result/Error'),
  176. // meta: { title: 'menu.result.fail', keepAlive: false, hiddenHeaderContent: true, permission: ['result'] }
  177. // }
  178. // ]
  179. // },
  180. // // Exception
  181. // {
  182. // path: '/exception',
  183. // name: 'exception',
  184. // component: RouteView,
  185. // redirect: '/exception/403',
  186. // meta: { title: 'menu.exception', icon: 'warning', permission: ['exception'] },
  187. // children: [
  188. // {
  189. // path: '/exception/403',
  190. // name: 'Exception403',
  191. // component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/403'),
  192. // meta: { title: 'menu.exception.not-permission', permission: ['exception'] }
  193. // },
  194. // {
  195. // path: '/exception/404',
  196. // name: 'Exception404',
  197. // component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'),
  198. // meta: { title: 'menu.exception.not-find', permission: ['exception'] }
  199. // },
  200. // {
  201. // path: '/exception/500',
  202. // name: 'Exception500',
  203. // component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'),
  204. // meta: { title: 'menu.exception.server-error', permission: ['exception'] }
  205. // }
  206. // ]
  207. // },
  208. // // account
  209. // {
  210. // path: '/account',
  211. // component: RouteView,
  212. // redirect: '/account/center',
  213. // name: 'account',
  214. // meta: { title: 'menu.account', icon: 'user', keepAlive: true, permission: ['user'] },
  215. // children: [
  216. // {
  217. // path: '/account/center',
  218. // name: 'center',
  219. // component: () => import('@/views/account/center'),
  220. // meta: { title: 'menu.account.center', keepAlive: true, permission: ['user'] }
  221. // },
  222. // {
  223. // path: '/account/settings',
  224. // name: 'settings',
  225. // component: () => import('@/views/account/settings/Index'),
  226. // meta: { title: 'menu.account.settings', hideHeader: true, permission: ['user'] },
  227. // redirect: '/account/settings/basic',
  228. // hideChildrenInMenu: true,
  229. // children: [
  230. // {
  231. // path: '/account/settings/basic',
  232. // name: 'BasicSettings',
  233. // component: () => import('@/views/account/settings/BasicSetting'),
  234. // meta: { title: 'account.settings.menuMap.basic', hidden: true, permission: ['user'] }
  235. // },
  236. // {
  237. // path: '/account/settings/security',
  238. // name: 'SecuritySettings',
  239. // component: () => import('@/views/account/settings/Security'),
  240. // meta: {
  241. // title: 'account.settings.menuMap.security',
  242. // hidden: true,
  243. // keepAlive: true,
  244. // permission: ['user']
  245. // }
  246. // },
  247. // {
  248. // path: '/account/settings/custom',
  249. // name: 'CustomSettings',
  250. // component: () => import('@/views/account/settings/Custom'),
  251. // meta: { title: 'account.settings.menuMap.custom', hidden: true, keepAlive: true, permission: ['user'] }
  252. // },
  253. // {
  254. // path: '/account/settings/binding',
  255. // name: 'BindingSettings',
  256. // component: () => import('@/views/account/settings/Binding'),
  257. // meta: { title: 'account.settings.menuMap.binding', hidden: true, keepAlive: true, permission: ['user'] }
  258. // },
  259. // {
  260. // path: '/account/settings/notification',
  261. // name: 'NotificationSettings',
  262. // component: () => import('@/views/account/settings/Notification'),
  263. // meta: {
  264. // title: 'account.settings.menuMap.notification',
  265. // hidden: true,
  266. // keepAlive: true,
  267. // permission: ['user']
  268. // }
  269. // }
  270. // ]
  271. // }
  272. // ]
  273. // }
  274. // other
  275. /*
  276. {
  277. path: '/other',
  278. name: 'otherPage',
  279. component: PageView,
  280. meta: { title: '其他组件', icon: 'slack', permission: [ 'dashboard' ] },
  281. redirect: '/other/icon-selector',
  282. children: [
  283. {
  284. path: '/other/icon-selector',
  285. name: 'TestIconSelect',
  286. component: () => import('@/views/other/IconSelectorView'),
  287. meta: { title: 'IconSelector', icon: 'tool', keepAlive: true, permission: [ 'dashboard' ] }
  288. },
  289. {
  290. path: '/other/list',
  291. component: RouteView,
  292. meta: { title: '业务布局', icon: 'layout', permission: [ 'support' ] },
  293. redirect: '/other/list/tree-list',
  294. children: [
  295. {
  296. path: '/other/list/tree-list',
  297. name: 'TreeList',
  298. component: () => import('@/views/other/TreeList'),
  299. meta: { title: '树目录表格', keepAlive: true }
  300. },
  301. {
  302. path: '/other/list/edit-table',
  303. name: 'EditList',
  304. component: () => import('@/views/other/TableInnerEditList'),
  305. meta: { title: '内联编辑表格', keepAlive: true }
  306. },
  307. {
  308. path: '/other/list/user-list',
  309. name: 'UserList',
  310. component: () => import('@/views/other/UserList'),
  311. meta: { title: '用户列表', keepAlive: true }
  312. },
  313. {
  314. path: '/other/list/role-list',
  315. name: 'RoleList',
  316. component: () => import('@/views/other/RoleList'),
  317. meta: { title: '角色列表', keepAlive: true }
  318. },
  319. {
  320. path: '/other/list/system-role',
  321. name: 'SystemRole',
  322. component: () => import('@/views/role/RoleList'),
  323. meta: { title: '角色列表2', keepAlive: true }
  324. },
  325. {
  326. path: '/other/list/permission-list',
  327. name: 'PermissionList',
  328. component: () => import('@/views/other/PermissionList'),
  329. meta: { title: '权限列表', keepAlive: true }
  330. }
  331. ]
  332. }
  333. ]
  334. }
  335. */
  336. ]
  337. },
  338. {
  339. path: '*',
  340. redirect: '/404',
  341. hidden: true
  342. }
  343. ]
  344. /**
  345. * 基础路由
  346. * @type { *[] }
  347. */
  348. export const constantRouterMap = [
  349. {
  350. path: '/manager/user',
  351. component: UserLayout,
  352. redirect: '/manager/user/login',
  353. hidden: true,
  354. children: [
  355. {
  356. path: 'login',
  357. name: 'login',
  358. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  359. }
  360. // ,
  361. // {
  362. // path: 'register',
  363. // name: 'register',
  364. // component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  365. // },
  366. // {
  367. // path: 'register-result',
  368. // name: 'registerResult',
  369. // component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  370. // },
  371. // {
  372. // path: 'recover',
  373. // name: 'recover',
  374. // component: undefined
  375. // }
  376. ]
  377. },
  378. {
  379. path: '/404',
  380. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  381. }
  382. ]