From 3ba2560a733ff876a44a762330eecaa5bd03e317 Mon Sep 17 00:00:00 2001 From: hbao Date: Sat, 19 Feb 2022 15:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E9=87=8F=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 1088 +++++++++++++++++----------- 1 file changed, 682 insertions(+), 406 deletions(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 69915f9b..685325f4 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -375,54 +375,7 @@
全图
-
测量
-
核查
-
绘图
-
定位
-
- - -
-
-
-
-
筛选列表
-
-
-
- -
- 全选 -
- -
-
附属设施
-
自然幢
-
宅基地
-
-
-
-
-
- - - - - - - - - - - - -
-
图层
-
- -
-
全图
-
测量
+
测量
核查
绘图
定位
@@ -1431,19 +1384,19 @@ style: styleYqr }); 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({ - // 只设置需要的属性即可 - center: center, // 中心点 - zoom: 15.8, // 缩放级别 - rotation: undefined, // 缩放完成view视图旋转弧度 - duration: 1000, // 缩放持续时间,默认不需要设置 - }); + // 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({ + // // 只设置需要的属性即可 + // center: center, // 中心点 + // zoom: 15.8, // 缩放级别 + // rotation: undefined, // 缩放完成view视图旋转弧度 + // duration: 1000, // 缩放持续时间,默认不需要设置 + // }); //自然幢定位开始 ---------start getZrzZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => { if (response.code == 200) { @@ -1552,12 +1505,50 @@ } //宅基地定位结束 ---------end + //地图操作定义------------start + //定位定义------------start + var Zb; + var latitude; + var longitude; + var vector_drawing; + //定位定义------------end + + //绘图定义---------------start + var drawing; + var draw_map; + //绘图定义---------------end + + //测面绘图定义------------start + var draw_cm; + //定义矢量图层 + var vector; + //创建一个帮助提示信息对象 + var helpTooltip; + //创建一个测量提示信息对象 + var measureTooltip; + //创建一个帮助提示框对象 + var helpTooltipElement; + //测出距离 + var measureTooltipElement; + //测面绘图定义-----------end + + //地图操作定义------------end //定位当前位置 ------start $("#dwMapAll").on("click", function () { - var Zb; - var latitude; - var longitude; - var vector_drawing; + console.log("进入定位图层") + //删除测量记录操作--------start + //将矢量图层从图中删除 + //map.removeLayer(helpTooltip); + map.removeLayer(vector); + map.removeInteraction(draw_cm); + //map.removeOverlay(helpTooltipElement); + //map.removeLayer(measureTooltip); + //删除测量记录操作--------end + //删除绘制图层画图操作-------start + map.removeInteraction(draw_map); + map.removeLayer(drawing); + //删除绘制图层画图操作-------end + //开始定位当前位置 navigator.geolocation.getCurrentPosition(function(position) { latitude = position.coords.latitude;// 获取纬度 @@ -1620,12 +1611,20 @@ }); }); //定位当前位置 ------end - var drawing; - var draw; + //开始绘制图层- -----start $("#htMapAll").on("click", function () { + console.log("进入绘制图层") + //删除之前 测距操作添加map中的绘图 --------start + //map.removeLayer(helpTooltip); + map.removeLayer(vector); + map.removeInteraction(draw_cm); + //map.removeOverlay(helpTooltipElement); + map.removeLayer(measureTooltipElement); + //删除之前 测距操作添加map中的绘图 --------end + //that.closeMoule = null; - map.removeInteraction(draw); + map.removeInteraction(draw_map); //var source = new ol.source.Vector({wrapX: false}); drawing = new ol.layer.Vector({ source: new ol.source.Vector(), @@ -1633,364 +1632,641 @@ map.addLayer(drawing); function addInteraction() { - draw = new ol.interaction.Draw({ + draw_map = new ol.interaction.Draw({ source: drawing.getSource(), type: "Polygon" }); - draw.on('drawend', function (evt) { + draw_map.on('drawend', function (evt) { var feature = evt.feature; var geometry = feature.getGeometry(); var coordinate = geometry.getCoordinates(); that.closeMoule = coordinate; }); - map.addInteraction(draw); + map.addInteraction(draw_map); } addInteraction(); }); //开始绘制图层- -----end - //点击查询详细信息 + //获取类型开始 侧面-----------------------------------------------------------------start + $("#area").click(function () { + console.log("进入测面") + //删除绘制图层画图操作-------start + map.removeInteraction(draw_map); + map.removeLayer(drawing); + //删除绘制图层画图操作-------end + //开始绘制 测面--------------------------------------------------------------start + //定义矢量数据源 + var source = new ol.source.Vector(); + + vector = new ol.layer.Vector({ + source: source, + style: new ol.style.Style({ + fill: new ol.style.Fill({ + color: "rgba(255,255,255,0.2)", + }), + stroke: new ol.style.Stroke({ + color: "#e21e0a", + width: 2, + }), + //image: new ol.style.Circle({ + // radius: 7, + // fill: new ol.style.Fill({ + // color:'#ffcc33' + // }) + //}) + }), + }); + + //将矢量图层添加到地图中 线的颜色加入map中 + map.addLayer(vector); + + var sketch; + + var continuePolygonMsg = "单击以继续绘制多边形"; + + /** + * Message to show when the user is drawing a line. + * @type {string} + */ + //var continueLineMsg = '单击继续绘制直线'; + + //鼠标移动触发的函数 + var pointerMoveHandler = function (evt) { + //Indicates if the map is currently being dragged. + //Only set for POINTERDRAG and POINTERMOVE events. Default is false. + //如果是平移地图则直接结束 + if (evt.dragging) { + return; + } + //帮助提示信息 + var helpMsg = "单击开始绘图"; + + if (sketch) { + //Get the feature's default geometry. + //A feature may have any number of named geometries. + //获取绘图对象的几何要素 + var geom = sketch.getGeometry(); + //如果当前绘制的几何要素是多边形,则将绘制提示信息设置为多边形绘制提示信息 + //如果当前绘制的几何要素是多线段,则将绘制提示信息设置为多线段绘制提示信息 + helpMsg = continuePolygonMsg; + } + //设置帮助提示要素的内标签为帮助提示信息 + helpTooltipElement.innerHTML = helpMsg; + //设置帮助提示信息的位置 + //The coordinate in view projection corresponding to the original browser event. + helpTooltip.setPosition(evt.coordinate); + //移除帮助提示要素的隐藏样式 + $(helpTooltipElement).removeClass("hidden"); + }; + + map.on("pointermove", pointerMoveHandler); + + map.getViewport().addEventListener("mouseout", function () { + helpTooltipElement.classList.add("hidden"); + }); + + //添加交互式绘图对象的函数 + function addInteraction() { + // 获取当前选择的绘制类型 + //var type = typeSelect.value == 'length' ? 'Polygon' : 'LineString'; + //创建一个交互式绘图对象 + var type = "Polygon"; + draw_cm = new ol.interaction.Draw({ + //绘制的数据源 + source: source, + //绘制类型 + type: type, + //样式 + style: new ol.style.Style({ + fill: new ol.style.Fill({ + color: "rgba(255,255,255,0.2)", + }), + stroke: new ol.style.Stroke({ + color: "rgba(0,0,0,0.5)", + lineDash: [10, 10], + width: 2, + }), + // image: new ol.style.Circle({ + // radius: 5, + // stroke: new ol.style.Stroke({ + // color:'rgba(0,0,0,0.7)' + // }), + // fill: new ol.style.Fill({ + //color: 'rgba(255,255,255,0.2)' + // }) + //}) + }), + }); + //将交互绘图对象添加到地图中 + map.addInteraction(draw_cm); + + //创建测量提示框 + createMeasureTooltip(); + //创建帮助提示框 + createHelpTooltip(); + + //定义一个事件监听 + var listener; + //定义一个控制鼠标点击次数的变量 + var count = 0; + //绘制开始事件 + draw_cm.on( + "drawstart", + function (evt) { + //The feature being drawn. + sketch = evt.feature; + //提示框的坐标 + var tooltipCoord = evt.coordinate; + //监听几何要素的change事件 + //Increases the revision counter and dispatches a 'change' event. + + listener = sketch.getGeometry().on("change", function (evt) { + //The event target. + //获取绘制的几何对象 + var geom = evt.target; + //定义一个输出对象,用于记录面积和长度 + var output; + map.removeEventListener("singleclick"); + map.removeEventListener("dblclick"); + //输出多边形的面积 + output = formatArea(geom); + //Return an interior point of the polygon. + //获取多变形内部点的坐标 + tooltipCoord = geom.getInteriorPoint().getCoordinates(); + + //设置测量提示框的内标签为最终输出结果 + measureTooltipElement.innerHTML = output; + //设置测量提示信息的位置坐标 + measureTooltip.setPosition(tooltipCoord); + }); + + //地图单击事件 + map.on("singleclick", function (evt) { + //设置测量提示信息的位置坐标,用来确定鼠标点击后测量提示框的位置 + measureTooltip.setPosition(evt.coordinate); + //如果是第一次点击,则设置测量提示框的文本内容为起点 + if (count == 0) { + measureTooltipElement.innerHTML = "起点"; + } + //根据鼠标点击位置生成一个点 + var point = new ol.geom.Point(evt.coordinate); + //将该点要素添加到矢量数据源中 + source.addFeature(new ol.Feature(point)); + //更改测量提示框的样式,使测量提示框可见 + measureTooltipElement.className = "tooltip tooltip-static"; + //创建测量提示框 + createMeasureTooltip(); + //点击次数增加 + count++; + }); + + //地图双击事件 + map.on("dblclick", function (evt) { + //根据 + var point = new ol.geom.Point(evt.coordinate); + source.addFeature(new ol.Feature(point)); + }); + }, + this + ); + //绘制结束事件 + draw_cm.on( + "drawend", + function (evt) { + count = 0; + //设置测量提示框的样式 + measureTooltipElement.className = "tooltip tooltip-static"; + //Set the offset for this overlay. + //设置偏移量 + measureTooltip.setOffset([0, -7]); + //清空绘制要素 + sketch = null; + //清空测量提示要素 + measureTooltipElement = null; + //创建测量提示框 + createMeasureTooltip(); + //Removes an event listener using the key returned by on() or once(). + //移除事件监听 + ol.Observable.unByKey(listener); + //移除地图单击事件 + map.removeEventListener("singleclick"); + }, + this + ); + } + /** + * Creates a new help tooltip + */ + function createHelpTooltip() { + if (helpTooltipElement) { + helpTooltipElement.parentNode.removeChild(helpTooltipElement); + } + helpTooltipElement = document.createElement("div"); + helpTooltipElement.className = "ol-tooltip hidden"; + helpTooltip = new ol.Overlay({ + element: helpTooltipElement, + offset: [15, 0], + positioning: "center-left", + }); + map.addOverlay(helpTooltip); + } + + /** + * Creates a new measure tooltip + */ + function createMeasureTooltip() { + if (measureTooltipElement) { + measureTooltipElement.parentNode.removeChild(measureTooltipElement); + } + measureTooltipElement = document.createElement("div"); + measureTooltipElement.className = "ol-tooltip ol-tooltip-measure"; + measureTooltip = new ol.Overlay({ + element: measureTooltipElement, + offset: [0, -15], + positioning: "bottom-center", + }); + map.addOverlay(measureTooltip); + } + + //格式化测量面积 + var formatArea = function (polygon) { + //定义面积变量 + var area; + //获取平面面积 + area = polygon.getArea(); + //定义输出变量 + var output; + //当面积大于10000时,转换为平方千米,否则为平方米 + if (area > 10000) { + output = + Math.round((area / 1000000) * 100) / 100 + " " + "km2"; + } else { + output = Math.round(area * 100) / 100 + " " + "m2"; + } + return output; + }; + + addInteraction(); + }); + //侧面结束-----------------------------------------------------------------end + + // //点击查询详细信息 map.on("singleclick", function (evt) { let feature = map.forEachFeatureAtPixel( evt.pixel, (feature) => feature ); - if(feature) { - document.getElementById("info").innerHTML = ""; - that.mapHaDataValue = true; - var ifConsole = feature.values_.createBy; - if (ifConsole =="mapTheGeomFsssId") { - let obj = {}; - that.mapHasDateStatus = 0; - obj.deptName = feature.values_.deptName;//行政区划名称 - obj.zjddm = feature.values_.zjddm;//宅基地代码 - obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态 - obj.fssslx = feature.values_.fssslx; //附属设施类型 - obj.jzmj = feature.values_.jzmj; //建筑面积 - obj.qsly = feature.values_.qsly;//权属来源 - obj.fwzt = feature.values_.fwzt; //房屋状态 - obj.sfsp = feature.values_.sfsp; //是否审批 - obj.sffz = feature.values_.sffz; //是否发证 - obj.jglx = feature.values_.jglx; //结构类型 - obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用 - obj.jzwqk = feature.values_.jzwqk; //建筑物情况 - obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况 - obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚 - obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用 - //附属设施类型字典项 - that.getDicts("fsss_type").then((response) => { - var assetTypeOptions = response.data; - if(obj.fssslx !=null && obj.fssslx !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.fssslx == assetTypeOptions[i].dictValue) { - obj.fssslx = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //权属类型字典项 - that.getDicts("acquisition_method").then((response) => { - var assetTypeOptions = response.data; - if(obj.qsly !=null && obj.qsly !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.qsly == assetTypeOptions[i].dictValue) { - obj.qsly = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //房屋状态字典项 - that.getDicts("fwzt").then((response) => { - var assetTypeOptions = response.data; - if(obj.fwzt !=null && obj.fwzt !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.fwzt == assetTypeOptions[i].dictValue) { - obj.fwzt = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //是否审批字典项 - that.getDicts("sys_yes_no").then((response) => { - var assetTypeOptions = response.data; - if(obj.sfsp !=null && obj.sfsp !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sfsp == assetTypeOptions[i].dictValue) { - obj.sfsp = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //是否发证字典项 - that.getDicts("sys_yes_no").then((response) => { - var assetTypeOptions = response.data; - if(obj.sffz !=null && obj.sffz !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sffz == assetTypeOptions[i].dictValue) { - obj.sffz = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //结构类型字典项 - that.getDicts("house_jglx").then((response) => { - var assetTypeOptions = response.data; - if(obj.jglx !=null && obj.jglx !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.jglx == assetTypeOptions[i].dictValue) { - obj.jglx = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //是否正在使用字典项 - that.getDicts("sys_yes_no").then((response) => { - var assetTypeOptions = response.data; - if(obj.sfzzsy !=null && obj.sfzzsy !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sfzzsy == assetTypeOptions[i].dictValue) { - obj.sfzzsy = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //房屋状态字典项 - that.getDicts("fwzt").then((response) => { - var assetTypeOptions = response.data; - if(obj.fwzt !=null && obj.fwzt !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.fwzt == assetTypeOptions[i].dictValue) { - obj.fwzt = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //土地状况字典项 - that.getDicts("land_state").then((response) => { - var assetTypeOptions = response.data; - if(obj.tdzk !=null && obj.tdzk !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.tdzk == assetTypeOptions[i].dictValue) { - obj.tdzk = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //是否受过处罚字典项 - that.getDicts("land_state").then((response) => { - var assetTypeOptions = response.data; - if(obj.sfsgcf !=null && obj.sfsgcf !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sfsgcf == assetTypeOptions[i].dictValue) { - obj.sfsgcf = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - that.mapFsssData = obj; - } else if(ifConsole =="mapTheGeomZrzId"){ - let obj = {}; - that.mapHasDateStatus = 1; - obj.deptName = feature.values_.deptName;//部门名称 - obj.zjddm = feature.values_.zjddm;//宅基地代码 - obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号 - obj.zrzh = feature.values_.zrzh;//自然幢号 - obj.jgrq = feature.values_.jgrq;//竣工日期 - obj.jzwgd = feature.values_.jzwgd;//建筑物高度 - obj.zzdmj = feature.values_.zzdmj;//幢占地面积 - obj.zydmj = feature.values_.zydmj;//幢用地面积 - obj.scjzmj = feature.values_.scjzmj;//实测建筑面积 - obj.zcs = feature.values_.zcs;//总层数 - obj.dscs = feature.values_.dscs;//地上层数 - obj.dxcs = feature.values_.dxcs;//地下层数 - obj.fwjg = feature.values_.fwjg;//房屋结构 - obj.sjly = feature.values_.sjly;//数据来源 - obj.status = feature.values_.status;//状态 - obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态 - //字典项转化 - //房屋结构字典项 - that.getDicts("housing_structure").then((response) => { - var assetTypeOptions = response.data; - if(obj.fwjg !=null && obj.fwjg !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.fwjg == assetTypeOptions[i].dictValue) { - obj.fwjg = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //房屋结构字典项 - that.getDicts("sjly").then((response) => { - var assetTypeOptions = response.data; - if(obj.sjly !=null && obj.sjly !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sjly == assetTypeOptions[i].dictValue) { - obj.sjly = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - that.mapZrzData = obj; - } else if(ifConsole =="mapTheGeomZjdId"){ - let obj = {}; - that.mapHasDateStatus = 2; - obj.deptName = feature.values_.deptName;//行政区划名称 - obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码 - obj.nhdm = feature.values_.nhdm;//农户代码 - obj.zjddm = feature.values_.zjddm;//宅基地代码 - obj.zdbh = feature.values_.zdbh;//宗地编号 - obj.zddm = feature.values_.zddm;//宗地代码 - obj.zl = feature.values_.zl;//坐落 - obj.zldwdm = feature.values_.zldwdm;//坐落单位代码 - obj.zdmj = feature.values_.zdmj;//宗地面积 - obj.yt = feature.values_.yt;//用途 - obj.ytmc = feature.values_.ytmc;//用途名称 - obj.dj = feature.values_.dj;//宗地编号 - obj.jg = feature.values_.jg;//价格万元 - obj.qllx = feature.values_.qllx;//权利类型 - obj.qlxz = feature.values_.qlxz;//权利性质 - obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式 - obj.rjl = feature.values_.rjl;//容积率 - obj.jzmd = feature.values_.jzmd;//建筑密度 - obj.jzxg = feature.values_.jzxg;//建筑限高 - obj.zdszd = feature.values_.zdszd;//宗地四至-东 - obj.zdszn = feature.values_.zdszn;//宗地四至-南 - obj.zdszx = feature.values_.zdszx;//宗地四至-西 - obj.zdszb = feature.values_.zdszb;//宗地四至-北 - obj.zdt = feature.values_.zdt;//宗地图 - obj.tfh = feature.values_.tfh;//图幅号 - obj.djh = feature.values_.djh;//地籍号 - obj.sjly = feature.values_.sjly;//数据来源 - obj.lyzk = feature.values_.lyzk;//当前利用状况 - obj.xzkssj = feature.values_.xzkssj;//闲置开始时间 - obj.sffz = feature.values_.sffz;//是否发证 - obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号 - obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片 - obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式 - obj.bccjl = feature.values_.bccjl;//被惩处经历 - obj.bccbz = feature.values_.bccbz;//被惩处备注 - obj.yctcyx = feature.values_.yctcyx;//有偿退出意向 - obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积 - obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因 - obj.lzyx = feature.values_.lzyx;//流转意向 - obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用 - //字典项转化 - //是否发证字典项 - that.getDicts("sys_yes_no").then((response) => { - var assetTypeOptions = response.data; - if(obj.sffz !=null && obj.sffz !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sffz == assetTypeOptions[i].dictValue) { - obj.sffz = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //利用状态字典项 - that.getDicts("zjdlyzk").then((response) => { - var assetTypeOptions = response.data; - if(obj.lyzk !=null && obj.lyzk !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.lyzk == assetTypeOptions[i].dictValue) { - obj.lyzk = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //流转意向字典项 - that.getDicts("is_have").then((response) => { - var assetTypeOptions = response.data; - if(obj.lzyx !=null && obj.lzyx !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.lzyx == assetTypeOptions[i].dictValue) { - obj.lzyx = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //有偿退出意向字典项 - that.getDicts("is_have").then((response) => { - var assetTypeOptions = response.data; - if(obj.yctcyx !=null && obj.yctcyx !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.yctcyx == assetTypeOptions[i].dictValue) { - obj.yctcyx = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //被惩处经历字典项 - that.getDicts("is_have").then((response) => { - var assetTypeOptions = response.data; - if(obj.bccjl !=null && obj.bccjl !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.bccjl == assetTypeOptions[i].dictValue) { - obj.bccjl = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //宅基地取得方式字典项 - that.getDicts("acquisition_method").then((response) => { - var assetTypeOptions = response.data; - if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.zjdqdfs == assetTypeOptions[i].dictValue) { - obj.zjdqdfs = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //权利设定方式字典项 - that.getDicts("right_setting_mode").then((response) => { - var assetTypeOptions = response.data; - if(obj.qlsdfs !=null && obj.qlsdfs !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.qlsdfs == assetTypeOptions[i].dictValue) { - obj.qlsdfs = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - //数据来源字典项 - that.getDicts("sjly").then((response) => { - var assetTypeOptions = response.data; - if(obj.sjly !=null && obj.sjly !=""){ - for(var i=0;assetTypeOptions.length >i; i++){ - if(obj.sjly == assetTypeOptions[i].dictValue) { - obj.sjly = assetTypeOptions[i].dictLabel; - break; - } - } - } - }); - that.mapZjdData = obj; - } else { - that.mapHaDataValue = false; - } - }else { - that.mapHaDataValue = false; + if (feature) { + //移除之前的绘制对象 + // map.removeInteraction(draw); + // //将帮助提示的覆盖标注从地图中删除 + // map.removeOverlay(helpTooltip); + // //将测量提示的覆盖标注从地图中删除 + // map.removeOverlay(measureTooltip); } }); + // map.on("singleclick", function (evt) { + // let feature = map.forEachFeatureAtPixel( + // evt.pixel, + // (feature) => feature + // ); + // if(feature) { + // document.getElementById("info").innerHTML = ""; + // that.mapHaDataValue = true; + // var ifConsole = feature.values_.createBy; + // if (ifConsole =="mapTheGeomFsssId") { + // let obj = {}; + // that.mapHasDateStatus = 0; + // obj.deptName = feature.values_.deptName;//行政区划名称 + // obj.zjddm = feature.values_.zjddm;//宅基地代码 + // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态 + // obj.fssslx = feature.values_.fssslx; //附属设施类型 + // obj.jzmj = feature.values_.jzmj; //建筑面积 + // obj.qsly = feature.values_.qsly;//权属来源 + // obj.fwzt = feature.values_.fwzt; //房屋状态 + // obj.sfsp = feature.values_.sfsp; //是否审批 + // obj.sffz = feature.values_.sffz; //是否发证 + // obj.jglx = feature.values_.jglx; //结构类型 + // obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用 + // obj.jzwqk = feature.values_.jzwqk; //建筑物情况 + // obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况 + // obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚 + // obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用 + // //附属设施类型字典项 + // that.getDicts("fsss_type").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.fssslx !=null && obj.fssslx !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.fssslx == assetTypeOptions[i].dictValue) { + // obj.fssslx = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //权属类型字典项 + // that.getDicts("acquisition_method").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.qsly !=null && obj.qsly !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.qsly == assetTypeOptions[i].dictValue) { + // obj.qsly = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //房屋状态字典项 + // that.getDicts("fwzt").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.fwzt !=null && obj.fwzt !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.fwzt == assetTypeOptions[i].dictValue) { + // obj.fwzt = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //是否审批字典项 + // that.getDicts("sys_yes_no").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sfsp !=null && obj.sfsp !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sfsp == assetTypeOptions[i].dictValue) { + // obj.sfsp = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //是否发证字典项 + // that.getDicts("sys_yes_no").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sffz !=null && obj.sffz !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sffz == assetTypeOptions[i].dictValue) { + // obj.sffz = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //结构类型字典项 + // that.getDicts("house_jglx").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.jglx !=null && obj.jglx !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.jglx == assetTypeOptions[i].dictValue) { + // obj.jglx = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //是否正在使用字典项 + // that.getDicts("sys_yes_no").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sfzzsy !=null && obj.sfzzsy !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sfzzsy == assetTypeOptions[i].dictValue) { + // obj.sfzzsy = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //房屋状态字典项 + // that.getDicts("fwzt").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.fwzt !=null && obj.fwzt !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.fwzt == assetTypeOptions[i].dictValue) { + // obj.fwzt = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //土地状况字典项 + // that.getDicts("land_state").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.tdzk !=null && obj.tdzk !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.tdzk == assetTypeOptions[i].dictValue) { + // obj.tdzk = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //是否受过处罚字典项 + // that.getDicts("land_state").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sfsgcf !=null && obj.sfsgcf !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sfsgcf == assetTypeOptions[i].dictValue) { + // obj.sfsgcf = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // that.mapFsssData = obj; + // } else if(ifConsole =="mapTheGeomZrzId"){ + // let obj = {}; + // that.mapHasDateStatus = 1; + // obj.deptName = feature.values_.deptName;//部门名称 + // obj.zjddm = feature.values_.zjddm;//宅基地代码 + // obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号 + // obj.zrzh = feature.values_.zrzh;//自然幢号 + // obj.jgrq = feature.values_.jgrq;//竣工日期 + // obj.jzwgd = feature.values_.jzwgd;//建筑物高度 + // obj.zzdmj = feature.values_.zzdmj;//幢占地面积 + // obj.zydmj = feature.values_.zydmj;//幢用地面积 + // obj.scjzmj = feature.values_.scjzmj;//实测建筑面积 + // obj.zcs = feature.values_.zcs;//总层数 + // obj.dscs = feature.values_.dscs;//地上层数 + // obj.dxcs = feature.values_.dxcs;//地下层数 + // obj.fwjg = feature.values_.fwjg;//房屋结构 + // obj.sjly = feature.values_.sjly;//数据来源 + // obj.status = feature.values_.status;//状态 + // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态 + // //字典项转化 + // //房屋结构字典项 + // that.getDicts("housing_structure").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.fwjg !=null && obj.fwjg !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.fwjg == assetTypeOptions[i].dictValue) { + // obj.fwjg = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //房屋结构字典项 + // that.getDicts("sjly").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sjly !=null && obj.sjly !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sjly == assetTypeOptions[i].dictValue) { + // obj.sjly = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // that.mapZrzData = obj; + // } else if(ifConsole =="mapTheGeomZjdId"){ + // let obj = {}; + // that.mapHasDateStatus = 2; + // obj.deptName = feature.values_.deptName;//行政区划名称 + // obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码 + // obj.nhdm = feature.values_.nhdm;//农户代码 + // obj.zjddm = feature.values_.zjddm;//宅基地代码 + // obj.zdbh = feature.values_.zdbh;//宗地编号 + // obj.zddm = feature.values_.zddm;//宗地代码 + // obj.zl = feature.values_.zl;//坐落 + // obj.zldwdm = feature.values_.zldwdm;//坐落单位代码 + // obj.zdmj = feature.values_.zdmj;//宗地面积 + // obj.yt = feature.values_.yt;//用途 + // obj.ytmc = feature.values_.ytmc;//用途名称 + // obj.dj = feature.values_.dj;//宗地编号 + // obj.jg = feature.values_.jg;//价格万元 + // obj.qllx = feature.values_.qllx;//权利类型 + // obj.qlxz = feature.values_.qlxz;//权利性质 + // obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式 + // obj.rjl = feature.values_.rjl;//容积率 + // obj.jzmd = feature.values_.jzmd;//建筑密度 + // obj.jzxg = feature.values_.jzxg;//建筑限高 + // obj.zdszd = feature.values_.zdszd;//宗地四至-东 + // obj.zdszn = feature.values_.zdszn;//宗地四至-南 + // obj.zdszx = feature.values_.zdszx;//宗地四至-西 + // obj.zdszb = feature.values_.zdszb;//宗地四至-北 + // obj.zdt = feature.values_.zdt;//宗地图 + // obj.tfh = feature.values_.tfh;//图幅号 + // obj.djh = feature.values_.djh;//地籍号 + // obj.sjly = feature.values_.sjly;//数据来源 + // obj.lyzk = feature.values_.lyzk;//当前利用状况 + // obj.xzkssj = feature.values_.xzkssj;//闲置开始时间 + // obj.sffz = feature.values_.sffz;//是否发证 + // obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号 + // obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片 + // obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式 + // obj.bccjl = feature.values_.bccjl;//被惩处经历 + // obj.bccbz = feature.values_.bccbz;//被惩处备注 + // obj.yctcyx = feature.values_.yctcyx;//有偿退出意向 + // obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积 + // obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因 + // obj.lzyx = feature.values_.lzyx;//流转意向 + // obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用 + // //字典项转化 + // //是否发证字典项 + // that.getDicts("sys_yes_no").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sffz !=null && obj.sffz !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sffz == assetTypeOptions[i].dictValue) { + // obj.sffz = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //利用状态字典项 + // that.getDicts("zjdlyzk").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.lyzk !=null && obj.lyzk !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.lyzk == assetTypeOptions[i].dictValue) { + // obj.lyzk = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //流转意向字典项 + // that.getDicts("is_have").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.lzyx !=null && obj.lzyx !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.lzyx == assetTypeOptions[i].dictValue) { + // obj.lzyx = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //有偿退出意向字典项 + // that.getDicts("is_have").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.yctcyx !=null && obj.yctcyx !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.yctcyx == assetTypeOptions[i].dictValue) { + // obj.yctcyx = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //被惩处经历字典项 + // that.getDicts("is_have").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.bccjl !=null && obj.bccjl !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.bccjl == assetTypeOptions[i].dictValue) { + // obj.bccjl = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //宅基地取得方式字典项 + // that.getDicts("acquisition_method").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.zjdqdfs == assetTypeOptions[i].dictValue) { + // obj.zjdqdfs = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //权利设定方式字典项 + // that.getDicts("right_setting_mode").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.qlsdfs !=null && obj.qlsdfs !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.qlsdfs == assetTypeOptions[i].dictValue) { + // obj.qlsdfs = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // //数据来源字典项 + // that.getDicts("sjly").then((response) => { + // var assetTypeOptions = response.data; + // if(obj.sjly !=null && obj.sjly !=""){ + // for(var i=0;assetTypeOptions.length >i; i++){ + // if(obj.sjly == assetTypeOptions[i].dictValue) { + // obj.sjly = assetTypeOptions[i].dictLabel; + // break; + // } + // } + // } + // }); + // that.mapZjdData = obj; + // } else { + // that.mapHaDataValue = false; + // } + // }else { + // that.mapHaDataValue = false; + // } + // }); //当前账套没有任何空间数据 if(mapTalkAbout){ let deptName = this.$store.state.user.loginDeptId + "";