import{H as G,_ as Se,r as c,A as ke,V as Ce,U as Y,d as w,o as p,c as C,l as s,m as I,e as D,w as x,L as Q,N as J,f as v,k as M,g as W,F as Le,x as Ee,y as Fe,p as ze,q as De}from"./index.955aa49e.js";import Ae from"./downloads.4cdbbcc5.js";import{_ as ne}from"./close1.45635d81.js";import{_ as Ve,a as qe,b as je,c as Ne}from"./position.a021215f.js";import{_ as Te,a as Ie}from"./TimeLine.vue_vue_type_style_index_0_scoped_26e8a223_lang.891b9335.js";import{_ as Me}from"./icon.d0cb5387.js";import"./index.6098b0aa.js";import"./linesGL.306b5757.js";import{T as We}from"./TimeLine.c55795b7.js";import{u as oe}from"./useEcharts.586cdb9c.js";import{i as ae,L as Ge}from"./install.6cb28b74.js";function re(d){return G({url:"equipment/nonFood",method:"get",params:d})}function Be(d){return G({url:"equipment/nonFoodChun",method:"get",params:d})}function Pe(d){return G({url:"equipment/nonFoodHuoChun",method:"get",params:d})}function Re(d){return G({url:"equipment/flYear ",method:"get",params:d})}const S=d=>(ze("data-v-8f171897"),d=d(),De(),d),Ye={class:"center"},Qe=S(()=>s("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),Je={class:"rightWra"},Oe={class:"rightbottom"},$e={class:"title"},He=S(()=>s("span",null,"\u975E\u7CAE\u5316\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),Ue=S(()=>s("img",{src:Ae,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Xe={class:"rightbottom"},Ze=S(()=>s("div",{class:"title"},[s("span",null,"\u975E\u7CAE\u5316\u8015\u5730\u9762\u79EF\u5360\u6BD4")],-1)),Ke={key:0,src:ne,alt:""},et={key:0,class:"imgrotate",src:ne,alt:""},tt={class:"mt-4"},ot={class:"bottom_center"},at=Fe('
',1),rt={id:"popup",class:"ol-popup"},nt=S(()=>s("div",{class:"pophead",style:{width:"100%"}},[s("div",{id:"popup-title",style:{"font-size":"20px","font-weight":"400","letter-spacing":"1px",color:"rgba(246, 255, 255, 1)","line-height":"42px","padding-left":"45px"}}),s("a",{href:"#",id:"popup-closer",class:"ol-popup-closer"})],-1)),lt={id:"popup-content",style:{padding:"10px"}},st={class:"perform_children"},it=S(()=>s("img",{src:Me},null,-1)),ct=S(()=>s("span",null,"\u975E\u7CAE\u5316",-1)),dt=S(()=>s("div",{id:"popup-pagination"},null,-1)),ut={__name:"index",setup(d){c(null);const O=c(null),$=c(null);let L=ke({arr:[],brr:[],crr:[]}),g=c([]);const h=c("370211");c({info:[]});const le=c(!1);c(!0);let k=c(!0);const q=c([]);let H=c([]),B=c([]),P=c([]),A=c("");const se=e=>{ie(e)},ie=e=>{let t=document.createElement("a");t.style.display="none",t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)};let R={\u975E\u7CAE\u5316:{color:"rgba(47, 236, 56, 0.8)",disabled:!1}},E={\u975E\u7CAE\u5316:{setOf:"2022-06-01-gengdi",name:"T2022_06_01_feilianghua"}},j=c(null);Ce(()=>{ce()});function ce(){ve(),de(),me();for(const e in R)R[e].disabled!==!0&&H.value.push(e);q.value=H.value}Y(()=>A.value,(e,t)=>{h.value="370211",K(A.value.name)});let n=c(null);c(null),c(null);let U=c(null),N=c(null);function de(){var e=document.querySelector(".center"),t=document.getElementById("cesiumContainer");n=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"})})]}),ue(),pe(),n.on("moveend",function(o){var a=n.getView().getZoom();a>=13?j.setVisible(!0):j.setVisible(!1)}),n.on("singleclick",function(o){var a=o.coordinate,i=a[0],f=a[1],V=n.getView(),y=n.getView().getZoom();console.log(i,f),V.animate({center:[i,f],duration:1e3}),y>=13?X(o,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie","\u6751"):X(o,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie","\u9547")});var l=new ResizeObserver(function(o){o.forEach(function(a){var i=a.contentRect.width,f=a.contentRect.height;t.style.width=i+"px",t.style.height=f+"px",n.updateSize()})});l.observe(e)}const ue=()=>{j=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"huangdaoqu_village",projection:"EPSG:4326",zIndex:9999}),n.addLayer(j)},pe=()=>{var e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),projection:"EPSG:4326",zIndex:9999});n.addLayer(e)},fe=e=>{let t=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+`/map-${e.setOf}/rest/maps/${e.name}@${e.setOf}`,cacheEnabled:!1}),name:e.name,projection:"EPSG:4326"});n.addLayer(t)};function X(e,t,l,o){let a=[];var i=new ol.geom.Point(e.coordinate),f=new ol.supermap.QueryByGeometryParameters({queryParams:{name:t},geometry:i});let V=document.querySelector("#popup-title"),y=c(null),F=c(null);new ol.supermap.QueryService(l).queryByGeometry(f,function(r){F=n.getLayers().getArray().find(u=>u.get("id")==="zhezhao"),n.removeLayer(F);let _="";if(o=="\u9547"&&r.result.recordsets[0].features.features[0].properties.XJQYDM){let u=r.result.recordsets[0].features.features[0].properties.XJQYDM;h.value=u;let b=[];re().then(z=>{z.data.forEach(m=>{m.subregionCode==u&&(_=m.subregionName,b.push(m))}),T(),B.value=b})}else if(o=="\u6751"&&r.result.recordsets[0].features.features[0].properties.CJQYDM){let u=r.result.recordsets[0].features.features[0].properties.CJQYDM,b=[];Pe({divisions:u,yearMonth:"2023-05"}).then(z=>{z.data.forEach(m=>{m.subregionCode==u&&(_=m.subregionName,console.log(m),b.push(m))}),B.value=b,T()})}function T(){if(r.result.currentCount>0){console.log(r.result.recordsets[0].features),r.result.recordsets[0].features&&(N.setPosition(i.flatCoordinates),console.log(_),V.innerHTML=_),y=n.getLayers().getArray().find(xe=>xe.get("id")==="dianjigaoliang"),n.removeLayer(y);var u=new ol.format.GeoJSON().readFeatures(r.result.recordsets[0].features);a=r.result.recordsets[0].features.features[0].geometry.coordinates,ge(r.result.recordsets[0].features.features[0].geometry.coordinates);var b=new ol.source.Vector;b.addFeatures(u);const m=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:b,zIndex:9999});z.setStyle(m),n.addLayer(z)}}}),U.addEventListener("click",function(){F=n.getLayers().getArray().find(r=>r.get("id")==="zhezhao"),n.removeLayer(F),Z(a),h.value="370211",y=n.getLayers().getArray().find(r=>r.get("id")==="dianjigaoliang"),n.removeLayer(y),N.setPosition(void 0)})}const me=()=>{document.getElementById("popup"),document.getElementById("popup-content"),U=document.getElementById("popup-closer"),N=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),n.addOverlay(N)};function ge(e){let t=new ol.source.Vector;var l=new ol.layer.Vector({id:"zhezhao",source:t,style:new ol.style.Style({fill:new ol.style.Fill({color:"rgba( 105, 105, 105, 0.9)"})})});const o=Z(e),a=new ol.Feature({geometry:o});l.getSource().addFeature(a),n.addLayer(l)}function Z(e){console.log(e);const t=[-180,-90,180,90],l=ol.geom.Polygon.fromExtent(t),o=e;return console.log(o),o.forEach(a=>{const i=new ol.geom.LinearRing(a[0]);l.appendLinearRing(i)}),l}Y(()=>h.value,()=>{_e()}),Y(()=>q.value,(e,t)=>{e.length>t.length?e.filter(o=>{if(t.findIndex(i=>i===o)<0)return o}).forEach(o=>{E[o]&&(console.log(E[o]),fe(E[o]))}):e.length{if(e.findIndex(i=>i===o)<0)return o}).forEach(o=>{E[o]&&(n.getLayers().getArray().indexOf(E[o].name),console.log(n.getLayers().getArray()),n.getLayers().getArray().forEach((a,i)=>{a.A.name&&a.A.name==E[o].name&&n.getLayers().removeAt(i)}))})});function he(){if(k.value=!k.value,k.value){let e=document.querySelector(".rightWra");e.style.transform="translate(0,0)"}else{let e=document.querySelector(".rightWra");e.style.transform="translate(107%,0)"}}const ve=()=>{Re().then(e=>{A.value={name:e.data[0]},e.data.forEach(t=>{P.value.push({name:t})})})},K=e=>{L.arr=[],g.value=[],re({yearMonth:e}).then(t=>{console.log(t.data),t.data.forEach(a=>{a.nonFarm>0&&(L.arr.push(a),g.value.push(a))}),L.arr.unshift({subregionCode:"370211",subregionName:"\u5168\u90E8"}),console.log(L.arr);let l=[...t.data],o=[];l.splice(0,1),l.forEach(a=>{o.push(a.subregionCode)}),[...Object.values(o)],ee(L.arr),te()})},ye=(e,t)=>{g.value=[],Be({divisions:e,yearMonth:t}).then(l=>{l.data.forEach(o=>{o.nonFarm>0&&g.value.push(o)}),ee(),te()})},_e=()=>{h.value=="370211"?K():h.value&&ye(h.value,A.value.name)},be=e=>{A.value=e};function ee(){const e=ae(O.value);console.log(g.value),g.value.sort((i,f)=>f.nonFarm-i.nonFarm);var t=[],l=[];g.value.forEach(i=>{t.push(i.subregionName),l.push(Number(i.nonFarm).toFixed(2))}),console.log(l);let o=3/g.value.length*100;var a={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"},dataZoom:[{type:"slider",width:"40%",zoomLock:!0,top:"90%",start:0,end:o,show:!1,showDataShadow:!1,showDetail:!1,fillerColor:"rgba(64, 158, 255)",borderRadius:"50%",moveHandleSize:0,moveHandleStyle:{},left:"35%",height:12,handleSize:"80%",handleIcon:"path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z",handleStyle:{borderWidth:0,color:"rgba(64, 158, 255)"}},{type:"inside"}],grid:{left:"5%",right:"5%",bottom:"9%",top:"10%",containLabel:!0},xAxis:{data:t,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(\u4EA9)",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 Ge(0,0,0,1,[{offset:0,color:"rgba(47, 236, 56, 1)"},{offset:1,color:"rgba(47, 236, 56, 0.8)"}])}},label:{show:!0,position:"top",textStyle:{color:"#ffffff"}},data:l,z:0}]};e.on("click",i=>we(i)),oe(e,a)}function te(){const e=ae($.value);let t=g.value,l=0;t.forEach(a=>{a.name=a.subregionName,a.value=Number(a.nonFarm).toFixed(2),l+=a.nonFarm});let o={color:["rgba(49, 235, 7, 1)","rgba(84, 170, 255, 1)","rgba(255, 251, 0, 1)","rgba(255, 168, 8, 1)","rgba(255, 0, 255, 1)"],title:{text:"\u975E\u7CAE\u5316\u603B\u9762\u79EF",subtext:`${l.toFixed(2)}\u4EA9`,textStyle:{color:"#f2f2f2",fontSize:14},subtextStyle:{fontSize:14,color:["#ff9d19"]},x:"center",y:"center"},grid:{top:0},tooltip:{trigger:"item",axisPointer:{type:"shadow"},formatter:"{a}
{b} : {c}\u4EA9
\u767E\u5206\u6BD4 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"\u975E\u7CAE\u5316\u9762\u79EF\u5360\u6BD4",data:t},{radius:["50%","54%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1},emphasis:{show:!1}},labelLine:{normal:{show:!1},emphasis:{show:!1}},animation:!1,tooltip:{show:!1},data:[{value:1,itemStyle:{color:"rgba(250,250,250,0.3)"}}]},{name:"\u5916\u8FB9\u6846",type:"pie",clockWise:!1,hoverAnimation:!1,center:["50%","50%"],radius:["85%","85%"],tooltip:{show:!1},label:{normal:{show:!1}},data:[{value:9,name:"",itemStyle:{normal:{borderWidth:2,borderColor:"#0b5263"}}}]}]};oe(e,o)}function we(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const l=w("el-option"),o=w("el-select"),a=w("el-tooltip"),i=w("el-checkbox"),f=w("el-checkbox-group"),V=w("el-collapse-item"),y=w("el-collapse"),F=w("el-button");return p(),C("div",Ye,[Qe,s("div",Je,[s("div",Oe,[s("div",$e,[He,s("p",{onClick:t[0]||(t[0]=r=>se("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx"))},[I(" \u4E0B\u8F7D \xA0 "),Ue])]),D(o,{"popper-class":"select_city",modelValue:h.value,"onUpdate:modelValue":t[1]||(t[1]=r=>h.value=r),clearable:"",placeholder:"\u5168\u90E8"},{default:x(()=>[(p(!0),C(Q,null,J(v(L).arr,r=>(p(),M(l,{key:r.subregionCode,label:r.subregionName,value:r.subregionCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),s("div",{ref_key:"ASdivisionDiv",ref:O,class:"ASdivision"},null,512)]),s("div",Xe,[Ze,s("div",{ref_key:"typesofDiv",ref:$,class:"typesofDiv"},null,512)]),s("div",{class:"rightFoldDiv",onClick:t[2]||(t[2]=r=>he())},[D(a,{disabled:!v(k),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:x(()=>[v(k)?(p(),C("img",Ke)):W("v-if",!0)]),_:1},8,["disabled"]),D(a,{disabled:v(k),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:x(()=>[v(k)?W("v-if",!0):(p(),C("img",et))]),_:1},8,["disabled"])])]),D(y,{class:"legend",accordion:""},{default:x(()=>[D(V,{name:"1"},{title:x(()=>[I("\u56FE\u4F8B")]),default:x(()=>[s("div",tt,[D(f,{modelValue:q.value,"onUpdate:modelValue":t[4]||(t[4]=r=>q.value=r),onChange:e.change},{default:x(()=>[(p(!0),C(Q,null,J(v(R),(r,_,T)=>(p(),M(i,{key:T,style:Le({background:r.color,border:`1px solid ${r.color}`,width:"100%"}),modelValue:e.checked3,"onUpdate:modelValue":t[3]||(t[3]=u=>e.checked3=u),disabled:r.disabled,label:_},null,8,["style","modelValue","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),s("div",ot,[v(P).length>0?(p(),M(We,{key:0,dataSource:v(P),onDataHandle:be},null,8,["dataSource"])):W("v-if",!0)]),at,s("div",rt,[nt,s("div",lt,[(p(!0),C(Q,null,J(v(B),(r,_)=>(p(),C("div",{class:"perform",key:_},[s("div",st,[it,ct,I(" : "),s("span",null,Ee(Number(r.nonFarm).toFixed(2))+"(\u4EA9)",1)])]))),128))]),dt]),le.value?(p(),M(F,{key:0,class:"back_button",onClick:t[5]||(t[5]=r=>e.back())},{default:x(()=>[I("\u8FD4\u56DE")]),_:1})):W("v-if",!0)])}}},St=Se(ut,[["__scopeId","data-v-8f171897"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/plough/Degrain/index.vue"]]);export{St as default};