router.config.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  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. hide: true
  35. }
  36. }
  37. ]
  38. },
  39. {
  40. path: '/changePwd',
  41. name: 'changePwd',
  42. component: () => import(/* webpackChunkName: "home" */ '@/views/user/ChangePwd'),
  43. meta: {
  44. title: '修改密码',
  45. icon: 'home'
  46. },
  47. hidden: true
  48. },
  49. // 销售管理
  50. {
  51. path: '/salesManagement',
  52. redirect: '/salesManagement/salesQuery',
  53. component: PageView,
  54. meta: {
  55. title: '销售管理',
  56. icon: 'account-book'
  57. // permission: 'M_salesManagement'
  58. },
  59. children: [
  60. {
  61. path: '/salesManagement/salesQuery',
  62. redirect: '/salesManagement/salesQuery/list',
  63. name: 'salesQuery',
  64. component: RouteView,
  65. meta: {
  66. title: '销售单查询',
  67. icon: 'monitor'
  68. // permission: 'M_salesQuery_list'
  69. },
  70. hideChildrenInMenu: true,
  71. children: [
  72. {
  73. path: 'list',
  74. name: 'salesQueryList',
  75. component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/list.vue'),
  76. meta: {
  77. title: '销售单列表',
  78. icon: 'menu',
  79. hidden: true
  80. // permission: 'M_salesQuery_list'
  81. }
  82. },
  83. {
  84. path: 'detail/:id',
  85. name: 'salesDetail',
  86. component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/salesDetail.vue'),
  87. meta: {
  88. title: '销售单明细',
  89. icon: 'read',
  90. hidden: true
  91. // permission: 'M_salesDetail'
  92. }
  93. },
  94. {
  95. path: 'salesNew',
  96. name: 'salesNew',
  97. component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/salesNew.vue'),
  98. meta: {
  99. title: '新建销售单',
  100. icon: 'plus-square',
  101. hidden: true
  102. // permission: 'M_salesNew'
  103. }
  104. },
  105. {
  106. path: 'salesEdit/:id',
  107. name: 'salesEdit',
  108. component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/salesNew.vue'),
  109. meta: {
  110. title: '修改销售单',
  111. icon: 'edit',
  112. hidden: true
  113. // permission: 'M_salesNew'
  114. }
  115. }
  116. ]
  117. },
  118. {
  119. path: '/salesManagement/customerManagement',
  120. redirect: '/salesManagement/customerManagement/list',
  121. name: 'customerManagement',
  122. component: RouteView,
  123. meta: {
  124. title: '客户管理',
  125. icon: 'shopping'
  126. // permission: 'M_goodsManage_list'
  127. },
  128. hideChildrenInMenu: true,
  129. children: [
  130. {
  131. path: '/salesManagement/customerManagement/list',
  132. name: 'customerManagementList',
  133. component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/customerManagement/list.vue'),
  134. meta: {
  135. title: '客户列表',
  136. icon: 'shopping',
  137. hidden: true
  138. // permission: 'M_goodsManage_list'
  139. }
  140. },
  141. {
  142. path: '/salesManagement/customerManagement/add',
  143. name: 'customerManagementAdd',
  144. component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/customerManagement/edit.vue'),
  145. meta: {
  146. title: '新增客户',
  147. icon: 'shopping',
  148. hidden: true
  149. // permission: 'B_goodsManage_edit'
  150. }
  151. },
  152. {
  153. path: '/salesManagement/customerManagement/edit/:id',
  154. name: 'customerManagementEdit',
  155. component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/customerManagement/edit.vue'),
  156. meta: {
  157. title: '编辑客户',
  158. icon: 'shopping',
  159. hidden: true
  160. // permission: 'B_goodsManage_edit'
  161. }
  162. }
  163. ]
  164. },
  165. {
  166. path: '/salesManagement/urgentItemsOffset',
  167. redirect: '/salesManagement/urgentItemsOffset/list',
  168. name: 'urgentItemsOffset',
  169. component: RouteView,
  170. meta: {
  171. title: '急件冲减',
  172. icon: 'shopping'
  173. // permission: 'M_goodsManage_list'
  174. },
  175. hideChildrenInMenu: true,
  176. children: [
  177. {
  178. path: '/salesManagement/urgentItemsOffset/list',
  179. name: 'urgentItemsOffsetList',
  180. component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/urgentItemsOffset/list.vue'),
  181. meta: {
  182. title: '急件冲减列表',
  183. icon: 'shopping',
  184. hidden: true
  185. // permission: 'M_goodsManage_list'
  186. }
  187. },
  188. {
  189. path: '/salesManagement/urgentItemsOffset/detail/:id',
  190. name: 'urgentItemsOffsetDetail',
  191. component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/urgentItemsOffset/detail.vue'),
  192. meta: {
  193. title: '急件冲减详情',
  194. icon: 'shopping',
  195. hidden: true
  196. // permission: 'B_goodsManage_edit'
  197. }
  198. }
  199. ]
  200. }
  201. ]
  202. },
  203. // 库存管理
  204. {
  205. path: '/inventoryManagement',
  206. redirect: '/inventoryManagement/inventoryQuery',
  207. component: PageView,
  208. meta: {
  209. title: '库存管理',
  210. icon: 'shop'
  211. // permission: 'M_shop'
  212. },
  213. children: [
  214. {
  215. path: '/inventoryManagement/inventoryQuery',
  216. redirect: '/inventoryManagement/inventoryQuery/list',
  217. name: 'inventoryQuery',
  218. component: RouteView,
  219. meta: {
  220. title: '库存查询',
  221. icon: 'shopping'
  222. // permission: 'M_goodsManage_list'
  223. },
  224. hideChildrenInMenu: true,
  225. children: [
  226. {
  227. path: '/inventoryManagement/inventoryQuery/list',
  228. name: 'inventoryQueryList',
  229. component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryQuery/list.vue'),
  230. meta: {
  231. title: '库存列表',
  232. icon: 'shopping',
  233. hidden: true
  234. // permission: 'M_goodsManage_list'
  235. }
  236. },
  237. {
  238. path: '/inventoryManagement/inventoryQuery/warehouseDetail/:id',
  239. name: 'inventoryQueryWarehouseDetail',
  240. component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryQuery/warehouseDetail.vue'),
  241. meta: {
  242. title: '出入库明细',
  243. icon: 'shopping',
  244. hidden: true
  245. // permission: 'B_goodsManage_edit'
  246. }
  247. }
  248. ]
  249. },
  250. {
  251. path: '/inventoryManagement/inventoryWarning',
  252. name: 'inventoryWarningList',
  253. component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryWarning/list.vue'),
  254. meta: {
  255. title: '库存预警',
  256. icon: 'flag'
  257. // permission: 'M_goodsShelves_0'
  258. }
  259. },
  260. {
  261. path: '/inventoryManagement/satelliteWarehouseInventory',
  262. name: 'satelliteWarehouseInventoryList',
  263. component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/satelliteWarehouseInventory/list.vue'),
  264. meta: {
  265. title: '卫星仓库存',
  266. icon: 'flag'
  267. // permission: 'M_goodsShelves_0'
  268. }
  269. },
  270. {
  271. path: '/inventoryManagement/warehouse',
  272. redirect: '/inventoryManagement/warehouse/list',
  273. name: 'warehouse',
  274. component: RouteView,
  275. meta: {
  276. title: '仓库管理',
  277. icon: 'shopping'
  278. // permission: 'M_goodsManage_list'
  279. },
  280. hideChildrenInMenu: true,
  281. children: [
  282. {
  283. path: '/inventoryManagement/warehouse/list',
  284. name: 'warehouseList',
  285. component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/warehouse/list.vue'),
  286. meta: {
  287. title: '仓库列表',
  288. icon: 'shopping',
  289. hidden: true
  290. // permission: 'M_goodsManage_list'
  291. }
  292. },
  293. {
  294. path: '/inventoryManagement/storingLocation/:id',
  295. name: 'storingLocationList',
  296. component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/warehouse/storingLocation/list.vue'),
  297. meta: {
  298. title: '仓位列表',
  299. icon: 'shopping',
  300. hidden: true
  301. // permission: 'B_goodsManage_edit'
  302. }
  303. }
  304. ]
  305. },
  306. ]
  307. },
  308. // 采购管理
  309. // 散件管理
  310. // 产品管理
  311. {
  312. path: '/productManagement',
  313. redirect: '/productManagement/productInfo',
  314. component: PageView,
  315. meta: {
  316. title: '产品管理',
  317. icon: 'shop'
  318. // permission: 'M_shop'
  319. },
  320. children: [
  321. {
  322. path: '/productManagement/productInfo',
  323. redirect: '/productManagement/productInfo/list',
  324. name: 'productInfo',
  325. component: RouteView,
  326. meta: {
  327. title: '产品信息管理',
  328. icon: 'shopping'
  329. // permission: 'M_goodsManage_list'
  330. },
  331. hideChildrenInMenu: true,
  332. children: [
  333. {
  334. path: '/productManagement/productInfo/list',
  335. name: 'productInfoList',
  336. component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/list.vue'),
  337. meta: {
  338. title: '产品信息列表',
  339. icon: 'shopping',
  340. hidden: true
  341. // permission: 'M_goodsManage_list'
  342. }
  343. },
  344. {
  345. path: '/productManagement/productInfo/add',
  346. name: 'productInfoAdd',
  347. component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/edit.vue'),
  348. meta: {
  349. title: '新增产品',
  350. icon: 'shopping',
  351. hidden: true
  352. // permission: 'B_goodsManage_edit'
  353. }
  354. },
  355. {
  356. path: '/productManagement/productInfo/edit/:id',
  357. name: 'productInfoEdit',
  358. component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/edit.vue'),
  359. meta: {
  360. title: '编辑产品',
  361. icon: 'shopping',
  362. hidden: true
  363. // permission: 'B_goodsManage_edit'
  364. }
  365. }
  366. ]
  367. },
  368. {
  369. path: '/productManagement/productBrand',
  370. redirect: '/productManagement/productBrand/list',
  371. name: 'productBrand',
  372. component: RouteView,
  373. meta: {
  374. title: '产品品牌管理',
  375. icon: 'shopping'
  376. // permission: 'M_goodsManage_list'
  377. },
  378. hideChildrenInMenu: true,
  379. children: [
  380. {
  381. path: '/productManagement/productBrand/list',
  382. name: 'productBrandList',
  383. component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productBrand/list.vue'),
  384. meta: {
  385. title: '产品品牌列表',
  386. icon: 'shopping',
  387. hidden: true
  388. // permission: 'M_goodsManage_list'
  389. }
  390. }
  391. ]
  392. },
  393. {
  394. path: '/productManagement/productCategory',
  395. redirect: '/productManagement/productCategory/list',
  396. name: 'productCategory',
  397. component: RouteView,
  398. meta: {
  399. title: '产品类别管理',
  400. icon: 'shopping'
  401. // permission: 'M_goodsManage_list'
  402. },
  403. hideChildrenInMenu: true,
  404. children: [
  405. {
  406. path: '/productManagement/productCategory/list',
  407. name: 'productCategoryList',
  408. component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productCategory/list.vue'),
  409. meta: {
  410. title: '产品类别列表',
  411. icon: 'shopping',
  412. hidden: true
  413. // permission: 'M_goodsManage_list'
  414. }
  415. }
  416. ]
  417. }
  418. ]
  419. },
  420. // 基础资料
  421. {
  422. path: '/basicData',
  423. redirect: '/basicData/supplierManagement',
  424. component: PageView,
  425. meta: {
  426. title: '基础资料',
  427. icon: 'shop'
  428. // permission: 'M_shop'
  429. },
  430. children: [
  431. {
  432. path: '/basicData/supplierManagement',
  433. redirect: '/basicData/supplierManagement/list',
  434. name: 'supplierManagement',
  435. component: RouteView,
  436. meta: {
  437. title: '供应商管理',
  438. icon: 'shopping'
  439. // permission: 'M_goodsManage_list'
  440. },
  441. hideChildrenInMenu: true,
  442. children: [
  443. {
  444. path: '/basicData/supplierManagement/list',
  445. name: 'supplierManagementList',
  446. component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/supplierManagement/list.vue'),
  447. meta: {
  448. title: '供应商列表',
  449. icon: 'shopping',
  450. hidden: true
  451. // permission: 'M_goodsManage_list'
  452. }
  453. },
  454. {
  455. path: '/basicData/supplierManagement/add',
  456. name: 'supplierManagementAdd',
  457. component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/supplierManagement/edit.vue'),
  458. meta: {
  459. title: '新增供应商',
  460. icon: 'shopping',
  461. hidden: true
  462. // permission: 'B_goodsManage_edit'
  463. }
  464. },
  465. {
  466. path: '/basicData/supplierManagement/edit/:id',
  467. name: 'supplierManagementEdit',
  468. component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/supplierManagement/edit.vue'),
  469. meta: {
  470. title: '编辑供应商',
  471. icon: 'shopping',
  472. hidden: true
  473. // permission: 'B_goodsManage_edit'
  474. }
  475. }
  476. ]
  477. }
  478. ]
  479. },
  480. // 财务管理
  481. // auth
  482. {
  483. path: '/auth',
  484. redirect: '/auth/userList',
  485. component: PageView,
  486. meta: {
  487. title: '权限管理',
  488. icon: 'lock',
  489. permission: 'M_auth_0'
  490. },
  491. children: [{
  492. path: '/auth/userList',
  493. name: 'powerUserList',
  494. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  495. meta: {
  496. title: '用户管理',
  497. icon: 'user',
  498. permission: 'M_auth_userList'
  499. }
  500. },
  501. {
  502. path: '/auth/roleList',
  503. name: 'powerRoleList',
  504. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  505. meta: {
  506. title: '角色管理',
  507. icon: 'solution',
  508. permission: 'M_auth_roleList'
  509. }
  510. }
  511. ]
  512. },
  513. {
  514. path: '/setting',
  515. redirect: '/setting/userList',
  516. component: PageView,
  517. meta: {
  518. title: '系统设置',
  519. icon: 'setting',
  520. permission: 'M_setting_0'
  521. },
  522. children: [{
  523. path: '/setting/dataDictionary',
  524. name: 'powerDD',
  525. component: () => import(/* webpackChunkName: "setting" */
  526. '@/views/power/dataDictionary/dataDictionary.vue'),
  527. meta: {
  528. title: '数据字典管理',
  529. icon: 'database',
  530. permission: 'M_sys_dataDictionary'
  531. }
  532. },
  533. // {
  534. // path: '/setting/register',
  535. // name: 'powerRegister',
  536. // component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
  537. // meta: {
  538. // title: '参数管理',
  539. // icon: 'key',
  540. // permission: 'M_sys_register'
  541. // }
  542. // },
  543. {
  544. path: '/setting/OperateJournal',
  545. name: 'powerOperateJournal',
  546. component: () => import(/* webpackChunkName: "setting" */
  547. '@/views/power/OperateJournal/OperateJournal.vue'),
  548. meta: {
  549. title: '操作日志',
  550. icon: 'read',
  551. permission: 'M_operateJournal'
  552. }
  553. }
  554. ]
  555. }
  556. ]
  557. },
  558. {
  559. path: '*',
  560. redirect: '/404',
  561. hidden: true
  562. }
  563. ]
  564. /**
  565. * 基础路由
  566. * @type { *[] }
  567. */
  568. export const constantRouterMap = [{
  569. path: '/user',
  570. component: UserLayout,
  571. redirect: '/user/login',
  572. hidden: true,
  573. children: [{
  574. path: 'login',
  575. name: 'login',
  576. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  577. },
  578. {
  579. path: 'register',
  580. name: 'register',
  581. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  582. },
  583. {
  584. path: 'register-result',
  585. name: 'registerResult',
  586. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  587. },
  588. {
  589. path: 'recover',
  590. name: 'recover',
  591. component: undefined
  592. }
  593. ]
  594. },
  595. {
  596. path: '/404',
  597. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  598. }
  599. ]