Commit 2c814782 authored by caicaicai's avatar caicaicai

修改

parent 572e3f21
......@@ -135,10 +135,9 @@ export default {
},
methods: {
//后台获取数据
//后台获取数据——获取电子围栏
getCoordinate() {
let that = this;
//获取电子围栏
HttpReq.truckDispatching.screenMapSetUpQuery({size:9999}).then((res) => {
if(true){;
//console.log(res);
......@@ -158,21 +157,17 @@ export default {
that.zuobianData = data1
//console.log("zuobianData",that.zuobianData);
//console.log("weilanName",that.weilanName);
this.$nextTick(()=>{
if (this.appendToBody) {
document.body.appendChild(this.$el)
}
if (this.mapKey) {
this.initMars3d(this.options)
} else {
mars3d.Resource.fetchJson({ url: this.url }).then((data) => {
this.initMars3d(data.map3d)// 构建地图
})
}
})
//后台获取数据——获取历史轨迹
this.getlishiguijiFn();
}
})
//获取历史轨迹
},
//后台获取数据——获取历史轨迹
getlishiguijiFn() {
let that = this;
HttpReq.truckDispatching.getAllHistroyCarTrajectoryQuery({name:that.deviceId}).then((res) => {
//console.log('获取历史轨迹',res);
if(res.code == 200){
......@@ -206,9 +201,6 @@ export default {
}
})
},
//上传围栏数据
uploaded(){
......@@ -279,6 +271,7 @@ export default {
//围栏回显
that.zuobianData.forEach(function(item,index){
console.log(item);
var graphicLayer = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer);
initLayerManager(graphicLayer,that.weilanName[index]);
......@@ -286,20 +279,20 @@ export default {
})
//历史轨迹回放
that.historyTrajectoryData.forEach(function(item,index){
var graphicLayer2 = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer2);
var itemText = `<table style="width: auto;">
<tr>
<th scope="col" colspan="2" style="text-align:center;font-size:15px;">卡车号码:${item.name}</th>
</tr>
<tr>
<td>名称:卡车二</td>
</tr>
</table>`;
initGraphicManager(graphicLayer2,itemText);
that.addGraphic_02(graphicLayer2,item.arrays,item.name);
})
// that.historyTrajectoryData.forEach(function(item,index){
// var graphicLayer2 = new mars3d.layer.GraphicLayer();
// map.addLayer(graphicLayer2);
// var itemText = `<table style="width: auto;">
// <tr>
// <th scope="col" colspan="2" style="text-align:center;font-size:15px;">卡车号码:${item.name}</th>
// </tr>
// <tr>
// <td>名称:卡车二</td>
// </tr>
// </table>`;
// initGraphicManager(graphicLayer2,itemText);
// that.addGraphic_02(graphicLayer2,item.arrays,item.name);
// })
//创建矢量数据图层2
var graphicLayer1 = new mars3d.layer.GraphicLayer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment