diff --git a/packages/2.0.5/AppGridBlock/components/add.vue b/packages/2.0.5/AppGridBlock/components/add.vue index 567a10f6..0aed187f 100644 --- a/packages/2.0.5/AppGridBlock/components/add.vue +++ b/packages/2.0.5/AppGridBlock/components/add.vue @@ -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 = []; diff --git a/packages/2.0.5/AppGridMember/components/add.vue b/packages/2.0.5/AppGridMember/components/add.vue index 5a126d3e..85c0675b 100644 --- a/packages/2.0.5/AppGridMember/components/add.vue +++ b/packages/2.0.5/AppGridMember/components/add.vue @@ -373,6 +373,7 @@ export default { `/app/appgirdmemberinfo/addOrUpdate`, { ...this.forms, + girdInfoListStr: this.forms.girdInfoList.map(v => v.girdName).join(',') }, null )