import Ae from"./downloads.4cdbbcc5.js";import{_ as ve}from"./linesGL.99030c5a.js";import{_ as Ne,a as Qe,b as Te,c as Ve}from"./position.a021215f.js";import{_ as Ie,a as We}from"./face.2eec3bdc.js";import{K as Y,_ as Je,r as u,D as Me,t as Pe,X as Ye,x as Z,v as $e,M as de,d as q,o as _,c as G,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 Be,y as ce,B as Oe,p as Xe,q as Re}from"./index.db81687b.js";import"./index.e2d056fa.js";import{T as He}from"./TimeLine.5d80dd5c.js";import{u as pe}from"./useEcharts.7cdde45a.js";import{d as fe}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 Y({url:"equipment/nonFood",method:"get",params:v})}function he(v){return Y({url:"equipment/nonFoodChun",method:"get",params:v})}function Ue(v){return Y({url:"equipment/nonFoodHuoChun",method:"get",params:v})}function Ke(v){return Y({url:"equipment/fnYear ",method:"get",params:v})}const z=v=>(Xe("data-v-0cdc57f5"),v=v(),Re(),v),et={class:"center"},tt=z(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),at={class:"rightWra"},ot={class:"rightbottom"},rt={class:"title"},nt=z(()=>i("span",null,"\u975E\u519C\u5316\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),st=z(()=>i("img",{src:Ae,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),lt={class:"rightbottom"},it=z(()=>i("div",{class:"title"},[i("span",null,"\u975E\u519C\u5316\u8015\u5730\u9762\u79EF\u5360\u6BD4")],-1)),ut={key:0,src:ve,alt:""},dt={key:0,class:"imgrotate",src:ve,alt:""},ct={class:"mt-4"},pt={class:"bottom_center"},ft=Oe('
',1),gt={id:"popup",class:"ol-popup"},mt=z(()=>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)),ht={id:"popup-content",style:{padding:"10px"}},vt=z(()=>i("span",null,"\u975E\u519C\u5316",-1)),yt=z(()=>i("div",{id:"popup-pagination"},null,-1)),_t={__name:"index",setup(v){u(null);const $=u(null),B=u(null);let D=Me({arr:[],brr:[],crr:[]}),F=u([]);const y=u("370211");u({info:[]});const ye=u(!1);u(!0);let E=u(!0);const j=u([]);let A=u([]),O=u([]),X=u([]),c=u(""),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=t=>{y.value=="370211"?ee({yearMonth:c.value.name,whetherToDownload:!0}).then(e=>{fe(e.data[e.data.length-1].downloadPath)}):he({divisions:y.value,yearMonth:c.value.name,whetherToDownload:!0}).then(e=>{fe(e.data[e.data.length-1].downloadPath)})};let N={\u975E\u519C\u5316:{color:"rgba(255, 255, 0, 1)",disabled:!1}},b={\u975E\u519C\u5316:{setOf:"2022-09-30-gengdi",name:"T2022_09_30_feinonghua"}},W=u(null);Pe(()=>{qe(),be()});function be(){we(),Ce(),ke();for(const t in N)N[t].disabled!==!0&&A.value.push(t);j.value=A.value}Ye(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"}),Z(()=>c.value,(t,e)=>{y.value=window.localStorage.getItem("divisions"),R?ne(c.value.name):se(y.value,c.value.name);let a=c.value.name.replace(/-/g,"_");b={\u975E\u519C\u5316:{setOf:`${c.value.name}-gengdi`,name:`T${a}_feinonghua`}};for(const o in j.value)oe(b[j.value[o]])});let n=u(null);u(null),u(null);let ae=u(null),J=u(null);function we(){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"})})]}),xe(),Le(),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(R){var l=o[0],d=o[1],m=n.getView(),w=n.getView().getZoom();console.log(l,d),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@huangdaoqu_bianjie","\u6751"):M(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84@huangdaoqu_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 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 g=0;g=13?M(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84@huangdaoqu_bianjie","\u6751"):M(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84@huangdaoqu_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),Se(te)}function Se(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(m){if(m.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(m.result.features);H(m.result.features.features[0].geometry.coordinates,"qu","rgba( 105, 105, 105, 1)",9999);var p=new ol.source.Vector;p.addFeatures(r);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),n.addLayer(L),n.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@huangdaoqu_bianjie",cacheEnabled:!1}),name:"huangdaoqu_village",projection:"EPSG:4326",zIndex:9999}),n.addLayer(W)},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/XJQY3702112019WGS84@huangdaoqu_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 m=document.querySelector("#popup-title"),w=u(null),S=u(null);new ol.supermap.QueryService(s).queryByGeometry(d,function(r){S=n.getLayers().getArray().find(f=>f.get("id")==="zhezhao"),n.removeLayer(S);let p="";if(a=="\u9547"&&r.result.recordsets[0].features.features[0].properties.XJQYDM){let f=r.result.recordsets[0].features.features[0].properties.XJQYDM;y.value=f;let h=[];ee({divisions:"370211",yearMonth:c.value.name}).then(k=>{k.data.forEach(g=>{g.subregionCode==f&&(p=g.subregionName,h.push(g))}),L(),O.value=h})}else if(a=="\u6751"&&r.result.recordsets[0].features.features[0].properties.CJQYDM){let f=r.result.recordsets[0].features.features[0].properties.CJQYDM,h=[];Ue({divisions:f,yearMonth:c.value.name}).then(k=>{k.data.forEach(g=>{g.subregionCode==f&&(p=g.subregionName,console.log(g),h.push(g))}),O.value=h,L()})}function L(){if(r.result.currentCount>0){console.log(r.result.recordsets[0].features),r.result.recordsets[0].features&&(J.setPosition(l.flatCoordinates),console.log(p),m.innerHTML=p),w=n.getLayers().getArray().find(P=>P.get("id")==="dianjigaoliang"),n.removeLayer(w);var f=new ol.format.GeoJSON().readFeatures(r.result.recordsets[0].features);o=r.result.recordsets[0].features.features[0].geometry.coordinates,H(r.result.recordsets[0].features.features[0].geometry.coordinates);var h=new ol.source.Vector;h.addFeatures(f);const g=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:h,zIndex:9999});k.setStyle(g),n.addLayer(k)}}}),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 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]}),n.addOverlay(J)};function Ce(){$e.get("/json/huangdao.json").then(({data:t})=>{const s=new ol.format.GeoJSON().readFeatures(t)[0];H(s.getGeometry().getCoordinates(),"huandao")})}function H(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),m=new ol.Feature({geometry:d});l.getSource().addFeature(m),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,()=>{Ee()}),Z(()=>j.value,(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 Fe(){if(E.value=!E.value,E.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=>{X.value.push({name:a})});let s=c.value.name.replace(/-/g,"_");b={\u975E\u519C\u5316:{setOf:`${c.value.name}-gengdi`,name:`T${s}_feinonghua`}}})},ne=t=>{D.arr=[],F.value=[],ee({yearMonth:t}).then(e=>{console.log(e.data),e.data.forEach(o=>{o.nonFarm>0&&(D.arr.push(o),F.value.push(o))}),D.arr.unshift({subregionCode:"370211",subregionName:"\u5168\u90E8"}),console.log(D.arr);let s=[...e.data],a=[];s.splice(0,1),s.forEach(o=>{a.push(o.subregionCode)}),[...Object.values(a)],le(D.arr),ie()})},se=(t,e)=>{he({divisions:t,yearMonth:e}).then(s=>{F.value=[],s.data.forEach(a=>{a.nonFarm>0&&F.value.push(a)}),le(),ie()})},Ee=()=>{y.value=="370211"?ne(c.value.name):y.value&&se(y.value,c.value.name)},je=t=>{A.value=[];for(const e in N)N[e].disabled!==!0&&A.value.push(e);j.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($.value);F.value.sort((d,m)=>m.nonFarm-d.nonFarm);var e=[],s=[];F.value.forEach(d=>{e.push(d.subregionName),s.push(Number(d.nonFarm).toFixed(2))});let a=3/F.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(255, 255, 0, 1)"},{offset:1,color:"rgba(255, 255, 0, 1)"}])}},label:{show:!0,position:"top",textStyle:{color:"#ffffff"}},data:s,z:0}]};t.on("click",d=>Ge(d)),pe(t,o),ge().listenTo($.value,()=>{de(()=>{t.resize()})})}function ie(){const t=me(B.value);let e=F.value,s=0;e.forEach(l=>{l.name=l.subregionName,l.value=Number(l.nonFarm).toFixed(2),s+=l.nonFarm});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\u519C\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\u519C\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"}}}]}]};pe(t,a),ge().listenTo(B.value,()=>{de(()=>{t.resize()})})}function Ge(t){console.log("\u53F3\u4E0B\u70B9\u51FB",t)}return(t,e)=>{const s=q("el-option"),a=q("el-select"),o=q("el-tooltip"),l=q("el-checkbox"),d=q("el-checkbox-group"),m=q("el-collapse-item"),w=q("el-collapse"),S=q("el-button");return _(),G("div",et,[tt,i("div",at,[i("div",ot,[i("div",rt,[nt,i("p",{onClick:e[0]||(e[0]=r=>_e())},[Q(" \u4E0B\u8F7D \xA0 "),st])]),x(R)?(_(),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:C(()=>[(_(!0),G(U,null,K(x(D).arr,r=>(_(),T(s,{key:r.subregionCode,label:r.subregionName,value:r.subregionCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):V("",!0),i("div",{ref_key:"ASdivisionDiv",ref:$,class:"ASdivision"},null,512)]),i("div",lt,[it,i("div",{ref_key:"typesofDiv",ref:B,class:"typesofDiv"},null,512)]),i("div",{class:"rightFoldDiv",onClick:e[2]||(e[2]=r=>Fe())},[I(o,{disabled:!x(E),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:C(()=>[x(E)?(_(),G("img",ut)):V("",!0)]),_:1},8,["disabled"]),I(o,{disabled:x(E),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:C(()=>[x(E)?V("",!0):(_(),G("img",dt))]),_:1},8,["disabled"])])]),I(w,{class:"legend",accordion:""},{default:C(()=>[I(m,{name:"1"},{title:C(()=>[Q("\u56FE\u4F8B")]),default:C(()=>[i("div",ct,[I(d,{modelValue:j.value,"onUpdate:modelValue":e[3]||(e[3]=r=>j.value=r),onChange:t.change},{default:C(()=>[(_(!0),G(U,null,K(x(N),(r,p,L)=>(_(),T(l,{key:L,"v-model":r.disabled,disabled:r.disabled,label:p},{default:C(()=>[i("span",{style:Be({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(X).length>0?(_(),T(He,{key:0,dataSource:x(X),onDataHandle:je},null,8,["dataSource"])):V("",!0)]),ft,i("div",gt,[mt,i("div",ht,[(_(!0),G(U,null,K(x(O),(r,p)=>(_(),G("div",{key:p},[i("p",null,[vt,Q(" : "),i("span",null,ce(Number(r.nonFarm).toFixed(2))+"(\u4EA9)",1)])]))),128))]),yt]),ye.value?(_(),T(S,{key:0,class:"back_button",onClick:e[4]||(e[4]=r=>t.back())},{default:C(()=>[Q("\u8FD4\u56DE")]),_:1})):V("",!0)])}}},Dt=Je(_t,[["__scopeId","data-v-0cdc57f5"]]);export{Dt as default};