index.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. import layout from '@/layout/index.vue';
  4. const originalPush = VueRouter.prototype.push;
  5. VueRouter.prototype.push = function push(location) {
  6. return originalPush.call(this, location).catch((err) => err);
  7. };
  8. Vue.use(VueRouter);
  9. const router = new VueRouter({
  10. // mode:"history",
  11. // mode:process.env.NODE_ENV !==
  12. // "production" ? "hash" : "history",
  13. mode: 'history',
  14. scrollBehavior(to, from, savedPosition) {
  15. if (savedPosition) {
  16. return savedPosition;
  17. } else {
  18. return { x: 0, y: 0 };
  19. }
  20. },
  21. base: '/mobile/',
  22. routes: [
  23. {
  24. path: '/',
  25. component: layout,
  26. redirect: '/home',
  27. children: [
  28. {
  29. path: '/home',
  30. name: 'home',
  31. component: () => import('@/views/home/index.vue'),
  32. meta: {
  33. keepAlive: true,
  34. },
  35. },
  36. {
  37. path: '/reportingRate',
  38. name: 'reportingRate',
  39. component: () => import('@/views/home/reportingRate.vue'),
  40. meta: {
  41. keepAlive: true,
  42. },
  43. },
  44. {
  45. path: '/err',
  46. name: 'err',
  47. component: () => import('@/views/home/err.vue'),
  48. meta: {
  49. keepAlive: true,
  50. },
  51. },
  52. {
  53. path: '/login',
  54. name: 'login',
  55. component: () => import('@/views/home/login.vue'),
  56. meta: {
  57. keepAlive: true,
  58. },
  59. },
  60. {
  61. path: '/logincs',
  62. name: 'logincs',
  63. component: () => import('@/views/home/logincs.vue'),
  64. meta: {
  65. keepAlive: true,
  66. },
  67. },
  68. {
  69. path: '/noVisit',
  70. name: 'noVisit',
  71. component: () => import('@/views/home/hintTabPage/noVisit.vue'),
  72. meta: {
  73. keepAlive: true,
  74. title: '未拜访门店',
  75. },
  76. },
  77. {
  78. path: '/hintDetail',
  79. name: 'hintDetail',
  80. component: () => import('@/views/home/hintTabPage/hintDetail.vue'),
  81. meta: {
  82. keepAlive: true,
  83. title: '提示类-拜访(实时) ',
  84. },
  85. },
  86. {
  87. path: '/pantoneNoGet',
  88. name: 'pantoneNoGet',
  89. component: () => import('@/views/home/hintTabPage/pantoneNoGet.vue'),
  90. meta: {
  91. keepAlive: true,
  92. title: '提示类-业务员未领取色卡门店 ',
  93. },
  94. },
  95. ],
  96. },
  97. {
  98. path: '/storemanagementlist',
  99. component: layout,
  100. redirect: '/storemanagement/index',
  101. children: [
  102. {
  103. path: '/storemanagement/index',
  104. name: 'storeManagement',
  105. component: () => import('@/views/storeManagement/index.vue'),
  106. meta: {
  107. keepAlive: true,
  108. },
  109. },
  110. {
  111. path: '/storeDetail',
  112. name: 'storeDetail',
  113. component: () => import('@/views/storeManagement/storeDetail.vue'),
  114. meta: {
  115. keepAlive: true,
  116. },
  117. },
  118. {
  119. path: '/storeAdd',
  120. name: 'storeAdd',
  121. component: () => import('@/views/storeManagement/storeAdd.vue'),
  122. meta: {
  123. keepAlive: true,
  124. },
  125. },
  126. {
  127. path: '/storeAddress',
  128. name: 'storeAddress',
  129. component: () => import('@/views/storeManagement/storeAddress.vue'),
  130. meta: {
  131. keepAlive: true,
  132. },
  133. },
  134. {
  135. path: '/odersuccess',
  136. name: 'storeAdd',
  137. component: () => import('@/views/deviceOutside/oderSuccess.vue'),
  138. meta: {
  139. keepAlive: true,
  140. },
  141. },
  142. {
  143. path: '/storeEdit',
  144. name: 'storeEdit',
  145. component: () => import('@/views/storeManagement/storeEdit.vue'),
  146. meta: {
  147. keepAlive: true,
  148. },
  149. },
  150. {
  151. path: '/success',
  152. name: 'success',
  153. component: () => import('@/views/storeManagement/success.vue'),
  154. meta: {
  155. keepAlive: true,
  156. },
  157. },
  158. ],
  159. },
  160. {
  161. path: '/outsidelist',
  162. component: layout,
  163. redirect: '/outsidelist/index',
  164. children: [
  165. {
  166. path: '/outsidelist/index',
  167. name: 'outsidelist',
  168. component: () => import('@/views/deviceOutside/index.vue'),
  169. meta: {
  170. keepAlive: true,
  171. scrollTop: 0,
  172. },
  173. },
  174. {
  175. path: '/ai',
  176. name: 'ai',
  177. component: () => import('@/views/intelligence/index.vue'),
  178. meta: {
  179. keepAlive: true,
  180. },
  181. },
  182. {
  183. path: '/topStore',
  184. name: 'topStore',
  185. component: () => import('@/views/deviceOutside/topStore.vue'),
  186. meta: {
  187. keepAlive: true,
  188. },
  189. },
  190. {
  191. path: '/pItem',
  192. name: 'pItem',
  193. component: () => import('@/views/deviceOutside/productItem.vue'),
  194. meta: {
  195. keepAlive: true,
  196. },
  197. },
  198. {
  199. path: '/suishenbangOutstoreVisit',
  200. name: 'suishenbangOutstoreVisit',
  201. component: () => import('@/views/deviceOutside/suishenbangOutstoreVisit.vue'),
  202. meta: {
  203. keepAlive: true,
  204. },
  205. },
  206. {
  207. path: '/projectOut',
  208. name: 'projectOut',
  209. component: () => import('@/views/deviceOutside/projectOut.vue'),
  210. meta: {
  211. keepAlive: true,
  212. },
  213. },
  214. {
  215. path: '/rangeStore',
  216. name: 'rangeStore',
  217. component: () => import('@/views/deviceOutside/rangeStore.vue'),
  218. meta: {
  219. keepAlive: true,
  220. },
  221. },
  222. {
  223. path: '/outstoreVisit',
  224. name: 'outstoreVisit',
  225. component: () => import('@/views/deviceOutside/outstoreVisit.vue'),
  226. meta: {
  227. keepAlive: true,
  228. },
  229. },
  230. {
  231. path: '/taskList',
  232. name: 'taskList',
  233. component: () => import('@/views/deviceOutside/taskList.vue'),
  234. meta: {
  235. keepAlive: true,
  236. },
  237. },
  238. {
  239. path: '/storeGroup',
  240. name: 'storeGroup',
  241. component: () => import('@/views/deviceOutside/storeGroup.vue'),
  242. meta: {
  243. keepAlive: true,
  244. },
  245. },
  246. {
  247. path: '/outabnormalVisit',
  248. name: 'outabnormalVisit',
  249. component: () => import('@/views/deviceOutside/outabnormalVisit.vue'),
  250. meta: {
  251. keepAlive: true,
  252. },
  253. },
  254. ],
  255. },
  256. {
  257. path: '/historicalVisit',
  258. component: layout,
  259. redirect: '/historicalVisit/index',
  260. children: [
  261. {
  262. path: '/historicalVisit/index',
  263. name: 'historicalVisit',
  264. component: () => import('@/views/historicalVisit/index.vue'),
  265. meta: {
  266. keepAlive: true,
  267. },
  268. },
  269. {
  270. path: '/historAllVisit',
  271. name: 'historAllVisit',
  272. component: () => import('@/views/historicalVisit/historAllVisit.vue'),
  273. meta: {
  274. keepAlive: true,
  275. },
  276. },
  277. {
  278. path: '/historicalDetails',
  279. name: 'historicalDetails',
  280. component: () => import('@/views/historicalVisit/historicalDetails.vue'),
  281. meta: {
  282. keepAlive: true,
  283. },
  284. },
  285. {
  286. path: '/historiStoreVisit',
  287. name: 'historiStoreVisit',
  288. component: () => import('@/views/historicalVisit/hisvistdeils.vue'),
  289. meta: {
  290. keepAlive: true,
  291. },
  292. },
  293. ],
  294. },
  295. {
  296. path: '/deviceWithin',
  297. component: layout,
  298. redirect: '/deviceWithin/index',
  299. children: [
  300. {
  301. path: '/deviceWithin/index',
  302. name: 'deviceWithin',
  303. component: () => import('@/views/deviceWithin/index.vue'),
  304. meta: {
  305. keepAlive: true,
  306. },
  307. },
  308. {
  309. path: '/storeVisitpage',
  310. name: 'storeVisitpage',
  311. component: () => import('@/views/deviceWithin/storeVisit.vue'),
  312. meta: {
  313. keepAlive: true,
  314. },
  315. },
  316. {
  317. path: '/addStoreVisit',
  318. name: 'addStoreVisit',
  319. component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
  320. meta: {
  321. keepAlive: true,
  322. },
  323. },
  324. {
  325. path: '/addStoreVisitd',
  326. name: 'addStoreVisitd',
  327. component: () => import('@/views/deviceWithin/addStoreVisitd.vue'),
  328. meta: {
  329. keepAlive: true,
  330. },
  331. },
  332. {
  333. path: '/addStoreVisitP',
  334. name: 'addStoreVisitP',
  335. component: () => import('@/views/deviceWithin/addStoreVisitP.vue'),
  336. meta: {
  337. keepAlive: true,
  338. },
  339. },
  340. {
  341. path: '/abnormalVisit',
  342. name: 'abnormalVisit',
  343. component: () => import('@/views/deviceWithin/abnormalVisit.vue'),
  344. meta: {
  345. keepAlive: true,
  346. },
  347. },
  348. {
  349. path: '/sign',
  350. name: 'sign',
  351. component: () => import('@/views/sign/index.vue'),
  352. meta: {
  353. keepAlive: true,
  354. },
  355. },
  356. {
  357. path: '/signApprovalList',
  358. name: 'signApproval',
  359. component: () => import('@/views/signApproval/index.vue'),
  360. meta: {
  361. keepAlive: true,
  362. },
  363. },
  364. {
  365. path: '/signApproval',
  366. name: 'signApproval',
  367. component: () => import('@/views/signApproval/signApproval.vue'),
  368. meta: {
  369. keepAlive: true,
  370. },
  371. },
  372. // 同城店铺建店审批
  373. {
  374. path: '/newStoreApprovalList',
  375. name: 'newStoreApprovalList',
  376. component: () => import('@/views/signApproval/newStoreApprovalList.vue'),
  377. meta: {
  378. keepAlive: true,
  379. },
  380. },
  381. {
  382. path: '/newStoreApprovalDetail',
  383. name: 'newStoreApprovalDetail',
  384. component: () => import('@/views/signApproval/newStoreApprovalDetail.vue'),
  385. meta: {
  386. keepAlive: true,
  387. },
  388. },
  389. ],
  390. },
  391. {
  392. path: '/My',
  393. component: layout,
  394. redirect: '/My/index',
  395. children: [
  396. {
  397. path: '/My/index',
  398. name: 'MyList',
  399. component: () => import('@/views/week/index.vue'),
  400. meta: {
  401. keepAlive: true,
  402. },
  403. },
  404. {
  405. path: '/myInventory',
  406. name: 'myInventory',
  407. component: () => import('@/views/my/myInventory.vue'),
  408. meta: {
  409. keepAlive: true,
  410. },
  411. },
  412. {
  413. path: '/material',
  414. name: 'material',
  415. component: () => import('@/views/my/material.vue'),
  416. meta: {
  417. keepAlive: true,
  418. },
  419. },
  420. {
  421. path: '/subordinateHistoricalDaily',
  422. name: 'subordinateHistoricalDaily',
  423. component: () => import('@/views/week/dailyHistorical.vue'),
  424. meta: {
  425. keepAlive: true,
  426. },
  427. },
  428. {
  429. path: '/subordinateHistoricalWeekly',
  430. name: 'subordinateHistoricalWeekly',
  431. component: () => import('@/views/week/weeklyHistorical.vue'),
  432. meta: {
  433. keepAlive: true,
  434. },
  435. },
  436. {
  437. path: '/myHistoricalDaily',
  438. name: 'myHistoricalDaily',
  439. component: () => import('@/views/week/myHistoricalDaily.vue'),
  440. meta: {
  441. keepAlive: true,
  442. },
  443. },
  444. {
  445. path: '/weeklyApproval',
  446. name: 'weeklyApproval',
  447. component: () => import('@/views/week/weeklyApproval.vue'),
  448. meta: {
  449. keepAlive: true,
  450. },
  451. },
  452. {
  453. path: '/weeklyApprovalDetils',
  454. name: 'weeklyApprovalDetils',
  455. component: () => import('@/views/week/weeklyApprovalDetils.vue'),
  456. meta: {
  457. keepAlive: true,
  458. },
  459. },
  460. {
  461. path: '/myComment',
  462. name: 'myComment',
  463. component: () => import('@/views/week/myComment.vue'),
  464. meta: {
  465. keepAlive: true,
  466. },
  467. },
  468. {
  469. path: '/doubleWeeklyDetils',
  470. name: 'doubleWeeklyDetils',
  471. component: () => import('@/views/week/doubleWeeklyDetils.vue'),
  472. meta: {
  473. keepAlive: true,
  474. },
  475. },
  476. {
  477. path: '/daily',
  478. name: 'daily',
  479. component: () => import('@/views/week/daily.vue'),
  480. meta: {
  481. keepAlive: true,
  482. },
  483. },
  484. {
  485. path: '/dailyApprovalList',
  486. name: 'dailyApprovalList',
  487. component: () => import('@/views/week/dailyApprovalList.vue'),
  488. meta: {
  489. keepAlive: true,
  490. },
  491. },
  492. {
  493. path: '/dailyApproval',
  494. name: 'dailyApproval',
  495. component: () => import('@/views/week/dailyApproval.vue'),
  496. meta: {
  497. keepAlive: true,
  498. },
  499. },
  500. {
  501. path: '/dailyDetails',
  502. name: 'dailyDetails',
  503. component: () => import('@/views/week/dailyDetails.vue'),
  504. meta: {
  505. keepAlive: true,
  506. },
  507. },
  508. {
  509. path: '/weeklyApproval',
  510. name: 'weeklyApproval',
  511. component: () => import('@/views/week/weeklyApproval.vue'),
  512. meta: {
  513. keepAlive: true,
  514. },
  515. },
  516. {
  517. path: '/weekly',
  518. name: 'weekly',
  519. component: () => import('@/views/week/weekly.vue'),
  520. meta: {
  521. keepAlive: true,
  522. },
  523. },
  524. {
  525. path: '/doubleWeekly',
  526. name: 'doubleWeekly',
  527. component: () => import('@/views/week/doubleWeekly.vue'),
  528. meta: {
  529. keepAlive: true,
  530. },
  531. },
  532. {
  533. path: '/doubleWeeklyApproval',
  534. name: 'doubleWeeklyApproval',
  535. component: () => import('@/views/week/doubleWeeklyApproval.vue'),
  536. meta: {
  537. keepAlive: true,
  538. },
  539. },
  540. {
  541. path: '/doubleWeeklyHistorical',
  542. name: 'doubleWeeklyHistorical',
  543. component: () => import('@/views/week/doubleWeeklyHistorical.vue'),
  544. meta: {
  545. keepAlive: true,
  546. },
  547. },
  548. {
  549. path: '/dailyHistoricalDetails',
  550. name: 'dailyHistoricalDetails',
  551. component: () => import('@/views/week/dailyHistoricalDetails.vue'),
  552. meta: {
  553. keepAlive: true,
  554. },
  555. },
  556. {
  557. path: '/doubleHistoricalWeeklyDetils',
  558. name: 'doubleHistoricalWeeklyDetils',
  559. component: () => import('@/views/week/doubleHistoricalWeeklyDetils.vue'),
  560. meta: {
  561. keepAlive: true,
  562. },
  563. },
  564. {
  565. path: '/weeklyHistoricalDetils',
  566. name: 'weeklyHistoricalDetils',
  567. component: () => import('@/views/week/weeklyHistoricalDetils.vue'),
  568. meta: {
  569. keepAlive: true,
  570. },
  571. },
  572. {
  573. path: '/VisitSummary',
  574. name: 'VisitSummary',
  575. component: () => import('@/views/week/VisitSummary.vue'),
  576. meta: {
  577. keepAlive: true,
  578. },
  579. },
  580. {
  581. path: '/VisitSummaryMy',
  582. name: 'VisitSummaryMy',
  583. component: () => import('@/views/week/VisitSummaryMy.vue'),
  584. meta: {
  585. keepAlive: true,
  586. },
  587. },
  588. {
  589. path: '/VisitSummaryAdd',
  590. name: 'VisitSummaryAdd',
  591. component: () => import('@/views/week/VisitSummaryAdd.vue'),
  592. meta: {
  593. keepAlive: true,
  594. },
  595. },
  596. {
  597. path: '/VisitSummaryDetail',
  598. name: 'VisitSummaryDetail',
  599. component: () => import('@/views/week/VisitSummaryDetail.vue'),
  600. meta: {
  601. keepAlive: true,
  602. },
  603. },
  604. {
  605. path: '/assignAwait',
  606. name: 'assignAwait',
  607. component: () => import('@/views/week/assignAwait/index.vue'),
  608. meta: {
  609. keepAlive: true,
  610. title: '待分配客资',
  611. },
  612. },
  613. {
  614. path: '/assignPage',
  615. name: 'assignPage',
  616. component: () => import('@/views/week/assignAwait/assignPage.vue'),
  617. meta: {
  618. keepAlive: true,
  619. title: '分配客资',
  620. },
  621. },
  622. {
  623. path: '/JZfollowUp',
  624. name: 'JZfollowUp',
  625. component: () => import('@/views/week/assignAwait/JZfollowUp.vue'),
  626. meta: {
  627. keepAlive: true,
  628. title: '客资跟进',
  629. },
  630. },
  631. ],
  632. },
  633. {
  634. path: '/clew',
  635. component: layout,
  636. redirect: '/clew',
  637. children: [
  638. {
  639. path: '/clew',
  640. name: 'clew',
  641. component: () => import('@/views/clew/index.vue'),
  642. meta: {
  643. keepAlive: true,
  644. },
  645. },
  646. {
  647. path: '/clewent',
  648. name: 'clewent',
  649. component: () => import('@/views/clew/clewent.vue'),
  650. meta: {
  651. keepAlive: true,
  652. },
  653. },
  654. {
  655. path: '/complaintDetail',
  656. name: 'complaintDetail',
  657. component: () => import('@/views/clew/complaintDetail/index.vue'),
  658. meta: {
  659. keepAlive: true,
  660. title: '渠道投诉',
  661. },
  662. },
  663. ],
  664. },
  665. ],
  666. });
  667. export default router;