router.config.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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. path: '/',
  11. name: 'index',
  12. component: BasicLayout,
  13. meta: {
  14. title: '首页'
  15. },
  16. redirect: '/home',
  17. children: [{
  18. path: '/home',
  19. name: 'home',
  20. redirect: '/home',
  21. component: PageView,
  22. meta: {
  23. title: '首页',
  24. icon: 'home'
  25. },
  26. hideChildrenInMenu: true,
  27. children: [{
  28. path: '/home',
  29. name: 'home',
  30. component: () => import(/* webpackChunkName: "home" */ '@/views/Home'),
  31. meta: {
  32. title: '首页',
  33. icon: 'home',
  34. hidden: true
  35. }
  36. },
  37. {
  38. path: '/changePwd',
  39. name: 'changePwd',
  40. component: () => import(/* webpackChunkName: "home" */ '@/views/user/ChangePwd'),
  41. meta: {
  42. title: '修改密码',
  43. icon: 'home',
  44. hidden: true
  45. }
  46. }
  47. ]
  48. },
  49. {
  50. path: '/tenants',
  51. redirect: '/tenants/list',
  52. component: PageView,
  53. meta: {
  54. title: '租户管理',
  55. icon: 'team',
  56. permission: 'M_tenants_list'
  57. },
  58. children: [{
  59. path: '/tenants/list',
  60. name: 'tenantsList',
  61. component: () => import(/* webpackChunkName: "tenants" */ '@/views/tenants/tenantsList.vue'),
  62. meta: {
  63. title: '租户列表',
  64. icon: 'team',
  65. permission: 'M_tenants_list'
  66. }
  67. }]
  68. },
  69. // 考评管理
  70. {
  71. path: '/evaluation',
  72. redirect: '/evaluation/evaluationItem',
  73. component: PageView,
  74. meta: {
  75. title: '考评管理',
  76. icon: 'team'
  77. },
  78. children: [{
  79. path: '/evaluation/evaluationItem',
  80. name: 'EvaluationItem',
  81. component: () => import(/* webpackChunkName: "evaluation" */ '@/views/evaluation/evaluationItem/EvaluationItem.vue'),
  82. meta: {
  83. title: '考评项目',
  84. icon: 'team'
  85. }
  86. }, {
  87. path: '/evaluation/evaluationPlan',
  88. name: 'EvaluationPlan',
  89. component: () => import(/* webpackChunkName: "evaluation" */ '@/views/evaluation/evaluationPlan/EvaluationPlan.vue'),
  90. meta: {
  91. title: '考评方案',
  92. icon: 'team'
  93. }
  94. }]
  95. },
  96. // 业务 设置setting
  97. {
  98. path: '/bnSetting',
  99. redirect: '/bnSetting/menusAuth',
  100. component: PageView,
  101. meta: {
  102. title: '平台设置',
  103. icon: 'security-scan',
  104. permission: 'M_bnSetting_0'
  105. },
  106. children: [{
  107. path: '/bnSetting/menusAuth',
  108. name: 'menusAuth',
  109. component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menusAuthTab.vue'),
  110. meta: {
  111. title: '菜单授权',
  112. icon: 'property-safety',
  113. permission: 'M_bnSetting_0'
  114. }
  115. }]
  116. },
  117. {
  118. path: '/appSetting',
  119. redirect: '/appSetting/bannerSetting',
  120. component: PageView,
  121. meta: {
  122. title: 'APP设置',
  123. icon: 'appstore',
  124. permission: 'M_appSetting'
  125. },
  126. children: [{
  127. path: '/appSetting/bannerSetting',
  128. name: 'bannerSetting',
  129. component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/bannerSetting.vue'),
  130. meta: {
  131. title: '营销图设置',
  132. icon: 'file-image',
  133. permission: 'M_banner'
  134. }
  135. },
  136. {
  137. path: '/editionSetting',
  138. redirect: '/editionSetting/list',
  139. name: 'editionSetting',
  140. component: RouteView,
  141. meta: {
  142. title: '版本设置',
  143. icon: 'info-circle',
  144. permission: 'M_banben'
  145. },
  146. hideChildrenInMenu: true,
  147. children: [{
  148. path: '/editionSetting/list',
  149. name: 'editionSetting_list',
  150. component: () => import(/* webpackChunkName: "appSetting" */
  151. '@/views/appSetting/editionSetting.vue'),
  152. meta: {
  153. title: '版本设置列表',
  154. icon: 'interaction',
  155. permission: 'M_banben'
  156. }
  157. },
  158. {
  159. path: '/editionSetting/add',
  160. name: 'editionSetting_add',
  161. component: () => import(/* webpackChunkName: "appSetting" */
  162. '@/views/appSetting/addEditionSetting.vue'),
  163. meta: {
  164. title: '增加',
  165. icon: 'crown',
  166. hidden: true
  167. }
  168. },
  169. {
  170. path: '/editionSetting/add',
  171. name: 'editionSetting_edit',
  172. component: () => import(/* webpackChunkName: "appSetting" */
  173. '@/views/appSetting/addEditionSetting.vue'),
  174. meta: {
  175. title: '编辑',
  176. icon: 'crown',
  177. hidden: true
  178. }
  179. }
  180. ]
  181. }
  182. ]
  183. },
  184. {
  185. path: '/menusAuth',
  186. redirect: '/bnSetting/menusAuth',
  187. component: PageView,
  188. meta: {
  189. title: '菜单管理',
  190. icon: 'bars',
  191. permission: 'M_menusAuth_0'
  192. },
  193. children: [{
  194. path: '/menusAuth/storeMenus',
  195. name: 'storeMenus',
  196. component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/storeMenus.vue'),
  197. meta: {
  198. title: '门店菜单管理',
  199. icon: 'shop',
  200. permission: 'M_menusAuth_storeMenus'
  201. }
  202. },
  203. {
  204. path: '/menusAuth/adminMenus',
  205. name: 'adminMenus',
  206. component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/adminMenus.vue'),
  207. meta: {
  208. title: '运营菜单管理',
  209. icon: 'appstore',
  210. permission: 'M_menusAuth_adminMenus'
  211. }
  212. },
  213. {
  214. path: '/menusAuth/menu',
  215. name: 'powerMenu',
  216. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
  217. meta: {
  218. title: 'IT菜单管理',
  219. icon: 'profile',
  220. permission: 'M_menusAuth_menu'
  221. }
  222. }
  223. ]
  224. },
  225. // auth
  226. {
  227. path: '/auth',
  228. redirect: '/auth/userList',
  229. component: PageView,
  230. meta: {
  231. title: 'IT权限管理',
  232. icon: 'lock',
  233. permission: 'M_auth_0'
  234. },
  235. children: [{
  236. path: '/auth/userList',
  237. name: 'powerUserList',
  238. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  239. meta: {
  240. title: '用户管理',
  241. icon: 'user',
  242. permission: 'M_auth_userList'
  243. }
  244. },
  245. {
  246. path: '/auth/roleList',
  247. name: 'powerRoleList',
  248. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  249. meta: {
  250. title: '角色管理',
  251. icon: 'solution',
  252. permission: 'M_auth_roleList'
  253. }
  254. }
  255. ]
  256. },
  257. {
  258. path: '/setting',
  259. redirect: '/setting/userList',
  260. component: PageView,
  261. meta: {
  262. title: '系统设置',
  263. icon: 'setting',
  264. permission: 'M_setting_0'
  265. },
  266. children: [{
  267. path: '/setting/dataDictionary',
  268. name: 'powerDD',
  269. component: () => import(/* webpackChunkName: "setting" */
  270. '@/views/power/dataDictionary/dataDictionary.vue'),
  271. meta: {
  272. title: '数据字典管理',
  273. icon: 'database',
  274. permission: 'M_sys_dataDictionary'
  275. }
  276. },
  277. {
  278. path: '/setting/register',
  279. name: 'powerRegister',
  280. component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
  281. meta: {
  282. title: '参数管理',
  283. icon: 'key'
  284. // permission: 'M_sys_register'
  285. }
  286. },
  287. // {
  288. // path: '/setting/jobs',
  289. // name: 'powerJobs',
  290. // component: () => import(/* webpackChunkName: "setting" */ '@/views/power/job/jobs.vue'),
  291. // meta: {
  292. // title: '定时器',
  293. // icon: 'alert',
  294. // permission: 'M_sys_job'
  295. // }
  296. // },
  297. {
  298. path: '/setting/OperateJournal',
  299. name: 'powerOperateJournal',
  300. component: () => import(/* webpackChunkName: "setting" */
  301. '@/views/power/OperateJournal/OperateJournal.vue'),
  302. meta: {
  303. title: '操作日志',
  304. icon: 'read',
  305. permission: 'M_operateJournal'
  306. }
  307. }
  308. ]
  309. }
  310. ]
  311. },
  312. {
  313. path: '*',
  314. redirect: '/404',
  315. hidden: true
  316. }
  317. ]
  318. /**
  319. * 基础路由
  320. * @type { *[] }
  321. */
  322. export const constantRouterMap = [{
  323. path: '/user',
  324. component: UserLayout,
  325. redirect: '/user/login',
  326. hidden: true,
  327. children: [{
  328. path: 'login',
  329. name: 'login',
  330. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  331. },
  332. {
  333. path: 'register',
  334. name: 'register',
  335. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  336. },
  337. {
  338. path: 'register-result',
  339. name: 'registerResult',
  340. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  341. },
  342. {
  343. path: 'recover',
  344. name: 'recover',
  345. component: undefined
  346. }
  347. ]
  348. },
  349. {
  350. path: '/404',
  351. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  352. }
  353. ]