router.config.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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: '/chainGroupManagement',
  53. redirect: '/chainGroupManagement/chainGroupSetting',
  54. component: PageView,
  55. meta: {
  56. title: '连锁组管理',
  57. icon: 'radar-chart',
  58. permission: 'M_chainGroupManagement'
  59. },
  60. children: [
  61. {
  62. path: '/chainGroupManagement/chainGroupSetting',
  63. redirect: '/chainGroupManagement/chainGroupSetting/list',
  64. name: 'chainGroupSetting',
  65. component: RouteView,
  66. meta: {
  67. title: '连锁组设置',
  68. icon: 'pull-request',
  69. permission: 'M_chainGroupSetting'
  70. },
  71. hideChildrenInMenu: true,
  72. children: [
  73. {
  74. path: 'list',
  75. name: 'chainGroupSettingList',
  76. component: () => import(/* webpackChunkName: "chainGroupManagement" */ '@/views/chainGroupManagement/chainGroupSetting/list.vue'),
  77. meta: {
  78. title: '连锁组列表',
  79. icon: 'pull-request',
  80. hidden: true,
  81. permission: 'M_chainGroupSetting'
  82. }
  83. }
  84. ]
  85. }
  86. ]
  87. },
  88. // APP设置
  89. {
  90. path: '/appSetting',
  91. redirect: '/appSetting/versionSettings',
  92. component: PageView,
  93. meta: {
  94. title: 'APP设置',
  95. icon: 'tablet'
  96. // permission: 'M_appSetting'
  97. },
  98. children: [
  99. {
  100. path: '/appSetting/versionSettings',
  101. redirect: '/appSetting/versionSettings/list',
  102. name: 'versionSettings',
  103. component: RouteView,
  104. meta: {
  105. title: '版本设置',
  106. icon: 'branches'
  107. // permission: 'M_versionSettings'
  108. },
  109. hideChildrenInMenu: true,
  110. children: [
  111. {
  112. path: 'list',
  113. name: 'versionSettingsList',
  114. component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/versionSettings/list.vue'),
  115. meta: {
  116. title: '版本设置',
  117. icon: 'branches',
  118. hidden: true
  119. // permission: 'M_versionSettings'
  120. }
  121. }
  122. ]
  123. }
  124. ]
  125. },
  126. {
  127. path: '/menusAuth',
  128. redirect: '/bnSetting/menusAuth',
  129. component: PageView,
  130. meta: {
  131. title: '菜单管理',
  132. icon: 'bars',
  133. permission: 'M_menusAuth_0'
  134. },
  135. children: [
  136. {
  137. path: '/menusAuth/storeMenus',
  138. name: 'storeMenus',
  139. component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/storeMenus.vue'),
  140. meta: {
  141. title: '连锁菜单管理',
  142. icon: 'shop',
  143. permission: 'M_menusAuth_lsMenus'
  144. }
  145. },
  146. // {
  147. // path: '/menusAuth/adminMenus',
  148. // name: 'adminMenus',
  149. // component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/adminMenus.vue'),
  150. // meta: {
  151. // title: 'boss菜单管理',
  152. // icon: 'appstore',
  153. // // permission: 'M_menusAuth_adminMenus'
  154. // }
  155. // },
  156. {
  157. path: '/menusAuth/menu',
  158. name: 'powerMenu',
  159. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
  160. meta: {
  161. title: 'IT菜单管理',
  162. icon: 'profile',
  163. permission: 'M_menusAuth_menu'
  164. }
  165. },
  166. {
  167. path: '/menusAuth/menuMould',
  168. name: 'MenuMould',
  169. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menuMould/list.vue'),
  170. meta: {
  171. title: '菜单模板',
  172. icon: 'profile',
  173. permission: 'M_menuMould'
  174. }
  175. }
  176. ]
  177. },
  178. // auth
  179. {
  180. path: '/auth',
  181. redirect: '/auth/userList',
  182. component: PageView,
  183. meta: {
  184. title: '权限管理',
  185. icon: 'lock',
  186. permission: 'M_auth_0'
  187. },
  188. children: [
  189. {
  190. path: '/auth/userList',
  191. name: 'powerUserList',
  192. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  193. meta: {
  194. title: '用户管理',
  195. icon: 'user',
  196. permission: 'M_auth_userList'
  197. }
  198. },
  199. {
  200. path: '/auth/roleList',
  201. name: 'powerRoleList',
  202. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  203. meta: {
  204. title: '角色管理',
  205. icon: 'solution',
  206. permission: 'M_auth_roleList'
  207. }
  208. }
  209. ]
  210. },
  211. {
  212. path: '/setting',
  213. redirect: '/setting/userList',
  214. component: PageView,
  215. meta: {
  216. title: '系统设置',
  217. icon: 'setting',
  218. permission: 'M_setting_0'
  219. },
  220. children: [
  221. {
  222. path: '/setting/dataDictionary',
  223. name: 'powerDD',
  224. component: () => import(/* webpackChunkName: "setting" */
  225. '@/views/power/dataDictionary/dataDictionary.vue'),
  226. meta: {
  227. title: '数据字典管理',
  228. icon: 'database',
  229. permission: 'M_sys_dataDictionary'
  230. }
  231. },
  232. // {
  233. // path: '/setting/register',
  234. // name: 'powerRegister',
  235. // component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
  236. // meta: {
  237. // title: '参数管理',
  238. // icon: 'key',
  239. // permission: 'M_sys_register'
  240. // }
  241. // },
  242. {
  243. path: '/setting/OperateJournal',
  244. name: 'powerOperateJournal',
  245. component: () => import(/* webpackChunkName: "setting" */
  246. '@/views/power/OperateJournal/OperateJournal.vue'),
  247. meta: {
  248. title: '操作日志',
  249. icon: 'read',
  250. permission: 'M_operateJournal'
  251. }
  252. }
  253. ]
  254. }
  255. ]
  256. },
  257. {
  258. path: '*',
  259. redirect: '/404',
  260. hidden: true
  261. }
  262. ]
  263. /**
  264. * 基础路由
  265. * @type { *[] }
  266. */
  267. export const constantRouterMap = [
  268. {
  269. path: '/user',
  270. component: UserLayout,
  271. redirect: '/user/login',
  272. hidden: true,
  273. children: [
  274. {
  275. path: 'login',
  276. name: 'login',
  277. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  278. },
  279. {
  280. path: 'register',
  281. name: 'register',
  282. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  283. },
  284. {
  285. path: 'register-result',
  286. name: 'registerResult',
  287. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  288. },
  289. {
  290. path: 'recover',
  291. name: 'recover',
  292. component: undefined
  293. }
  294. ]
  295. },
  296. {
  297. path: '/404',
  298. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  299. }
  300. ]