index.js 18 KB

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