index.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  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. path: '/unCreateStore',
  97. name: 'unCreateStore',
  98. meta: { title: '提示类-业务员建店未完成页面' },
  99. component: () => import('@/views/home/hintTabPage/unCreateStore.vue'),
  100. meta: {
  101. title: '提示类-业务员建店未完成页面',
  102. },
  103. },
  104. ],
  105. },
  106. {
  107. path: '/storemanagementlist',
  108. component: layout,
  109. redirect: '/storemanagement/index',
  110. children: [
  111. {
  112. path: '/storemanagement/index',
  113. name: 'storeManagement',
  114. component: () => import('@/views/storeManagement/index.vue'),
  115. meta: {
  116. keepAlive: true,
  117. },
  118. },
  119. {
  120. path: '/storeDetail',
  121. name: 'storeDetail',
  122. component: () => import('@/views/storeManagement/storeDetail.vue'),
  123. meta: {
  124. keepAlive: true,
  125. },
  126. },
  127. {
  128. path: '/storeAdd',
  129. name: 'storeAdd',
  130. component: () => import('@/views/storeManagement/storeAdd.vue'),
  131. meta: {
  132. keepAlive: true,
  133. },
  134. },
  135. {
  136. path: '/storeAddress',
  137. name: 'storeAddress',
  138. component: () => import('@/views/storeManagement/storeAddress.vue'),
  139. meta: {
  140. keepAlive: true,
  141. },
  142. },
  143. {
  144. path: '/odersuccess',
  145. name: 'storeAdd',
  146. component: () => import('@/views/deviceOutside/oderSuccess.vue'),
  147. meta: {
  148. keepAlive: true,
  149. },
  150. },
  151. {
  152. path: '/storeEdit',
  153. name: 'storeEdit',
  154. component: () => import('@/views/storeManagement/storeEdit.vue'),
  155. meta: {
  156. keepAlive: true,
  157. },
  158. },
  159. {
  160. path: '/success',
  161. name: 'success',
  162. component: () => import('@/views/storeManagement/success.vue'),
  163. meta: {
  164. keepAlive: true,
  165. },
  166. },
  167. {
  168. path: '/chainMaintain',
  169. name: 'chainMaintain',
  170. component: () => import('@/views/storeManagement/chainMaintain.vue'),
  171. },
  172. {
  173. path: '/addDesignerPage',
  174. name: 'addDesignerPage',
  175. component: () => import('@/views/storeManagement/addDesignerPage.vue'),
  176. meta: { title: '设计师招募', keepAlive: true },
  177. },
  178. {
  179. path: '/addDesignerDetail',
  180. name: 'addDesignerDetail',
  181. component: () => import('@/views/storeManagement/addDesignerDetail.vue'),
  182. meta: { title: '设计师招募详情', keepAlive: true },
  183. },
  184. {
  185. path: '/addDesignerEdit',
  186. name: 'addDesignerEdit',
  187. component: () => import('@/views/storeManagement/addDesignerEdit.vue'),
  188. meta: { title: '设计师招募编辑', keepAlive: true },
  189. },
  190. ],
  191. },
  192. {
  193. path: '/outsidelist',
  194. component: layout,
  195. redirect: '/outsidelist/index',
  196. children: [
  197. {
  198. path: '/outsidelist/index',
  199. name: 'outsidelist',
  200. component: () => import('@/views/deviceOutside/index.vue'),
  201. meta: {
  202. keepAlive: true,
  203. scrollTop: 0,
  204. },
  205. },
  206. {
  207. path: '/ai',
  208. name: 'ai',
  209. component: () => import('@/views/intelligence/index.vue'),
  210. meta: {
  211. keepAlive: true,
  212. },
  213. },
  214. {
  215. path: '/topStore',
  216. name: 'topStore',
  217. component: () => import('@/views/deviceOutside/topStore.vue'),
  218. meta: {
  219. keepAlive: true,
  220. },
  221. },
  222. {
  223. path: '/pItem',
  224. name: 'pItem',
  225. component: () => import('@/views/deviceOutside/productItem.vue'),
  226. meta: {
  227. keepAlive: true,
  228. },
  229. },
  230. {
  231. path: '/suishenbangOutstoreVisit',
  232. name: 'suishenbangOutstoreVisit',
  233. component: () => import('@/views/deviceOutside/suishenbangOutstoreVisit.vue'),
  234. meta: {
  235. keepAlive: true,
  236. },
  237. },
  238. {
  239. path: '/projectOut',
  240. name: 'projectOut',
  241. component: () => import('@/views/deviceOutside/projectOut.vue'),
  242. meta: {
  243. keepAlive: true,
  244. },
  245. },
  246. {
  247. path: '/rangeStore',
  248. name: 'rangeStore',
  249. component: () => import('@/views/deviceOutside/rangeStore.vue'),
  250. meta: {
  251. keepAlive: true,
  252. },
  253. },
  254. {
  255. path: '/outstoreVisit',
  256. name: 'outstoreVisit',
  257. component: () => import('@/views/deviceOutside/outstoreVisit.vue'),
  258. meta: {
  259. keepAlive: true,
  260. },
  261. },
  262. {
  263. path: '/taskList',
  264. name: 'taskList',
  265. component: () => import('@/views/deviceOutside/taskList.vue'),
  266. meta: {
  267. keepAlive: true,
  268. },
  269. },
  270. {
  271. path: '/storeGroup',
  272. name: 'storeGroup',
  273. component: () => import('@/views/deviceOutside/storeGroup.vue'),
  274. meta: {
  275. keepAlive: true,
  276. },
  277. },
  278. {
  279. path: '/outabnormalVisit',
  280. name: 'outabnormalVisit',
  281. component: () => import('@/views/deviceOutside/outabnormalVisit.vue'),
  282. meta: {
  283. keepAlive: true,
  284. },
  285. },
  286. ],
  287. },
  288. {
  289. path: '/historicalVisit',
  290. component: layout,
  291. redirect: '/historicalVisit/index',
  292. children: [
  293. {
  294. path: '/historicalVisit/index',
  295. name: 'historicalVisit',
  296. component: () => import('@/views/historicalVisit/index.vue'),
  297. meta: {
  298. keepAlive: true,
  299. },
  300. },
  301. {
  302. path: '/historAllVisit',
  303. name: 'historAllVisit',
  304. component: () => import('@/views/historicalVisit/historAllVisit.vue'),
  305. meta: {
  306. keepAlive: true,
  307. },
  308. },
  309. {
  310. path: '/historicalDetails',
  311. name: 'historicalDetails',
  312. component: () => import('@/views/historicalVisit/historicalDetails.vue'),
  313. meta: {
  314. keepAlive: true,
  315. },
  316. },
  317. {
  318. path: '/historiStoreVisit',
  319. name: 'historiStoreVisit',
  320. component: () => import('@/views/historicalVisit/hisvistdeils.vue'),
  321. meta: {
  322. keepAlive: true,
  323. },
  324. },
  325. ],
  326. },
  327. {
  328. path: '/deviceWithin',
  329. component: layout,
  330. redirect: '/deviceWithin/index',
  331. children: [
  332. {
  333. path: '/deviceWithin/index',
  334. name: 'deviceWithin',
  335. component: () => import('@/views/deviceWithin/index.vue'),
  336. meta: {
  337. keepAlive: true,
  338. },
  339. },
  340. {
  341. path: '/storeVisitpage',
  342. name: 'storeVisitpage',
  343. component: () => import('@/views/deviceWithin/storeVisit.vue'),
  344. meta: {
  345. keepAlive: true,
  346. },
  347. },
  348. {
  349. path: '/addStoreVisit',
  350. name: 'addStoreVisit',
  351. component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
  352. meta: {
  353. keepAlive: true,
  354. },
  355. },
  356. {
  357. path: '/addStoreVisitd',
  358. name: 'addStoreVisitd',
  359. component: () => import('@/views/deviceWithin/addStoreVisitd.vue'),
  360. meta: {
  361. keepAlive: true,
  362. },
  363. },
  364. {
  365. path: '/addStoreVisitP',
  366. name: 'addStoreVisitP',
  367. component: () => import('@/views/deviceWithin/addStoreVisitP.vue'),
  368. meta: {
  369. keepAlive: true,
  370. },
  371. },
  372. {
  373. path: '/abnormalVisit',
  374. name: 'abnormalVisit',
  375. component: () => import('@/views/deviceWithin/abnormalVisit.vue'),
  376. meta: {
  377. keepAlive: true,
  378. },
  379. },
  380. {
  381. path: '/sign',
  382. name: 'sign',
  383. component: () => import('@/views/sign/index.vue'),
  384. meta: {
  385. keepAlive: true,
  386. },
  387. },
  388. {
  389. path: '/signApprovalList',
  390. name: 'signApproval',
  391. component: () => import('@/views/signApproval/index.vue'),
  392. meta: {
  393. keepAlive: true,
  394. },
  395. },
  396. {
  397. path: '/signApproval',
  398. name: 'signApproval',
  399. component: () => import('@/views/signApproval/signApproval.vue'),
  400. meta: {
  401. keepAlive: true,
  402. },
  403. },
  404. // 同城店铺建店审批
  405. {
  406. path: '/newStoreApprovalList',
  407. name: 'newStoreApprovalList',
  408. component: () => import('@/views/signApproval/newStoreApprovalList.vue'),
  409. meta: {
  410. keepAlive: true,
  411. },
  412. },
  413. {
  414. path: '/newStoreApprovalDetail',
  415. name: 'newStoreApprovalDetail',
  416. component: () => import('@/views/signApproval/newStoreApprovalDetail.vue'),
  417. meta: {
  418. keepAlive: true,
  419. },
  420. },
  421. ],
  422. },
  423. {
  424. path: '/My',
  425. component: layout,
  426. redirect: '/My/index',
  427. children: [
  428. {
  429. path: '/My/index',
  430. name: 'MyList',
  431. component: () => import('@/views/week/index.vue'),
  432. meta: {
  433. keepAlive: true,
  434. },
  435. },
  436. {
  437. path: '/myInventory',
  438. name: 'myInventory',
  439. component: () => import('@/views/my/myInventory.vue'),
  440. meta: {
  441. keepAlive: true,
  442. },
  443. },
  444. {
  445. path: '/material',
  446. name: 'material',
  447. component: () => import('@/views/my/material.vue'),
  448. meta: {
  449. keepAlive: true,
  450. },
  451. },
  452. {
  453. path: '/subordinateHistoricalDaily',
  454. name: 'subordinateHistoricalDaily',
  455. component: () => import('@/views/week/dailyHistorical.vue'),
  456. meta: {
  457. keepAlive: true,
  458. },
  459. },
  460. {
  461. path: '/subordinateHistoricalWeekly',
  462. name: 'subordinateHistoricalWeekly',
  463. component: () => import('@/views/week/weeklyHistorical.vue'),
  464. meta: {
  465. keepAlive: true,
  466. },
  467. },
  468. {
  469. path: '/myHistoricalDaily',
  470. name: 'myHistoricalDaily',
  471. component: () => import('@/views/week/myHistoricalDaily.vue'),
  472. meta: {
  473. keepAlive: true,
  474. },
  475. },
  476. {
  477. path: '/weeklyApproval',
  478. name: 'weeklyApproval',
  479. component: () => import('@/views/week/weeklyApproval.vue'),
  480. meta: {
  481. keepAlive: true,
  482. },
  483. },
  484. {
  485. path: '/weeklyApprovalDetils',
  486. name: 'weeklyApprovalDetils',
  487. component: () => import('@/views/week/weeklyApprovalDetils.vue'),
  488. meta: {
  489. keepAlive: true,
  490. },
  491. },
  492. {
  493. path: '/myComment',
  494. name: 'myComment',
  495. component: () => import('@/views/week/myComment.vue'),
  496. meta: {
  497. keepAlive: true,
  498. },
  499. },
  500. {
  501. path: '/doubleWeeklyDetils',
  502. name: 'doubleWeeklyDetils',
  503. component: () => import('@/views/week/doubleWeeklyDetils.vue'),
  504. meta: {
  505. keepAlive: true,
  506. },
  507. },
  508. {
  509. path: '/daily',
  510. name: 'daily',
  511. component: () => import('@/views/week/daily.vue'),
  512. meta: {
  513. keepAlive: true,
  514. },
  515. },
  516. {
  517. path: '/dailyApprovalList',
  518. name: 'dailyApprovalList',
  519. component: () => import('@/views/week/dailyApprovalList.vue'),
  520. meta: {
  521. keepAlive: true,
  522. },
  523. },
  524. {
  525. path: '/dailyApproval',
  526. name: 'dailyApproval',
  527. component: () => import('@/views/week/dailyApproval.vue'),
  528. meta: {
  529. keepAlive: true,
  530. },
  531. },
  532. {
  533. path: '/dailyDetails',
  534. name: 'dailyDetails',
  535. component: () => import('@/views/week/dailyDetails.vue'),
  536. meta: {
  537. keepAlive: true,
  538. },
  539. },
  540. {
  541. path: '/weeklyApproval',
  542. name: 'weeklyApproval',
  543. component: () => import('@/views/week/weeklyApproval.vue'),
  544. meta: {
  545. keepAlive: true,
  546. },
  547. },
  548. {
  549. path: '/weekly',
  550. name: 'weekly',
  551. component: () => import('@/views/week/weekly.vue'),
  552. meta: {
  553. keepAlive: true,
  554. },
  555. },
  556. {
  557. path: '/doubleWeekly',
  558. name: 'doubleWeekly',
  559. component: () => import('@/views/week/doubleWeekly.vue'),
  560. meta: {
  561. keepAlive: true,
  562. },
  563. },
  564. {
  565. path: '/doubleWeeklyApproval',
  566. name: 'doubleWeeklyApproval',
  567. component: () => import('@/views/week/doubleWeeklyApproval.vue'),
  568. meta: {
  569. keepAlive: true,
  570. },
  571. },
  572. {
  573. path: '/doubleWeeklyHistorical',
  574. name: 'doubleWeeklyHistorical',
  575. component: () => import('@/views/week/doubleWeeklyHistorical.vue'),
  576. meta: {
  577. keepAlive: true,
  578. },
  579. },
  580. {
  581. path: '/dailyHistoricalDetails',
  582. name: 'dailyHistoricalDetails',
  583. component: () => import('@/views/week/dailyHistoricalDetails.vue'),
  584. meta: {
  585. keepAlive: true,
  586. },
  587. },
  588. {
  589. path: '/doubleHistoricalWeeklyDetils',
  590. name: 'doubleHistoricalWeeklyDetils',
  591. component: () => import('@/views/week/doubleHistoricalWeeklyDetils.vue'),
  592. meta: {
  593. keepAlive: true,
  594. },
  595. },
  596. {
  597. path: '/weeklyHistoricalDetils',
  598. name: 'weeklyHistoricalDetils',
  599. component: () => import('@/views/week/weeklyHistoricalDetils.vue'),
  600. meta: {
  601. keepAlive: true,
  602. },
  603. },
  604. {
  605. path: '/VisitSummary',
  606. name: 'VisitSummary',
  607. component: () => import('@/views/week/VisitSummary.vue'),
  608. meta: {
  609. keepAlive: true,
  610. },
  611. },
  612. {
  613. path: '/VisitSummaryMy',
  614. name: 'VisitSummaryMy',
  615. component: () => import('@/views/week/VisitSummaryMy.vue'),
  616. meta: {
  617. keepAlive: true,
  618. },
  619. },
  620. {
  621. path: '/VisitSummaryAdd',
  622. name: 'VisitSummaryAdd',
  623. component: () => import('@/views/week/VisitSummaryAdd.vue'),
  624. meta: {
  625. keepAlive: true,
  626. },
  627. },
  628. {
  629. path: '/VisitSummaryDetail',
  630. name: 'VisitSummaryDetail',
  631. component: () => import('@/views/week/VisitSummaryDetail.vue'),
  632. meta: {
  633. keepAlive: true,
  634. },
  635. },
  636. {
  637. path: '/assignAwait',
  638. name: 'assignAwait',
  639. component: () => import('@/views/week/assignAwait/index.vue'),
  640. meta: {
  641. keepAlive: true,
  642. title: '待分配客资',
  643. },
  644. },
  645. {
  646. path: '/assignPage',
  647. name: 'assignPage',
  648. component: () => import('@/views/week/assignAwait/assignPage.vue'),
  649. meta: {
  650. keepAlive: true,
  651. title: '分配客资',
  652. },
  653. },
  654. {
  655. path: '/JZfollowUp',
  656. name: 'JZfollowUp',
  657. component: () => import('@/views/week/assignAwait/JZfollowUp.vue'),
  658. meta: {
  659. keepAlive: true,
  660. title: '客资跟进',
  661. },
  662. },
  663. {
  664. path: '/systemSettings',
  665. name: 'systemSettings',
  666. component: () => import('@/views/week/systemSettings.vue'),
  667. meta: { title: '设置' },
  668. },
  669. {
  670. path: '/SUPTaskApproval',
  671. name: 'SUPTaskApproval',
  672. component: () => import('@/views/week/SUPTaskApproval/index.vue'),
  673. meta: { title: '主管任务审批', keepAlive: true },
  674. children: [],
  675. },
  676. {
  677. path: '/SUPTaskApprovalDetail',
  678. name: 'SUPTaskApprovalDetail',
  679. component: () => import('@/views/week/SUPTaskApproval/SUPTaskApprovalDetail.vue'),
  680. meta: { title: '主管任务审批详情', keepAlive: true },
  681. },
  682. ],
  683. },
  684. {
  685. path: '/clew',
  686. component: layout,
  687. redirect: '/clew',
  688. children: [
  689. {
  690. path: '/clew',
  691. name: 'clew',
  692. component: () => import('@/views/clew/index.vue'),
  693. meta: {
  694. keepAlive: true,
  695. },
  696. },
  697. {
  698. path: '/clewent',
  699. name: 'clewent',
  700. component: () => import('@/views/clew/clewent.vue'),
  701. meta: {
  702. keepAlive: true,
  703. },
  704. },
  705. {
  706. path: '/complaintDetail',
  707. name: 'complaintDetail',
  708. component: () => import('@/views/clew/complaintDetail/index.vue'),
  709. meta: {
  710. keepAlive: true,
  711. title: '渠道投诉',
  712. },
  713. },
  714. ],
  715. },
  716. {
  717. path: '/AIImage',
  718. component: layout,
  719. redirect: '/AIImage/list',
  720. children: [
  721. {
  722. path: '/AIImage/list',
  723. name: 'AIImage',
  724. component: () => import('@/views/AIImage/list.vue'),
  725. },
  726. {
  727. path: '/AIImageDetail',
  728. name: 'AIImageDetail',
  729. component: () => import('@/views/AIImage/AIImageDetail.vue'),
  730. },
  731. ],
  732. },
  733. {
  734. path: '/chatAIPage',
  735. component: layout,
  736. redirect: '/chatAIPage',
  737. children: [
  738. {
  739. path: '/chatAIPage',
  740. name: 'chatAIPage',
  741. component: () => import('@/views/chatAIPage/index.vue'),
  742. },
  743. ],
  744. },
  745. ],
  746. });
  747. export default router;