diff --git a/src/components/house/CommonMap.vue b/src/components/house/CommonMap.vue index 10dcabfc..5209e3d0 100644 --- a/src/components/house/CommonMap.vue +++ b/src/components/house/CommonMap.vue @@ -314,6 +314,69 @@ export default { }); return true; }, + + addLayerNew(name, theGeom,tcmc,status) { + if(!this.mapObject) + return false; + let css = null; + if(tcmc === "zjdzdxx"){ + if(status === "1"){ + css = "#F9F900"; + }else if(status === "2"){ + css = "#FF8000"; + }else if(status === "3"){ + css = "#82D900"; + }else if(status === "4"){ + css = "#F75000"; + }else{ + css = "#9F4D95"; + } + }else if(tcmc === "fsss"){ + css = "#FF8C00"; + }else{ + css = "#47c68f"; + } + //地图只加载一次 + //加载地图编辑 + //图层查询定位开始 ---------start + console.info(css); + let hc_land = new ol.layer.Vector({ + title: name, + source: new ol.source.Vector({ + projection: this.getProjection(), + features: new ol.format.GeoJSON().readFeatures("{\n" + + " \"type\": \"Feature\",\n" + + " \"geometry\":" + theGeom + "}"), + }), + style: new ol.style.Style({ + fill: new ol.style.Fill({ + //矢量图层填充颜色,以及透明度 + color: "rgba(204, 255, 204,0.3)", + }), + stroke: new ol.style.Stroke({ + //边界样式 + color: css, + width: 3, + }), + }), + }); + if(!this.pushLayer(name, hc_land)) + return false; + 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]); //获取边界区域的中心位置 + this.mapObject.getView().animate({ + // 只设置需要的属性即可 + center: center, // 中心点 + zoom: 17.9, // 缩放级别 + rotation: undefined, // 缩放完成view视图旋转弧度 + duration: 1000, // 缩放持续时间,默认不需要设置 + }); + return true; + }, update() { if(!this.mapObject) return; diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index 5c6f7dc3..931579a2 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -977,7 +977,7 @@ export default { if(!map) return; if(data) { - map.setLayer('pointDarwLayer', data); + map.addLayerNew('pointDarwLayer',data,"zjdzdxx",this.form.surveyStatus); } else { this.getLandCoord((lng, lat) => { diff --git a/src/views/homesteadSurvey/fsssAdd.vue b/src/views/homesteadSurvey/fsssAdd.vue index ed8140e3..f970787d 100644 --- a/src/views/homesteadSurvey/fsssAdd.vue +++ b/src/views/homesteadSurvey/fsssAdd.vue @@ -115,6 +115,7 @@ v-model="form.remark" name="备注" label="备注" + placeholder="备注" maxlength="50" autocomplete="off" /> @@ -183,6 +184,7 @@ export default { let data = this.$route.query; this.form = data; this.permission = localStorage.getItem("executePermission"); + this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem")); if(this.form.id == null){ this.$set(this.form, 'fssslx', "11"); this.$set(this.form, 'sfzsy', "1"); @@ -253,11 +255,11 @@ export default { if(data) { map.setLayer('pointDarwLayer', data); + console.info(this.zjdzdxx.surveyStatus); + map.addLayerNew('pointDarwLayer3', this.zjdzdxx.theGeomJson,"zjdzdxx",this.zjdzdxx.surveyStatus); } else { - this.getLandCoord((lng, lat) => { - map.setCoord(this.tGeoOrganizationLng, this.tGeoOrganizationLat); - }); + map.addLayerNew('pointDarwLayer3', this.zjdzdxx.theGeomJson,"zjdzdxx",this.zjdzdxx.surveyStatus); } }, // 当地图绘制完成时 diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue index ce74556c..adbc8535 100644 --- a/src/views/homesteadSurvey/index.vue +++ b/src/views/homesteadSurvey/index.vue @@ -9,9 +9,10 @@ src="https://img.yzcdn.cn/vant/leaf.jpg" />
-

调查员·采集员

-

审核员

-

{{nickName}}

+

{{nickName}} + ·调查员 + ·审核员 +

@@ -224,6 +225,7 @@ }) if(this.checked){ let userId = this.$store.getters.userId; + this.nickName = this.$store.getters.nickName; this.$set(this.queryParams, "rwzxr", userId); this.getList(); }else{ diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 3e454dbc..7d2379b7 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -52,13 +52,14 @@

+ + + - - - - + + --> - +
+ +

个人信息

+

修改密码

@@ -45,6 +48,16 @@ + + + + + + + 保存 + + +