router.config.js 8.6 KB

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