From 70061e52aeb78c15d15934e1336f965f216a93f6 Mon Sep 17 00:00:00 2001 From: hbao Date: Tue, 15 Mar 2022 17:39:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=B6=E9=97=B4=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/add.vue | 2 ++ src/views/homesteadSurvey/list.vue | 33 ++++++++++++++++-------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index 8f67385c..a6528133 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -5446,6 +5446,7 @@ sjlyName:'农村宅基地使用权确权登记发证', theGeom:this.form.theGeom, } + this.zrzProduct(); }else{ this.form3 = item this.form3.theGeom = item.theGeom; @@ -5741,6 +5742,7 @@ sfsgcf:'N', theGeom:this.form.theGeom, } + this.fsssProduct(); }else{ this.form4=item console.log(this.form4); diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index c12a445b..73333787 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -3655,7 +3655,6 @@ //地图定义 var delete_map = ["mapZjd", "mapZrz","mapFsss"]; - var hc_land_query; var hc_land_queryList =[]; var texiao_layer_zjd; var texiao_layer_zrz; @@ -3666,9 +3665,10 @@ $("#deleteHistoryMap").trigger("click"); var val = that.seachText; //删除之前查询图层 - //for(var i=0;hc_land_queryList>i;i++){ - map.removeLayer(hc_land_query); - //} + for(var i=0;hc_land_queryList.length>i;i++){ + map.removeLayer(hc_land_queryList[i]); + } + hc_land_queryList = []; that.mapDataAll =[]; if (val == "") { that.$toast('请填写查询条件再查询'); @@ -3706,9 +3706,8 @@ } that.mapDataAll[hg].typeTc="宅基地"; if (that.mapDataAll[hg] !=null && that.mapDataAll[hg].theGeom != null && that.mapDataAll[hg].theGeom != "") { - //that.mapDataAll[hg].createBy = 'mapTheGeomZjdId'; - hc_land_query = - new ol.layer.Vector({ + that.mapDataAll[hg].createBy = 'mapTheGeomZjdId'; + hc_land_queryList[hg] =new ol.layer.Vector({ title: "add Layer", source: new ol.source.Vector({ projection: projection, @@ -3718,12 +3717,11 @@ }), style: styleZjd }); - //hc_land_queryList.push(hc_land_query); - map.addLayer(hc_land_query); - var maxXMap = hc_land_query.values_.source.featuresRtree_.rbush_.data.maxX; - var maxYMap = hc_land_query.values_.source.featuresRtree_.rbush_.data.maxY; - var minXMap = hc_land_query.values_.source.featuresRtree_.rbush_.data.minX; - var minYMap = hc_land_query.values_.source.featuresRtree_.rbush_.data.minY; + map.addLayer(hc_land_queryList[hg]); + var maxXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxX; + var maxYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxY; + var minXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minX; + var minYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 map.getView().animate({ @@ -3739,7 +3737,9 @@ // that.mapDataAll.push(response.rows); // }); } - // map.addLayer(hc_land_queryList); + // for(var queryFor=0; hc_land_queryList > queryFor; queryFor++ ){ + // map.addLayer(hc_land_queryList[queryFor]); + // } // var mapZrzFor = that.mapDataAll[0].length+1; // console.log(mapZrzFor); // for(var mapFor=0;mapZrzFor>mapFor;mapFor++){ @@ -4531,7 +4531,10 @@ map.removeLayer(hc_land_on); //map.removeLayer(hc_land_query); //for(var i=0;hc_land_query>i;i++){ - map.removeLayer(hc_land_query); + //map.removeLayer(hc_land_query); + for(var i=0;hc_land_queryList.length>i;i++){ + map.removeLayer(hc_land_queryList[i]); + } //}c if (that.fsssSx && that.zjdSx && that.zrzSx) { url = wmsSource.getFeatureInfoUrl(