From c15f16b01026f9b4c9a47cd851afe8d43c17ab86 Mon Sep 17 00:00:00 2001 From: hbao Date: Wed, 2 Mar 2022 17:03:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 108 +++++++++++++++++------------ 1 file changed, 63 insertions(+), 45 deletions(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 825a4a33..b0d9725c 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -1332,56 +1332,69 @@ }, dataList: [["fsssSx"],["zjdSx"],["zrzSx"]], //地图使用 --end checkBoxAll:[], + //地图跳转存之 + mapAddJump:"", + mapAddJumpNum:"", }; }, mounted(){ }, created(){ + this.getDicts("zjlx").then(response => { + this.zjlxOptions = response.data; + }); + this.getDicts("qsxz").then(response => { + this.suyqxzOptions = response.data; + }); + this.getDicts("sjly").then(response => { + this.sjlyOptions = response.data; + }); + this.getDicts("hyzk").then(response => { + this.hyzkOptions = response.data; + }); + this.getDicts("occupation").then(response => { + this.occupationOptions = response.data; + }); + this.getDicts("living_condition").then(response => { + this.jzqkOptions = response.data; + }); + this.getDicts("jzhcssfyzf").then(response => { + this.jzhcssfyzfOptions = response.data; + }); + this.getDicts("family_status").then(response => { + var arr = []; + response.data.forEach(function (item) { + if (item.dictLabel !== '户主') { + arr.push(item) + } + }); + this.yhzgxOptions = arr; + + /*this.yhzgxOptions = response.data;*/ + }); + this.getDicts("cybz").then(response => { + this.cybzOptions = response.data; + }); if(this.$cookies.get("item")){ + console.log(this.$cookies.get("item")); if(this.$cookies.get("item").activeBtn !=null){ - this.activeBtn = this.$cookies.get("item").activeBtn; - this.item = this.$cookies.get("item").backMapZjdAData; + if(this.$cookies.get("item").activeBtn == 4){ + this.activeBtn = this.$cookies.get("item").activeBtn; + this.item = this.$cookies.get("item").backMapZjdAData; + this.mapAddJump = this.$cookies.get("item").backMapZjdAData.deptId; + this.mapAddJumpNum =1; + this.mapShow(); + } + }else { + this.item = this.$cookies.get("item"); + this.getZjdList(); + this.getTotalHR(); } }else { - + this.item = this.$cookies.get("item"); + this.getZjdList(); + this.getTotalHR(); } - this.getDicts("zjlx").then(response => { - this.zjlxOptions = response.data; - }); - this.getDicts("qsxz").then(response => { - this.suyqxzOptions = response.data; - }); - this.getDicts("sjly").then(response => { - this.sjlyOptions = response.data; - }); - this.getDicts("hyzk").then(response => { - this.hyzkOptions = response.data; - }); - this.getDicts("occupation").then(response => { - this.occupationOptions = response.data; - }); - this.getDicts("living_condition").then(response => { - this.jzqkOptions = response.data; - }); - this.getDicts("jzhcssfyzf").then(response => { - this.jzhcssfyzfOptions = response.data; - }); - this.getDicts("family_status").then(response => { - var arr = [];response.data.forEach(function (item) { - if (item.dictLabel !== '户主') { - arr.push(item) - } - }); - this.yhzgxOptions = arr; - - /*this.yhzgxOptions = response.data;*/ - }); - this.getDicts("cybz").then(response => { - this.cybzOptions = response.data; - }); - this.item = this.$cookies.get("item"); - this.getZjdList(); - this.getTotalHR(); }, methods: { //删除户内成员 @@ -2187,7 +2200,12 @@ // map.addLayer(zhenTc); //镇边界查询开始 ------------------------------end //村边界查询开始 ------------------------------start - var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'"; + var cql_filter + if(that.mapAddJumpNum == 1){ + cql_filter = "dept_id='" + that.mapAddJump + "'"; + } else { + cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'"; + } var cunTc= new ol.layer.Tile({ source: new ol.source.TileWMS({ url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms", @@ -2244,14 +2262,14 @@ 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: "http://116.255.223.226:8080/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, }, }), @@ -2266,7 +2284,7 @@ params: { LAYERS: 'zjd_dc:t_house_survey_zrz', TILED: true, - cql_filter: cql_filter_all, + cql_filter: cql_filter, SRID: 3857, }, }), @@ -2281,7 +2299,7 @@ params: { LAYERS: 'zjd_dc:t_house_survey_fsss', TILED: true, - cql_filter: cql_filter_all, + cql_filter: cql_filter, SRID: 3857, }, }), From 492e039038d7e6453faeae23b0cf0bebd76810fe Mon Sep 17 00:00:00 2001 From: hbao Date: Wed, 2 Mar 2022 17:10:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A0=B8=E6=9F=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index b0d9725c..15a54ee0 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -1384,6 +1384,7 @@ this.mapAddJump = this.$cookies.get("item").backMapZjdAData.deptId; this.mapAddJumpNum =1; this.mapShow(); + this.onSubmitnh(); } }else { this.item = this.$cookies.get("item");