This commit is contained in:
yanran200730
2022-02-10 11:12:41 +08:00
parent 7a85950d29
commit 2900c27c70
2 changed files with 3 additions and 15 deletions

View File

@@ -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()

View File

@@ -71,7 +71,7 @@ export default {
},
created() {
this.activeName = this.$route.query?.type
this.areaId = JSON.parse(JSON.stringify(this.user.info.areaId))
// this.areaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.dict.load('residentType', "sex", "faithType", "fileStatus",
"legality",
"education",