|
@@ -203,21 +203,7 @@ export default {
|
|
|
wuliaoList: [],
|
|
wuliaoList: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
- this.urlParameter = this.$route.query;
|
|
|
|
|
- this.storeId = this.$route.query.storeId + '';
|
|
|
|
|
- this.visitId = this.$route.query.visitId;
|
|
|
|
|
- this.storeCode = this.$route.query.storeCode;
|
|
|
|
|
- this.rdId = this.$route.query.rdId + '';
|
|
|
|
|
- this.addressLine = this.$route.query.addressLine;
|
|
|
|
|
- this.storeCategory = this.$route.query.storeCategory;
|
|
|
|
|
- this.storeName = this.$route.query.storeName;
|
|
|
|
|
- this.contactName = this.$route.query.contactName;
|
|
|
|
|
- this.lat = this.$route.query.lat + '';
|
|
|
|
|
- this.lon = this.$route.query.lon + '';
|
|
|
|
|
- this.visitModel = this.$route.query.visitModel + '';
|
|
|
|
|
- this.uType = localStorage.getItem('uType');
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ created() {},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
beforeRouteLeave(to, from, next) {
|
|
|
if (
|
|
if (
|
|
|
(to.path == '/outsidelist/index' && from.path == '/suishenbangOutstoreVisit') ||
|
|
(to.path == '/outsidelist/index' && from.path == '/suishenbangOutstoreVisit') ||
|
|
@@ -230,6 +216,9 @@ export default {
|
|
|
next();
|
|
next();
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
|
|
|
+ // 是否请求任务列表接口
|
|
|
|
|
+ let getRequestFlage = localStorage.getItem('getRequestFlage');
|
|
|
|
|
+ if (getRequestFlage != 'true') return;
|
|
|
this.urlParameter = this.$route.query;
|
|
this.urlParameter = this.$route.query;
|
|
|
this.storeId = this.$route.query.storeId + '';
|
|
this.storeId = this.$route.query.storeId + '';
|
|
|
this.visitId = this.$route.query.visitId;
|
|
this.visitId = this.$route.query.visitId;
|
|
@@ -243,9 +232,6 @@ export default {
|
|
|
this.lon = this.$route.query.lon + '';
|
|
this.lon = this.$route.query.lon + '';
|
|
|
this.visitModel = this.$route.query.visitModel + '';
|
|
this.visitModel = this.$route.query.visitModel + '';
|
|
|
this.uType = localStorage.getItem('uType');
|
|
this.uType = localStorage.getItem('uType');
|
|
|
- // 是否请求任务列表接口
|
|
|
|
|
- let getRequestFlage = localStorage.getItem('getRequestFlage');
|
|
|
|
|
- if (getRequestFlage != 'true') return;
|
|
|
|
|
this.list = [];
|
|
this.list = [];
|
|
|
if (localStorage.getItem('visitId') != null) {
|
|
if (localStorage.getItem('visitId') != null) {
|
|
|
this.visitId = localStorage.getItem('visitId');
|
|
this.visitId = localStorage.getItem('visitId');
|
|
@@ -515,6 +501,7 @@ export default {
|
|
|
getVisitTasks(params).then((res) => {
|
|
getVisitTasks(params).then((res) => {
|
|
|
loading2.clear();
|
|
loading2.clear();
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
|
|
+ debugger;
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.notes = res.data.notes;
|
|
that.notes = res.data.notes;
|
|
|
that.visitId = res.data.visitId;
|
|
that.visitId = res.data.visitId;
|
|
@@ -567,6 +554,7 @@ export default {
|
|
|
that.startTime = res.data.startTime;
|
|
that.startTime = res.data.startTime;
|
|
|
that.timeN = setInterval(that.animation, 16);
|
|
that.timeN = setInterval(that.animation, 16);
|
|
|
that.visitsRemarks = res.data.visitsRemarks;
|
|
that.visitsRemarks = res.data.visitsRemarks;
|
|
|
|
|
+ console.log(that.visitId);
|
|
|
} else {
|
|
} else {
|
|
|
that.$toast(res.msg);
|
|
that.$toast(res.msg);
|
|
|
}
|
|
}
|
|
@@ -576,6 +564,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
addStoreVisit(val, index) {
|
|
addStoreVisit(val, index) {
|
|
|
localStorage.setItem('getRequestFlage', 'false');
|
|
localStorage.setItem('getRequestFlage', 'false');
|
|
|
|
|
+ console.log(this.visitId);
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/addStoreVisit',
|
|
path: '/addStoreVisit',
|
|
|
query: {
|
|
query: {
|