|
@@ -61,8 +61,9 @@ export default {
|
|
// this.loadmap();
|
|
// this.loadmap();
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+
|
|
methods: {
|
|
methods: {
|
|
- paging(value1,value2){
|
|
|
|
|
|
+ paging(value1, value2) {
|
|
this.currentPage = value1
|
|
this.currentPage = value1
|
|
this.pageSize = value2
|
|
this.pageSize = value2
|
|
this.infoList()
|
|
this.infoList()
|
|
@@ -73,12 +74,21 @@ export default {
|
|
travelpathbd({ orderId: that.orderid })
|
|
travelpathbd({ orderId: that.orderid })
|
|
.then((response) => {
|
|
.then((response) => {
|
|
that.path1 = [];
|
|
that.path1 = [];
|
|
- var patharr = JSON.parse(response.data.longitudeLatitude)
|
|
|
|
|
|
+ var patharr = JSON.parse(response.data.longitudeLatitude)
|
|
// console.log(JSON.parse(response.data.longitudeLatitude),11111111)
|
|
// console.log(JSON.parse(response.data.longitudeLatitude),11111111)
|
|
for (let i = 0; i < patharr.length; i++) {
|
|
for (let i = 0; i < patharr.length; i++) {
|
|
- that.path1.push([patharr[i].lon, patharr[i].lat]);
|
|
|
|
|
|
+ if (patharr[i].lon && patharr[i].lat) {
|
|
|
|
+ that.path1.push([patharr[i].lon, patharr[i].lat]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
that.path = that.path1;
|
|
that.path = that.path1;
|
|
|
|
+ if (that.path.length == 0) {
|
|
|
|
+ that.$notify({
|
|
|
|
+ title: '提示',
|
|
|
|
+ message: '未获取到北斗轨迹',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
that.loadmap();
|
|
that.loadmap();
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
@@ -99,6 +109,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
that.path = that.path2;
|
|
that.path = that.path2;
|
|
|
|
+ if (that.path.length == 0) {
|
|
|
|
+ that.$notify({
|
|
|
|
+ title: '提示',
|
|
|
|
+ message: '未获取到平台轨迹',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
that.loadmap();
|
|
that.loadmap();
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
@@ -182,14 +199,15 @@ export default {
|
|
path: this.path,
|
|
path: this.path,
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
-
|
|
|
|
//对第一条线路(即索引 0)创建一个巡航器
|
|
//对第一条线路(即索引 0)创建一个巡航器
|
|
- let trajectory = pathSimplifierIns.createPathNavigator(0, {
|
|
|
|
- loop: true, //循环播放
|
|
|
|
- speed: 100, //巡航速度,单位千米/小时
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.path.length > 0) {
|
|
|
|
+ let trajectory = pathSimplifierIns.createPathNavigator(0, {
|
|
|
|
+ loop: true, //循环播放
|
|
|
|
+ speed: 100, //巡航速度,单位千米/小时
|
|
|
|
+ });
|
|
|
|
+ trajectory.start();
|
|
|
|
+ }
|
|
|
|
|
|
- trajectory.start();
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -199,17 +217,24 @@ export default {
|
|
this.$nextTick(function () {
|
|
this.$nextTick(function () {
|
|
travelpathbd({ orderId: that.orderid })
|
|
travelpathbd({ orderId: that.orderid })
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
|
+ console.log("data",response)
|
|
that.path1 = [];
|
|
that.path1 = [];
|
|
if (response.data) {
|
|
if (response.data) {
|
|
var patharr = JSON.parse(response.data.longitudeLatitude);
|
|
var patharr = JSON.parse(response.data.longitudeLatitude);
|
|
- // console.log(JSON.parse(response.data.longitudeLatitude),11111111)
|
|
|
|
for (let i = 0; i < patharr.length; i++) {
|
|
for (let i = 0; i < patharr.length; i++) {
|
|
- that.path1.push([patharr[i].longitude, patharr[i].latitude]);
|
|
|
|
|
|
+ if (patharr[i].lon && patharr[i].lat) {
|
|
|
|
+ that.path1.push([patharr[i].lon, patharr[i].lat]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
that.path = that.path1;
|
|
that.path = that.path1;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (that.path.length == 0) {
|
|
|
|
+ that.$notify({
|
|
|
|
+ title: '提示',
|
|
|
|
+ message: '未获取到北斗轨迹',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
that.loadmap();
|
|
that.loadmap();
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|