Commit a063296b by 张晓玮

Merge branch 'v1.7.0-zxw' into 'v1.7.0'

常驻地 历史停留地址信息 取后端返回值 不用高德逆地址解析

See merge request !12
2 parents 59870461 59845f9f
......@@ -246,11 +246,11 @@
data.forEach((item, idx)=>{
item.idx = idx;
item.name = item.ownerName || '--'
item.standno = item.workOrderNo || '--'
item.sn = item.sn || '--'
item.vin = item.vin || '--'
item.begintime = item.beginTime
item.endtime = item.endTime
item.transferAddress = item.address || '--' // 取后端返回address
});
this.resultList = data;
......
......@@ -160,9 +160,9 @@
data.forEach((item, idx)=>{
item.idx = idx;
item.name = item.ownerName || '--'
item.standNo = item.workOrderNo || '--'
item.sn = item.sn || '--'
item.vin = item.vin || '--'
item.transferAddress = item.address || '--' // 取后端返回address
});
this.resultList = data;
EventBus.$emit('uiMap.resident.draw', data);
......
......@@ -13,18 +13,29 @@ const historyLocation = {
const MAP = mapService.map;
this.data = data;
MAPGEO.transferAddressByGroup(this, ()=>{
EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{
let marker = mapService.createHistoryLocationMarker([item.elng, item.elat], MAP);
let infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item);
this.markers[item.idx] = marker;
this.infowins[item.idx] = infoWindow;
});
console.log(this.markers)
mapService.setFitView(MAP);
this.createClusterer();
// MAPGEO.transferAddressByGroup(this, ()=>{
// EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
// this.data.forEach((item)=>{
// let marker = mapService.createHistoryLocationMarker([item.elng, item.elat], MAP);
// let infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item);
// this.markers[item.idx] = marker;
// this.infowins[item.idx] = infoWindow;
// });
// console.log(this.markers)
// mapService.setFitView(MAP);
// this.createClusterer();
// });
// v1.7.0历史停留为保证地址信息显示与导出一致 取后端返回的address 不需高德逆地址解析
EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{
let marker = mapService.createHistoryLocationMarker([item.elng, item.elat], MAP);
let infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item);
this.markers[item.idx] = marker;
this.infowins[item.idx] = infoWindow;
});
console.log(this.markers)
mapService.setFitView(MAP);
this.createClusterer();
});
EventBus.$on('uiMap.historyLocation.destroy', ()=>{
......
......@@ -30,20 +30,33 @@ const resident = {
const MAP = mapService.map;
this.data = data;
MAPGEO.transferAddressByGroup(this, ()=>{
EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{
if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return;
// MAPGEO.transferAddressByGroup(this, ()=>{
// EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
// this.data.forEach((item)=>{
// if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return;
let marker = mapService.createConstantMarker([parseFloat(item.elng), parseFloat(item.elat)], MAP);
let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item);
this.markers[item.idx] = marker;
this.infowins[item.idx] = infoWindow;
// let marker = mapService.createConstantMarker([parseFloat(item.elng), parseFloat(item.elat)], MAP);
// let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item);
// this.markers[item.idx] = marker;
// this.infowins[item.idx] = infoWindow;
});
// });
mapService.setFitView(MAP);
// mapService.setFitView(MAP);
// });
// v1.7.0常驻地为保证导出内容与显示一致 取后端返回的address 不需高德逆地址解析
EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{
if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return;
let marker = mapService.createConstantMarker([parseFloat(item.elng), parseFloat(item.elat)], MAP);
let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item);
this.markers[item.idx] = marker;
this.infowins[item.idx] = infoWindow;
});
mapService.setFitView(MAP);
},
intervalDraw(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!