diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 72787387..61aa1f96 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -433,6 +433,7 @@ -->
+
@@ -1117,7 +1118,7 @@

是否完成绘制

-

+

@@ -2080,6 +2081,8 @@ //加载地图编辑 var that = this; var map; + //点击事件添加样式 + var hc_land_on; // document.getElementById("mapAll").innerHTML = ''; var hc_land; var projection = new ol.proj.Projection({ @@ -2720,7 +2723,8 @@ //删除之前绘制图层 $("#deleteHistory").on("click", function () { console.log("否进入"); - map.removeInteraction(draw_map); + map.removeLayer(drawing); + that.showhzht = false; }); //开始绘制图层- -----end @@ -3587,7 +3591,7 @@ that.mapZjdTeAll.mapZrzAData ={}; that.mapZjdTeAll.mapFsssAData ={}; that.mapZjdDataTure =""; - var hc_land_on; + map.removeLayer(hc_land_on); setTimeout(() => { if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zjdzd") { that.mapHasDateStatus = 2; @@ -3736,7 +3740,8 @@ // } // } // }); - getZjdzd(item.id).then((response) => { + console.log(obj.id); + getZjdzd(obj.id).then((response) => { console.log(response); that.mapZjdData = response.data; that.mapZjdData.active = 1; @@ -3770,7 +3775,7 @@ map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 - zoom: 15.8, // 缩放级别 + zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 }); @@ -3840,9 +3845,9 @@ } listZjdzd(params).then((response) => { that.mapZjdAData = response.data; - that.mapZjdAData.active = 1; + //that.mapZjdAData.active = 1; that.mapZjdTeAll.mapZjdAData = that.mapZjdAData; - getZrz(item.id).then((response) => { + getZrz(obj.id).then((response) => { that.mapZrzData = response.data; that.mapZrzData.active = 3; that.mapZjdTeAll.mapZrzAData =that.mapZrzData; @@ -3874,7 +3879,7 @@ map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 - zoom: 15.8, // 缩放级别 + zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 }); @@ -4039,8 +4044,8 @@ that.mapZjdData = response.data; that.mapZjdData.active = 1; that.mapZjdTeAll.mapZjdAData = that.mapZjdData; - getfsss(item.id).then((response) => { - that.mapfsssData.active = 4; + getfsss(obj.id).then((response) => { + //that.mapfsssData.active = 4; that.mapfsssData = response.data; that.mapZjdTeAll.mapFsssAData = that.mapfsssData; that.zjdHcDy = obj.zjddm; @@ -4071,7 +4076,7 @@ map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 - zoom: 15.8, // 缩放级别 + zoom: 17.8, // 缩放级别 rotation: undefined, // 缩放完成view视图旋转弧度 duration: 1000, // 缩放持续时间,默认不需要设置 }); @@ -4652,9 +4657,6 @@ ) $('.searchBar_wrap').css({'animation':'test2 0.5s ease-in-out 0s 1 alternate forwards','-webkit-animation':'test2 0.5s ease-in-out 0s 1 alternate forwards'}); }, - deleteHistory(){ - console.log("进入aa"); - }, zjdTz(){ console.log(this.htZjdZrzFsss); this.mapZjdTeAll.active =1; @@ -4677,6 +4679,11 @@ this.mapZjdTeAll.mapFsssAData.deptId = this.$cookies.get("item").deptId; this.$cookies.set("search",this.mapZjdTeAll); this.$router.push({path:'/homesteadSurvey/add'}); + }, + //绘图重置清除之前图层 + deleteHistory(){ + console.log("进入重置"); + $("#deleteHistory").trigger("click"); } },