Commit 59845f9f by zhangxw

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

1 parent b4ff9675
...@@ -246,11 +246,11 @@ ...@@ -246,11 +246,11 @@
data.forEach((item, idx)=>{ data.forEach((item, idx)=>{
item.idx = idx; item.idx = idx;
item.name = item.ownerName || '--' item.name = item.ownerName || '--'
item.standno = item.workOrderNo || '--'
item.sn = item.sn || '--' item.sn = item.sn || '--'
item.vin = item.vin || '--' item.vin = item.vin || '--'
item.begintime = item.beginTime item.begintime = item.beginTime
item.endtime = item.endTime item.endtime = item.endTime
item.transferAddress = item.address || '--' // 取后端返回address
}); });
this.resultList = data; this.resultList = data;
......
...@@ -160,9 +160,9 @@ ...@@ -160,9 +160,9 @@
data.forEach((item, idx)=>{ data.forEach((item, idx)=>{
item.idx = idx; item.idx = idx;
item.name = item.ownerName || '--' item.name = item.ownerName || '--'
item.standNo = item.workOrderNo || '--'
item.sn = item.sn || '--' item.sn = item.sn || '--'
item.vin = item.vin || '--' item.vin = item.vin || '--'
item.transferAddress = item.address || '--' // 取后端返回address
}); });
this.resultList = data; this.resultList = data;
EventBus.$emit('uiMap.resident.draw', data); EventBus.$emit('uiMap.resident.draw', data);
......
...@@ -13,18 +13,29 @@ const historyLocation = { ...@@ -13,18 +13,29 @@ const historyLocation = {
const MAP = mapService.map; const MAP = mapService.map;
this.data = data; this.data = data;
MAPGEO.transferAddressByGroup(this, ()=>{ // MAPGEO.transferAddressByGroup(this, ()=>{
EventBus.$emit('uiMap.historyLocation.transferSuccess', data); // EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{ // this.data.forEach((item)=>{
let marker = mapService.createHistoryLocationMarker([item.elng, item.elat], MAP); // let marker = mapService.createHistoryLocationMarker([item.elng, item.elat], MAP);
let infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item); // let infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item);
this.markers[item.idx] = marker; // this.markers[item.idx] = marker;
this.infowins[item.idx] = infoWindow; // this.infowins[item.idx] = infoWindow;
}); // });
console.log(this.markers) // console.log(this.markers)
mapService.setFitView(MAP); // mapService.setFitView(MAP);
this.createClusterer(); // 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', ()=>{ EventBus.$on('uiMap.historyLocation.destroy', ()=>{
......
...@@ -30,20 +30,33 @@ const resident = { ...@@ -30,20 +30,33 @@ const resident = {
const MAP = mapService.map; const MAP = mapService.map;
this.data = data; this.data = data;
MAPGEO.transferAddressByGroup(this, ()=>{ // MAPGEO.transferAddressByGroup(this, ()=>{
EventBus.$emit('uiMap.historyLocation.transferSuccess', data); // EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{ // this.data.forEach((item)=>{
if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return; // if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return;
let marker = mapService.createConstantMarker([parseFloat(item.elng), parseFloat(item.elat)], MAP); // let marker = mapService.createConstantMarker([parseFloat(item.elng), parseFloat(item.elat)], MAP);
let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item); // let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item);
this.markers[item.idx] = marker; // this.markers[item.idx] = marker;
this.infowins[item.idx] = infoWindow; // 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(){ intervalDraw(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!