diff --git a/src/components/Map/MapGisObtain.vue b/src/components/Map/MapGisObtain.vue index c1c8b331..0ecab3f7 100644 --- a/src/components/Map/MapGisObtain.vue +++ b/src/components/Map/MapGisObtain.vue @@ -132,6 +132,30 @@ export default { resolution:Math.random() * 0.00000001, }); } + } else { // 加载全部地图,不带宅基地图斑 + let deptName = this.$store.state.user.loginDeptId + ""; + getQueryLand(deptName).then((response) => { + if (response.code == 200) { + let InsertCode = response.data; + if (InsertCode != null) { + let lat = InsertCode.lat; + let lng = InsertCode.lng; + let center; + if(lat !=null && lng !=null && lat !="" && lng !=""){ + center = [lng,lat]; + }else { + center = [115.452752, 31.789033]; + } + that.map.getView().animate({ + // 只设置需要的属性即可 + center: ol.proj.fromLonLat(center), // 中心点 + zoom: 17.9, // 缩放级别 + rotation: undefined, // 缩放完成view视图旋转弧度 + duration: 1000, // 缩放持续时间,默认不需要设置 + }); + } + } + }); } var geo_zjdzd; that.map.on("singleclick", function (evt) { @@ -175,10 +199,10 @@ export default { that.map.addLayer(geo_zjdzd); //that.closeMoule = feature.values_.zjddm; that.$emit('closeMoule', feature.values_.zjddm); - var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX; - var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY; - var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX; - var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY; + var maxXMap = geo_zjdzd.values_.source.featuresRtree_.rbush_.data.maxX; + var maxYMap = geo_zjdzd.values_.source.featuresRtree_.rbush_.data.maxY; + var minXMap = geo_zjdzd.values_.source.featuresRtree_.rbush_.data.minX; + var minYMap = geo_zjdzd.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 that.map.getView().animate({ diff --git a/src/views/onlineHome/homestead/freeExit/freeExitAdd.vue b/src/views/onlineHome/homestead/freeExit/freeExitAdd.vue index adc17f47..9e07f05f 100644 --- a/src/views/onlineHome/homestead/freeExit/freeExitAdd.vue +++ b/src/views/onlineHome/homestead/freeExit/freeExitAdd.vue @@ -12,7 +12,13 @@
- + + +
+ + {{item}} + +