router.config.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'
  2. /**
  3. * 走菜单,走权限控制
  4. * @type {[null,null]}
  5. */
  6. export const asyncRouterMap = [
  7. {
  8. path: '/',
  9. name: 'dashboard',
  10. component: TabLayout,
  11. meta: { title: '联锁总表' },
  12. redirect: '/interLock/summary',
  13. // meta: { title: '首页' },
  14. // redirect: '/dashboard/analysis',
  15. children: [
  16. // // dashboard
  17. // {
  18. // path: '/dashboard',
  19. // name: 'dashboard',
  20. // redirect: '/dashboard/workplace',
  21. // component: RouteView,
  22. // meta: { title: '仪表盘', icon: 'dashboard', permission: [ 'dashboard' ] },
  23. // children: [
  24. // {
  25. // path: '/dashboard/analysis',
  26. // name: 'Analysis',
  27. // component: () => import('@/views/dashboard/Analysis'),
  28. // meta: { title: '分析页', permission: [ 'dashboard' ] }
  29. // },
  30. // {
  31. // path: '/dashboard/monitor',
  32. // name: 'Monitor',
  33. // hidden: true,
  34. // component: () => import('@/views/dashboard/Monitor'),
  35. // meta: { title: '监控页', permission: [ 'dashboard' ] }
  36. // },
  37. // {
  38. // path: '/dashboard/workplace',
  39. // name: 'Workplace',
  40. // component: () => import('@/views/dashboard/Workplace'),
  41. // meta: { title: '工作台', permission: [ 'dashboard' ] }
  42. // }
  43. // ]
  44. // },
  45. //
  46. // // forms
  47. // {
  48. // path: '/form',
  49. // redirect: '/form/basic-form',
  50. // component: PageView,
  51. // meta: { title: '表单页', icon: 'form', permission: [ 'form' ] },
  52. // children: [
  53. // {
  54. // path: '/form/base-form',
  55. // name: 'BaseForm',
  56. // component: () => import('@/views/form/BasicForm'),
  57. // meta: { title: '基础表单', permission: [ 'form' ] }
  58. // },
  59. // {
  60. // path: '/form/step-form',
  61. // name: 'StepForm',
  62. // component: () => import('@/views/form/stepForm/StepForm'),
  63. // meta: { title: '分步表单', permission: [ 'form' ] }
  64. // },
  65. // {
  66. // path: '/form/advanced-form',
  67. // name: 'AdvanceForm',
  68. // component: () => import('@/views/form/advancedForm/AdvancedForm'),
  69. // meta: { title: '高级表单', permission: [ 'form' ] }
  70. // }
  71. // ]
  72. // },
  73. //
  74. // // list
  75. // {
  76. // path: '/list',
  77. // name: 'list',
  78. // component: PageView,
  79. // redirect: '/list/query-list',
  80. // meta: { title: '列表页', icon: 'table', permission: [ 'table' ] },
  81. // children: [
  82. // {
  83. // path: '/list/query-list',
  84. // name: 'QueryList',
  85. // component: () => import('@/views/list/TableList'),
  86. // meta: { title: '查询表格', permission: [ 'table' ] }
  87. // },
  88. // {
  89. // path: '/list/edit-table',
  90. // name: 'EditList',
  91. // component: () => import('@/views/list/TableInnerEditList'),
  92. // meta: { title: '内联编辑表格', permission: [ 'table' ] }
  93. // },
  94. // {
  95. // path: '/list/user-list',
  96. // name: 'UserList',
  97. // component: () => import('@/views/list/UserList'),
  98. // meta: { title: '用户列表', permission: [ 'table' ] }
  99. // },
  100. // {
  101. // path: '/list/role-list',
  102. // name: 'RoleList',
  103. // component: () => import('@/views/list/RoleList'),
  104. // meta: { title: '角色列表', permission: [ 'table' ] }
  105. // },
  106. // {
  107. // path: '/list/permission-list',
  108. // name: 'PermissionList',
  109. // component: () => import('@/views/list/PermissionList'),
  110. // meta: { title: '权限列表', permission: [ 'table' ] }
  111. // },
  112. // {
  113. // path: '/list/basic-list',
  114. // name: 'BasicList',
  115. // component: () => import('@/views/list/StandardList'),
  116. // meta: { title: '标准列表', permission: [ 'table' ] }
  117. // },
  118. // {
  119. // path: '/list/card',
  120. // name: 'CardList',
  121. // component: () => import('@/views/list/CardList'),
  122. // meta: { title: '卡片列表', permission: [ 'table' ] }
  123. // },
  124. // {
  125. // path: '/list/search',
  126. // name: 'SearchList',
  127. // component: () => import('@/views/list/search/SearchLayout'),
  128. // redirect: '/list/search/article',
  129. // meta: { title: '搜索列表', permission: [ 'table' ] },
  130. // children: [
  131. // {
  132. // path: '/list/search/article',
  133. // name: 'SearchArticles',
  134. // component: () => import('../views/list/TableList'),
  135. // meta: { title: '搜索列表(文章)', permission: [ 'table' ] }
  136. // },
  137. // {
  138. // path: '/list/search/project',
  139. // name: 'SearchProjects',
  140. // component: () => import('../views/list/TableList'),
  141. // meta: { title: '搜索列表(项目)', permission: [ 'table' ] }
  142. // },
  143. // {
  144. // path: '/list/search/application',
  145. // name: 'SearchApplications',
  146. // component: () => import('../views/list/TableList'),
  147. // meta: { title: '搜索列表(应用)', permission: [ 'table' ] }
  148. // },
  149. // ]
  150. // },
  151. // ]
  152. // },
  153. //
  154. // // profile
  155. // {
  156. // path: '/profile',
  157. // name: 'profile',
  158. // component: RouteView,
  159. // redirect: '/profile/basic',
  160. // meta: { title: '详情页', icon: 'profile', permission: [ 'profile' ] },
  161. // children: [
  162. // {
  163. // path: '/profile/basic',
  164. // name: 'ProfileBasic',
  165. // component: () => import('@/views/profile/basic/Index'),
  166. // meta: { title: '基础详情页', permission: [ 'profile' ] }
  167. // },
  168. // {
  169. // path: '/profile/advanced',
  170. // name: 'ProfileAdvanced',
  171. // component: () => import('@/views/profile/advanced/Advanced'),
  172. // meta: { title: '高级详情页', permission: [ 'profile' ] }
  173. // }
  174. // ]
  175. // },
  176. //
  177. // // result
  178. // {
  179. // path: '/result',
  180. // name: 'result',
  181. // component: PageView,
  182. // redirect: '/result/success',
  183. // meta: { title: '结果页', icon: 'check-circle-o', permission: [ 'result' ] },
  184. // children: [
  185. // {
  186. // path: '/result/success',
  187. // name: 'ResultSuccess',
  188. // component: () => import(/* webpackChunkName: "result" */ '@/views/result/Success'),
  189. // meta: { title: '成功', hiddenHeaderContent: true, permission: [ 'result' ] }
  190. // },
  191. // {
  192. // path: '/result/fail',
  193. // name: 'ResultFail',
  194. // component: () => import(/* webpackChunkName: "result" */ '@/views/result/Error'),
  195. // meta: { title: '失败', hiddenHeaderContent: true, permission: [ 'result' ] }
  196. // }
  197. // ]
  198. // },
  199. //
  200. // // Exception
  201. // {
  202. // path: '/exception',
  203. // name: 'exception',
  204. // component: RouteView,
  205. // redirect: '/exception/403',
  206. // meta: { title: '异常页', icon: 'warning', permission: [ 'exception' ] },
  207. // children: [
  208. // {
  209. // path: '/exception/403',
  210. // name: 'Exception403',
  211. // component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/403'),
  212. // meta: { title: '403', permission: [ 'exception' ] }
  213. // },
  214. // {
  215. // path: '/exception/404',
  216. // name: 'Exception404',
  217. // component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'),
  218. // meta: { title: '404', permission: [ 'exception' ] }
  219. // },
  220. // {
  221. // path: '/exception/500',
  222. // name: 'Exception500',
  223. // component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'),
  224. // meta: { title: '500', permission: [ 'exception' ] }
  225. // }
  226. // ]
  227. // },
  228. //
  229. // // account
  230. // {
  231. // path: '/account',
  232. // component: RouteView,
  233. // name: 'account',
  234. // meta: { title: '个人页', icon: 'user', keepAlive: true, permission: [ 'user' ] },
  235. // children: [
  236. // {
  237. // path: '/account/center',
  238. // name: 'center',
  239. // component: () => import('@/views/account/center/Index'),
  240. // meta: { title: '个人中心', keepAlive: true, permission: [ 'user' ] }
  241. // },
  242. // {
  243. // path: '/account/settings',
  244. // name: 'settings',
  245. // component: () => import('@/views/account/settings/Index'),
  246. // meta: { title: '个人设置', hideHeader: true, keepAlive: true, permission: [ 'user' ] },
  247. // redirect: '/account/settings/base',
  248. // alwaysShow: true,
  249. // children: [
  250. // {
  251. // path: '/account/settings/base',
  252. // name: 'BaseSettings',
  253. // component: () => import('@/views/account/settings/BaseSetting'),
  254. // meta: { title: '基本设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
  255. // },
  256. // {
  257. // path: '/account/settings/security',
  258. // name: 'SecuritySettings',
  259. // component: () => import('@/views/account/settings/Security'),
  260. // meta: { title: '安全设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
  261. // },
  262. // {
  263. // path: '/account/settings/custom',
  264. // name: 'CustomSettings',
  265. // component: () => import('@/views/account/settings/Custom'),
  266. // meta: { title: '个性化设置', hidden: true, keepAlive: true, permission: [ 'user' ] }
  267. // },
  268. // {
  269. // path: '/account/settings/binding',
  270. // name: 'BindingSettings',
  271. // component: () => import('@/views/account/settings/Binding'),
  272. // meta: { title: '账户绑定', hidden: true, keepAlive: true, permission: [ 'user' ] }
  273. // },
  274. // {
  275. // path: '/account/settings/notification',
  276. // name: 'NotificationSettings',
  277. // component: () => import('@/views/account/settings/Notification'),
  278. // meta: { title: '新消息通知', hidden: true, keepAlive: true, permission: [ 'user' ] }
  279. // },
  280. // ]
  281. // },
  282. // ]
  283. // }
  284. ]
  285. },
  286. {
  287. path: '*', redirect: '/404', hidden: true
  288. }
  289. ]
  290. /**
  291. * 基础路由
  292. * @type { *[] }
  293. */
  294. export const constantRouterMap = [
  295. {
  296. path: '/org',
  297. component: UserLayout,
  298. redirect: '/org/login',
  299. hidden: true,
  300. children: [
  301. {
  302. path: 'login',
  303. name: 'orgLogin',
  304. component: () => import(/* webpackChunkName: "user" */ '@/views/user/OrgLogin')
  305. },
  306. ]
  307. },
  308. {
  309. path: '/user',
  310. component: UserLayout,
  311. redirect: '/user/login',
  312. hidden: true,
  313. children: [
  314. {
  315. path: 'login',
  316. name: 'login',
  317. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  318. },
  319. {
  320. path: 'register',
  321. name: 'register',
  322. component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register')
  323. },
  324. {
  325. path: 'register-result',
  326. name: 'registerResult',
  327. component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/RegisterResult')
  328. },
  329. {
  330. path: 'alteration',
  331. name: 'alteration',
  332. component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration')
  333. },
  334. ]
  335. },
  336. // {
  337. // path: '/',
  338. // name: 'index',
  339. // component: TabLayout,
  340. // meta: {title: '首页'},
  341. // redirect: '/dashboard/workplace',
  342. // children: [
  343. // {
  344. // path: '/online',
  345. // name: 'online',
  346. // redirect: '/online',
  347. // component: RouteView,
  348. // meta: {title: '在线开发', icon: 'dashboard', permission: ['dashboard']},
  349. // children: [
  350. // {
  351. // path: '/online/auto/:code',
  352. // name: 'report',
  353. // component: () => import('@/views/modules/online/cgreport/OnlCgreportAutoList')
  354. // },
  355. // ]
  356. // },
  357. // ]
  358. // },
  359. {
  360. // OAuth2 APP页面路由
  361. path: '/oauth2-app',
  362. component: BlankLayout,
  363. redirect: '/oauth2-app/login',
  364. children: [
  365. {
  366. // OAuth2 登录路由
  367. path: 'login',
  368. name: 'oauth2-app-login',
  369. component: () => import(/* webpackChunkName: "oauth2-app.login" */ '@/views/user/oauth2/OAuth2Login')
  370. },
  371. ]
  372. },
  373. // IoT Edge相关 修改框架
  374. {
  375. // ito sso登录页面路由
  376. path: '/iot-sso',
  377. component: BlankLayout,
  378. redirect: '/iot-sso/login',
  379. children: [
  380. {
  381. // ito sso 登录路由
  382. path: 'login',
  383. name: 'iot-sso-login',
  384. component: () => import(/* webpackChunkName: "iot-sso.login" */ '@/views/user/iotSso/IotSsoLogin')
  385. },
  386. ]
  387. },
  388. {
  389. path: '/test',
  390. component: BlankLayout,
  391. redirect: '/test/home',
  392. children: [
  393. {
  394. path: 'home',
  395. name: 'TestHome',
  396. component: () => import('@/views/Home')
  397. }
  398. ]
  399. },
  400. {
  401. path: '/404',
  402. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  403. },
  404. ]