router.config.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. // eslint-disable-next-line
  2. import {
  3. UserLayout,
  4. BasicLayout,
  5. RouteView,
  6. BlankLayout,
  7. PageView
  8. } from '@/layouts'
  9. export const asyncRouterMap = [
  10. {
  11. path: '/',
  12. name: 'index',
  13. component: BasicLayout,
  14. meta: {
  15. title: '首页'
  16. },
  17. redirect: '/home',
  18. children: [
  19. {
  20. path: '/home',
  21. name: 'home',
  22. redirect: '/home',
  23. component: PageView,
  24. meta: {
  25. title: '首页',
  26. icon: 'home'
  27. },
  28. hideChildrenInMenu: true,
  29. children: [{
  30. path: '/home',
  31. name: 'home',
  32. component: () => import(/* webpackChunkName: "home" */ '@/views/Home'),
  33. meta: {
  34. title: '首页',
  35. icon: 'home',
  36. hide: true
  37. }
  38. }]
  39. },
  40. {
  41. path: '/changePwd',
  42. name: 'changePwd',
  43. component: () => import(/* webpackChunkName: "home" */ '@/views/user/ChangePwd'),
  44. meta: {
  45. title: '修改密码',
  46. icon: 'home'
  47. },
  48. hidden: true
  49. },
  50. // 数字货架管理
  51. {
  52. path: '/numsGoodsShelves',
  53. redirect: '/numsGoodsShelves/approveStore',
  54. component: PageView,
  55. meta: {
  56. title: '数字货架管理',
  57. icon: 'hdd',
  58. permission: 'M_numsGoodsShelves'
  59. },
  60. children: [
  61. {
  62. path: '/numsGoodsShelves/approveStore',
  63. redirect: '/numsGoodsShelves/approveStore/list',
  64. name: 'approveStore',
  65. component: BlankLayout,
  66. meta: {
  67. title: '汽修厂认证审核',
  68. icon: 'monitor',
  69. permission: 'M_approveStore'
  70. },
  71. hideChildrenInMenu: true,
  72. children: [
  73. {
  74. path: 'list',
  75. name: 'approveStoreList',
  76. component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/approveStore/list.vue'),
  77. meta: {
  78. title: '认证审核列表',
  79. icon: 'monitor',
  80. replaceTab: true,
  81. hidden: true,
  82. permission: 'M_approveStore'
  83. }
  84. },
  85. {
  86. path: 'authPass/:sn',
  87. name: 'approveStoreAuthPass',
  88. component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/approveStore/authPass.vue'),
  89. meta: {
  90. title: '审核通过',
  91. icon: 'monitor',
  92. replaceTab: true,
  93. hidden: true
  94. }
  95. }
  96. ]
  97. }
  98. ]
  99. },
  100. // 连锁组管理
  101. {
  102. path: '/chainGroupManagement',
  103. redirect: '/chainGroupManagement/chainGroupSetting',
  104. component: PageView,
  105. meta: {
  106. title: '连锁组管理',
  107. icon: 'radar-chart',
  108. permission: 'M_chainGroupManagement'
  109. },
  110. children: [
  111. {
  112. path: '/chainGroupManagement/chainGroupSetting',
  113. redirect: '/chainGroupManagement/chainGroupSetting/list',
  114. name: 'chainGroupSetting',
  115. component: RouteView,
  116. meta: {
  117. title: '连锁组设置',
  118. icon: 'pull-request',
  119. permission: 'M_chainGroupSetting'
  120. },
  121. hideChildrenInMenu: true,
  122. children: [
  123. {
  124. path: 'list',
  125. name: 'chainGroupSettingList',
  126. component: () => import(/* webpackChunkName: "chainGroupManagement" */ '@/views/chainGroupManagement/chainGroupSetting/list.vue'),
  127. meta: {
  128. title: '连锁组列表',
  129. icon: 'pull-request',
  130. hidden: true,
  131. permission: 'M_chainGroupSetting'
  132. }
  133. }
  134. ]
  135. }
  136. ]
  137. },
  138. // APP设置
  139. {
  140. path: '/appSetting',
  141. redirect: '/appSetting/versionSettings',
  142. component: PageView,
  143. meta: {
  144. title: 'APP设置',
  145. icon: 'tablet',
  146. permission: 'M_appSetting'
  147. },
  148. children: [
  149. {
  150. path: '/appSetting/versionSettings',
  151. redirect: '/appSetting/versionSettings/list',
  152. name: 'versionSettings',
  153. component: RouteView,
  154. meta: {
  155. title: '版本设置',
  156. icon: 'branches',
  157. permission: 'M_versionSettings'
  158. },
  159. hideChildrenInMenu: true,
  160. children: [
  161. {
  162. path: 'list',
  163. name: 'versionSettingsList',
  164. component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/versionSettings/list.vue'),
  165. meta: {
  166. title: '版本设置',
  167. icon: 'branches',
  168. hidden: true,
  169. permission: 'M_versionSettings'
  170. }
  171. }
  172. ]
  173. }
  174. ]
  175. },
  176. {
  177. path: '/menusAuth',
  178. redirect: '/bnSetting/menusAuth',
  179. component: PageView,
  180. meta: {
  181. title: '菜单管理',
  182. icon: 'bars',
  183. permission: 'M_menusAuth_0'
  184. },
  185. children: [
  186. {
  187. path: '/menusAuth/storeMenus',
  188. name: 'storeMenus',
  189. component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/storeMenus.vue'),
  190. meta: {
  191. title: '连锁菜单管理',
  192. icon: 'shop',
  193. permission: 'M_menusAuth_lsMenus'
  194. }
  195. },
  196. // {
  197. // path: '/menusAuth/adminMenus',
  198. // name: 'adminMenus',
  199. // component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/adminMenus.vue'),
  200. // meta: {
  201. // title: 'boss菜单管理',
  202. // icon: 'appstore',
  203. // // permission: 'M_menusAuth_adminMenus'
  204. // }
  205. // },
  206. {
  207. path: '/menusAuth/menu',
  208. name: 'powerMenu',
  209. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
  210. meta: {
  211. title: 'IT菜单管理',
  212. icon: 'profile',
  213. permission: 'M_menusAuth_menu'
  214. }
  215. },
  216. {
  217. path: '/menusAuth/menuMould',
  218. name: 'MenuMould',
  219. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menuMould/list.vue'),
  220. meta: {
  221. title: '菜单模板',
  222. icon: 'profile',
  223. permission: 'M_menuMould'
  224. }
  225. }
  226. ]
  227. },
  228. // auth
  229. {
  230. path: '/auth',
  231. redirect: '/auth/userList',
  232. component: PageView,
  233. meta: {
  234. title: '权限管理',
  235. icon: 'lock',
  236. permission: 'M_auth_0'
  237. },
  238. children: [
  239. {
  240. path: '/auth/userList',
  241. name: 'powerUserList',
  242. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  243. meta: {
  244. title: '用户管理',
  245. icon: 'usergroup-add',
  246. permission: 'M_auth_userList'
  247. }
  248. },
  249. {
  250. path: '/auth/roleList',
  251. name: 'powerRoleList',
  252. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  253. meta: {
  254. title: '角色管理',
  255. icon: 'solution',
  256. permission: 'M_auth_roleList'
  257. }
  258. },
  259. {
  260. path: '/auth/setUser',
  261. name: 'setUserList',
  262. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/superUser/setUser.vue'),
  263. meta: {
  264. title: '超级管理员',
  265. icon: 'user',
  266. permission: 'M_auth_superAdmin'
  267. }
  268. }
  269. ]
  270. },
  271. {
  272. path: '/setting',
  273. redirect: '/setting/userList',
  274. component: PageView,
  275. meta: {
  276. title: '系统设置',
  277. icon: 'setting',
  278. permission: 'M_setting_0'
  279. },
  280. children: [
  281. {
  282. path: '/setting/dataDictionary',
  283. name: 'powerDD',
  284. component: () => import(/* webpackChunkName: "setting" */
  285. '@/views/power/dataDictionary/dataDictionary.vue'),
  286. meta: {
  287. title: '数据字典管理',
  288. icon: 'database',
  289. permission: 'M_sys_dataDictionary'
  290. }
  291. },
  292. // {
  293. // path: '/setting/register',
  294. // name: 'powerRegister',
  295. // component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
  296. // meta: {
  297. // title: '参数管理',
  298. // icon: 'key',
  299. // permission: 'M_sys_register'
  300. // }
  301. // },
  302. {
  303. path: '/setting/OperateJournal',
  304. name: 'powerOperateJournal',
  305. component: () => import(/* webpackChunkName: "setting" */
  306. '@/views/power/OperateJournal/OperateJournal.vue'),
  307. meta: {
  308. title: '操作日志',
  309. icon: 'read',
  310. permission: 'M_operateJournal'
  311. }
  312. },
  313. {
  314. path: '/setting/equipmentManagement',
  315. name: 'equipmentManagement',
  316. component: () => import(/* webpackChunkName: "setting" */
  317. '@/views/power/equipment/equipmentManagement.vue'),
  318. meta: {
  319. title: '设备管理',
  320. icon: 'read'
  321. // permission: 'M_operateJournal'
  322. }
  323. }
  324. ]
  325. }
  326. ]
  327. },
  328. {
  329. path: '*',
  330. redirect: '/404',
  331. hidden: true
  332. }
  333. ]
  334. /**
  335. * 基础路由
  336. * @type { *[] }
  337. */
  338. export const constantRouterMap = [
  339. {
  340. path: '/user',
  341. component: UserLayout,
  342. redirect: '/user/login',
  343. hidden: true,
  344. children: [
  345. {
  346. path: 'login',
  347. name: 'login',
  348. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  349. },
  350. {
  351. path: 'register',
  352. name: 'register',
  353. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  354. },
  355. {
  356. path: 'register-result',
  357. name: 'registerResult',
  358. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  359. },
  360. {
  361. path: 'recover',
  362. name: 'recover',
  363. component: undefined
  364. }
  365. ]
  366. },
  367. {
  368. path: '/404',
  369. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  370. }
  371. ]