index.js 16 KB

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