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

View File

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