import Ge from"./downloads.4cdbbcc5.js";import{_ as he}from"./linesGL.99030c5a.js";import{_ as Ae,a as Ne,b as Qe,c as Te}from"./position.a021215f.js";import{_ as Ie,a as Ve}from"./face.2eec3bdc.js";import{_ as We}from"./icon.d0cb5387.js";import"./index.e2d056fa.js";import{T as Je}from"./TimeLine.5d80dd5c.js";import{u as ue}from"./useEcharts.7cdde45a.js";import{K as P,_ as Me,r as u,D as Pe,t as Ye,X as $e,x as Z,v as Be,M as de,d as F,o as _,c as D,k as i,m as Q,f as x,j as T,w as q,P as U,Q as K,l as I,e as V,I as Oe,y as ce,B as Xe,p as Re,q as He}from"./index.db81687b.js";import{d as pe}from"./download.67ee05d3.js";import{e as ge}from"./element-resize-detector.d8720798.js";import{i as me,L as Ze}from"./install.49294472.js";/* empty css */function ee(v){return P({url:"equipment/nonGrain",method:"get",params:v})}function fe(v){return P({url:"equipment/nonGrainChun",method:"get",params:v})}function Ue(v){return P({url:"equipment/nonGrainHuoChun",method:"get",params:v})}function Ke(v){return P({url:"equipment/flYear ",method:"get",params:v})}const E=v=>(Re("data-v-c8c4500e"),v=v(),He(),v),et={class:"center"},tt=E(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),at={class:"rightWra"},ot={class:"rightbottom"},rt={class:"title"},nt=E(()=>i("span",null,"\u975E\u7CAE\u5316\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),st=E(()=>i("img",{src:Ge,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),lt={class:"rightbottom"},it=E(()=>i("div",{class:"title"},[i("span",null,"\u975E\u7CAE\u5316\u8015\u5730\u9762\u79EF\u5360\u6BD4")],-1)),ut={key:0,src:he,alt:""},dt={key:0,class:"imgrotate",src:he,alt:""},ct={class:"mt-4"},pt={class:"bottom_center"},gt=Xe('
',1),mt={id:"popup",class:"ol-popup"},ft=E(()=>i("div",{class:"pophead",style:{width:"100%"}},[i("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"}}),i("a",{href:"#",id:"popup-closer",class:"ol-popup-closer"})],-1)),ht={id:"popup-content",style:{padding:"10px"}},vt={class:"perform_children"},yt=E(()=>i("img",{src:We},null,-1)),_t=E(()=>i("span",null,"\u975E\u7CAE\u5316",-1)),bt=E(()=>i("div",{id:"popup-pagination"},null,-1)),wt={__name:"index",setup(v){u(null);const Y=u(null),$=u(null);let G=Pe({arr:[],brr:[],crr:[]}),L=u([]);const y=u("370211");u({info:[]});const ve=u(!1);u(!0);let j=u(!0);const z=u([]);let A=u([]),B=u([]),O=u([]),c=u(""),X=!(window.localStorage.getItem("divisions").length>6),te=window.localStorage.getItem("deptName")=="\u9752\u5C9B\u897F\u6D77\u5CB8\u65B0\u533A"?"\u9EC4\u5C9B\u533A":window.localStorage.getItem("deptName");const ye=t=>{y.value=="370211"?ee({yearMonth:c.value.name,whetherToDownload:!0}).then(e=>{pe(e.data[e.data.length-1].downloadPath)}):fe({divisions:y.value,yearMonth:c.value.name,whetherToDownload:!0}).then(e=>{pe(e.data[e.data.length-1].downloadPath)})};let N={\u975E\u7CAE\u5316:{color:"rgba(47, 236, 56, 0.8)",disabled:!1}},b={\u975E\u7CAE\u5316:{setOf:"2022-09-30-gengdi",name:"T2022_09_30_feilianghua"}},W=u(null);Ye(()=>{_e()});function _e(){qe(),be(),ke(),Le();for(const t in N)N[t].disabled!==!0&&A.value.push(t);z.value=A.value}$e(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"}),Z(()=>c.value,(t,e)=>{y.value=window.localStorage.getItem("divisions"),X?ne(c.value.name):se(y.value,c.value.name);let a=c.value.name.replace(/-/g,"_");b={\u975E\u7CAE\u5316:{setOf:`${c.value.name}-gengdi`,name:`T${a}_feilianghua`}};for(const o in z.value)oe(b[z.value[o]])});let n=u(null);u(null),u(null);let ae=u(null),J=u(null);function be(){var t=document.querySelector(".center"),e=document.getElementById("cesiumContainer");n=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,maxZoom:16.5,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.Tianditu({layerType:"img",key:"1d109683f4d84198e37a38c442d68311"})})]}),Se(),xe(),n.on("moveend",function(a){var o=n.getView().getZoom();o>=13?W.setVisible(!0):W.setVisible(!1)}),n.on("singleclick",function(a){var o=a.coordinate;if(X){var l=o[0],d=o[1],f=n.getView(),w=n.getView().getZoom();f.animate({center:[l,d],duration:1e3}),w>=13?M(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie","\u6751"):M(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie","\u9547")}else{let S="http://36.134.44.75:8090/iserver/services/data-huangdaoqu_bianjie/rest/data",r=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:"XJQY3702112019WGS84@huangdaoqu_bianjie",attributeFilter:`XJQYMC = '${te}'`},datasetNames:["huangdaoqu_bianjie:XJQY3702112019WGS84"]});new ol.supermap.FeatureService(S).getFeaturesBySQL(r,function(p){let k=new ol.format.GeoJSON().readFeatures(p.result.features),g=new ol.source.Vector;g.addFeatures(k);let C=new ol.layer.Vector({source:g}).getSource().getFeatures();for(var m=0;m=13?M(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie","\u6751"):M(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie","\u9547")}})}});var s=new ResizeObserver(function(a){a.forEach(function(o){var l=o.contentRect.width,d=o.contentRect.height;e.style.width=l+"px",e.style.height=d+"px",n.updateSize()})});s.observe(t),we(te)}function we(t){let e="",s="",a="",o="",l="";s="http://36.134.44.75:8090/iserver/services/data-huangdaoqu_bianjie/rest/data",e=t,a="XJQY3702112019WGS84",o="huangdaoqu_bianjie",l="XJQYMC";var d=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:`${a}@${o}`,attributeFilter:`${l} like '%${e}%'`},datasetNames:[`${o}:${a}`]});new ol.supermap.FeatureService(s).getFeaturesBySQL(d,function(f){if(f.result.featureCount!=0){var w=n.getLayers().getArray().find(h=>h.get("id")==="zhezhao");n.removeLayer(w);var S=n.getLayers().getArray().find(h=>h.get("id")==="dianjigaoliang");n.removeLayer(S);var r=new ol.format.GeoJSON().readFeatures(f.result.features);R(f.result.features.features[0].geometry.coordinates,"qu","rgba( 105, 105, 105, 1)",9999);var p=new ol.source.Vector;p.addFeatures(r);const g=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var k=new ol.layer.Vector({id:"dianjigaoliang",source:p});k.setStyle(g),n.addLayer(k),n.getView().fit(p.getExtent())}})}const Se=()=>{W=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(W)},xe=()=>{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/XJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),projection:"EPSG:4326",zIndex:9999});n.addLayer(t)},oe=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"});n.addLayer(e)};function M(t,e,s,a){let o=[];var l=new ol.geom.Point(t.coordinate),d=new ol.supermap.QueryByGeometryParameters({queryParams:{name:e},geometry:l});let f=document.querySelector("#popup-title"),w=u(null),S=u(null);new ol.supermap.QueryService(s).queryByGeometry(d,function(r){S=n.getLayers().getArray().find(g=>g.get("id")==="zhezhao"),n.removeLayer(S);let p="";if(a=="\u9547"&&r.result.recordsets[0].features.features[0].properties.XJQYDM){let g=r.result.recordsets[0].features.features[0].properties.XJQYDM;y.value=g;let h=[];ee({divisions:"370211",yearMonth:c.value.name}).then(C=>{C.data.forEach(m=>{m.subregionCode==g&&(p=m.subregionName,h.push(m))}),k(),B.value=h})}else if(a=="\u6751"&&r.result.recordsets[0].features.features[0].properties.CJQYDM){let g=r.result.recordsets[0].features.features[0].properties.CJQYDM,h=[];Ue({divisions:g,yearMonth:c.value.name}).then(C=>{C.data.forEach(m=>{m.subregionCode==g&&(p=m.subregionName,console.log(m),h.push(m))}),B.value=h,k()})}function k(){if(r.result.currentCount>0){console.log(r.result.recordsets[0].features),r.result.recordsets[0].features&&(J.setPosition(l.flatCoordinates),console.log(p),f.innerHTML=p),w=n.getLayers().getArray().find(H=>H.get("id")==="dianjigaoliang"),n.removeLayer(w);var g=new ol.format.GeoJSON().readFeatures(r.result.recordsets[0].features);o=r.result.recordsets[0].features.features[0].geometry.coordinates,R(r.result.recordsets[0].features.features[0].geometry.coordinates);var h=new ol.source.Vector;h.addFeatures(g);const m=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var C=new ol.layer.Vector({id:"dianjigaoliang",source:h,zIndex:9999});C.setStyle(m),n.addLayer(C)}}}),ae.addEventListener("click",function(){S=n.getLayers().getArray().find(r=>r.get("id")==="zhezhao"),n.removeLayer(S),re(o),y.value=window.localStorage.getItem("divisions"),w=n.getLayers().getArray().find(r=>r.get("id")==="dianjigaoliang"),n.removeLayer(w),J.setPosition(void 0)})}const Le=()=>{document.getElementById("popup"),document.getElementById("popup-content"),ae=document.getElementById("popup-closer"),J=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),n.addOverlay(J)};function ke(){Be.get("/json/huangdao.json").then(({data:t})=>{const s=new ol.format.GeoJSON().readFeatures(t)[0];R(s.getGeometry().getCoordinates(),"huandao")})}function R(t,e,s,a){let o=new ol.source.Vector;var l=new ol.layer.Vector({id:e||"zhezhao",source:o,zIndex:a||50,style:new ol.style.Style({fill:new ol.style.Fill({color:s||"rgba( 105, 105, 105, 0.9)"})})});const d=re(t),f=new ol.Feature({geometry:d});l.getSource().addFeature(f),n.addLayer(l)}function re(t){console.log(t);const e=[-180,-90,180,90],s=ol.geom.Polygon.fromExtent(e),a=t;return console.log(a),a.forEach(o=>{const l=new ol.geom.LinearRing(o[0]);s.appendLinearRing(l)}),s}Z(()=>y.value,()=>{Fe()}),Z(()=>z.value,(t,e)=>{console.log(t,e),t.length>e.length?t.filter(a=>{if(e.findIndex(l=>l===a)<0)return a}).forEach(a=>{b[a]&&(console.log(b[a]),oe(b[a]))}):t.length{if(t.findIndex(l=>l===a)<0)return a}).forEach(a=>{b[a]&&(n.getLayers().getArray().indexOf(b[a].name),console.log(n.getLayers().getArray()),n.getLayers().getArray().forEach((o,l)=>{o.A.name&&o.A.name==b[a].name&&n.getLayers().removeAt(l)}))})});function Ce(){if(j.value=!j.value,j.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 qe=()=>{Ke().then(t=>{c.value={name:t.data[0]},t.data.forEach(a=>{O.value.push({name:a})});let s=c.value.name.replace(/-/g,"_");b={\u975E\u7CAE\u5316:{setOf:`${c.value.name}-gengdi`,name:`T${s}_feilianghua`}}})},ne=t=>{G.arr=[],L.value=[],ee({yearMonth:t}).then(e=>{console.log(e.data),e.data.forEach(o=>{o.farm>0&&(G.arr.push(o),L.value.push(o))}),G.arr.unshift({subregionCode:"370211",subregionName:"\u5168\u90E8"}),console.log(G.arr);let s=[...e.data],a=[];s.splice(0,1),s.forEach(o=>{a.push(o.subregionCode)}),[...Object.values(a)],le(G.arr),ie()})},se=(t,e)=>{fe({divisions:t,yearMonth:e}).then(s=>{L.value=[],s.data.forEach(a=>{a.farm>0&&L.value.push(a)}),le(),ie()})},Fe=()=>{y.value=="370211"?ne(c.value.name):y.value&&se(y.value,c.value.name)},Ee=t=>{A.value=[];for(const e in N)N[e].disabled!==!0&&A.value.push(e);z.value=A.value;for(const e in b)n.getLayers().getArray().forEach((s,a)=>{s.A.name==b[e].name&&n.getLayers().removeAt(a)});c.value=t};function le(){const t=me(Y.value);console.log(L.value),L.value.sort((d,f)=>f.farm-d.farm);var e=[],s=[];L.value.forEach(d=>{e.push(d.subregionName),s.push(Number(d.farm).toFixed(2))});let a=3/L.value.length*100;var o={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:a,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:e,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:"#fff"}}},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:"#fff",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 Ze(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:s,z:0}]};t.on("click",d=>ChartClickRB(d)),ue(t,o),ge().listenTo(Y.value,()=>{de(()=>{t.resize()})})}function ie(){const t=me($.value);let e=L.value,s=0;e.forEach(l=>{l.name=l.subregionName,l.value=Number(l.farm).toFixed(2),s+=l.farm});let a={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:`${s.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:e},{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"}}}]}]};ue(t,a),ge().listenTo($.value,()=>{de(()=>{t.resize()})})}return(t,e)=>{const s=F("el-option"),a=F("el-select"),o=F("el-tooltip"),l=F("el-checkbox"),d=F("el-checkbox-group"),f=F("el-collapse-item"),w=F("el-collapse"),S=F("el-button");return _(),D("div",et,[tt,i("div",at,[i("div",ot,[i("div",rt,[nt,i("p",{onClick:e[0]||(e[0]=r=>ye())},[Q(" \u4E0B\u8F7D \xA0 "),st])]),x(X)?(_(),T(a,{key:0,"popper-class":"select_city",modelValue:y.value,"onUpdate:modelValue":e[1]||(e[1]=r=>y.value=r),clearable:"",placeholder:"\u5168\u90E8"},{default:q(()=>[(_(!0),D(U,null,K(x(G).arr,r=>(_(),T(s,{key:r.subregionCode,label:r.subregionName,value:r.subregionCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):I("",!0),i("div",{ref_key:"ASdivisionDiv",ref:Y,class:"ASdivision"},null,512)]),i("div",lt,[it,i("div",{ref_key:"typesofDiv",ref:$,class:"typesofDiv"},null,512)]),i("div",{class:"rightFoldDiv",onClick:e[2]||(e[2]=r=>Ce())},[V(o,{disabled:!x(j),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:q(()=>[x(j)?(_(),D("img",ut)):I("",!0)]),_:1},8,["disabled"]),V(o,{disabled:x(j),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:q(()=>[x(j)?I("",!0):(_(),D("img",dt))]),_:1},8,["disabled"])])]),V(w,{class:"legend",accordion:""},{default:q(()=>[V(f,{name:"1"},{title:q(()=>[Q("\u56FE\u4F8B")]),default:q(()=>[i("div",ct,[V(d,{modelValue:z.value,"onUpdate:modelValue":e[3]||(e[3]=r=>z.value=r),onChange:t.change},{default:q(()=>[(_(!0),D(U,null,K(x(N),(r,p,k)=>(_(),T(l,{key:k,"v-model":r.disabled,disabled:r.disabled,label:p},{default:q(()=>[i("span",{style:Oe({background:r.color,border:`1px solid ${r.color}`,width:"10px",height:"10px",display:"flex","margin-right":"5px"})},null,4),Q(" "+ce(p),1)]),_:2},1032,["v-model","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),i("div",pt,[x(O).length>0?(_(),T(Je,{key:0,dataSource:x(O),onDataHandle:Ee},null,8,["dataSource"])):I("",!0)]),gt,i("div",mt,[ft,i("div",ht,[(_(!0),D(U,null,K(x(B),(r,p)=>(_(),D("div",{class:"perform",key:p},[i("div",vt,[yt,_t,Q(" : "),i("span",null,ce(Number(r.farm).toFixed(2))+"(\u4EA9)",1)])]))),128))]),bt]),ve.value?(_(),T(S,{key:0,class:"back_button",onClick:e[4]||(e[4]=r=>t.back())},{default:q(()=>[Q("\u8FD4\u56DE")]),_:1})):I("",!0)])}}},Qt=Me(wt,[["__scopeId","data-v-c8c4500e"]]);export{Qt as default};