import{H as K,_ as be,r as c,A as R,V as ve,U as ye,d as _,o as p,c as k,l as i,m as T,e as S,w,L as Z,N as O,f as L,k as X,g as I,F as _e,x as we,y as xe,p as ke,q as Se}from"./index.ae0c781d.js";import Le from"./downloads.4cdbbcc5.js";import{_ as ee}from"./close1.45635d81.js";import{_ as Ce,a as Ee,b as ze,c as De,d as qe,e as Me}from"./linesGL.97ae14ae.js";import{i as Ae,L as Te}from"./index.c9f5bd8b.js";import{T as je}from"./TimeLine.64a8bde3.js";import{u as Ve}from"./useEcharts.dbdb546a.js";function Ne(f){return K({url:"equipment/abandon",method:"get",params:f})}function Pe(f){return K({url:"equipment/abandonHuoChun",method:"get",params:f})}const D=f=>(ke("data-v-722f0c81"),f=f(),Se(),f),Ie={class:"center"},Fe=D(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),Be={class:"rightWra"},Re={class:"rightbottom"},Ze={class:"title"},Oe=D(()=>i("span",null,"\u6482\u8352\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),Xe=D(()=>i("img",{src:Le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Ge={key:0,src:ee,alt:""},Qe={key:0,class:"imgrotate",src:ee,alt:""},We={class:"mt-4"},$e={class:"bottom_center"},He=xe('
',1),Ue={id:"popup",class:"ol-popup"},Je=D(()=>i("div",{class:"pophead",style:{width:"100%",height:"20px"}},[i("div",{id:"popup-title",style:{font:"bold 15px sans-serif",align:"left",position:"absolute",left:"17px",color:"#fff"}}),i("a",{href:"#",id:"popup-closer",class:"ol-popup-closer",style:{color:"#8e908c"}})],-1)),Ye={id:"popup-content",style:{padding:"10px"}},Ke=D(()=>i("span",null,"\u6482\u8352\u5730",-1)),et=D(()=>i("div",{id:"popup-pagination"},null,-1)),tt={__name:"index",setup(f){let g=c(null);const G=c(null);let q=R({arr:[],brr:[],crr:[]});const m=c("370211");c({info:[]});const Q=c(!1);c(!0);let x=c(!0);const M=c([]);let W=c([]),F=c([]);const te=t=>{oe(t)},oe=t=>{let e=document.createElement("a");e.style.display="none",e.href=t,document.body.appendChild(e),e.click(),document.body.removeChild(e)};let B={\u6482\u8352\u5730:{color:"rgba(255, 141, 26, 1)",disabled:!1}},C={\u6482\u8352\u5730:{setOf:"2022-06-01-gengdi",name:"T2022_06_01_liaohuang"}},j=c(null);ve(()=>{ae()});function ae(){re(),ie();for(const t in B)B[t].disabled!==!0&&W.value.push(t);M.value=W.value,console.log(M.value)}let l=c(null);c(null),c(null);let $=c(null),V=c(null);function re(){var t=document.querySelector(".center"),e=document.getElementById("cesiumContainer");l=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.Tianditu({layerType:"img",key:"1d109683f4d84198e37a38c442d68311"})})]}),ne(),le(),l.on("moveend",function(o){var n=l.getView().getZoom();n>=13?j.setVisible(!0):j.setVisible(!1)}),l.on("singleclick",function(o){var n=o.coordinate,s=n[0],h=n[1],A=l.getView(),b=l.getView().getZoom();console.log(s,h),A.animate({center:[s,h],duration:1e3}),b>=13?H(o,"huangdaoqu_village@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/huangdaoqu_village@huangdaoqu_bianjie","\u6751"):H(o,"huangdaoqu_town@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/huangdaoqu_town@huangdaoqu_bianjie","\u9547")});var a=new ResizeObserver(function(o){o.forEach(function(n){var s=n.contentRect.width,h=n.contentRect.height;e.style.width=s+"px",e.style.height=h+"px",l.updateSize()})});a.observe(t)}const ne=()=>{j=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/huangdaoqu_village@huangdaoqu_bianjie",cacheEnabled:!1}),name:"huangdaoqu_village",projection:"EPSG:4326",zIndex:9999}),l.addLayer(j)},le=()=>{var t=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/huangdaoqu_town@huangdaoqu_bianjie",cacheEnabled:!1}),projection:"EPSG:4326",zIndex:9999});l.addLayer(t)},se=t=>{let e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+`/map-${t.setOf}/rest/maps/${t.name}@${t.setOf}`,cacheEnabled:!1}),name:t.name,projection:"EPSG:4326"});l.addLayer(e)};function H(t,e,a,o){let n=[];var s=new ol.geom.Point(t.coordinate),h=new ol.supermap.QueryByGeometryParameters({queryParams:{name:e},geometry:s});let A=document.querySelector("#popup-title"),b=c(null),E=c(null);new ol.supermap.QueryService(a).queryByGeometry(h,function(r){E=l.getLayers().getArray().find(d=>d.get("id")==="zhezhao"),l.removeLayer(E);let v="";if(o=="\u9547"&&r.result.recordsets[0].features.features[0].properties.XJQYDM){let d=r.result.recordsets[0].features.features[0].properties.XJQYDM;m.value=d;let y=[];Ne().then(z=>{z.data.forEach(u=>{u.subregionCode==d&&(v=u.subregionName,y.push(u))}),P(),F.value=y})}else if(o=="\u6751"&&r.result.recordsets[0].features.features[0].properties.CJQYDM){let d=r.result.recordsets[0].features.features[0].properties.CJQYDM,y=[];Pe({divisions:d,yearMonth:"2023-05"}).then(z=>{z.data.forEach(u=>{u.subregionCode==d&&(v=u.subregionName,console.log(u),y.push(u))}),F.value=y,P()})}function P(){if(r.result.currentCount>0){console.log(r.result.recordsets[0].features),r.result.recordsets[0].features&&(V.setPosition(s.flatCoordinates),console.log(v),A.innerHTML=v),b=l.getLayers().getArray().find(he=>he.get("id")==="dianjigaoliang"),l.removeLayer(b);var d=new ol.format.GeoJSON().readFeatures(r.result.recordsets[0].features);n=r.result.recordsets[0].features.features[0].geometry.coordinates,ce(r.result.recordsets[0].features.features[0].geometry.coordinates);var y=new ol.source.Vector;y.addFeatures(d);const u=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var z=new ol.layer.Vector({id:"dianjigaoliang",source:y,zIndex:9999});z.setStyle(u),l.addLayer(z)}}}),$.addEventListener("click",function(){E=l.getLayers().getArray().find(r=>r.get("id")==="zhezhao"),l.removeLayer(E),U(n),m.value="370211",b=l.getLayers().getArray().find(r=>r.get("id")==="dianjigaoliang"),l.removeLayer(b),V.setPosition(void 0)})}const ie=()=>{document.getElementById("popup"),document.getElementById("popup-content"),$=document.getElementById("popup-closer"),V=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),l.addOverlay(V)};function ce(t){let e=new ol.source.Vector;var a=new ol.layer.Vector({id:"zhezhao",source:e,style:new ol.style.Style({fill:new ol.style.Fill({color:"rgba( 105, 105, 105, 0.9)"})})});const o=U(t),n=new ol.Feature({geometry:o});a.getSource().addFeature(n),l.addLayer(a)}function U(t){console.log(t);const e=[-180,-90,180,90],a=ol.geom.Polygon.fromExtent(e),o=t;return console.log(o),o.forEach(n=>{const s=new ol.geom.LinearRing(n[0]);a.appendLinearRing(s)}),a}ye(()=>M.value,(t,e)=>{t.length>e.length?t.filter(o=>{if(e.findIndex(s=>s===o)<0)return o}).forEach(o=>{C[o]&&(console.log(C[o]),se(C[o]))}):t.length{if(t.findIndex(s=>s===o)<0)return o}).forEach(o=>{C[o]&&(l.getLayers().getArray().indexOf(C[o].name),console.log(l.getLayers().getArray()),l.getLayers().getArray().forEach((n,s)=>{n.A.name&&n.A.name==C[o].name&&l.getLayers().removeAt(s)}))})});function N(t,e){if(g){const a=g.imageryLayers._layers;for(let o=a.length-1;o>=0;o--)t.forEach(n=>{a[o]&&a[o]._imageryProvider&&a[o]._imageryProvider.customName&&(e?a[o]._imageryProvider.customName.indexOf(n)>-1&&g.imageryLayers.remove(a[o]):a[o]._imageryProvider.customName===n&&g.imageryLayers.remove(a[o]))})}}function J(t){if(g){let a=g.entities._entities._array;for(var e=a.length-1;e>=0;e--)a[e]._name&&a[e]._name===t&&g.entities.remove(a[e])}}c([]);function de(){N(["huangdaoqu_town"],!0),N(["shuzisannong:farmlandgbzn"],!0),addWms("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town"),g.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),Q.value=!1}function ue(){if(x.value=!x.value,x.value){let t=document.querySelector(".rightWra");t.style.transform="translate(0,0)"}else{let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"}}const pe=(t,e)=>getarea({time:"2023-04-19",subregion:e,parent:t}).then(a=>a.data),ge=()=>{getTownship().then(t=>{q.arr=t.features,q.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let e=[...t.features],a=[];e.splice(0,1),e.forEach(o=>{a.push(o.properties.XZMC)}),[...Object.values(a)],Y()})},me=()=>{m.value=="370211"?(ge(),J("townLine"),N(["village_CQL"]),Pie3D=R({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.8,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.8,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.8,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:156,itemStyle:{opacity:.8,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u84DD\u8393",value:56,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}}]})):m.value&&(Pie3D=R({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.8,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.8,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.8,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:0,itemStyle:{opacity:.8,color:"rgba(27, 85, 222, 1)"},label:{show:!1}},{name:"\u84DD\u8393",value:156,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!1}}]})),[...q.arr].forEach(e=>{e.properties.XZDM==m.value&&(pe(e.properties.XZMC,"2"),g.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(e.bbox[0],e.bbox[1],e.bbox[2],e.bbox[3]),duration:2}));let a=[...q.brr],o=[];a.forEach(n=>{n.properties.XZDM==m.value&&o.push(n.properties.XZQMC)}),[...Object.values(o)],Y()}),N(["village_CQL"]),J("townLine"),addvillage(`XZDM=${m.value}`,"village_CQL")};function Y(){const t=Ae(G.value);var e=[{areaName:"\u533A\u57DF\u4E00",rate:"3598"},{areaName:"\u533A\u57DF\u4E8C",rate:"1235"},{areaName:"\u533A\u57DF\u4E09",rate:"2354"},{areaName:"\u533A\u57DF\u56DB",rate:"3251"},{areaName:"\u533A\u57DF\u4E94",rate:"1652"}],a=[],o=[];e.forEach(s=>{a.push(s.areaName),o.push(parseInt(s.rate).toFixed(0))});var n={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!0,top:"10",right:"5%",textStyle:{color:"rgba(255,255,255,.9)"},itemWidth:20,itemHeight:12.5,icon:"rect",backgroundColor:"transparent"},grid:{left:"5%",right:"5%",bottom:"9%",top:"10%",containLabel:!0},xAxis:{data:a,triggerEvent:!0,axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#70F5FE"}},axisLabel:{show:!0,rotate:0,interval:0,textStyle:{padding:[8,0,0,0],fontSize:14,color:"rgba(21, 222, 255, 0.8)"}}},yAxis:{name:"",triggerEvent:!0,nameTextStyle:{color:"rgba(255,255,255,1)",fontSize:16,padding:[0,0,10,-20]},splitLine:{show:!0,lineStyle:{color:"#A6D9F6",type:"dashed"}},axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,textStyle:{color:"rgba(24, 255, 255, 0.8)",fontSize:14}}},series:[{name:"\u9762\u79EF",barMinHeight:10,type:"pictorialBar",barCategoryGap:"60%",symbolOffset:[1,-5],symbol:"path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z",itemStyle:{normal:{color:new Te(0,0,0,1,[{offset:0,color:"rgba(161, 222, 147, 1)"},{offset:1,color:"rgba(161, 222, 147, 0.08)"}])}},label:{show:!0,position:"top",textStyle:{color:"#ffffff"}},data:o,z:0}]};t.on("click",s=>fe(s)),Ve(t,n)}function fe(t){console.log("\u53F3\u4E0B\u70B9\u51FB",t)}return(t,e)=>{const a=_("el-option"),o=_("el-select"),n=_("el-tooltip"),s=_("el-checkbox"),h=_("el-checkbox-group"),A=_("el-collapse-item"),b=_("el-collapse"),E=_("el-button");return p(),k("div",Ie,[Fe,i("div",Be,[i("div",Re,[i("div",Ze,[Oe,i("p",{onClick:e[0]||(e[0]=r=>te("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx"))},[T(" \u4E0B\u8F7D \xA0 "),Xe])]),S(o,{"popper-class":"select_city",onChange:e[1]||(e[1]=r=>me(t.item)),modelValue:m.value,"onUpdate:modelValue":e[2]||(e[2]=r=>m.value=r),clearable:"",placeholder:"\u5168\u90E8"},{default:w(()=>[(p(!0),k(Z,null,O(L(q).arr,r=>(p(),X(a,{key:r.properties.XZDM,label:r.properties.XZMC,value:r.properties.XZDM},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i("div",{ref_key:"ASdivisionDiv",ref:G,class:"ASdivision"},null,512)]),i("div",{class:"rightFoldDiv",onClick:e[3]||(e[3]=r=>ue())},[S(n,{disabled:!L(x),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:w(()=>[L(x)?(p(),k("img",Ge)):I("v-if",!0)]),_:1},8,["disabled"]),S(n,{disabled:L(x),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:w(()=>[L(x)?I("v-if",!0):(p(),k("img",Qe))]),_:1},8,["disabled"])])]),S(b,{class:"legend",accordion:""},{default:w(()=>[S(A,{name:"1"},{title:w(()=>[T("\u56FE\u4F8B")]),default:w(()=>[i("div",We,[S(h,{modelValue:M.value,"onUpdate:modelValue":e[5]||(e[5]=r=>M.value=r),onChange:t.change},{default:w(()=>[(p(!0),k(Z,null,O(L(B),(r,v,P)=>(p(),X(s,{key:P,style:_e({background:r.color,border:`1px solid ${r.color}`,width:"100%"}),modelValue:t.checked3,"onUpdate:modelValue":e[4]||(e[4]=d=>t.checked3=d),disabled:r.disabled,label:v},null,8,["style","modelValue","disabled","label"]))),128)),I(` ')]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),i("div",$e,[S(je)]),He,i("div",Ue,[Je,i("div",Ye,[(p(!0),k(Z,null,O(L(F),(r,v)=>(p(),k("div",{key:v},[i("p",null,[Ke,T(" : "),i("span",null,we(Number(r.wasteland).toFixed(2))+"(\u4EA9)",1)])]))),128))]),et]),Q.value?(p(),X(E,{key:0,class:"back_button",onClick:e[6]||(e[6]=r=>de())},{default:w(()=>[T("\u8FD4\u56DE")]),_:1})):I("v-if",!0)])}}},ct=be(tt,[["__scopeId","data-v-722f0c81"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/plough/abandonedLand/index.vue"]]);export{ct as default};