router.config.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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. // permission: 'M_approveStore'
  95. }
  96. },
  97. ]
  98. },
  99. ]
  100. },
  101. // 连锁组管理
  102. {
  103. path: '/chainGroupManagement',
  104. redirect: '/chainGroupManagement/chainGroupSetting',
  105. component: PageView,
  106. meta: {
  107. title: '连锁组管理',
  108. icon: 'radar-chart',
  109. permission: 'M_chainGroupManagement'
  110. },
  111. children: [
  112. {
  113. path: '/chainGroupManagement/chainGroupSetting',
  114. redirect: '/chainGroupManagement/chainGroupSetting/list',
  115. name: 'chainGroupSetting',
  116. component: RouteView,
  117. meta: {
  118. title: '连锁组设置',
  119. icon: 'pull-request',
  120. permission: 'M_chainGroupSetting'
  121. },
  122. hideChildrenInMenu: true,
  123. children: [
  124. {
  125. path: 'list',
  126. name: 'chainGroupSettingList',
  127. component: () => import(/* webpackChunkName: "chainGroupManagement" */ '@/views/chainGroupManagement/chainGroupSetting/list.vue'),
  128. meta: {
  129. title: '连锁组列表',
  130. icon: 'pull-request',
  131. hidden: true,
  132. permission: 'M_chainGroupSetting'
  133. }
  134. }
  135. ]
  136. }
  137. ]
  138. },
  139. // APP设置
  140. {
  141. path: '/appSetting',
  142. redirect: '/appSetting/versionSettings',
  143. component: PageView,
  144. meta: {
  145. title: 'APP设置',
  146. icon: 'tablet',
  147. permission: 'M_appSetting'
  148. },
  149. children: [
  150. {
  151. path: '/appSetting/versionSettings',
  152. redirect: '/appSetting/versionSettings/list',
  153. name: 'versionSettings',
  154. component: RouteView,
  155. meta: {
  156. title: '版本设置',
  157. icon: 'branches',
  158. permission: 'M_versionSettings'
  159. },
  160. hideChildrenInMenu: true,
  161. children: [
  162. {
  163. path: 'list',
  164. name: 'versionSettingsList',
  165. component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/versionSettings/list.vue'),
  166. meta: {
  167. title: '版本设置',
  168. icon: 'branches',
  169. hidden: true,
  170. permission: 'M_versionSettings'
  171. }
  172. }
  173. ]
  174. }
  175. ]
  176. },
  177. {
  178. path: '/menusAuth',
  179. redirect: '/bnSetting/menusAuth',
  180. component: PageView,
  181. meta: {
  182. title: '菜单管理',
  183. icon: 'bars',
  184. permission: 'M_menusAuth_0'
  185. },
  186. children: [
  187. {
  188. path: '/menusAuth/storeMenus',
  189. name: 'storeMenus',
  190. component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/storeMenus.vue'),
  191. meta: {
  192. title: '连锁菜单管理',
  193. icon: 'shop',
  194. permission: 'M_menusAuth_lsMenus'
  195. }
  196. },
  197. // {
  198. // path: '/menusAuth/adminMenus',
  199. // name: 'adminMenus',
  200. // component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/adminMenus.vue'),
  201. // meta: {
  202. // title: 'boss菜单管理',
  203. // icon: 'appstore',
  204. // // permission: 'M_menusAuth_adminMenus'
  205. // }
  206. // },
  207. {
  208. path: '/menusAuth/menu',
  209. name: 'powerMenu',
  210. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
  211. meta: {
  212. title: 'IT菜单管理',
  213. icon: 'profile',
  214. permission: 'M_menusAuth_menu'
  215. }
  216. },
  217. {
  218. path: '/menusAuth/menuMould',
  219. name: 'MenuMould',
  220. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menuMould/list.vue'),
  221. meta: {
  222. title: '菜单模板',
  223. icon: 'profile',
  224. permission: 'M_menuMould'
  225. }
  226. }
  227. ]
  228. },
  229. // auth
  230. {
  231. path: '/auth',
  232. redirect: '/auth/userList',
  233. component: PageView,
  234. meta: {
  235. title: '权限管理',
  236. icon: 'lock',
  237. permission: 'M_auth_0'
  238. },
  239. children: [
  240. {
  241. path: '/auth/userList',
  242. name: 'powerUserList',
  243. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  244. meta: {
  245. title: '用户管理',
  246. icon: 'usergroup-add',
  247. permission: 'M_auth_userList'
  248. }
  249. },
  250. {
  251. path: '/auth/roleList',
  252. name: 'powerRoleList',
  253. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  254. meta: {
  255. title: '角色管理',
  256. icon: 'solution',
  257. permission: 'M_auth_roleList'
  258. }
  259. },
  260. {
  261. path: '/auth/setUser',
  262. name: 'setUserList',
  263. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/superUser/setUser.vue'),
  264. meta: {
  265. title: '超级管理员',
  266. icon: 'user',
  267. permission: 'M_auth_superAdmin'
  268. }
  269. }
  270. ]
  271. },
  272. {
  273. path: '/setting',
  274. redirect: '/setting/userList',
  275. component: PageView,
  276. meta: {
  277. title: '系统设置',
  278. icon: 'setting',
  279. permission: 'M_setting_0'
  280. },
  281. children: [
  282. {
  283. path: '/setting/dataDictionary',
  284. name: 'powerDD',
  285. component: () => import(/* webpackChunkName: "setting" */
  286. '@/views/power/dataDictionary/dataDictionary.vue'),
  287. meta: {
  288. title: '数据字典管理',
  289. icon: 'database',
  290. permission: 'M_sys_dataDictionary'
  291. }
  292. },
  293. // {
  294. // path: '/setting/register',
  295. // name: 'powerRegister',
  296. // component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
  297. // meta: {
  298. // title: '参数管理',
  299. // icon: 'key',
  300. // permission: 'M_sys_register'
  301. // }
  302. // },
  303. {
  304. path: '/setting/OperateJournal',
  305. name: 'powerOperateJournal',
  306. component: () => import(/* webpackChunkName: "setting" */
  307. '@/views/power/OperateJournal/OperateJournal.vue'),
  308. meta: {
  309. title: '操作日志',
  310. icon: 'read',
  311. permission: 'M_operateJournal'
  312. }
  313. }
  314. ]
  315. }
  316. ]
  317. },
  318. {
  319. path: '*',
  320. redirect: '/404',
  321. hidden: true
  322. }
  323. ]
  324. /**
  325. * 基础路由
  326. * @type { *[] }
  327. */
  328. export const constantRouterMap = [
  329. {
  330. path: '/user',
  331. component: UserLayout,
  332. redirect: '/user/login',
  333. hidden: true,
  334. children: [
  335. {
  336. path: 'login',
  337. name: 'login',
  338. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  339. },
  340. {
  341. path: 'register',
  342. name: 'register',
  343. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  344. },
  345. {
  346. path: 'register-result',
  347. name: 'registerResult',
  348. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  349. },
  350. {
  351. path: 'recover',
  352. name: 'recover',
  353. component: undefined
  354. }
  355. ]
  356. },
  357. {
  358. path: '/404',
  359. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  360. }
  361. ]