27143
This commit is contained in:
		| @@ -228,20 +228,10 @@ export default { | ||||
|   mounted() { | ||||
|     this.areaId = this.user.info.areaId | ||||
|     this.areaName = this.user.info.areaName | ||||
|     this.getCorpLocation() | ||||
|     this.initMap() | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getCorpLocation(){ | ||||
|       if(this.showStatistics) { //楼栋模型返回重新查询 | ||||
|         return | ||||
|       } | ||||
|       this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res=>{ | ||||
|         if(res.code==0){ | ||||
|           this.initMap(res.data); | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     changeZoom(isAdd) { | ||||
|       const zoom = isAdd ? this.map.getZoom() + 1 : this.map.getZoom() - 1 | ||||
|       this.map.setZoom(zoom, false, 600) | ||||
| @@ -470,8 +460,7 @@ export default { | ||||
|       this.isImageMap = flag | ||||
|     }, | ||||
|  | ||||
|     initMap({lng,lat}) { | ||||
|       this.center = [lng,lat]; | ||||
|     initMap() { | ||||
|       AMapLoader.load({ | ||||
|         key: 'b553334ba34f7ac3cd09df9bc8b539dc', | ||||
|         version: '2.0', | ||||
| @@ -484,7 +473,6 @@ export default { | ||||
|         this.map = new AMap.Map('map', { | ||||
|           resizeEnable: true, | ||||
|           zooms: [6, 20], | ||||
|           center: [lng, lat], | ||||
|           zoom: this.zoom | ||||
|         }) | ||||
|         this.satellite = new AMap.TileLayer.Satellite() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user