(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4e3565f3"],{2068:function(e,t,r){},5316:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"content"}},[r("div",{ref:"map",attrs:{id:"map"}}),e._m(0)])},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ol-popup",staticStyle:{"background-color":"#fff"},attrs:{id:"popup"}},[r("div",{staticClass:"popup-closer",attrs:{id:"popup-closer"}},[r("i",{staticClass:"el-icon-error"})]),r("div",{staticClass:"popup-content",attrs:{id:"popup-content"}})])}],n=r("c7eb"),d=r("1da1"),i=r("2909"),c=(r("99af"),r("d81d"),r("fb6a"),r("a9e3"),r("b680"),r("b64b"),r("d3b7"),r("ac1f"),r("00b4"),r("25f0"),r("5319"),r("159b"),r("5bc0"),r("5eee")),l=r("a2c7"),u=r("480c"),s=(r("256f"),r("d510")),p=r("6ed8"),y=r("5831"),m=r("55bd"),g=r("429c"),F=r("3e6b"),h=r("6c77"),v=r("83a6"),b=r("8682"),f=r("ce2c"),x=r("8295"),M=r("2ce2"),P=r("06f8"),I=r("4cdf"),N=r("f403"),w=r("2278"),_=r("27c7"),L=r("0af5"),S=r("a2e1"),C=r("0710"),E=r("8575"),V={props:{potMsg:{type:Array},lineMsg:{type:Array},allDrawMsg:{type:Array}},data:function(){return{map:null,pointDrawFlag:"",lineDrawFlag:"",sketch:"",geometries:[],lastPointFeature:null,lastLineFeature:null,all_draw_feature:[],all_point_coords:[],all_line_coords:[],pointVectorSource:null,lineVectorSource:null,ClusterSource:null,pointVectorLayer:null,lineVectorLayer:null,zoom:10,interaction:null,lonALat:{lon:null,lat:null},viewCenter:[113.36502,22.9787]}},created:function(){(this.potMsg.length>0||this.lineMsg.length>0)&&(this.all_point_coords=Object(i["a"])(this.potMsg),this.all_line_coords=Object(i["a"])(this.lineMsg),this.all_draw_feature=Object(i["a"])(this.allDrawMsg))},mounted:function(){this.initMap()},methods:{initMap:function(){var e=this,t=this,r="EPSG:4326";this.map=new c["a"]({target:"map",view:new l["a"]({center:t.viewCenter,zoom:10,minZoom:5,projection:r,multiWorld:!0})});for(var o=new Array(18),a=[],n=0;n<18;++n){var d=360/512;a[n]=d/Math.pow(2,n-1),o[n]=n}var i=new u["a"]({source:new s["a"]({url:"http://t0.tianditu.gov.cn/img_c/wmts?tk=42a5dfa93ea7a9cbf423c4c1bb9ec16d",service:"wmts",version:"1.0.0",matrixSet:"c",layer:"img",format:"Tile",projection:"EPSG:4326",tileGrid:new p["b"]({extent:[-180,-90,180,90],origin:[-180,90],resolutions:a,matrixIds:o}),style:"default"})});this.map.addLayer(i);for(var m=[{index:2,code:"YZT1610609681389",name:"广东2020年7_17级矢量注记",url:"http://19.25.37.27:8081/gmap/proxyHandler?serviceCode={{serviceCode}}&url=https://ztn-data.gdgov.cn:8581/GatewayMsg/http/api/proxy/invoke",type:"YZT-WMTS"},{index:3,code:"0",text:"",url:"http://19.25.37.25:8090/iserver/services/map-XingZhengQuHua/rest/maps/行政区划",type:"rest-map"},{index:5,code:"0",text:"",url:"http://19.25.35.204:31190/iserver/services/map-ShengJiXingZhengQuHuaMian/rest/maps/省级行政区划面",type:"rest-map"},{index:11,code:"0",text:"",url:"http://19.25.35.204:31190/iserver/services/map-YiZhangTuShuiZha/rest/maps/水闸",type:"rest-map"},{index:12,code:"0",text:"",url:"http://19.25.35.204:31190/iserver/services/map-YiZhangTuDiFang/rest/maps/堤防",type:"rest-map"}],M=0;M-1){r=t[o];break}d=new h["c"]({image:new f["a"]({fill:new v["a"]({color:"#ff0721"}),radius:5}),text:new x["a"]({text:r,offsetY:30,font:"12px Calibri,sans-serif",fill:new v["a"]({color:"#fff"}),stroke:new b["a"]({color:"#f00",width:3})})}),e.setStyle(d)})):n[0].getGeometry()instanceof ol.geom.LineString&&(d=new h["c"]({stroke:new b["a"]({color:"#2899fb",width:4})}));var i=new y["a"]({features:n}),c={source:i,style:d},l=new F["a"]({id:m[r].code,source:c.source,style:c.style});t.map.addLayer(l)}function S(e,r){var o=new u["a"]({source:new g["a"]({url:e.url,prjCoordSys:{epsgCode:4326},projection:"EPSG:4326"})}),a=r+10*(1+r);o.setZIndex(a),t.map.addLayer(o)}this.pointVectorSource=new y["a"]({wrapX:!1}),this.pointVectorLayer=new F["a"]({source:this.pointVectorSource,style:new h["c"]({fill:new v["a"]({color:"rgba(255, 255, 255, 0.2)"}),stroke:new b["a"]({width:4}),image:new f["a"]({radius:8,fill:new v["a"]({color:"blue"})})})}),this.lineVectorLayer=new F["a"]({source:this.lineVectorSource,style:new h["c"]({fill:new v["a"]({color:"rgba(255, 255, 255, 0.2)"}),stroke:new b["a"]({width:4}),image:new f["a"]({radius:8,fill:new v["a"]({color:"blue"})})})}),this.map.addLayer(this.lineVectorLayer),this.map.on("moveend",(function(){t.zoom=t.map.getView().getZoom(),console.log("zomm",t.zoom)})),this.map.on("pointermove",(function(t){var r=e.map.getEventPixel(t.originalEvent),o=e.map.forEachFeatureAtPixel(r,(function(e){return e}));e.map.getTargetElement().style.cursor=void 0!=o?"pointer":"auto"})),this.ProjectCoordinatePoint(),this.addPopup()},addGuangdongJson:function(){var e=this,t=(new S["a"]).readFeatures(E),r=new y["a"]({features:t}),o=new F["a"]({source:r,style:new h["c"]({fill:new v["a"]({color:"rgba(255, 255, 255, 0.6)"}),stroke:new b["a"]({color:"#319FD3",width:1})})});e.map.addLayer(o)},ProjectCoordinatePoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=[{id:"706cf8d0b46345a5b8663389a07914d5",projectName:"test新增专题项目",pointLatitudeLongitudeList:"[[113.2857,22.9062],[113.2905,22.9038],[113.2929,22.9082],[113.2892,22.9109]]"},{id:"b9bdec758a3a4394bde8fc3ceb93ba0e",projectName:"清林径水库巡逻哨所工程",pointLatitudeLongitudeList:"[[114.23961891846892,22.766099930804188]]"},{id:"937c6726536e4f87abc1e60b3ff2b409",projectName:"深圳市西丽水库除险加固工程",pointLatitudeLongitudeList:"[[113.95333747585406,22.594931238307186]]"},{id:"8c52ba26999d4204970d7b15a02f9648",projectName:"铁岗、石岩、西丽、长岭皮水库2018年版一级水源保护区调整新增围网工程",pointLatitudeLongitudeList:"[[113.8929221476539,22.62227051357431],[113.95036032139922,22.600084872053458],[113.90267358885954,22.693537929579115],[114.00273672489836,22.61127967377137]]"},{id:"607bc8bc38ed487d83ea906def4f5659",projectName:"沙湾河深圳水库截排工程项目施工总承包Ⅲ标段",pointLatitudeLongitudeList:"[[111,22],[114.16831,22.61232]]"}];var t=new y["a"]({});e.forEach((function(e){e.pointLatitudeLongitudeList=JSON.parse(e.pointLatitudeLongitudeList),e.pointLatitudeLongitudeList.forEach((function(r){var o=new I["a"]({geometry:new N["a"](r),pointData:e,name:"test"});t.addFeature(o)}))}));var r=new m["a"]({distance:25,source:t}),o=new F["a"]({source:r,style:function(e,t,r){var o=e.values_.features[0].values_.geometry.flatCoordinates[0].toFixed(4)+","+e.values_.features[0].values_.geometry.flatCoordinates[1].toFixed(4),a=e.values_.features.length.toString(),n="1"==a?o:a,d="1"==a?20:0;return new h["c"]({fill:new v["a"]({color:"rgba(255, 255, 255, 0.2)"}),stroke:new b["a"]({color:"#409eff",width:4}),image:new f["a"]({radius:8,fill:new v["a"]({color:"red"})}),text:new x["a"]({text:n,offsetY:d,fill:new v["a"]({color:"yellow"})})})},zIndex:1});this.map.addLayer(o)},addPopup:function(e,t){var r=this,o=document.getElementById("popup"),a=document.getElementById("popup-closer"),i=document.getElementById("popup-content"),c=new C["a"]({element:o,autoPan:!0,positioning:"bottom-left",stopEvent:!0,autoPanAnimation:{duration:250}});this.map.addOverlay(c);a.onclick=function(){return i.style.display="none",c.setPosition(void 0),a.blur(),!1},this.map.on("singleclick",function(){var e=Object(d["a"])(Object(n["a"])().mark((function e(o){var a,d,l;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t||r.map.forEachFeatureAtPixel(o.pixel,(function(e,t){return e})),!(void 0!=a&&a.getProperties().features.length>0)){e.next=16;break}if(console.log(a.getGeometry().getType()),console.log(a.get("name")),1!==a.getProperties().features.length){e.next=12;break}d=a.getProperties().features[0].values_.pointData,l="\n\n
项目名:".concat(d.projectName,"
\n\n "),i.innerHTML=l,i.style.display="block",c.setPosition(o.coordinate),e.next=14;break;case 12:return r.$message.warning("请放大精度查看"),e.abrupt("return");case 14:e.next=17;break;case 16:r.map.getTargetElement().style.cursor="auto";case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleReturn:function(){console.log("this.all_draw_feature",this.all_draw_feature);var e=this.all_draw_feature.pop();console.log("当前图像内容 "+this.all_draw_feature.length,e),void 0==e?this.$message.warning("已全部撤销"):"point"===e[0]?(this.pointVectorSource.removeFeature(e[1]),this.all_point_coords.pop()):"line"===e[0]&&(this.lineVectorSource.removeFeature(e[1]),this.all_line_coords.pop())},handleDelect:function(){var e=this,t=this.resetBtn("del"),r=t.delBtnDom;"选择删除"===r.innerHTML?(r.innerHTML="取消删除",this.interaction=new M["a"]({condition:P["SingleClick"],style:new h["c"]({image:new f["a"]({radius:10,stroke:new b["a"]({width:4,color:"red"}),fill:new v["a"]({color:"green"})}),stroke:new b["a"]({width:4,color:"red"}),fill:new v["a"]({color:"green"})}),layers:[e.pointVectorLayer,e.lineVectorLayer]}),this.map.addInteraction(this.interaction)):(r.innerHTML="选择删除",this.map.removeInteraction(this.interaction)),this.interaction.on("select",(function(t){if(t.selected.length>0){var r=t.selected[0];r.get("name");console.log("选中的几点",t,r),console.log("this.pointVectorLayer",e.pointVectorSource);var o=r.values_.features?r.values_.features.length:1;console.log("选中个数",o),e.$confirm("是否删除选中"+o+"个的元素?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.lineVectorSource.removeFeature(r),e.pointVectorSource.getFeatures().forEach((function(t){t.values_.geometry.flatCoordinates[0]===r.values_.geometry.flatCoordinates[0]&&t.values_.geometry.flatCoordinates[1]===r.values_.geometry.flatCoordinates[1]&&e.pointVectorSource.removeFeature(t)}))}))}}))},handleClearDrawLayer:function(){this.pointVectorSource.clear(),this.lineVectorSource.clear(),this.all_draw_feature=[],this.all_point_coords=[],this.all_line_coords=[]},handleSaveCoords:function(){if(this.all_point_coords=this.pointVectorSource.getFeatures().map((function(e){return e.geometryChangeKey_.target.flatCoordinates})),0!=this.all_point_coords.length||0!=this.all_line_coords){var e=[],t=this.lineVectorSource.getFeatures();t.forEach((function(t){for(var r=[],o=0;o