This commit is contained in:
yanran200730
2021-12-28 14:39:15 +08:00
parent f2fd618255
commit b33e9f8b85
2 changed files with 11 additions and 2 deletions

View File

@@ -257,6 +257,7 @@ export default {
overlays: [],
options: [],
path: [],
location: {},
polyEditor: "",
title: "添加网格区块",
parentGirdInfo: {},
@@ -301,6 +302,7 @@ export default {
},
},
created() {
this.getCorpLocation()
if (this.isEdit) {
this.title = "编辑网格区块";
this.searchDetail();
@@ -382,14 +384,20 @@ export default {
panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
});
this.map.setZoomAndCenter(14, [117.147097, 36.72081], false, 600);
this.map.setZoomAndCenter(14, [this.location.lng, this.location.lat], false, 600);
this.eventOn();
}
})
.catch((e) => {
console.log(e);
});
},
getCorpLocation(){
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res=>{
if(res.code==0){
this.location = res.data
}
})
},
//地图事件绑定
eventOn() {
this.path = [];

View File

@@ -373,6 +373,7 @@ export default {
`/app/appgirdmemberinfo/addOrUpdate`,
{
...this.forms,
girdInfoListStr: this.forms.girdInfoList.map(v => v.girdName).join(',')
},
null
)