Commit 52363726 authored by caicaicai's avatar caicaicai

修改

parent d9ff3a33
......@@ -181,39 +181,48 @@ export default {
if(number == ''){
}else{
HttpReq.truckDispatching.getAllHistroyCarTrajectoryQuery({name:that.deviceId}).then((res) => {
console.log('获取历史轨迹',res);
if(res.code == 200){
let obj1 = {};
let array1 = [];
res.data.line.forEach((item,index)=>{
let array2 = [];
array2.push(item.location.x);
array2.push(item.location.y);
array2.push('500');
array1.push(array2);
})
obj1.name = res.data.name;
obj1.arrays = array1;
//let hisCenterData = [...that.historyTrajectoryData];
let hisCenterData = [];
hisCenterData.push(obj1);
that.historyTrajectoryData = [...hisCenterData];
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)// 构建地图
})
}
})
}
})
if(that.deviceId == '' || that.deviceId == undefined){
this.$notify({
title: '此车暂无轨迹!',
type: 'warning',
duration: 2500
});
}else{
HttpReq.truckDispatching.getAllHistroyCarTrajectoryQuery({name:that.deviceId}).then((res) => {
//console.log('获取历史轨迹',res);
if(res.code == 200){
let obj1 = {};
let array1 = [];
res.data.line.forEach((item,index)=>{
let array2 = [];
array2.push(item.location.x);
array2.push(item.location.y);
array2.push('500');
array1.push(array2);
})
obj1.name = res.data.name;
obj1.arrays = array1;
//let hisCenterData = [...that.historyTrajectoryData];
let hisCenterData = [];
hisCenterData.push(obj1);
that.historyTrajectoryData = [...hisCenterData];
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)// 构建地图
})
}
})
}
})
}
}
},
......@@ -292,7 +301,7 @@ export default {
that.addGraphic_01(graphicLayer,item,that.weilanName[index]);
})
if(that.carNumber == ''){
if(that.carNumber == '' || that.deviceId == '' || that.deviceId == undefined){
}else{
//创建矢量数据图层2
......
......@@ -100,7 +100,7 @@ export default {
// 点击搜索
toSearch() {
let that = this;
console.log(this.query.number);
//console.log(this.query.number);
HttpReq.truckDispatching.carInformationQuery({number:this.query.number}).then((res) => {
if(res.code == 200){
this.shuaxinTimer = new Date().getTime();
......
......@@ -116,7 +116,7 @@
<el-form-item label="选择车辆" prop="cars" v-show="form.item.areaclass == '电子围栏'">
<div class="checkboxViews">
<el-checkbox-group v-model="checkDataList" style="width:480px;">
<el-checkbox v-for="(obj,index) in carInformationData" :label="obj.name + '/' + obj.number" :key="index">{{obj.name + '/' + obj.number}}</el-checkbox>
<el-checkbox v-for="(obj,index) in carInformationData" :label="obj.number" :key="index">{{obj.number}}</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
......
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