index.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  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. },
  33. {
  34. path: '/reportingRate',
  35. name: 'reportingRate',
  36. component: () => import('@/views/home/reportingRate.vue'),
  37. },
  38. {
  39. path: '/err',
  40. name: 'err',
  41. component: () => import('@/views/home/err.vue'),
  42. },
  43. {
  44. path: '/login',
  45. name: 'login',
  46. component: () => import('@/views/home/login.vue'),
  47. },
  48. {
  49. path: '/logincs',
  50. name: 'logincs',
  51. component: () => import('@/views/home/logincs.vue'),
  52. },
  53. {
  54. path: '/noVisit',
  55. name: 'noVisit',
  56. meta: { title: '未拜访门店' },
  57. component: () => import('@/views/home/hintTabPage/noVisit.vue'),
  58. },
  59. {
  60. path: '/hintDetail',
  61. name: 'hintDetail',
  62. meta: { title: '提示类-拜访(实时) ' },
  63. component: () => import('@/views/home/hintTabPage/hintDetail.vue'),
  64. },
  65. {
  66. path: '/pantoneNoGet',
  67. name: 'pantoneNoGet',
  68. meta: { title: '提示类-业务员未领取色卡门店 ' },
  69. component: () => import('@/views/home/hintTabPage/pantoneNoGet.vue'),
  70. },
  71. {
  72. path: '/unCreateStore',
  73. name: 'unCreateStore',
  74. meta: { title: '提示类-业务员建店未完成页面' },
  75. component: () => import('@/views/home/hintTabPage/unCreateStore.vue'),
  76. meta: {
  77. title: '提示类-业务员建店未完成页面',
  78. },
  79. },
  80. {
  81. path: '/warningStore',
  82. name: 'warningStore',
  83. meta: { title: '提示类-业务员预警门店页面' },
  84. component: () => import('@/views/home/hintTabPage/warningStore.vue'),
  85. meta: {
  86. title: '提示类-业务员预警门店页面',
  87. },
  88. },
  89. {
  90. path: "/error",
  91. name: 'error',
  92. meta: { title: '提示类-接口异常提示页面' },
  93. component: () => import("../views/home/error.vue")
  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. },
  107. {
  108. path: '/storeDetail',
  109. name: 'storeDetail',
  110. component: () => import('@/views/storeManagement/storeDetail.vue'),
  111. },
  112. {
  113. path: '/storeAdd',
  114. name: 'storeAdd',
  115. component: () => import('@/views/storeManagement/storeAdd.vue'),
  116. },
  117. {
  118. path: '/storeAddress',
  119. name: 'storeAddress',
  120. component: () => import('@/views/storeManagement/storeAddress.vue'),
  121. },
  122. {
  123. path: '/odersuccess',
  124. name: 'storeAdd',
  125. component: () => import('@/views/deviceOutside/oderSuccess.vue'),
  126. },
  127. {
  128. path: '/storeEdit',
  129. name: 'storeEdit',
  130. component: () => import('@/views/storeManagement/storeEdit.vue'),
  131. },
  132. {
  133. path: '/success',
  134. name: 'success',
  135. component: () => import('@/views/storeManagement/success.vue'),
  136. },
  137. {
  138. path: '/chainMaintain',
  139. name: 'chainMaintain',
  140. component: () => import('@/views/storeManagement/chainMaintain.vue'),
  141. },
  142. {
  143. path: '/addDesignerPage',
  144. name: 'addDesignerPage',
  145. component: () => import('@/views/storeManagement/addDesignerPage.vue'),
  146. meta: { title: '设计师招募', keepAlive: true },
  147. },
  148. {
  149. path: '/addDesignerDetail',
  150. name: 'addDesignerDetail',
  151. component: () => import('@/views/storeManagement/addDesignerDetail.vue'),
  152. meta: { title: '设计师招募详情', keepAlive: true },
  153. },
  154. {
  155. path: '/addDesignerEdit',
  156. name: 'addDesignerEdit',
  157. component: () => import('@/views/storeManagement/addDesignerEdit.vue'),
  158. meta: { title: '设计师招募编辑', keepAlive: true },
  159. },
  160. {
  161. path: '/JPattributeEditor',
  162. name: 'JPattributeEditor',
  163. component: () => import('@/views/storeManagement/JPattributeEditor.vue'),
  164. meta: { title: '金牌店档案编辑', keepAlive: true },
  165. },
  166. {
  167. path: '/FSQStoreDetail',
  168. name: 'FSQStoreDetail',
  169. component: () => import('@/views/storeManagement/FSQStoreDetail.vue'),
  170. meta: { title: '仿石漆详情', keepAlive: true },
  171. },
  172. {
  173. path: '/FSQStoreEdit',
  174. name: 'FSQStoreEdit',
  175. component: () => import('@/views/storeManagement/FSQStoreEdit.vue'),
  176. meta: { title: '仿石漆编辑', keepAlive: true },
  177. },
  178. {
  179. path: '/competingStoresAdd',
  180. name: 'competingStoresAdd',
  181. component: () => import('@/views/storeManagement/competingStoresAdd.vue'),
  182. meta: { title: '竞品店添加', keepAlive: true },
  183. },
  184. {
  185. path: '/competingStoresDetail',
  186. name: 'competingStoresDetail',
  187. component: () => import('@/views/storeManagement/competingStoresDetail.vue'),
  188. meta: { title: '竞品门店详情', keepAlive: true },
  189. },
  190. {
  191. path: '/competingStoresEdit',
  192. name: 'competingStoresEdit',
  193. component: () => import('@/views/storeManagement/competingStoresEdit.vue'),
  194. meta: { title: '竞品门店编辑', keepAlive: true },
  195. },
  196. ],
  197. },
  198. {
  199. path: '/outsidelist',
  200. component: layout,
  201. redirect: '/outsidelist/index',
  202. children: [
  203. {
  204. path: '/outsidelist/index',
  205. name: 'outsidelist',
  206. component: () => import('@/views/deviceOutside/index.vue'),
  207. },
  208. {
  209. path: '/ai',
  210. name: 'ai',
  211. component: () => import('@/views/intelligence/index.vue'),
  212. },
  213. {
  214. path: '/topStore',
  215. name: 'topStore',
  216. component: () => import('@/views/deviceOutside/topStore.vue'),
  217. },
  218. {
  219. path: '/pItem',
  220. name: 'pItem',
  221. component: () => import('@/views/deviceOutside/productItem.vue'),
  222. },
  223. {
  224. path: '/suishenbangOutstoreVisit',
  225. name: 'suishenbangOutstoreVisit',
  226. component: () => import('@/views/deviceOutside/suishenbangOutstoreVisit.vue'),
  227. },
  228. {
  229. path: '/projectOut',
  230. name: 'projectOut',
  231. component: () => import('@/views/deviceOutside/projectOut.vue'),
  232. },
  233. {
  234. path: '/rangeStore',
  235. name: 'rangeStore',
  236. component: () => import('@/views/deviceOutside/rangeStore.vue'),
  237. },
  238. {
  239. path: '/outstoreVisit',
  240. name: 'outstoreVisit',
  241. component: () => import('@/views/deviceOutside/outstoreVisit.vue'),
  242. },
  243. {
  244. path: '/taskList',
  245. name: 'taskList',
  246. component: () => import('@/views/deviceOutside/taskList.vue'),
  247. },
  248. {
  249. path: '/storeGroup',
  250. name: 'storeGroup',
  251. component: () => import('@/views/deviceOutside/storeGroup.vue'),
  252. },
  253. {
  254. path: '/outabnormalVisit',
  255. name: 'outabnormalVisit',
  256. component: () => import('@/views/deviceOutside/outabnormalVisit.vue'),
  257. },
  258. ],
  259. },
  260. {
  261. path: '/historicalVisit',
  262. component: layout,
  263. redirect: '/historicalVisit/index',
  264. children: [
  265. {
  266. path: '/historicalVisit/index',
  267. name: 'historicalVisit',
  268. component: () => import('@/views/historicalVisit/index.vue'),
  269. },
  270. {
  271. path: '/historAllVisit',
  272. name: 'historAllVisit',
  273. component: () => import('@/views/historicalVisit/historAllVisit.vue'),
  274. },
  275. {
  276. path: '/historicalDetails',
  277. name: 'historicalDetails',
  278. component: () => import('@/views/historicalVisit/historicalDetails.vue'),
  279. },
  280. {
  281. path: '/historiStoreVisit',
  282. name: 'historiStoreVisit',
  283. component: () => import('@/views/historicalVisit/hisvistdeils.vue'),
  284. },
  285. {
  286. path: '/skuRecognize',
  287. name: 'skuRecognize',
  288. component: () => import('@/views/historicalVisit/skuRecognize.vue'),
  289. },
  290. ],
  291. },
  292. {
  293. path: '/deviceWithin',
  294. component: layout,
  295. redirect: '/deviceWithin/index',
  296. children: [
  297. {
  298. path: '/deviceWithin/index',
  299. name: 'deviceWithin',
  300. component: () => import('@/views/deviceWithin/index.vue'),
  301. },
  302. {
  303. path: '/storeVisitpage',
  304. name: 'storeVisitpage',
  305. component: () => import('@/views/deviceWithin/storeVisit.vue'),
  306. },
  307. {
  308. path: '/addStoreVisit',
  309. name: 'addStoreVisit',
  310. component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
  311. },
  312. {
  313. path: '/addStoreVisitd',
  314. name: 'addStoreVisitd',
  315. component: () => import('@/views/deviceWithin/addStoreVisitd.vue'),
  316. },
  317. {
  318. path: '/addStoreVisitP',
  319. name: 'addStoreVisitP',
  320. component: () => import('@/views/deviceWithin/addStoreVisitP.vue'),
  321. },
  322. {
  323. path: '/abnormalVisit',
  324. name: 'abnormalVisit',
  325. component: () => import('@/views/deviceWithin/abnormalVisit.vue'),
  326. },
  327. {
  328. path: '/sign',
  329. name: 'sign',
  330. component: () => import('@/views/sign/index.vue'),
  331. },
  332. {
  333. path: '/signApprovalList',
  334. name: 'signApproval',
  335. component: () => import('@/views/signApproval/index.vue'),
  336. },
  337. {
  338. path: '/signApproval',
  339. name: 'signApproval',
  340. component: () => import('@/views/signApproval/signApproval.vue'),
  341. },
  342. // 同城店铺建店审批
  343. {
  344. path: '/newStoreApprovalList',
  345. name: 'newStoreApprovalList',
  346. component: () => import('@/views/signApproval/newStoreApprovalList.vue'),
  347. },
  348. {
  349. path: '/newStoreApprovalDetail',
  350. name: 'newStoreApprovalDetail',
  351. component: () => import('@/views/signApproval/newStoreApprovalDetail.vue'),
  352. },
  353. ],
  354. },
  355. {
  356. path: '/My',
  357. component: layout,
  358. redirect: '/My/index',
  359. children: [
  360. {
  361. path: '/My/index',
  362. name: 'MyList',
  363. component: () => import('@/views/week/index.vue'),
  364. },
  365. {
  366. path: '/myInventory',
  367. name: 'myInventory',
  368. component: () => import('@/views/my/myInventory.vue'),
  369. },
  370. {
  371. path: '/material',
  372. name: 'material',
  373. component: () => import('@/views/my/material.vue'),
  374. },
  375. {
  376. path: '/subordinateHistoricalDaily',
  377. name: 'subordinateHistoricalDaily',
  378. component: () => import('@/views/week/dailyHistorical.vue'),
  379. },
  380. {
  381. path: '/subordinateHistoricalWeekly',
  382. name: 'subordinateHistoricalWeekly',
  383. component: () => import('@/views/week/weeklyHistorical.vue'),
  384. },
  385. {
  386. path: '/myHistoricalDaily',
  387. name: 'myHistoricalDaily',
  388. component: () => import('@/views/week/myHistoricalDaily.vue'),
  389. },
  390. {
  391. path: '/weeklyApproval',
  392. name: 'weeklyApproval',
  393. component: () => import('@/views/week/weeklyApproval.vue'),
  394. },
  395. {
  396. path: '/weeklyApprovalDetils',
  397. name: 'weeklyApprovalDetils',
  398. component: () => import('@/views/week/weeklyApprovalDetils.vue'),
  399. },
  400. {
  401. path: '/myComment',
  402. name: 'myComment',
  403. component: () => import('@/views/week/myComment.vue'),
  404. },
  405. {
  406. path: '/doubleWeeklyDetils',
  407. name: 'doubleWeeklyDetils',
  408. component: () => import('@/views/week/doubleWeeklyDetils.vue'),
  409. },
  410. {
  411. path: '/daily',
  412. name: 'daily',
  413. component: () => import('@/views/week/daily.vue'),
  414. },
  415. {
  416. path: '/dailyApprovalList',
  417. name: 'dailyApprovalList',
  418. component: () => import('@/views/week/dailyApprovalList.vue'),
  419. },
  420. {
  421. path: '/dailyApproval',
  422. name: 'dailyApproval',
  423. component: () => import('@/views/week/dailyApproval.vue'),
  424. },
  425. {
  426. path: '/dailyDetails',
  427. name: 'dailyDetails',
  428. component: () => import('@/views/week/dailyDetails.vue'),
  429. },
  430. {
  431. path: '/weeklyApproval',
  432. name: 'weeklyApproval',
  433. component: () => import('@/views/week/weeklyApproval.vue'),
  434. },
  435. {
  436. path: '/weekly',
  437. name: 'weekly',
  438. component: () => import('@/views/week/weekly.vue'),
  439. },
  440. {
  441. path: '/doubleWeekly',
  442. name: 'doubleWeekly',
  443. component: () => import('@/views/week/doubleWeekly.vue'),
  444. },
  445. {
  446. path: '/doubleWeeklyApproval',
  447. name: 'doubleWeeklyApproval',
  448. component: () => import('@/views/week/doubleWeeklyApproval.vue'),
  449. },
  450. {
  451. path: '/doubleWeeklyHistorical',
  452. name: 'doubleWeeklyHistorical',
  453. component: () => import('@/views/week/doubleWeeklyHistorical.vue'),
  454. },
  455. {
  456. path: '/dailyHistoricalDetails',
  457. name: 'dailyHistoricalDetails',
  458. component: () => import('@/views/week/dailyHistoricalDetails.vue'),
  459. },
  460. {
  461. path: '/doubleHistoricalWeeklyDetils',
  462. name: 'doubleHistoricalWeeklyDetils',
  463. component: () => import('@/views/week/doubleHistoricalWeeklyDetils.vue'),
  464. },
  465. {
  466. path: '/weeklyHistoricalDetils',
  467. name: 'weeklyHistoricalDetils',
  468. component: () => import('@/views/week/weeklyHistoricalDetils.vue'),
  469. },
  470. {
  471. path: '/VisitSummary',
  472. name: 'VisitSummary',
  473. component: () => import('@/views/week/VisitSummary.vue'),
  474. },
  475. {
  476. path: '/VisitSummaryMy',
  477. name: 'VisitSummaryMy',
  478. component: () => import('@/views/week/VisitSummaryMy.vue'),
  479. },
  480. {
  481. path: '/VisitSummaryAdd',
  482. name: 'VisitSummaryAdd',
  483. component: () => import('@/views/week/VisitSummaryAdd.vue'),
  484. },
  485. {
  486. path: '/VisitSummaryDetail',
  487. name: 'VisitSummaryDetail',
  488. component: () => import('@/views/week/VisitSummaryDetail.vue'),
  489. },
  490. {
  491. path: '/VisitSummaryStorageDetail',
  492. name: 'VisitSummaryStorageDetail',
  493. component: () => import('@/views/week/VisitSummaryStorageDetail.vue'),
  494. },
  495. {
  496. path: '/assignAwait',
  497. name: 'assignAwait',
  498. meta: { title: '待分配客资' },
  499. component: () => import('@/views/week/assignAwait/index.vue'),
  500. },
  501. {
  502. path: '/assignPage',
  503. name: 'assignPage',
  504. meta: { title: '分配客资' },
  505. component: () => import('@/views/week/assignAwait/assignPage.vue'),
  506. },
  507. {
  508. path: '/JZfollowUp',
  509. name: 'JZfollowUp',
  510. meta: { title: '客资跟进' },
  511. component: () => import('@/views/week/assignAwait/JZfollowUp.vue'),
  512. },
  513. {
  514. path: '/systemSettings',
  515. name: 'systemSettings',
  516. component: () => import('@/views/week/systemSettings.vue'),
  517. meta: { title: '设置' },
  518. },
  519. {
  520. path: '/SUPTaskApproval',
  521. name: 'SUPTaskApproval',
  522. component: () => import('@/views/week/SUPTaskApproval/index.vue'),
  523. meta: { title: '主管任务审批', keepAlive: true },
  524. children: [],
  525. },
  526. {
  527. path: '/SUPTaskApprovalDetail',
  528. name: 'SUPTaskApprovalDetail',
  529. component: () => import('@/views/week/SUPTaskApproval/SUPTaskApprovalDetail.vue'),
  530. meta: { title: '主管任务审批详情', keepAlive: true },
  531. },
  532. ],
  533. },
  534. {
  535. path: '/clew',
  536. component: layout,
  537. redirect: '/clew',
  538. children: [
  539. {
  540. path: '/clew',
  541. name: 'clew',
  542. component: () => import('@/views/clew/index.vue'),
  543. },
  544. {
  545. path: '/clewent',
  546. name: 'clewent',
  547. component: () => import('@/views/clew/clewent.vue'),
  548. },
  549. {
  550. path: '/complaintDetail',
  551. name: 'complaintDetail',
  552. meta: { title: '渠道投诉' },
  553. component: () => import('@/views/clew/complaintDetail/index.vue'),
  554. },
  555. ],
  556. },
  557. {
  558. path: '/AIImage',
  559. component: layout,
  560. redirect: '/AIImage/list',
  561. children: [
  562. {
  563. path: '/AIImage/list',
  564. name: 'AIImage',
  565. component: () => import('@/views/AIImage/list.vue'),
  566. },
  567. {
  568. path: '/AIImageDetail',
  569. name: 'AIImageDetail',
  570. component: () => import('@/views/AIImage/AIImageDetail.vue'),
  571. },
  572. ],
  573. },
  574. ],
  575. });
  576. export default router;