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