| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- import Vue from "vue";
- import VueRouter from "vue-router";
- import layout from "@/layout/index.vue";
- const originalPush = VueRouter.prototype.push;
- VueRouter.prototype.push = function push(location) {
- return originalPush.call(this, location).catch(err => err);
- };
- Vue.use(VueRouter);
- const router = new VueRouter({
- // mode:"history",
- // mode:process.env.NODE_ENV !==
- // "production" ? "hash" : "history",
- mode:"history",
- scrollBehavior(to, from, savedPosition) {
- if (savedPosition) {
- return savedPosition;
- } else {
- return { x: 0, y: 0 };
- }
- },
- base: '/mobile/',
- routes: [
- {
- path: "/",
- component: layout,
- redirect: "/home",
- children: [
- {
- path: "/home",
- name: "home",
- component: () => import("@/views/home/index.vue")
- },
- {
- path: "/reportingRate",
- name: "reportingRate",
- component: () => import("@/views/home/reportingRate.vue")
- },
- {
- path: "/err",
- name: "err",
- component: () => import("@/views/home/err.vue")
- },
- {
- path: "/login",
- name: "login",
- component: () => import("@/views/home/login.vue")
- },
- {
- path: "/clew",
- name: "clew",
- component: () => import("@/views/clew/index.vue")
- },
- {
- path: "/clewent",
- name: "clew",
- component: () => import("@/views/clew/clewent.vue")
- },
- // {
- // path: "/logincs",
- // name: "logincs",
- // component: () => import("@/views/home/logincs.vue")
- // }
- ]
- },
- {
- path: "/storemanagementlist",
- component: layout,
- redirect: "/storemanagement/index",
- children: [
- {
- path: "/storemanagement/index",
- name: "storeManagement",
- component: () => import("@/views/storeManagement/index.vue")
- },
- {
- path: "/storeDetail",
- name: "storeDetail",
- component: () => import("@/views/storeManagement/storeDetail.vue")
- },
- {
- path: "/storeAdd",
- name: "storeAdd",
- component: () => import("@/views/storeManagement/storeAdd.vue")
- },
- {
- path: "/storeAddress",
- name: "storeAddress",
- component: () => import("@/views/storeManagement/storeAddress.vue")
- },
- {
- path: "/odersuccess",
- name: "storeAdd",
- component: () => import("@/views/deviceOutside/oderSuccess.vue")
- },
- {
- path: "/storeEdit",
- name: "storeEdit",
- component: () => import("@/views/storeManagement/storeEdit.vue")
- },
- {
- path: "/success",
- name: "success",
- component: () => import("@/views/storeManagement/success.vue")
- }
- ]
- },
- {
- path: "/outsidelist",
- component: layout,
- redirect: "/outsidelist/index",
- children: [
- {
- path: "/outsidelist/index",
- name: "outsidelist",
- component: () => import("@/views/deviceOutside/index.vue")
- },
- {
- path: "/ai",
- name: "ai",
- component: () => import("@/views/intelligence/index.vue")
- },
- {
- path: "/topStore",
- name: "topStore",
- component: () => import("@/views/deviceOutside/topStore.vue")
- },
- {
- path: "/pItem",
- name: "pItem",
- component: () => import("@/views/deviceOutside/productItem.vue")
- },
- {
- path: "/suishenbangOutstoreVisit",
- name: "suishenbangOutstoreVisit",
- component: () => import("@/views/deviceOutside/suishenbangOutstoreVisit.vue")
- },
- {
- path: "/projectOut",
- name: "projectOut",
- component: () => import("@/views/deviceOutside/projectOut.vue")
- },
- {
- path: "/rangeStore",
- name: "rangeStore",
- component: () => import("@/views/deviceOutside/rangeStore.vue")
- },
- {
- path: "/outstoreVisit",
- name: "outstoreVisit",
- component: () => import("@/views/deviceOutside/outstoreVisit.vue")
- },
- {
- path: "/taskList",
- name: "taskList",
- component: () => import("@/views/deviceOutside/taskList.vue")
- },
- {
- path: "/storeGroup",
- name: "storeGroup",
- component: () => import("@/views/deviceOutside/storeGroup.vue")
- },
- {
- path: "/outabnormalVisit",
- name: "outabnormalVisit",
- component: () => import("@/views/deviceOutside/outabnormalVisit.vue")
- }
- ]
- },
- {
- path: "/historicalVisit",
- component: layout,
- redirect: "/historicalVisit/index",
- children: [
- {
- path: "/historicalVisit/index",
- name: "historicalVisit",
- component: () => import("@/views/historicalVisit/index.vue")
- },
- {
- path: "/historAllVisit",
- name: "historAllVisit",
- component: () => import("@/views/historicalVisit/historAllVisit.vue")
- },
- {
- path: "/historicalDetails",
- name: "historicalDetails",
- component: () => import("@/views/historicalVisit/historicalDetails.vue")
- },
- {
- path: "/historiStoreVisit",
- name: "historiStoreVisit",
- component: () => import("@/views/historicalVisit/hisvistdeils.vue")
- }
- ]
- },
- {
- path: "/deviceWithin",
- component: layout,
- redirect: "/deviceWithin/index",
- children: [
- {
- path: "/deviceWithin/index",
- name: "deviceWithin",
- component: () => import("@/views/deviceWithin/index.vue")
- },
- {
- path: "/storeVisitpage",
- name: "storeVisitpage",
- component: () => import("@/views/deviceWithin/storeVisit.vue")
- },
- {
- path: "/addStoreVisit",
- name: "addStoreVisit",
- component: () => import("@/views/deviceWithin/addStoreVisit.vue")
- },
- {
- path: "/addStoreVisitd",
- name: "addStoreVisitd",
- component: () => import("@/views/deviceWithin/addStoreVisitd.vue")
- },
- {
- path: "/addStoreVisitP",
- name: "addStoreVisitP",
- component: () => import("@/views/deviceWithin/addStoreVisitP.vue")
- },
- {
- path: "/abnormalVisit",
- name: "abnormalVisit",
- component: () => import("@/views/deviceWithin/abnormalVisit.vue")
- }
- ,
- {
- path: "/sign",
- name: "sign",
- component: () => import("@/views/sign/index.vue")
- } ,
- {
- path: "/signApprovalList",
- name: "signApproval",
- component: () => import("@/views/signApproval/index.vue")
- },
- {
- path: "/signApproval",
- name: "signApproval",
- component: () => import("@/views/signApproval/signApproval.vue")
- }
- ]
- },
- {
- path: "/My",
- component: layout,
- redirect: "/My/index",
- children: [
- {
- path: "/My/index",
- name: "MyList",
- component: () => import("@/views/week/index.vue")
- },
- {
- path: "/myInventory",
- name: "myInventory",
- component: () => import("@/views/my/myInventory.vue")
- },
- {
- path: "/material",
- name: "material",
- component: () => import("@/views/my/material.vue")
- },
- {
- path: "/subordinateHistoricalDaily",
- name: "subordinateHistoricalDaily",
- component: () => import("@/views/week/dailyHistorical.vue")
- }, {
- path: "/subordinateHistoricalWeekly",
- name: "subordinateHistoricalWeekly",
- component: () => import("@/views/week/weeklyHistorical.vue")
- }, {
- path: "/myHistoricalDaily",
- name: "myHistoricalDaily",
- component: () => import("@/views/week/myHistoricalDaily.vue")
- },
- {
- path: "/weeklyApproval",
- name: "weeklyApproval",
- component: () => import("@/views/week/weeklyApproval.vue")
- },
- {
- path: "/weeklyApprovalDetils",
- name: "weeklyApprovalDetils",
- component: () => import("@/views/week/weeklyApprovalDetils.vue")
- },
- {
- path: "/myComment",
- name: "myComment",
- component: () => import("@/views/week/myComment.vue")
- },
- {
- path: "/doubleWeeklyDetils",
- name: "doubleWeeklyDetils",
- component: () => import("@/views/week/doubleWeeklyDetils.vue")
- },
- {
- path: "/daily",
- name: "daily",
- component: () => import("@/views/week/daily.vue")
- }, {
- path: "/dailyApprovalList",
- name: "dailyApprovalList",
- component: () => import("@/views/week/dailyApprovalList.vue")
- },
- {
- path: "/dailyApproval",
- name: "dailyApproval",
- component: () => import("@/views/week/dailyApproval.vue")
- },
- {
- path: "/dailyDetails",
- name: "dailyDetails",
- component: () => import("@/views/week/dailyDetails.vue")
- },
- {
- path: "/weeklyApproval",
- name: "weeklyApproval",
- component: () => import("@/views/week/weeklyApproval.vue")
- },
- {
- path: "/weekly",
- name: "weekly",
- component: () => import("@/views/week/weekly.vue")
- },
- {
- path: "/doubleWeekly",
- name: "doubleWeekly",
- component: () => import("@/views/week/doubleWeekly.vue")
- },
- {
- path: "/doubleWeeklyApproval",
- name: "doubleWeeklyApproval",
- component: () => import("@/views/week/doubleWeeklyApproval.vue")
- },
- {
- path: "/doubleWeeklyHistorical",
- name: "doubleWeeklyHistorical",
- component: () => import("@/views/week/doubleWeeklyHistorical.vue")
- },
- {
- path: "/dailyHistoricalDetails",
- name: "dailyHistoricalDetails",
- component: () => import("@/views/week/dailyHistoricalDetails.vue")
- },
- {
- path: "/doubleHistoricalWeeklyDetils",
- name: "doubleHistoricalWeeklyDetils",
- component: () => import("@/views/week/doubleHistoricalWeeklyDetils.vue")
- },
- {
- path: "/weeklyHistoricalDetils",
- name: "weeklyHistoricalDetils",
- component: () => import("@/views/week/weeklyHistoricalDetils.vue")
- },
- {
- path: "/VisitSummary",
- name: "VisitSummary",
- component: () => import("@/views/week/VisitSummary.vue")
- },
- {
- path: "/VisitSummaryMy",
- name: "VisitSummaryMy",
- component: () => import("@/views/week/VisitSummaryMy.vue")
- },
- {
- path: "/VisitSummaryAdd",
- name: "VisitSummaryAdd",
- component: () => import("@/views/week/VisitSummaryAdd.vue")
- },
- {
- path: "/VisitSummaryDetail",
- name: "VisitSummaryDetail",
- component: () => import("@/views/week/VisitSummaryDetail.vue")
- },
- ]
- }
- ]
- });
- export default router;
|