diff --git a/src/components/Map/MapGisDrawing.vue b/src/components/Map/MapGisDrawing.vue index 659906ca..cfba03c7 100644 --- a/src/components/Map/MapGisDrawing.vue +++ b/src/components/Map/MapGisDrawing.vue @@ -73,7 +73,11 @@ export default { var draw; // global so we can remove it later var vector_drawing; console.log(that.message); - console.log(that.$cookies.get("item")); + // if(that.$cookies.get("item").backMapZjdAData.theGeom !=null && that.$cookies.get("item").backMapZjdAData.theGeom !="" + // && that.$cookies.get("item").backMapZjdAData.theGeom.substring(0,1) =="["){ + // console.log(that.$cookies.get("item")); + // that.message = that.$cookies.get("item").backMapZjdAData.theGeom; + // } getGeoServerConfigKey().then(response => { that.mapGeoServerUrl = response.msg; if (that.message != null && that.message != "" @@ -597,14 +601,14 @@ export default { map.addLayer(cunTc); //村边界查询开始 ------------------------------end //宅基地图层查询开始 ------------------start - var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'"; + //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'"; var zjdTc= new ol.layer.Tile({ source: new ol.source.TileWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zjdzd', TILED: true, - cql_filter: cql_filter_all, + cql_filter: cql_filter, SRID: 3857, }, }), diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index a863e611..fc08cf9e 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -22,7 +22,7 @@
- +

宅基地

@@ -3208,13 +3208,15 @@ this.isFinished = true } this.form = this.cookiesInfo.mapZjdAData; + this.mapClickLoading(); let zrz = this.cookiesInfo.mapZrzAData; let fsss = this.cookiesInfo.mapFsssAData; - this.getnhdmlist(); - this.getBaseUrl(); - this.getZjd(); + // this.getnhdmlist(); + // this.getBaseUrl(); + // this.getZjd(); if(this.cookiesInfo.active=="3"){ this.showzrz= true + this.form3 = this.form3.theGeom = this.cookiesInfo.mapZrzAData.theGeom; this.getZrzList() setTimeout(() => { @@ -3355,15 +3357,15 @@ this.industryOptions = response.data; }); if(this.active ==1){ - this.form.theGeom = this.item.theGeom; + //this.form.theGeom = this.item.theGeom; + this.message = this.form.theGeom; + console.log(this.message); + //this.$refs.drewingClickLoading = this.form.theGeom; this.mapClickLoading(); } }, mounted(){ - // if(this.active ==1){ - // this.form.theGeom = this.item.theGeom; - // this.mapClickLoading(); - // } + }, methods: { showPic(){ diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 55971479..c3cc8a8f 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -15,7 +15,7 @@
-
入户核查
@@ -492,6 +492,7 @@
+
@@ -1979,6 +1980,8 @@ }, // 查询所有权人 getSyqr(){ + //删除地图选中状态 + $("#deleteHistoryMap").trigger("click"); let params = { "deptId" : this.item.deptId } @@ -2033,6 +2036,8 @@ }, // 查询农户列表 getNh(){ + //删除地图选中状态 + $("#deleteHistoryMap").trigger("click"); let params = { "deptId" : this.item.deptId } @@ -2041,6 +2046,11 @@ this.totalN = response.total }); }, + //调查 + getDc(){ + //删除地图选中状态 + $("#deleteHistoryMap").trigger("click"); + }, // 农户信息搜索框 onSearchnh(){ let params = { @@ -2798,6 +2808,8 @@ } }, mapShow() { + //删除地图选中状态 + $("#deleteHistoryMap").trigger("click"); //通过数据直接查询方式--------加载较慢 start //镇边界获取 // listTown().then(response => { @@ -3576,6 +3588,18 @@ }); //开始绘制图层- -----end + //切换功能删除之前选中状态 + $("#deleteHistoryMap").on("click", function () { + map.removeLayer(hc_land_on); + that.mapZjdData = ""; + that.mapZrzData = ""; + that.mapFsssData = ""; + //that.mapZjdTeAll.active ="1"; + that.mapZjdTeAll.mapZjdAData = {}; + that.mapZjdTeAll.mapZrzAData = {}; + that.mapZjdTeAll.mapFsssAData = {}; + that.mapZjdDataTure = ""; + }); //清除画图鼠标点击事件 // $("#drawRemove").click(function () { // map.removeLayer(drawing); @@ -3585,15 +3609,19 @@ //地图定义 var delete_map = ["mapZjd", "mapZrz","mapFsss"]; var hc_land_query; + var hc_land_queryList =[]; var texiao_layer_zjd; var texiao_layer_zrz; var texiao_layer_fsss; //按照查询条件人名 定位地图-----------------start $("#query").on("click", function () { //数据库查询数据------------------------------------------------------start + $("#deleteHistoryMap").trigger("click"); var val = that.seachText; //删除之前查询图层 - map.removeLayer(hc_land_query); + //for(var i=0;hc_land_queryList>i;i++){ + map.removeLayer(hc_land_query); + //} that.mapDataAll =[]; if (val == "") { that.$toast('请填写查询条件再查询'); @@ -3632,16 +3660,18 @@ 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({ - title: "add Layer", - source: new ol.source.Vector({ - projection: projection, - features: new ol.format.GeoJSON().readFeatures("{\n" + - " \"type\": \"Feature\",\n" + - " \"geometry\":" + that.mapDataAll[hg].theGeom + ", \"properties\":" + JSON.stringify(that.mapDataAll[hg]) + "}"), - }), - style: styleZjd - }); + hc_land_query = + new ol.layer.Vector({ + title: "add Layer", + source: new ol.source.Vector({ + projection: projection, + features: new ol.format.GeoJSON().readFeatures("{\n" + + " \"type\": \"Feature\",\n" + + " \"geometry\":" + that.mapDataAll[hg].theGeom + ", \"properties\":" + JSON.stringify(that.mapDataAll[hg]) + "}"), + }), + 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; @@ -3661,6 +3691,7 @@ // that.mapDataAll.push(response.rows); // }); } + // map.addLayer(hc_land_queryList); // var mapZrzFor = that.mapDataAll[0].length+1; // console.log(mapZrzFor); // for(var mapFor=0;mapZrzFor>mapFor;mapFor++){ @@ -4444,6 +4475,10 @@ if(that.drawingClick) { //点击空白删除之前图层 map.removeLayer(hc_land_on); + //map.removeLayer(hc_land_query); + //for(var i=0;hc_land_query>i;i++){ + map.removeLayer(hc_land_query); + //}c if (that.fsssSx && that.zjdSx && that.zrzSx) { url = wmsSource.getFeatureInfoUrl( evt.coordinate, @@ -5351,7 +5386,6 @@ zjdTz(){ if(this.mapZjdData =="" && this.mapZjdDataTure =="" && this.mapZjdData !=undefined){ this.mapZjdTeAll.active =1; - console.log(this.htZjdZrzFsss); this.mapZjdTeAll.mapZjdAData.theGeom =this.htZjdZrzFsss; this.mapZjdTeAll.mapZjdAData.deptId = this.$cookies.get("item").deptId; this.$cookies.set("search",this.mapZjdTeAll);