index.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  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: '/clew',
  50. name: 'clew',
  51. component: () => import('@/views/clew/index.vue'),
  52. },
  53. {
  54. path: '/clewent',
  55. name: 'clew',
  56. component: () => import('@/views/clew/clewent.vue'),
  57. },
  58. // {
  59. // path: "/logincs",
  60. // name: "logincs",
  61. // component: () => import("@/views/home/logincs.vue")
  62. // },
  63. {
  64. path: '/noVisit',
  65. name: 'noVisit',
  66. meta: { title: '未拜访门店' },
  67. component: () => import('@/views/home/hintTabPage/noVisit.vue'),
  68. },
  69. {
  70. path: '/hintDetail',
  71. name: 'hintDetail',
  72. meta: { title: '提示类-拜访(实时) ' },
  73. component: () => import('@/views/home/hintTabPage/hintDetail.vue'),
  74. },
  75. {
  76. path: '/pantoneNoGet',
  77. name: 'pantoneNoGet',
  78. meta: { title: '提示类-业务员未领取色卡门店 ' },
  79. component: () => import('@/views/home/hintTabPage/pantoneNoGet.vue'),
  80. },
  81. ],
  82. },
  83. {
  84. path: '/storemanagementlist',
  85. component: layout,
  86. redirect: '/storemanagement/index',
  87. children: [
  88. {
  89. path: '/storemanagement/index',
  90. name: 'storeManagement',
  91. component: () => import('@/views/storeManagement/index.vue'),
  92. },
  93. {
  94. path: '/storeDetail',
  95. name: 'storeDetail',
  96. component: () => import('@/views/storeManagement/storeDetail.vue'),
  97. },
  98. {
  99. path: '/storeAdd',
  100. name: 'storeAdd',
  101. component: () => import('@/views/storeManagement/storeAdd.vue'),
  102. },
  103. {
  104. path: '/storeAddress',
  105. name: 'storeAddress',
  106. component: () => import('@/views/storeManagement/storeAddress.vue'),
  107. },
  108. {
  109. path: '/odersuccess',
  110. name: 'storeAdd',
  111. component: () => import('@/views/deviceOutside/oderSuccess.vue'),
  112. },
  113. {
  114. path: '/storeEdit',
  115. name: 'storeEdit',
  116. component: () => import('@/views/storeManagement/storeEdit.vue'),
  117. },
  118. {
  119. path: '/success',
  120. name: 'success',
  121. component: () => import('@/views/storeManagement/success.vue'),
  122. },
  123. ],
  124. },
  125. {
  126. path: '/outsidelist',
  127. component: layout,
  128. redirect: '/outsidelist/index',
  129. children: [
  130. {
  131. path: '/outsidelist/index',
  132. name: 'outsidelist',
  133. component: () => import('@/views/deviceOutside/index.vue'),
  134. },
  135. {
  136. path: '/ai',
  137. name: 'ai',
  138. component: () => import('@/views/intelligence/index.vue'),
  139. },
  140. {
  141. path: '/topStore',
  142. name: 'topStore',
  143. component: () => import('@/views/deviceOutside/topStore.vue'),
  144. },
  145. {
  146. path: '/pItem',
  147. name: 'pItem',
  148. component: () => import('@/views/deviceOutside/productItem.vue'),
  149. },
  150. {
  151. path: '/suishenbangOutstoreVisit',
  152. name: 'suishenbangOutstoreVisit',
  153. component: () => import('@/views/deviceOutside/suishenbangOutstoreVisit.vue'),
  154. },
  155. {
  156. path: '/projectOut',
  157. name: 'projectOut',
  158. component: () => import('@/views/deviceOutside/projectOut.vue'),
  159. },
  160. {
  161. path: '/rangeStore',
  162. name: 'rangeStore',
  163. component: () => import('@/views/deviceOutside/rangeStore.vue'),
  164. },
  165. {
  166. path: '/outstoreVisit',
  167. name: 'outstoreVisit',
  168. component: () => import('@/views/deviceOutside/outstoreVisit.vue'),
  169. },
  170. {
  171. path: '/taskList',
  172. name: 'taskList',
  173. component: () => import('@/views/deviceOutside/taskList.vue'),
  174. },
  175. {
  176. path: '/storeGroup',
  177. name: 'storeGroup',
  178. component: () => import('@/views/deviceOutside/storeGroup.vue'),
  179. },
  180. {
  181. path: '/outabnormalVisit',
  182. name: 'outabnormalVisit',
  183. component: () => import('@/views/deviceOutside/outabnormalVisit.vue'),
  184. },
  185. ],
  186. },
  187. {
  188. path: '/historicalVisit',
  189. component: layout,
  190. redirect: '/historicalVisit/index',
  191. children: [
  192. {
  193. path: '/historicalVisit/index',
  194. name: 'historicalVisit',
  195. component: () => import('@/views/historicalVisit/index.vue'),
  196. },
  197. {
  198. path: '/historAllVisit',
  199. name: 'historAllVisit',
  200. component: () => import('@/views/historicalVisit/historAllVisit.vue'),
  201. },
  202. {
  203. path: '/historicalDetails',
  204. name: 'historicalDetails',
  205. component: () => import('@/views/historicalVisit/historicalDetails.vue'),
  206. },
  207. {
  208. path: '/historiStoreVisit',
  209. name: 'historiStoreVisit',
  210. component: () => import('@/views/historicalVisit/hisvistdeils.vue'),
  211. },
  212. ],
  213. },
  214. {
  215. path: '/deviceWithin',
  216. component: layout,
  217. redirect: '/deviceWithin/index',
  218. children: [
  219. {
  220. path: '/deviceWithin/index',
  221. name: 'deviceWithin',
  222. component: () => import('@/views/deviceWithin/index.vue'),
  223. },
  224. {
  225. path: '/storeVisitpage',
  226. name: 'storeVisitpage',
  227. component: () => import('@/views/deviceWithin/storeVisit.vue'),
  228. },
  229. {
  230. path: '/addStoreVisit',
  231. name: 'addStoreVisit',
  232. component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
  233. },
  234. {
  235. path: '/addStoreVisitd',
  236. name: 'addStoreVisitd',
  237. component: () => import('@/views/deviceWithin/addStoreVisitd.vue'),
  238. },
  239. {
  240. path: '/addStoreVisitP',
  241. name: 'addStoreVisitP',
  242. component: () => import('@/views/deviceWithin/addStoreVisitP.vue'),
  243. },
  244. {
  245. path: '/abnormalVisit',
  246. name: 'abnormalVisit',
  247. component: () => import('@/views/deviceWithin/abnormalVisit.vue'),
  248. },
  249. {
  250. path: '/sign',
  251. name: 'sign',
  252. component: () => import('@/views/sign/index.vue'),
  253. },
  254. {
  255. path: '/signApprovalList',
  256. name: 'signApproval',
  257. component: () => import('@/views/signApproval/index.vue'),
  258. },
  259. {
  260. path: '/signApproval',
  261. name: 'signApproval',
  262. component: () => import('@/views/signApproval/signApproval.vue'),
  263. },
  264. // 同城店铺建店审批
  265. {
  266. path: '/newStoreApprovalList',
  267. name: 'newStoreApprovalList',
  268. component: () => import('@/views/signApproval/newStoreApprovalList.vue'),
  269. },
  270. {
  271. path: '/newStoreApprovalDetail',
  272. name: 'newStoreApprovalDetail',
  273. component: () => import('@/views/signApproval/newStoreApprovalDetail.vue'),
  274. },
  275. ],
  276. },
  277. {
  278. path: '/My',
  279. component: layout,
  280. redirect: '/My/index',
  281. children: [
  282. {
  283. path: '/My/index',
  284. name: 'MyList',
  285. component: () => import('@/views/week/index.vue'),
  286. },
  287. {
  288. path: '/myInventory',
  289. name: 'myInventory',
  290. component: () => import('@/views/my/myInventory.vue'),
  291. },
  292. {
  293. path: '/material',
  294. name: 'material',
  295. component: () => import('@/views/my/material.vue'),
  296. },
  297. {
  298. path: '/subordinateHistoricalDaily',
  299. name: 'subordinateHistoricalDaily',
  300. component: () => import('@/views/week/dailyHistorical.vue'),
  301. },
  302. {
  303. path: '/subordinateHistoricalWeekly',
  304. name: 'subordinateHistoricalWeekly',
  305. component: () => import('@/views/week/weeklyHistorical.vue'),
  306. },
  307. {
  308. path: '/myHistoricalDaily',
  309. name: 'myHistoricalDaily',
  310. component: () => import('@/views/week/myHistoricalDaily.vue'),
  311. },
  312. {
  313. path: '/weeklyApproval',
  314. name: 'weeklyApproval',
  315. component: () => import('@/views/week/weeklyApproval.vue'),
  316. },
  317. {
  318. path: '/weeklyApprovalDetils',
  319. name: 'weeklyApprovalDetils',
  320. component: () => import('@/views/week/weeklyApprovalDetils.vue'),
  321. },
  322. {
  323. path: '/myComment',
  324. name: 'myComment',
  325. component: () => import('@/views/week/myComment.vue'),
  326. },
  327. {
  328. path: '/doubleWeeklyDetils',
  329. name: 'doubleWeeklyDetils',
  330. component: () => import('@/views/week/doubleWeeklyDetils.vue'),
  331. },
  332. {
  333. path: '/daily',
  334. name: 'daily',
  335. component: () => import('@/views/week/daily.vue'),
  336. },
  337. {
  338. path: '/dailyApprovalList',
  339. name: 'dailyApprovalList',
  340. component: () => import('@/views/week/dailyApprovalList.vue'),
  341. },
  342. {
  343. path: '/dailyApproval',
  344. name: 'dailyApproval',
  345. component: () => import('@/views/week/dailyApproval.vue'),
  346. },
  347. {
  348. path: '/dailyDetails',
  349. name: 'dailyDetails',
  350. component: () => import('@/views/week/dailyDetails.vue'),
  351. },
  352. {
  353. path: '/weeklyApproval',
  354. name: 'weeklyApproval',
  355. component: () => import('@/views/week/weeklyApproval.vue'),
  356. },
  357. {
  358. path: '/weekly',
  359. name: 'weekly',
  360. component: () => import('@/views/week/weekly.vue'),
  361. },
  362. {
  363. path: '/doubleWeekly',
  364. name: 'doubleWeekly',
  365. component: () => import('@/views/week/doubleWeekly.vue'),
  366. },
  367. {
  368. path: '/doubleWeeklyApproval',
  369. name: 'doubleWeeklyApproval',
  370. component: () => import('@/views/week/doubleWeeklyApproval.vue'),
  371. },
  372. {
  373. path: '/doubleWeeklyHistorical',
  374. name: 'doubleWeeklyHistorical',
  375. component: () => import('@/views/week/doubleWeeklyHistorical.vue'),
  376. },
  377. {
  378. path: '/dailyHistoricalDetails',
  379. name: 'dailyHistoricalDetails',
  380. component: () => import('@/views/week/dailyHistoricalDetails.vue'),
  381. },
  382. {
  383. path: '/doubleHistoricalWeeklyDetils',
  384. name: 'doubleHistoricalWeeklyDetils',
  385. component: () => import('@/views/week/doubleHistoricalWeeklyDetils.vue'),
  386. },
  387. {
  388. path: '/weeklyHistoricalDetils',
  389. name: 'weeklyHistoricalDetils',
  390. component: () => import('@/views/week/weeklyHistoricalDetils.vue'),
  391. },
  392. {
  393. path: '/VisitSummary',
  394. name: 'VisitSummary',
  395. component: () => import('@/views/week/VisitSummary.vue'),
  396. },
  397. {
  398. path: '/VisitSummaryMy',
  399. name: 'VisitSummaryMy',
  400. component: () => import('@/views/week/VisitSummaryMy.vue'),
  401. },
  402. {
  403. path: '/VisitSummaryAdd',
  404. name: 'VisitSummaryAdd',
  405. component: () => import('@/views/week/VisitSummaryAdd.vue'),
  406. },
  407. {
  408. path: '/VisitSummaryDetail',
  409. name: 'VisitSummaryDetail',
  410. component: () => import('@/views/week/VisitSummaryDetail.vue'),
  411. },
  412. {
  413. path: '/assignAwait',
  414. name: 'assignAwait',
  415. meta: { title: '待分配客资' },
  416. component: () => import('@/views/week/assignAwait/index.vue'),
  417. },
  418. {
  419. path: '/assignAwaitDetail',
  420. name: 'assignAwaitDetail',
  421. meta: { title: '待分配客资详情' },
  422. component: () => import('@/views/week/assignAwait/assignAwaitDetail.vue'),
  423. },
  424. ],
  425. },
  426. ],
  427. });
  428. export default router;