From a21171052caeeb5474f5b8ccd949f9fb75569cd2 Mon Sep 17 00:00:00 2001 From: hbao Date: Mon, 14 Mar 2022 18:33:52 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map/MapGisDrawing.vue | 40 ++++++++++----- src/views/homesteadSurvey/add.vue | 29 +++++------ src/views/homesteadSurvey/list.vue | 75 +++++++++++++++++----------- 3 files changed, 89 insertions(+), 55 deletions(-) diff --git a/src/components/Map/MapGisDrawing.vue b/src/components/Map/MapGisDrawing.vue index 7e4656de..7dc04724 100644 --- a/src/components/Map/MapGisDrawing.vue +++ b/src/components/Map/MapGisDrawing.vue @@ -122,7 +122,9 @@ export default { zoom: 15, minZoom: 5, //地图缩小限制 maxZoom: 18.3, //地图放大限制 + resolution:Math.random() * 0.00000001 }), + //view: new ol.View({ol.view.getResolution() + Math.random() * 0.00000001)});//随机数缩放实现刷新 }); that.mapData= that.message; var zjdTc; @@ -140,12 +142,12 @@ export default { // zjddmNew = that.$cookies.get("item").zjddm; // } // } - var cql_filter_all = "dept_id='" + that.$cookies.get("map").deptId + "'" + "and zjddm='" + that.$cookies.get("map").zjddm + "'"; + var cql_filter_all = "dept_id='" + that.$cookies.get("search").deptId + "'" + "and zjddm='" + that.$cookies.get("search").zjddm + "'"; console.log(cql_filter_all); console.log(that.$cookies.get("item")); console.log(that.$cookies.get("search")); - zjdTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + zjdTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl +"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zjdzd', @@ -153,13 +155,14 @@ export default { cql_filter: cql_filter_all, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); map.addLayer(zjdTc); //宅基地图层查询开始 ------------------start //自然幢图层查询开始 ------------------start - zrzTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + zrzTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zrz', @@ -167,14 +170,15 @@ export default { cql_filter: cql_filter_all, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); map.addLayer(zrzTc); //自然幢图层查询结束 ------------------end //附属设施图层查询开始 ------------------start - fsssTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + fsssTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_fsss', @@ -182,6 +186,7 @@ export default { cql_filter: cql_filter_all, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); map.addLayer(fsssTc); @@ -200,6 +205,7 @@ export default { " \"type\": \"Feature\",\n" + " \"geometry\":" + this.message + "}"), }), + resolution:Math.random() * 0.00000001, style: new ol.style.Style({ fill: new ol.style.Fill({ //矢量图层填充颜色,以及透明度 @@ -222,9 +228,10 @@ export default { map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 - zoom: 17.9, // 缩放级别 + zoom: 16.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); // let resolution = map.getView().getResolutionForExtent([maxXMap, maxYMap, minXMap, minYMap],map.getSize()); // map.getView().fit([maxXMap, maxYMap, minXMap, minYMap]); @@ -242,6 +249,7 @@ export default { " \"type\": \"Feature\",\n" + " \"geometry\":" + rightJoin + "}"), }), + resolution:Math.random() * 0.00000001, style: new ol.style.Style({ fill: new ol.style.Fill({ //矢量图层填充颜色,以及透明度 @@ -267,6 +275,7 @@ export default { zoom: 16.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); // let resolution = map.getView().getResolutionForExtent([maxXMap, maxYMap, minXMap, minYMap],map.getSize()); // map.getView().fit([maxXMap, maxYMap, minXMap, minYMap]); @@ -462,6 +471,7 @@ export default { zoom: 17.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); // let resolution = map.getView().getResolutionForExtent([maxXMap, maxYMap, minXMap, minYMap],map.getSize()); // map.getView().fit([maxXMap, maxYMap, minXMap, minYMap]); @@ -504,6 +514,7 @@ export default { zoom: 16.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); } } @@ -549,14 +560,16 @@ export default { zoom: 16.9, minZoom: 5, //地图缩小限制 maxZoom: 18, //地图放大限制 + resolution:Math.random() * 0.00000001, }), }); + //view.setResolution(view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 //获取坐标是否存在 //var Zb; //村边界查询开始 ------------------------------start var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'"; - var cunTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + var cunTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl +"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_border_village', @@ -596,6 +609,7 @@ export default { .then((data) => { console.log(data); let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize()); + resolution:resolution + Math.random() * 0.00000001, map.getView().fit(data.bbox); map.getView().setResolution(resolution); // var datamap = data.bbox; @@ -613,8 +627,8 @@ export default { //村边界查询开始 ------------------------------end //宅基地图层查询开始 ------------------start //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'"; - var zjdTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + var zjdTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zjdzd', @@ -747,6 +761,7 @@ export default { zoom: 17.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); // let resolution = map.getView().getResolutionForExtent([maxXMap, maxYMap, minXMap, minYMap],map.getSize()); // map.getView().fit([maxXMap, maxYMap, minXMap, minYMap]); @@ -789,6 +804,7 @@ export default { zoom: 16.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); // let resolution = map.getView().getResolutionForExtent([maxXMap, maxYMap, minXMap, minYMap],map.getSize()); // map.getView().fit([maxXMap, maxYMap, minXMap, minYMap]); diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index c22b9bf4..f8c3ece8 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -20,9 +20,9 @@
- +
- +

宅基地

@@ -3163,8 +3163,8 @@ //this.$cookies.set("item",""); if(this.$cookies.get("search") !=null &&this.$cookies.get("search").zjddm !="" && this.$cookies.get("search").zjddm !=undefined && this.$cookies.get("search").zjddm !=null){ this.ztMap =false; - this.$cookies.set("map",this.$cookies.get("search")); - console.log(this.$cookies.get("map")); + //this.$cookies.set("map",this.$cookies.get("search")); + console.log(this.$cookies.get("search")); }else { this.ztMap =true; } @@ -3178,10 +3178,7 @@ this.backMap.backMapZjdAData = this.cookiesInfo.mapZjdAData; this.backMap.deptId = this.cookiesInfo.mapZjdAData.deptId; this.backMap.zjddm = this.cookiesInfo.mapZjdAData.zjddm; - if(this.ztMap){ - this.$cookies.set("map",this.backMap); - } - this.form.theGeom = this.cookiesInfo.mapZjdAData.theGeom; + //this.form.theGeom = this.cookiesInfo.mapZjdAData.theGeom; //this.enterMapZjddm = this.cookiesInfo.mapZjdAData.zjddm; //返回地图值记录----end this.active = this.cookiesInfo.active; @@ -3193,7 +3190,9 @@ this.getnhdmlist(); this.getBaseUrl(); this.getZjd(); - //this.mapClickLoading(); + if(this.ztMap){ + this.$cookies.set("search",this.backMap); + } let zrz = this.cookiesInfo.mapZrzAData; let fsss = this.cookiesInfo.mapFsssAData; if(this.cookiesInfo.active=="3"){ @@ -3341,9 +3340,9 @@ }); }, mounted(){ - if(this.active ==1){ - this.mapClickLoading(); - } + // if(this.active ==1 && !this.ztMap){ + // this.mapClickLoading(); + // } }, methods: { showPic(){ @@ -4249,9 +4248,9 @@ //this.enterMap=""; //this.$cookies.set("item",""); if(this.ztMap && this.enterMap ==1){ - this.$cookies.set("map",this.backMap); + this.$cookies.set("search",this.backMap); } else { - this.$cookies.set("map",""); + this.$cookies.set("search",""); } this.$router.push({name:'homesteadList'}); // } @@ -4522,6 +4521,7 @@ this.form.djName = res.dictLabel } }) + this.mapClickLoading(); }); }else{ let params = { @@ -4556,6 +4556,7 @@ this.form.suyqrdm = response.rows[0].suyqrdm this.form.zl = response.rows[0].suyqrmc } + this.mapClickLoading(); }); } }, diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 6d15a89c..29f64245 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -1390,10 +1390,10 @@ mounted(){ }, created(){ - if(location.href.indexOf("#reloaded")==-1){ - location.href=location.href+"#reloaded"; - location.reload(); - } + // if(location.href.indexOf("#reloaded")==-1){ + // location.href=location.href+"#reloaded"; + // location.reload(); + // } this.getDicts("zjlx").then(response => { this.zjlxOptions = response.data; }); @@ -1429,15 +1429,15 @@ this.getDicts("member_remark").then(response => { this.cybzOptions = response.data; }); - if(this.$cookies.get("map") != null && this.$cookies.get("map") !="" && this.$cookies.get("map")!=undefined){ - if(this.$cookies.get("map").activeBtn !=null){ - if(this.$cookies.get("map").activeBtn == 4){ - this.activeBtn = this.$cookies.get("map").activeBtn; + if(this.$cookies.get("search") != null && this.$cookies.get("search") !="" && this.$cookies.get("search")!=undefined){ + if(this.$cookies.get("search").activeBtn !=null){ + if(this.$cookies.get("search").activeBtn == 4){ + this.activeBtn = this.$cookies.get("search").activeBtn; this.item = this.$cookies.get("item"); - this.mapAddJump = this.$cookies.get("map").backMapZjdAData.deptId; - this.backTheGeom = this.$cookies.get("map").backMapZjdAData.theGeom; - this.mapZjdData = this.$cookies.get("map").backMapZjdAData; - this.mapZjdTeAll.mapZjdAData = this.$cookies.get("map").backMapZjdAData; + this.mapAddJump = this.$cookies.get("search").backMapZjdAData.deptId; + this.backTheGeom = this.$cookies.get("search").backMapZjdAData.theGeom; + this.mapZjdData = this.$cookies.get("search").backMapZjdAData; + this.mapZjdTeAll.mapZjdAData = this.$cookies.get("search").backMapZjdAData; this.zjdHcDy = 1; this.mapZjdDataTure = 1; this.mapAddJumpNum =1; @@ -1844,7 +1844,7 @@ }, // 返回 onClickLeft(){ - this.$cookies.set("map","") + this.$cookies.set("search","") this.$router.push('/homesteadSurvey/index'); }, onConfirmhncysjly(value){ @@ -2921,6 +2921,7 @@ zoom: 10, minZoom: 5, //地图缩小限制 maxZoom: 18.3, //地图放大限制 + resolution:Math.random() * 0.00000001, }), interactions: ol.interaction.defaults({ pinchRotate: false // 移动端禁止地图旋转 @@ -2949,8 +2950,8 @@ } else { cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'"; } - var cunTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + var cunTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_border_village', @@ -2958,6 +2959,7 @@ cql_filter: cql_filter, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); //定位查询位置 @@ -3016,6 +3018,7 @@ zoom: 17.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); } else if(that.backTheGeom !="" && that.backTheGeom !=undefined && that.backTheGeom.substring(0,1) =="[") { //that.newHt ="1"; @@ -3055,9 +3058,11 @@ zoom: 16.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); }else { let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize()); + resolution:resolution + Math.random() * 0.00000001, map.getView().fit(data.bbox); map.getView().setResolution(resolution); } @@ -3069,8 +3074,8 @@ //村边界查询开始 ------------------------------end //宅基地图层查询开始 ------------------start //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'"; - var zjdTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + var zjdTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zjdzd', @@ -3078,14 +3083,15 @@ cql_filter: cql_filter, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); map.addLayer(zjdTc); //宅基地图层查询开始 ------------------start //自然幢图层查询开始 ------------------start - var zrzTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + var zrzTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zrz', @@ -3093,14 +3099,15 @@ cql_filter: cql_filter, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); map.addLayer(zrzTc); //自然幢图层查询开始 ------------------start //附属设施图层查询开始 ------------------start - var fsssTc= new ol.layer.Tile({ - source: new ol.source.TileWMS({ + var fsssTc= new ol.layer.Image({ + source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_fsss', @@ -3108,6 +3115,7 @@ cql_filter: cql_filter, SRID: 3857, }, + resolution:Math.random() * 0.00000001, }), }); map.addLayer(fsssTc); @@ -3516,6 +3524,7 @@ zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); }); //定位当前位置 ------end @@ -3704,6 +3713,7 @@ zoom: 15.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); } // listFsss(paramsZrz).then((response) => { @@ -4396,6 +4406,7 @@ }) .then((data) => { let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize()); + resolution:resolution + Math.random() * 0.00000001, map.getView().fit(data.bbox); map.getView().setResolution(resolution); // var datamap = data.bbox; @@ -4431,6 +4442,7 @@ serverType: "geoserver", crossOrigin: "anonymous", }, + resolution:Math.random() * 0.00000001, }); //查询宅基地图层 @@ -4443,6 +4455,7 @@ serverType: "geoserver", crossOrigin: "anonymous", }, + resolution:Math.random() * 0.00000001, }); //查询自然幢图层 @@ -4455,6 +4468,7 @@ serverType: "geoserver", crossOrigin: "anonymous", }, + resolution:Math.random() * 0.00000001, }); //查询附属设施图层 @@ -4467,6 +4481,7 @@ serverType: "geoserver", crossOrigin: "anonymous", }, + resolution:Math.random() * 0.00000001, }); @@ -4619,7 +4634,7 @@ "zjddm": obj.zjddm, } that.$cookies.set("search", "") - that.$cookies.set("map", "") + //that.$cookies.set("map", "") console.log(document.cookie.split(';').length) console.log(params); listZjdzd(params).then((response) => { @@ -4663,6 +4678,7 @@ zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); function createLabelStyleMap() { @@ -4717,7 +4733,7 @@ "zjddm": obj.zjddm, } that.$cookies.set("search", "") - that.$cookies.set("map", "") + //that.$cookies.set("map", "") listZjdzd(params).then((response) => { that.mapZjdData = response.rows[0]; //that.mapZjdAData.active = 1; @@ -4762,6 +4778,7 @@ zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); }); }); @@ -4788,7 +4805,7 @@ "pageSize": 20, } that.$cookies.remove("search") - that.$cookies.set("map", "") + //that.$cookies.set("map", "") listZjdzd(params).then((response) => { that.mapZjdData = response.rows[0]; that.mapZjdData.active = 1; @@ -4801,6 +4818,7 @@ } //that.mapfsssData.active = 4; that.mapfsssData = response.data; + console.log(that.mapfsssData); that.mapZjdTeAll.mapFsssAData = that.mapfsssData; that.zjdHcDy = obj.zjddm; var styleZjd = new ol.style.Style({ @@ -4833,6 +4851,7 @@ zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 + resolution:Math.random() * 0.00000001, }); }); }); @@ -5285,17 +5304,15 @@ this.mapZjdTeAll.active =1; this.$cookies.set("search",this.mapZjdTeAll); this.$router.push({path:'/homesteadSurvey/add'}); - } - if(this.mapZrzData !=undefined && this.mapZrzData !=""){ + }else if(this.mapZrzData !=undefined && this.mapZrzData !=""){ if(this.mapZjdTeAll.mapZjdAData !=""){ - this.mapZjdTeAll.active =3; + this.mapZjdTeAll.active = 3; this.$cookies.set("search",this.mapZjdTeAll); this.$router.push({path:'/homesteadSurvey/add'}); } else { this.$toast("必须有宅基地数据才能进入自然幢核查"); } - } - if(this.mapFsssData !=undefined && this.mapFsssData !=""){ + }else { if(this.mapZjdTeAll.mapZjdAData !="") { this.mapZjdTeAll.active = 4; this.$cookies.set("search", this.mapZjdTeAll); From fb56b806b7dea02d99ffa12092dd2921f980767a Mon Sep 17 00:00:00 2001 From: hbao Date: Mon, 14 Mar 2022 23:29:32 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map/MapGisDrawing.vue | 96 ++++++++++++++-------------- src/views/homesteadSurvey/add.vue | 49 ++++++++++---- src/views/homesteadSurvey/list.vue | 84 ++++++++++++++---------- 3 files changed, 135 insertions(+), 94 deletions(-) diff --git a/src/components/Map/MapGisDrawing.vue b/src/components/Map/MapGisDrawing.vue index 7dc04724..0ea3b368 100644 --- a/src/components/Map/MapGisDrawing.vue +++ b/src/components/Map/MapGisDrawing.vue @@ -35,6 +35,7 @@ export default { newZb: null, newGeom: null, mapData: null, + map:this.guidProduct(), //地图服务地址 mapGeoServerUrl:"", }; @@ -68,7 +69,7 @@ export default { /* console.log(this.message);*/ //加载地图编辑 var that = this; - var map; + //var map; //var hc_land; var draw; // global so we can remove it later var vector_drawing; @@ -102,6 +103,7 @@ export default { }), isGroup: true, name: "卫星影像图", + resolution:Math.random() * 0.00000001 }); var yingxzi = new ol.layer.Tile({ @@ -110,9 +112,10 @@ export default { }), isGroup: true, name: "天地图文字标注--卫星影像图", + resolution:Math.random() * 0.00000001 }); //加载地图 - map = new ol.Map({ + that.map = new ol.Map({ controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮 layers: [aerial, yingxzi], projection: projection, @@ -122,7 +125,10 @@ export default { zoom: 15, minZoom: 5, //地图缩小限制 maxZoom: 18.3, //地图放大限制 - resolution:Math.random() * 0.00000001 + resolution:Math.random() * 0.00000001, + }), + interactions: ol.interaction.defaults({ + pinchRotate: false // 移动端禁止地图旋转 }), //view: new ol.View({ol.view.getResolution() + Math.random() * 0.00000001)});//随机数缩放实现刷新 }); @@ -130,22 +136,14 @@ export default { var zjdTc; var zrzTc; var fsssTc; - map.removeLayer(zrzTc); - map.removeLayer(zjdTc); - map.removeLayer(fsssTc); + that.map.removeLayer(zrzTc); + that.map.removeLayer(zjdTc); + that.map.removeLayer(fsssTc); //宅基地图层查询开始 ------------------start - // var zjddmNew; - // if(that.$cookies.get("search").zjddm !=undefined && that.$cookies.get("search").zjddm !=""){ - // zjddmNew = that.$cookies.get("search").zjddm; - // }else { - // if(that.$cookies.get("item").zjddm !=undefined && that.$cookies.get("item").zjddm !=""){ - // zjddmNew = that.$cookies.get("item").zjddm; - // } - // } - var cql_filter_all = "dept_id='" + that.$cookies.get("search").deptId + "'" + "and zjddm='" + that.$cookies.get("search").zjddm + "'"; + + //村边界查询开始 ------------------------------end + var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + that.$cookies.get("search").zjddm + "'"; console.log(cql_filter_all); - console.log(that.$cookies.get("item")); - console.log(that.$cookies.get("search")); zjdTc= new ol.layer.Image({ source: new ol.source.ImageWMS({ url: that.mapGeoServerUrl +"/geoserver/zjd_dc/wms", @@ -158,7 +156,7 @@ export default { resolution:Math.random() * 0.00000001, }), }); - map.addLayer(zjdTc); + that.map.addLayer(zjdTc); //宅基地图层查询开始 ------------------start //自然幢图层查询开始 ------------------start zrzTc= new ol.layer.Image({ @@ -173,7 +171,7 @@ export default { resolution:Math.random() * 0.00000001, }), }); - map.addLayer(zrzTc); + that.map.addLayer(zrzTc); //自然幢图层查询结束 ------------------end //附属设施图层查询开始 ------------------start @@ -189,7 +187,7 @@ export default { resolution:Math.random() * 0.00000001, }), }); - map.addLayer(fsssTc); + that.map.addLayer(fsssTc); //附属设施图层查询结束 ------------------end //图层查询定位开始 ---------start if(this.message.substring(0,1) =="{"){ @@ -218,14 +216,14 @@ export default { }), }), }); - map.addLayer(hc_land); + that.map.addLayer(hc_land); 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 center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 16.9, // 缩放级别 @@ -262,14 +260,14 @@ export default { }), }), }); - map.addLayer(hc_land); + that.map.addLayer(hc_land); 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 center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 16.9, // 缩放级别 @@ -287,15 +285,15 @@ export default { //开始绘制地图 $("#"+this.drawingPolygonMap).click(function () { that.newGeom = 1; - map.removeLayer(hc_land); - map.removeLayer(vector_drawing); + that.map.removeLayer(hc_land); + that.map.removeLayer(vector_drawing); //that.closeMoule = null; - map.removeInteraction(draw); + that.map.removeInteraction(draw); //var source = new ol.source.Vector({wrapX: false}); vector_drawing = new ol.layer.Vector({ source: new ol.source.Vector(), }); - map.addLayer(vector_drawing); + that.map.addLayer(vector_drawing); function addInteraction() { draw = new ol.interaction.Draw({ @@ -308,12 +306,12 @@ export default { var coordinate = geometry.getCoordinates(); if(coordinate !="" && coordinate !=null){ //map.addLayer(vector_drawing); - map.removeInteraction(draw); + that.map.removeInteraction(draw); } that.closeMoule = coordinate; that.formSubmit(); }); - map.addInteraction(draw); + that.map.addInteraction(draw); } addInteraction(); @@ -328,9 +326,9 @@ export default { $("#"+this.drawingResetMap).click(function () { that.newGeom = 2; if(that.closeMoule !=null) { - map.addLayer(hc_land); - map.removeInteraction(draw); - map.removeLayer(vector_drawing); + that.map.addLayer(hc_land); + that.map.removeInteraction(draw); + that.map.removeLayer(vector_drawing); that.formSubmit(); } }); @@ -381,7 +379,7 @@ export default { var minYMap = hc_landFuther.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 17.9, // 缩放级别 @@ -423,7 +421,7 @@ export default { var minYMap = hc_landFuther.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 16.9, // 缩放级别 @@ -465,7 +463,7 @@ export default { var minYMap = hc_landFuther.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 17.9, // 缩放级别 @@ -508,7 +506,7 @@ export default { var minYMap = hc_landFuther.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 16.9, // 缩放级别 @@ -548,7 +546,7 @@ export default { }); //加载地图 - map = new ol.Map({ + that.map = new ol.Map({ controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮 layers: [aerial, yingxzi], projection: projection, @@ -610,8 +608,8 @@ export default { console.log(data); let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize()); resolution:resolution + Math.random() * 0.00000001, - map.getView().fit(data.bbox); - map.getView().setResolution(resolution); + that.map.getView().fit(data.bbox); + that.map.getView().setResolution(resolution); // var datamap = data.bbox; // var center = ol.extent.getCenter(datamap); // map.getView().animate({ @@ -623,7 +621,7 @@ export default { .catch((error) => { console.log("【异常】", error); }); - map.addLayer(cunTc); + that.map.addLayer(cunTc); //村边界查询开始 ------------------------------end //宅基地图层查询开始 ------------------start //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'"; @@ -638,7 +636,7 @@ export default { }, }), }); - map.addLayer(zjdTc); + that.map.addLayer(zjdTc); //宅基地图层查询开始 ------------------start // getQueryLand().then((response) => { // if (response.code == 200) { @@ -674,12 +672,12 @@ export default { //开始绘制地图 $("#"+this.drawingPolygonMap).click(function () { //that.closeMoule = null; - map.removeInteraction(draw); + that.map.removeInteraction(draw); //var source = new ol.source.Vector({wrapX: false}); vector_drawing = new ol.layer.Vector({ source: new ol.source.Vector(), }); - map.addLayer(vector_drawing); + that.map.addLayer(vector_drawing); function addInteraction() { draw = new ol.interaction.Draw({ @@ -698,7 +696,7 @@ export default { that.closeMoule = coordinate; that.formSubmit(); }); - map.addInteraction(draw); + that.map.addInteraction(draw); } addInteraction(); @@ -712,8 +710,8 @@ export default { // }); //还原之前图层 $("#"+this.drawingResetMap).click(function () { - map.removeInteraction(draw); - map.removeLayer(vector_drawing); + that.map.removeInteraction(draw); + that.map.removeLayer(vector_drawing); //that.closeMoule = null; that.formSubmit(); }); @@ -755,7 +753,7 @@ export default { var minYMap = hc_landFuther.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 17.9, // 缩放级别 @@ -798,7 +796,7 @@ export default { var minYMap = hc_landFuther.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 - map.getView().animate({ + that.map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 zoom: 16.9, // 缩放级别 diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index f8c3ece8..8f67385c 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -20,7 +20,7 @@
- +

宅基地

@@ -446,7 +446,7 @@ placeholder="备注" maxlength="200" /> - +
保存
@@ -1039,7 +1039,7 @@ label="备注" placeholder="备注" /> - +
保存
@@ -2418,7 +2418,7 @@ label="备注" placeholder="备注" /> - +
保存
@@ -3155,6 +3155,10 @@ cookiesInfo:null, // 异常标记照片 fileListyc:[], + //刷新随机数 + zjdProductResh:this.guidProduct(), + zrzProductResh:this.guidProduct(), + fsssProductResh:this.guidProduct(), }; }, created(){ @@ -3217,6 +3221,7 @@ this.cookiesInfo = this.$cookies.get("search") this.$cookies.set("search","") this.item = this.cookiesInfo + this.$cookies.set("search",this.cookiesInfo); if(this.item.houseDataConfirmStatus!="CONFIRMED"){ this.isFinished = true } @@ -4521,7 +4526,7 @@ this.form.djName = res.dictLabel } }) - this.mapClickLoading(); + this.zjdProduct(); }); }else{ let params = { @@ -4556,7 +4561,7 @@ this.form.suyqrdm = response.rows[0].suyqrdm this.form.zl = response.rows[0].suyqrmc } - this.mapClickLoading(); + this.zjdProductResh(); }); } }, @@ -5478,7 +5483,7 @@ } this.showzrz = true; - this.mapClickLoading(); + this.zrzProduct(); this.active = 3; // if(){ // @@ -5811,7 +5816,7 @@ } this.showfsss = true; this.active = 4; - this.mapClickLoading(); + this.fsssProduct(); } }, showPopup3() { @@ -6006,15 +6011,13 @@ }, //地图加载js------start mapClickLoading(){ - //this.$cookies.set("item", this.form); - console.log(this.$cookies.get("item")); setTimeout(() => { if(this.active =="1"){ - this.$refs.drewingClickLoading1.drawingPaceCountryDarw(); + this.$refs[this.zjdProductResh].drawingPaceCountryDarw(); }else if(this.active=="3"){ - this.$refs.drewingClickLoading3.drawingPaceCountryDarw(); + this.$refs[this.zrzProductResh].drawingPaceCountryDarw(); }else if(this.active=="4"){ - this.$refs.drewingClickLoading4.drawingPaceCountryDarw(); + this.$refs[this.fsssProductResh].drawingPaceCountryDarw(); } else { } @@ -6032,6 +6035,26 @@ } }, + zjdProduct(){ + this.zjdProductResh = this.guidProduct(); + console.log(this.zjdProductResh); + this.mapClickLoading(); + }, + zrzProduct(){ + this.zrzProductResh = this.guidProduct(); + this.mapClickLoading(); + }, + fsssProduct(){ + this.fsssProductResh = this.guidProduct(); + this.mapClickLoading(); + }, + guidProduct(){ + return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + }, //地图加载js------end } } diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 29f64245..c12a445b 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -1382,6 +1382,7 @@ backTheGeom:"", //地图服务地址 mapGeoServerUrl:"", + backMap:"", // 任务完成标记 isFinished:false, @@ -1390,10 +1391,10 @@ mounted(){ }, created(){ - // if(location.href.indexOf("#reloaded")==-1){ - // location.href=location.href+"#reloaded"; - // location.reload(); - // } + if(location.href.indexOf("#reloaded")==-1){ + location.href=location.href+"#reloaded"; + location.reload(); + } this.getDicts("zjlx").then(response => { this.zjlxOptions = response.data; }); @@ -2921,13 +2922,12 @@ zoom: 10, minZoom: 5, //地图缩小限制 maxZoom: 18.3, //地图放大限制 - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }), interactions: ol.interaction.defaults({ pinchRotate: false // 移动端禁止地图旋转 }), }); - //使用geoserver服务查询开始 -------------------start //镇边界查询开始 ------------------------------start // var zhenTc= new ol.layer.Tile({ @@ -2945,21 +2945,21 @@ //镇边界查询开始 ------------------------------end //村边界查询开始 ------------------------------start var cql_filter - if(that.mapAddJumpNum == 1){ + 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.Image({ + var cunTc = new ol.layer.Image({ source: new ol.source.ImageWMS({ - url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", + url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_border_village', TILED: true, cql_filter: cql_filter, SRID: 3857, }, - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }), }); //定位查询位置 @@ -2976,7 +2976,7 @@ outputFormat: "application/json", //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值 }; - let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl; + let url_dw = that.mapGeoServerUrl + "/geoserver/zjd_dc/wfs"; //wfsurl; url_dw = url_dw + "?"; for (let key in param_dw) { url_dw = url_dw + key + "=" + param_dw[key] + "&"; @@ -2990,7 +2990,7 @@ return geojsonmap; }) .then((data) => { - if(that.backTheGeom !="" && that.backTheGeom !=undefined && that.backTheGeom.substring(0,1) =="{"){ + if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "{") { hc_land_on = new ol.layer.Vector({ title: "add Layer", source: new ol.source.Vector({ @@ -3018,13 +3018,17 @@ zoom: 17.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }); - } else if(that.backTheGeom !="" && that.backTheGeom !=undefined && that.backTheGeom.substring(0,1) =="[") { + this.backMap =1; + } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") { //that.newHt ="1"; - var zbNew = JSON.stringify({"type": "MultiPolygon", "coordinates": [that.backTheGeom.replaceAll("\"","")]}); - var leftJoin = zbNew.replace("\"[","["); - var rightJoin = leftJoin.replace("\"]","]"); + var zbNew = JSON.stringify({ + "type": "MultiPolygon", + "coordinates": [that.backTheGeom.replaceAll("\"", "")] + }); + var leftJoin = zbNew.replace("\"[", "["); + var rightJoin = leftJoin.replace("\"]", "]"); hc_land_on = new ol.layer.Vector({ title: "add Layer", source: new ol.source.Vector({ @@ -3058,12 +3062,13 @@ zoom: 16.9, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }); - }else { - let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize()); + this.backMap =1; + } else { + let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize()); resolution:resolution + Math.random() * 0.00000001, - map.getView().fit(data.bbox); + map.getView().fit(data.bbox); map.getView().setResolution(resolution); } }) @@ -3074,55 +3079,69 @@ //村边界查询开始 ------------------------------end //宅基地图层查询开始 ------------------start //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'"; - var zjdTc= new ol.layer.Image({ + var zjdTc = new ol.layer.Image({ source: new ol.source.ImageWMS({ - url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", + url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zjdzd', TILED: true, cql_filter: cql_filter, SRID: 3857, }, - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }), }); map.addLayer(zjdTc); //宅基地图层查询开始 ------------------start //自然幢图层查询开始 ------------------start - var zrzTc= new ol.layer.Image({ + var zrzTc = new ol.layer.Image({ source: new ol.source.ImageWMS({ - url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", + url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_zrz', TILED: true, cql_filter: cql_filter, SRID: 3857, }, - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }), }); map.addLayer(zrzTc); //自然幢图层查询开始 ------------------start //附属设施图层查询开始 ------------------start - var fsssTc= new ol.layer.Image({ + var fsssTc = new ol.layer.Image({ source: new ol.source.ImageWMS({ - url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms", + url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", params: { LAYERS: 'zjd_dc:t_house_survey_fsss', TILED: true, cql_filter: cql_filter, SRID: 3857, }, - resolution:Math.random() * 0.00000001, + resolution: Math.random() * 0.00000001, }), }); map.addLayer(fsssTc); //附属设施图层查询开始 ------------------start //使用geoserver服务查询开始 -------------------end - - + if(this.backMap ==1){ + var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'"; + var wmsSourceBack = new ol.source.ImageWMS({ + crossOrigin: 'anonymous', + params: { + LAYERS: 'zjd_dc:t_house_survey_all', + 'VERSION': '1.1.0', + 'FORMAT': "image/png", + 'CQL_FILTER': cql + }, + serverType: 'geoserver', + url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", + }); + zjdTc.setSource(wmsSourceBack); + ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 + } //数据库直接加载数据渲染方式---------------------------------------------------start //判断当前账套是否有数据 // var mapTalkAbout = true; @@ -4498,6 +4517,7 @@ //属性查询结束 ------------------end //点击查询详细信息 map.on("singleclick", function (evt) { + console.log(evt); let feature = map.forEachFeatureAtPixel( evt.pixel, (feature) => feature From 70061e52aeb78c15d15934e1336f965f216a93f6 Mon Sep 17 00:00:00 2001 From: hbao Date: Tue, 15 Mar 2022 17:39:12 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BC=98=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( From 776dbaf47fad6858b702824ba3bc9a5e96bb741b Mon Sep 17 00:00:00 2001 From: hbao Date: Wed, 16 Mar 2022 09:59:43 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map/MapGisDrawing.vue | 2 +- src/views/homesteadSurvey/add.vue | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Map/MapGisDrawing.vue b/src/components/Map/MapGisDrawing.vue index 0ea3b368..623160b6 100644 --- a/src/components/Map/MapGisDrawing.vue +++ b/src/components/Map/MapGisDrawing.vue @@ -606,7 +606,7 @@ export default { }) .then((data) => { console.log(data); - let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize()); + let resolution = that.map.getView().getResolutionForExtent(data.bbox,map.getSize()); resolution:resolution + Math.random() * 0.00000001, that.map.getView().fit(data.bbox); that.map.getView().setResolution(resolution); diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index a6528133..bb60d019 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -5481,7 +5481,9 @@ } }) } - + if(this.form3.theGeom == null){ + this.form3.theGeom = this.form.theGeom; + } } this.showzrz = true; this.zrzProduct(); @@ -5783,7 +5785,7 @@ this.form4.sfsgcf = "N" } if(this.form4.theGeom==null||this.form4.theGeom==""){ - this.form4.theGeom = this.form4.theGeom + this.form4.theGeom = this.form.theGeom } this.fssslxOptions.map(res => { if(res.dictValue == item.fssslx){ From c077609743f3d05e8641319ef0a5abc364af1801 Mon Sep 17 00:00:00 2001 From: nsgkyjk <759200926@qq.com> Date: Wed, 16 Mar 2022 11:43:51 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 73333787..171de6bc 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -1572,7 +1572,6 @@ }else{ this.list.splice(index,1); } - } }) }) @@ -1620,6 +1619,7 @@ delNh(item.id).then(res => { if(res.code=="200"){ this.nhlist.splice(index,1); + this.totalH-- } }) }) @@ -1683,6 +1683,7 @@ delNhhncy(id).then(res => { if(res.code=="200"){ this.hncylist.splice(index,1); + this.totalR-- } }) }) @@ -2710,7 +2711,6 @@ duration:"1000", onClose:function(){ _this.totalR+=1 - _this.totalH+=1 _this.showhncy = false let params = { "nhdm":_this.form5.nhdm, @@ -2735,7 +2735,6 @@ duration:"1000", onClose:function(){ _this.totalR+=1 - _this.totalH+=1 _this.showhncy = false let params = { "nhdm":_this.form5.nhdm, @@ -2764,7 +2763,6 @@ duration:"1000", onClose:function(){ _this.totalR+=1 - _this.totalH+=1 _this.showhncy = false let params = { "nhdm":_this.form5.nhdm, @@ -2789,7 +2787,6 @@ duration:"1000", onClose:function(){ _this.totalR+=1 - _this.totalH+=1 _this.showhncy = false let params = { "nhdm":_this.form5.nhdm, @@ -2811,7 +2808,6 @@ duration:"1000", onClose:function(){ _this.totalR+=1 - _this.totalH+=1 _this.showhncy = false let params = { "nhdm":_this.form5.nhdm, From baeb403eb9b5cb80d063ed50540b64641cf6673c Mon Sep 17 00:00:00 2001 From: nsgkyjk <759200926@qq.com> Date: Wed, 16 Mar 2022 14:20:32 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 171de6bc..049ce9a0 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -1620,6 +1620,7 @@ if(res.code=="200"){ this.nhlist.splice(index,1); this.totalH-- + this.totalR-- } }) }) @@ -1644,6 +1645,7 @@ delNhhncy(item.id).then(res => { if(res.code=="200"){ this.hncylist.splice(index,1); + this.totalR-- } }) // 更新户主信息 From a15d0cea69c447d667c0ac29c181d5ea11959261 Mon Sep 17 00:00:00 2001 From: hbao Date: Wed, 16 Mar 2022 15:08:59 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=98=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/add.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index bb60d019..820da87c 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -4561,7 +4561,7 @@ this.form.suyqrdm = response.rows[0].suyqrdm this.form.zl = response.rows[0].suyqrmc } - this.zjdProductResh(); + this.zjdProduct(); }); } }, @@ -6041,7 +6041,6 @@ }, zjdProduct(){ this.zjdProductResh = this.guidProduct(); - console.log(this.zjdProductResh); this.mapClickLoading(); }, zrzProduct(){ From 6db8054f58fce2fee353ceaad78cc4ce6da4fb50 Mon Sep 17 00:00:00 2001 From: hbao Date: Wed, 16 Mar 2022 16:01:53 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E4=BE=A7=E9=9D=A2=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=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 | 35 +++++++----------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 049ce9a0..4538d39d 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -4066,31 +4066,12 @@ //样式加载定义 var vector_drawing_delete; $("#area").click(function () { - if(that.textMjAll != "" && that.clickBbox !=""){ - // var styleFsss = new ol.style.Style({ - // text: new ol.style.Text({ - // text: that.textMjAll+"㎡", - // font: '30px sans-serif', - // textAlign: "center", - // textBaseline: "middle", - // //font: 'verdana', - // fill: new ol.style.Fill({ - // color: "#ff00ff" - // }), - // // backgroundFill: new ol.style.Fill({ - // // color: "#ff0000" - // // }), - // font: "30px sans-serif", - // stroke: new ol.style.Stroke({ - // color: "#ffffff" - // // width: 3 - // }), - // offsetX: parseInt(0, 10), - // offsetY: parseInt(0, 10), - // placement: "point", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注 - // overflow: false //超出面的部分不显示 - // }), - // }); + console.log(that.textMjAll); + console.log(that.clickBbox); + if(that.textMjAll ==null){ + that.textMjAll =0; + } + if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){ map.removeLayer(vector_drawing_delete); function createLabelStyle() { return new ol.style.Style({ @@ -4121,8 +4102,6 @@ map.addLayer(vector_drawing_delete); newcenterFeature.setStyle(createLabelStyle()); //设置要素样式 sourceMapLook.addFeature(newcenterFeature); - that.clickBbox =""; - that.textMjAll = ""; //map.addLayer(styleFsss); } else if(that.textMjAllNum == "1"){ that.$toast("该图层面积暂无信息"); @@ -4524,6 +4503,8 @@ var zb = evt.coordinate; var url; var url_bbox; + that.clickBbox =""; + that.textMjAll = ""; if(that.drawingClick) { //点击空白删除之前图层 map.removeLayer(hc_land_on); From d0a2b230a468fe2d3096f7cdbe84b394f708e8a3 Mon Sep 17 00:00:00 2001 From: nsgkyjk <759200926@qq.com> Date: Thu, 17 Mar 2022 16:20:18 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 6 +- .../bankAgriculture/paymentAccount.js | 35 +- .../bankAgriculture/paymentApproval.js | 9 + .../paymentAccount/paymentAccountAdd.vue | 335 +++++++++++++++++- .../paymentApproval/approvalAdd.vue | 21 +- .../paymentApproval/approvalAdd10.vue | 14 +- .../paymentApproval/approvalAdd11.vue | 14 +- .../paymentApproval/approvalAdd12.vue | 15 +- .../paymentApproval/approvalAdd2.vue | 34 +- .../paymentApproval/approvalAdd4.vue | 52 +-- .../paymentApproval/approvalApproval.vue | 8 + .../paymentApproval/approvalApproval10.vue | 8 + .../paymentApproval/approvalApproval11.vue | 8 + .../paymentApproval/approvalApproval12.vue | 8 + .../paymentApproval/approvalDetail.vue | 10 +- .../paymentApproval/approvalDetail10.vue | 10 +- .../paymentApproval/approvalDetail11.vue | 10 +- .../paymentApproval/approvalDetail12.vue | 10 +- .../paymentApproval/approvalDetail2.vue | 8 + .../paymentApproval/approvalDetail4.vue | 10 +- .../paymentApproval/approvalList.vue | 2 +- .../paymentApproval/approvalList10.vue | 2 +- .../paymentApproval/approvalList11.vue | 2 +- .../paymentApproval/approvalList12.vue | 2 +- .../paymentApproval/approvalList4.vue | 2 +- .../paymentApproval/approvalModify.vue | 12 +- .../paymentApproval/approvalModify10.vue | 12 +- .../paymentApproval/approvalModify11.vue | 12 +- .../paymentApproval/approvalModify12.vue | 12 +- .../paymentApproval/approvalModify2.vue | 10 +- .../paymentApproval/approvalModify4.vue | 12 +- src/views/onlineHome/workbench.vue | 14 +- 32 files changed, 636 insertions(+), 83 deletions(-) diff --git a/index.html b/index.html index d25baa43..57a611c9 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,8 @@ content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum=scale=1.0" /> - + 农燊高科 @@ -17,4 +17,4 @@ - \ No newline at end of file + diff --git a/src/api/onlineHome/bankAgriculture/paymentAccount.js b/src/api/onlineHome/bankAgriculture/paymentAccount.js index 0400e5cd..65a7b53f 100644 --- a/src/api/onlineHome/bankAgriculture/paymentAccount.js +++ b/src/api/onlineHome/bankAgriculture/paymentAccount.js @@ -8,7 +8,22 @@ export function getList(data){ params:data }) } - +// 查询乡镇账户列表 +export function queryTaccount(query) { + return request({ + url: '/yinnong/taccount/query', + method: 'get', + params: query + }) +} +// 查询开户行信息列表 +export function listDeposit(query) { + return request({ + url: '/yinnong/deposit/list', + method: 'get', + params: query + }) +} // 查询出纳账户设置详细 export function getAccount(id) { return request({ @@ -51,3 +66,21 @@ export function delAccount(id) { method: 'get' }) } + +// 查询管控类型为中心账套时中心账套列表 +export function getCentralBooks(query) { + return request({ + url: '/cashier/account/centralBooks', + method: 'get', + params: query + }) +} + +// 查询管控类型为中心账套时会计科目列表 +export function getCentralSubjects(query) { + return request({ + url: '/cashier/account/centralSubjects', + method: 'get', + params: query + }) +} diff --git a/src/api/onlineHome/bankAgriculture/paymentApproval.js b/src/api/onlineHome/bankAgriculture/paymentApproval.js index 9a9c9325..58e891bd 100644 --- a/src/api/onlineHome/bankAgriculture/paymentApproval.js +++ b/src/api/onlineHome/bankAgriculture/paymentApproval.js @@ -282,3 +282,12 @@ export function listAccount(query) { params: query }) } + +// 查询村虚拟出纳账户设置列表 +export function listAccount1(query) { + return request({ + url: '/cashier/account/list1', + method: 'get', + params: query + }) +} diff --git a/src/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd.vue b/src/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd.vue index ca0f6f61..a85b7712 100644 --- a/src/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd.vue +++ b/src/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd.vue @@ -23,6 +23,7 @@ input-align="right" right-icon="arrow-down" label-width="auto" + required /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + - + + + + + - + +
+

账簿信息

+
+ + + + + + + + +
@@ -84,34 +256,68 @@