diff --git a/src/saas/AppBuilding/components/searchMap.vue b/src/saas/AppBuilding/components/searchMap.vue index 0e615fa7..01749e7a 100644 --- a/src/saas/AppBuilding/components/searchMap.vue +++ b/src/saas/AppBuilding/components/searchMap.vue @@ -53,7 +53,7 @@ 网格管理员 - , + , @@ -95,7 +95,7 @@ 网格管理员 - , + , @@ -177,10 +177,6 @@ export default { }, getMarkerCluster(points, count = 0) { let {lib: TMap, map} = this - console.log(points) - if(!points.length) { - return - } if (map) { // map.setCenter(this.config.latlng) let MarkerCluster = new TMap.MarkerCluster({ @@ -319,19 +315,16 @@ export default { if (res.code == 0 && res.data.length) { this.show = true this.buildList = res.data - const points = [] - res.data.map(item => { + const points = res.data.map(item => { if(item.lng && item.lat) { - points.push( - { - lnglat: [item.lng, item.lat], - id: item.id, - corpId: item.corpId, - areaName: item.areaName, - buildingNumber: item.name || item.buildingNumber, - communityName: item.name || item.communityName, - } - ) + return { + lnglat: [item.lng, item.lat], + id: item.id, + corpId: item.corpId, + areaName: item.areaName, + buildingNumber: item.name || item.buildingNumber, + communityName: item.name || item.communityName, + } } }) this.getMarkerCluster(points)