import{Q as e,_ as a,u as t,r,I as l,x as o,H as n,aa as i,a2 as s,S as u,d,o as c,c as g,l as m,f as h,O as p,K as v,M as f,n as b,e as y,w,m as S,k as x,V as _,W as k,N as L,A as E,F as N,q as z,s as A}from"./index.e5c8b0d6.js";import{_ as j}from"./fh.7489c25e.js";import C from"./downloads.e955445d.js";import{_ as W}from"./qx.88a5ecd3.js";import{_ as $,a as q}from"./zhankaiss.6870329f.js";import{_ as O,a as T,b as M,c as F}from"./position.3b2b2301.js";import{_ as V,a as I}from"./face.d3470a20.js";import{_ as P}from"./dow.b4b83e88.js";import"./index.2809c208.js";import{T as B}from"./TimeLine.89abb5b7.js";import{u as D}from"./useEcharts.31b48034.js";import"./linesGL.76a64914.js";import{d as G}from"./download.57166482.js";import{u as Q,w as J}from"./xlsx.881b8a71.js";import{e as R}from"./element-resize-detector.d4d1cd8d.js";import{ai as Y,aj as U}from"./linkSeriesData.e74eae00.js";/* empty css */import"./browser-detector.d146ab9e.js";function X(a){return e({url:"equipment/areaStatisticsDrought",method:"get",params:a})}function H(a){return e({url:"equipment/proportionOfArea",method:"get",params:a})}function Z(a){return e({url:"equipment/statisticsOfArea",method:"get",params:a})}function K(a){return e({url:"equipment/township",method:"get",params:a})}function ee(a){return e({url:"equipment/administrative",method:"get",params:a})}const ae=e=>(z("data-v-b6bd2ce2"),e=e(),A(),e),te={class:"fatherDiv"},re={class:"centerBox"},le=ae((()=>m("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1))),oe={class:"rightWra"},ne=[ae((()=>m("img",{src:j},null,-1))),ae((()=>m("span",null,"返回",-1)))],ie={class:"tabar"},se={class:"leftTop"},ue={class:"title"},de=ae((()=>m("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),ce=ae((()=>m("span",null,"各干旱等级面积统计",-1))),ge=ae((()=>m("img",{src:C,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1))),me={class:"leftbottom"},he={class:"title"},pe=ae((()=>m("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),ve=ae((()=>m("span",null,"各干旱等级面积占比",-1))),fe=ae((()=>m("img",{src:C,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1))),be={class:"tableDiv"},ye={class:"rightTop"},we={class:"title"},Se=ae((()=>m("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),xe=ae((()=>m("span",null,"各干旱等级面积统计-高标准农田",-1))),_e=ae((()=>m("img",{src:C,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1))),ke={key:0},Le=[ae((()=>m("img",{src:W},null,-1)))],Ee={class:"rightbottom"},Ne={class:"title"},ze=ae((()=>m("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),Ae=ae((()=>m("span",null,"各干旱等级面积统计-行政区划",-1))),je=ae((()=>m("img",{src:C,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1))),Ce=ae((()=>m("img",{src:$},null,-1))),We=ae((()=>m("img",{src:q},null,-1))),$e={class:"bottom_center"},qe=N('
',1),Oe={class:"mt-4"},Te={id:"popup",class:"ol-popup"},Me=ae((()=>m("div",{class:"pophead",style:{width:"100%"}},[m("div",{id:"popup-title",style:{"font-size":"20px","font-weight":"400","letter-spacing":"1px","line-height":"42px","padding-left":"20px","border-radius":"8px",margin:"20px",background:"rgba(100, 195, 164, 0.05)"}}),m("a",{href:"#",id:"popup-closer",class:"ol-popup-closer"})],-1))),Fe={id:"popup-content",style:{padding:"10px"}},Ve={class:"perform_children"},Ie={class:"label"},Pe=ae((()=>m("div",{id:"popup-pagination"},null,-1))),Be={class:"tabulation"},De={class:"searchDiv"},Ge=ae((()=>m("img",{src:P,alt:""},null,-1))),Qe={class:"tableBox"},Je={class:"tableBorder"},Re={key:0,style:{color:"rgba(255, 168, 8, 0.4)","font-weight":"600"}},Ye={key:1,style:{color:"rgba(255, 168, 8, 1)","font-weight":"700"}},Ue={key:2,style:{color:"red","font-weight":"800"}},Xe={key:3},He={key:0,style:{color:"rgba(255, 168, 8, 0.4)","font-weight":"600"}},Ze={key:1,style:{color:"rgba(255, 168, 8, 1)","font-weight":"700"}},Ke={key:2,style:{color:"red","font-weight":"800"}},ea={key:3},aa={class:"example-pagination-block"},ta={class:"chartMode"},ra=a({__name:"Drought",setup(a){const N=t();r(null);const z=r(null),A=r(null),j=r(null);r(null);const C=r(null),W=r("370211");W.value=window.localStorage.getItem("divisions");const $=r(null);let q=l({arr:[],brr:[],crr:[]});r({}),r([]);const O=r(!1);r(!1);let T=r(!1);const M=r(["false"]);let F=r([]),V=r([]),I=r([]),P=r(0),ae=r([]),ra=r(!0),la=r([]);const oa=r(0);let na=r([]),ia=r(""),sa=r([]);r("");let ua=r(""),da=r([]),ca=r(""),ga=r(5),ma=r(!0),ha=r([{"湿润":0,"适宜":0,"轻度干旱":0,"中度干旱":0,"重度干旱":0}]),pa=r([]),va=r(1),fa=r(12);const ba=r(null);let ya=r([]),wa=r(!0),Sa=r(1),xa=r([]),_a="青岛西海岸新区"==window.localStorage.getItem("deptName")?"黄岛区":window.localStorage.getItem("deptName"),ka=r({time:"",statistical:"镇",droughtRating:"",area:oa.value});const La=r([]);let Ea=["2019年高标准农田片区1","2019年高标准农田片区2","2019年高标准农田片区3","2019年高标准农田片区4","2020年高标准农田片区","2021年高标准农田片区","2022年高标准农田片区1","2022年高标准农田片区2","2022年高标准农田片区3","2022年高标准农田片区4","2022年高标准农田片区5","2022年高标准农田片区6","2022年高标准农田片区7"],Na={"轻度干旱":[],"中度干旱":[],"重度干旱":[],"适宜":[],"湿润":[]},za=r({"湿润":{color:"rgba(0, 132, 255, 1)",disabled:!1},"适宜":{color:"rgba(32, 242, 255, 1)",disabled:!1},"轻度干旱":{color:"rgba(255, 255, 0, 1)",disabled:!1},"中度干旱":{color:"rgba(255, 168, 8, 1)",disabled:!1},"重度干旱":{color:"rgba(224, 13, 15, 1)",disabled:!0}});var Aa={title:[]};let ja={"适宜":[],"湿润":[],"轻度干旱":[],"中度干旱":[],"重度干旱":[]},Ca=r([]),Wa={"湿润":{setOf:"2022-12-20-ganhan",name:"T2022_12_20_shirun"},"适宜":{setOf:"2022-12-20-ganhan",name:"T2022_12_20_shiyi"},"轻度干旱":{setOf:"2022-12-20-ganhan",name:"T2022_12_20_qingduganhan"},"中度干旱":{setOf:"2022-12-20-ganhan",name:"T2022_12_20_medium_ganhan"},"重度干旱":{setOf:"2022-12-20-ganhan",name:"T2022_12_20_serious_ganhan"}};o((()=>{!function(){Za(),e=document.querySelector(".centerBox"),a=document.getElementById("cesiumContainer"),qa=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.XYZ({url:`${serverAPI.tiandituLayers}`,projection:serverAPI.flag?"EPSG:4326":"EPSG:3857"}),preload:20})]}),qa.on("moveend",(function(e){qa.getView().getZoom()>=13?$a.setVisible(!0):$a.setVisible(!1)})),qa.on("singleclick",(function(e){var a=e.coordinate;if(Ma){var t=a[0],r=a[1],l=qa.getView(),o=qa.getView().getZoom();l.animate({center:[t,r],duration:1e3});let n=!1;if(["CJQY3702112019WGS84","XJQY3702112019WGS84"].forEach((e=>{qa.getLayers().getArray().forEach(((a,t)=>{e!=a.A.name||(n=!0)}))})),n)o>=13?Fa(e,"CJQY3702112019WGS84@huangdaoqu_bianjie",`${serverAPI.geoserverUrl}/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie`,"村"):Fa(e,"XJQY3702112019WGS84@huangdaoqu_bianjie",`${serverAPI.geoserverUrl}/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie`,"镇");else{let t=`${serverAPI.geoserverUrl}/data-2019-2022gaobiaozhunnongtian/rest/data`,r=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:"T2019_2022高标准农田片区@2019-2022gaobiaozhunnongtian",attributeFilter:`DKMC = '${ua.value}'`},datasetNames:["2019-2022gaobiaozhunnongtian:T2019_2022高标准农田片区"]});new ol.supermap.FeatureService(t).getFeaturesBySQL(r,(function(t){let r=(new ol.format.GeoJSON).readFeatures(t.result.features),l=new ol.source.Vector;l.addFeatures(r);let o=new ol.layer.Vector({source:l}).getSource().getFeatures();for(var n=0;n=13?Fa(e,"CJQY3702112019WGS84@huangdaoqu_bianjie",`${serverAPI.geoserverUrl}/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie`,"村"):Fa(e,"XJQY3702112019WGS84@huangdaoqu_bianjie",`${serverAPI.geoserverUrl}/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie`,"镇")}}))}})),new ResizeObserver((function(e){e.forEach((function(e){var t=e.contentRect.width,r=e.contentRect.height;a.style.width=t+"px",a.style.height=r+"px",qa.updateSize()}))})).observe(e),function(e){let a="",t="",r="",l="",o="";t=`${serverAPI.geoserverUrl}/data-huangdaoqu_bianjie/rest/data`,a=e,r="XJQY3702112019WGS84",l="huangdaoqu_bianjie",o="XJQYMC";var n=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:`${r}@${l}`,attributeFilter:`${o} like '%${a}%'`},datasetNames:[`${l}:${r}`]});new ol.supermap.FeatureService(t).getFeaturesBySQL(n,(function(e){if(e.result&&0!=e.result.featureCount){var a=qa.getLayers().getArray().find((e=>"zhezhao"===e.get("id")));qa.removeLayer(a);var t=qa.getLayers().getArray().find((e=>"dianjigaoliang"===e.get("id")));qa.removeLayer(t);var r=(new ol.format.GeoJSON).readFeatures(e.result.features);Va(e.result.features.features[0].geometry.coordinates,"qu","rgba( 105, 105, 105, 1)",9999);var l=new ol.source.Vector;l.addFeatures(r);const n=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var o=new ol.layer.Vector({id:"dianjigaoliang",source:l});o.setStyle(n),qa.addLayer(o),qa.getView().fit(l.getExtent())}}))}(_a),i.get("/json/huangdao.json").then((({data:e})=>{(new ol.format.GeoJSON).readFeatures(e)[0]})),ut(),mt(),Pa();var e,a;for(const r in za.value)!0!==za.value[r].disabled&&ae.value.push(r);M.value=ae.value;let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(-107%,0)"),document.querySelector(".rightWra").style.transform="translate(101%,0)",localStorage.setItem(N.currentRoute.value.path,!0)}()})),n((()=>{"false"==localStorage.getItem(N.currentRoute.value.path)?(document.querySelector(".mode").style.display="block",document.querySelector(".mode").innerText="地图模式",window.document.querySelector("#screenfull").style.display="none"):(document.querySelector(".mode").style.display="block",document.querySelector(".mode").innerText="列表模式",window.document.querySelector("#screenfull").style.display="block")}));let $a=r(null),qa=r(null);r(null),r(null);let Oa=r(null),Ta=r(null),Ma=!(window.localStorage.getItem("divisions").length>6);function Fa(a,t,l,o){var n=new ol.geom.Point(a.coordinate),i=new ol.supermap.QueryByGeometryParameters({queryParams:{name:t},geometry:n});let s=[],u=document.querySelector("#popup-title"),d=r(null),c=r(null);new ol.supermap.QueryService(l).queryByGeometry(i,(function(a){let t="";if(c=qa.getLayers().getArray().find((e=>"zhezhao"===e.get("id"))),qa.removeLayer(c),"镇"==o&&a.result.recordsets[0].features.features[0].properties.XJQYDM){let e=a.result.recordsets[0].features.features[0].properties.XJQYDM;W.value=e;let r=[];K({divisions:"370211",yearMonth:ia.value.name}).then((a=>{a.data.forEach((a=>{a.streetCode==e&&(t=a.streetName,r.push(a))}));let o=[];o.push(r[1]),o.push(r[2]),o.push(r[0]),o.push(r[3]),o.push(r[4]),sa.value=o,l()}))}else if("村"==o&&a.result.recordsets[0].features.features[0].properties.CJQYDM){let o=a.result.recordsets[0].features.features[0].properties.CJQYDM,n=[];(r={divisions:o,yearMonth:ia.value.name},e({url:"equipment/administrativeChun",method:"get",params:r})).then((e=>{e.data.forEach((e=>{t=e.streetName,n.push(e)})),t=e.data[0].streetName,sa.value=n,l()}))}else if("高标准"==o&&a.result.recordsets[0].features.features[0].properties.DKMC){let e=a.result.recordsets[0].features.features[0].properties.DKMC,r=[];Z({divisions:"370211",yearMonth:ia.value.name}).then((a=>{a.data.forEach((a=>{a.region==e&&r.push(a)})),r.forEach((e=>{e.type=e.level})),sa.value=r,t=e,l()}))}var r;function l(){if(a.result.currentCount>0){a.result.recordsets[0].features&&(Ta.setPosition(n.flatCoordinates),u.innerHTML=t),d=qa.getLayers().getArray().find((e=>"dianjigaoliang"===e.get("id"))),qa.removeLayer(d);var e=(new ol.format.GeoJSON).readFeatures(a.result.recordsets[0].features);s=a.result.recordsets[0].features.features[0].geometry.coordinates,Va(a.result.recordsets[0].features.features[0].geometry.coordinates);var r=new ol.source.Vector;r.addFeatures(e);const o=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var l=new ol.layer.Vector({id:"dianjigaoliang",source:r,zIndex:9999});l.setStyle(o),qa.addLayer(l)}}})),Oa.addEventListener("click",(function(){let e=qa.getLayers().getArray().find((e=>"zhezhao"===e.get("id")));qa.removeLayer(e),Ia(s),W.value=window.localStorage.getItem("divisions"),d=qa.getLayers().getArray().find((e=>"dianjigaoliang"===e.get("id"))),qa.removeLayer(d),Ta.setPosition(void 0)}))}function Va(e,a,t,r){let l=new ol.source.Vector;var o=new ol.layer.Vector({id:a||"zhezhao",source:l,zIndex:r||50,style:new ol.style.Style({fill:new ol.style.Fill({color:t||"rgba( 105, 105, 105, 0.9)"})})});const n=Ia(e),i=new ol.Feature({geometry:n});o.getSource().addFeature(i),qa.addLayer(o)}function Ia(e){const a=ol.geom.Polygon.fromExtent([-180,-90,180,90]);return e.forEach((e=>{const t=new ol.geom.LinearRing(e[0]);a.appendLinearRing(t)})),a}const Pa=()=>{document.getElementById("popup"),document.getElementById("popup-content"),Oa=document.getElementById("popup-closer"),Ta=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),qa.addOverlay(Ta)};const Ba=()=>{$a=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"CJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999}),qa.addLayer($a)},Da=()=>{var e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"XJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999});qa.addLayer(e)},Ga=e=>{let a=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"});qa.addLayer(a)};r({label:[]});const Qa=(e,a="用户列表",t="Sheet1")=>{const r=((e,a)=>e.map((e=>{const t={};for(const r in e)"区域名称"==a[r]&&(t[a[r]]=e[r]);for(const r in e)"湿润 (亩)"==a[r]&&(t[a[r]]=e[r]);for(const r in e)"适宜(亩)"==a[r]&&(t[a[r]]=e[r]);for(const r in e)"轻度干旱(亩)"==a[r]&&(t[a[r]]=e[r]);for(const r in e)"中度干旱(亩)"==a[r]&&(t[a[r]]=e[r]);for(const r in e)"重度干旱(亩)"==a[r]&&(t[a[r]]=e[r]);return t})))(e,{region:"区域名称","湿润":"湿润 (亩)","适宜":"适宜(亩)","轻度干旱":"轻度干旱(亩)","中度干旱":"中度干旱(亩)","重度干旱":"重度干旱(亩)",area:"面积(亩)"}),l=Q.json_to_sheet(r),o=Q.book_new();Q.book_append_sheet(o,l,t),J(o,`${a}.xlsx`)};s((()=>W.value),(()=>{ot()})),s((()=>ia.value),((e,a)=>{W.value=window.localStorage.getItem("divisions"),Ka(W.value,ia.value.name),et(W.value,ia.value.name),at(ia.value.name),Ma?rt(W.value,ia.value.name):lt(W.value,ia.value.name);let t=ia.value.name.replace(/-/g,"_");Wa={"湿润":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_shirun`},"适宜":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_shiyi`},"轻度干旱":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_qingduganhan`},"中度干旱":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_medium_ganhan`},"重度干旱":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_serious_ganhan`}}}));let Ja=0;const Ra=()=>{Sa.value=0};s((()=>M.value),((e,a)=>{if(e.length>=a.length&&Sa.value<1){e.filter((e=>{if(a.findIndex((a=>a===e))<0)return e})).forEach((e=>{Wa[e]&&Ga(Wa[e])}))}else if(e.length{if(e.findIndex((e=>e===a))<0)return a}));t.forEach((e=>{Wa[e]&&(qa.getLayers().getArray().indexOf(Wa[e].name),qa.getLayers().getArray().forEach(((a,t)=>{a.A.name&&a.A.name==Wa[e].name&&qa.getLayers().removeAt(t)})))})),t.forEach((e=>{Wa[e]&&(qa.getLayers().getArray().indexOf(Wa[e].name),qa.getLayers().getArray().forEach(((a,t)=>{a.A.name&&a.A.name==Wa[e].name&&qa.getLayers().removeAt(t)})))}))}Ja++,1==Ja&&(Ba(),Da())}));const Ya=()=>{let a=[],t=[];var r;va.value=1,(r={yearMonth:ka.value.time,statistical:ka.value.statistical,droughtRating:ka.value.droughtRating,area:ka.value.area},e({url:"equipment/listDroughts",method:"get",params:r})).then((e=>{ya.value=[{lable:"",value:"region"},{lable:"湿润",value:"湿润"},{lable:"适宜",value:"适宜"},{lable:"轻度干旱",value:"轻度干旱"},{lable:"中度干旱",value:"中度干旱"},{lable:"重度干旱",value:"重度干旱"}],e.data.forEach((e=>{-1==a.indexOf(e.region)&&a.push(e.region)})),a.forEach((e=>{t.push(Object.create(null,{regio:{value:e}}))})),t.forEach((a=>{e.data.map((e=>{a.regio===e.region&&(a.region=e.region,a[e.level]=Number(e.area).toFixed(2))}))})),wa.value=!1,La.value=t.sort(((e,a)=>e.region.length-a.region.length)),pa.value=t.slice((va.value-1)*fa.value,(va.value-1)*fa.value+fa.value),ha.value[0]["适宜"]=0,ha.value[0]["湿润"]=0,ha.value[0]["轻度干旱"]=0,ha.value[0]["中度干旱"]=0,ha.value[0]["重度干旱"]=0,ha.value[0].region="合计",t.forEach((e=>{e.适宜&&(ha.value[0]["适宜"]+=NaN!==Number(e.适宜)?Number(e.适宜):0),e.湿润&&(ha.value[0]["湿润"]+=NaN!==Number(e.湿润)?Number(e.湿润):0),e.轻度干旱&&(ha.value[0]["轻度干旱"]+=NaN!==Number(e.轻度干旱)?Number(e.轻度干旱):0),e.中度干旱&&(ha.value[0]["中度干旱"]+=NaN!==Number(e.中度干旱)?Number(e.中度干旱):0),e.重度干旱&&(ha.value[0]["重度干旱"]+=NaN!==Number(e.重度干旱)?Number(e.重度干旱):0)}));for(const a in ha.value[0])"合计"!==ha.value[0][a]&&(ha.value[0][a]=ha.value[0][a].toFixed(2));const r=ba.value;r.style.width=window.innerWidth-100+"px",r.style.height=window.innerHeight-100+"px";const l=Y(r);window.addEventListener("resize",(()=>{r.style.width=window.innerWidth-200+"px",r.style.height=window.innerHeight-200+"px",l.resize()})),vt()}))},Ua=()=>{ka.value.time=la.value[la.value.length-1],ka.value.statistical="镇",ka.value.droughtRating="",ka.value.area=0,oa.value=0,wa.value=!0,Ya()};const Xa=e=>{ma.value=e,e?(st(),ut()):(dt(),mt())},Ha=e=>{na.value=xa.value.slice((e-1)*ga.value,e*ga.value)},Za=()=>{e({url:"equipment/listDroughtsYear",method:"get"}).then((e=>{ia.value={name:e.data[e.data.length-1]},la.value=e.data;let a=[];e.data.forEach((e=>{a.push({name:e})})),xa.value=a,da.value=Math.ceil(xa.value.length/5),ca=Math.ceil(a.length/5),na.value=xa.value.slice((ca-1)*ga.value,ca*ga.value),ka.value.time=e.data[e.data.length-1],Ya();let t=ia.value.name.replace(/-/g,"_");Wa={"湿润":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_shirun`},"适宜":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_shiyi`},"轻度干旱":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_qingduganhan`},"中度干旱":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_medium_ganhan`},"重度干旱":{setOf:`${ia.value.name}-ganhan`,name:`T${t}_serious_ganhan`}}}))},Ka=(e,a)=>{X({divisions:e,yearMonth:a}).then((e=>{F=r([]),V=r([]),e.data.forEach((e=>{F.value.push(e.level),V.value.push(e.area)})),e.data.forEach((e=>{Number(e.area)<1?za.value[e.level].disabled=!0:za.value[e.level].disabled=!1})),st()}))},et=(e,a)=>{let t=r([]);H({divisions:e,yearMonth:a}).then((e=>{I=r([]),P=r(0),e.data.forEach((e=>{P.value+=Number(e.area),I.value.push({name:e.level,value:Number(e.area).toFixed(2)}),t.value.push({date:e.level,name:`${Number(e.area).toFixed(2)}`,address:`${(100*e.percentage).toFixed(2)}%`})})),Ca.value=t.value,ut()}))};r([{}]);const at=e=>{Z({yearMonth:e}).then((e=>{Na={"轻度干旱":[],"中度干旱":[],"重度干旱":[],"适宜":[],"湿润":[]},Ea.forEach(((a,t)=>{let r=e.data.map((e=>{if(a===e.region)return e}));Object.keys(Na).forEach((e=>{let a=0;r.findIndex((t=>(t&&t.level===e&&(a=t.area),t&&t.level===e)))>-1?Na[e].push(a):Na[e].push(0)}))})),e.data.length>0&&dt()}))};let tt=()=>{document.querySelector(".tool").style.display="none",Ba(),$a.setVisible(!1),Da();["2019-2022gaobiaozhunnongtian","gbz","dianjigaoliang","dianjigaoliangs","gao","zhezhao"].forEach((e=>{qa.getLayers().getArray().forEach(((a,t)=>{a.A.name!=e&&a.A.id!=e||qa.getLayers().removeAt(t)}))})),qa.getView().animate({center:["119.88661841637813","35.85667692242919"],duration:1e3,zoom:11})};const rt=(e,a)=>{K({divisions:e,yearMonth:a}).then((e=>{ja={"适宜":[],"湿润":[],"轻度干旱":[],"中度干旱":[],"重度干旱":[]},q.brr=e.data,q.arr=e.data.sort(((e,a)=>e.streetName.length-a.streetName.length)),q.arr.unshift({streetCode:"370211",streetName:"全部"});let a=[],t=[];q.arr.forEach((e=>{-1==a.indexOf(e.streetName)&&(a.push(e.streetName),t.push({streetName:e.streetName,streetCode:e.streetCode,area:e.area,type:e.type}))})),q.arr=t;let r=[...e.data],l=[];r.splice(0,1),r.forEach((e=>{-1==l.indexOf(e.streetName)&&l.push(e.streetName)})),Aa.title=[...Object.values(l)],Aa.title.forEach(((a,t)=>{let r=e.data.map((e=>{if(a===e.streetName)return e}));Object.keys(ja).forEach((e=>{r.findIndex((a=>a&&a.type===e&&Number(a.area)>0))>-1?ja[e].push(1):ja[e].push(null)}))})),mt()}))},lt=(e,a)=>{ee({divisions:e,yearMonth:a}).then((e=>{ja={"适宜":[],"湿润":[],"轻度干旱":[],"中度干旱":[],"重度干旱":[]},q.brr=e.data;let a=[...e.data],t=[];a.forEach((e=>{-1==t.indexOf(e.streetName)&&t.push(e.streetName)})),Aa.title=[...Object.values(t)],Aa.title.forEach(((a,t)=>{let r=e.data.map((e=>{if(a===e.streetName)return e}));Object.keys(ja).forEach((e=>{r.findIndex((a=>a&&a.type===e&&a.area>0))>-1?ja[e].push(1):ja[e].push(null)}))})),mt()}))},ot=()=>{"370211"==W.value?(rt(W.value,ia.value.name),Ka(W.value,ia.value.name),et(W.value,ia.value.name)):(lt(W.value,ia.value.name),Ka(W.value,ia.value.name),et(W.value,ia.value.name))},nt=()=>{let e=JSON.parse(JSON.stringify(ha.value[0]));e.region="合计",La.value.push(e),Qa(La.value,"干旱面积统计表","Sheet1")},it=e=>{for(const t in Wa)qa.getLayers().getArray().forEach(((e,a)=>{e.A.name&&Wa[t].name==e.A.name&&qa.getLayers().removeAt(a)}));Sa.value+=1,ae.value=[];let a=[];for(const t in Wa)qa.getLayers().getArray().forEach(((e,a)=>{e.A.name==Wa[t].name&&qa.getLayers().removeAt(a)}));ia.value=e,X({divisions:"370211",yearMonth:ia.value.name}).then((e=>{e.data.forEach((e=>{Number(e.area)>1?za.value[e.level].disabled=!1:za.value[e.level].disabled=!0,a=za}));for(const t in a.value)!0!==a.value[t].disabled&&ae.value.push(t);M.value=ae.value,M.value.forEach((e=>{Ga(Wa[e])}))}))};function st(){const e=Y(z.value);var a={textStyle:{fontSize:0},grid:{top:"15%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!0,top:"5%",data:["面积"],right:"5%",icon:"rect",textStyle:{fontSize:14,color:"rgba(153, 153, 153, 1)"}},xAxis:{nameTextStyle:{color:"#c0c3cd",padding:[0,0,-10,0],fontSize:14},axisLabel:{color:"rgba(153, 153, 153, 1)",fontWeight:400,fontFamily:"SourceHanSansCN-Regular, SourceHanSansCN",fontSize:14},axisTick:{lineStyle:{color:"#0B1535",width:1},show:!1},splitLine:{show:!1},axisLine:{lineStyle:{color:"#384267",width:1,type:"dashed"},show:!0},data:F.value,type:"category"},yAxis:{name:"面积(亩)",nameTextStyle:{color:"rgba(153, 153, 153, 1)",fontSize:14},type:"value",axisLabel:{color:"rgba(153, 153, 153, 1)"},splitLine:{lineStyle:{type:"dashed"}},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{data:V.value,name:"面积",type:"bar",barMaxWidth:"auto",barWidth:35,itemStyle:{color:{x:0,y:0,x2:0,y2:1,type:"linear",global:!1,colorStops:[{offset:0,color:"rgba(33, 156, 249, 1)"},{offset:1,color:"rgba(110, 191, 251, 1)"}]}},label:{normal:{show:!1,fontSize:14,color:"#ffffff",position:"top"}}}]};a&&e.setOption(a),R().listenTo(z.value,(()=>{u((()=>{e.resize()}))}))}function ut(){const e=Y(A.value);var a=I.value;let t={color:["rgba(0, 132, 255, 1)","rgba(32, 242, 255, 1)","rgba(255, 255, 0, 1)","rgba(255, 168, 8, 1)","rgba(224, 13, 15, 1)"],title:{text:"总面积",subtext:`${(P.value/1e4).toFixed(2)}万亩`,textStyle:{color:"rgba(51, 51, 51, 1)",fontSize:14},subtextStyle:{fontSize:14,color:["#ff9d19"]},x:"center",y:"center"},grid:{top:0},legend:{orient:"vertical",top:"middle",right:"2%",textStyle:{color:"black",fontSize:14},icon:"roundRect",data:a},tooltip:{trigger:"item",axisPointer:{type:"shadow"},formatter:"{a}
{b} : {c}亩
百分比 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"各干旱等级面积占比",data:a},{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)"}}]}]};D(e,t),R().listenTo(A.value,(()=>{u((()=>{e.resize()}))}))}function dt(){const e=Y(j.value);let a={title:{text:"",subtext:""},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"15%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:{type:"category",data:Ea,axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)",width:1,type:"solid"}},axisLabel:{color:"rgba(153, 153, 153, 1)",fontWeight:400,fontFamily:"SourceHanSansCN-Regular, SourceHanSansCN",fontSize:14}},yAxis:{name:"面积(亩)",nameTextStyle:{color:"rgba(153, 153, 153, 1)",fontSize:14},type:"value",axisLabel:{color:"rgba(153, 153, 153, 1)"},splitLine:{lineStyle:{type:"dashed",color:"rgba(235, 238, 245, 1)"},show:!0},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"湿润",type:"bar",barWidth:14,stack:"数量",data:Na.湿润,itemStyle:{normal:{borderWidth:1,color:new U(0,0,0,1,[{offset:0,color:"rgba(0, 132, 255, 1)"},{offset:1,color:"rgba(0, 132, 255, 1)"}])}}},{name:"适宜",type:"bar",barWidth:14,stack:"数量",data:Na.适宜,itemStyle:{normal:{borderWidth:1,color:new U(0,0,0,1,[{offset:0,color:"rgba(32, 242, 255, 1)"},{offset:1,color:"rgba(32, 242, 255, 1)"}])}}},{name:"轻度干旱",type:"bar",barWidth:14,stack:"数量",data:Na.轻度干旱,itemStyle:{normal:{borderWidth:1,color:new U(0,0,0,1,[{offset:0,color:"rgba(255, 255, 0, 1)"},{offset:1,color:"rgba(255, 255, 0, 1)"}])}}},{name:"中度干旱",type:"bar",barWidth:14,stack:"数量",data:Na.中度干旱,itemStyle:{normal:{borderWidth:1,color:new U(0,0,0,1,[{offset:0,color:"rgba(255, 168, 8, 1)"},{offset:1,color:"rgba(255, 168, 8, 1)"}])}}},{name:"重度干旱",type:"bar",barWidth:14,stack:"数量",data:Na.重度干旱,itemStyle:{normal:{borderWidth:1,color:new U(0,0,0,1,[{offset:0,color:"rgba(224, 13, 15, 1)"},{offset:1,color:"rgba(224, 13, 15, 1)"}])}}}]};e.off("click"),e.on("click",(function(e){var a=window.location.host;if(!/^(([-\u4E00-\u9FA5a-z0-9]{1,63})\.)+([\u4E00-\u9FA5a-z]{2,63})\.?$/.test(a)){document.querySelector(".tool").style.display="block",ua.value=e.name;let a=["XJQY3702112019WGS84","CJQY3702112019WGS84"];!function(e){let a="",t="",r="",l="",o="";t=`${serverAPI.geoserverUrl}/data-2019-2022gaobiaozhunnongtian/rest/data`,a=e,r="T2019_2022高标准农田片区",l="2019-2022gaobiaozhunnongtian",o="DKMC";var n=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:`${r}@${l}`,attributeFilter:`DKMC like '%${a}%'`},datasetNames:[`${l}:${r}`]});new ol.supermap.FeatureService(t).getFeaturesBySQL(n,(function(e){if(e.result.featureCount&&0!=e.result.featureCount){var a=qa.getLayers().getArray().find((e=>"zhezhao"===e.get("id")));qa.removeLayer(a);var t=qa.getLayers().getArray().find((e=>"dianjigaoliang"===e.get("id")));qa.removeLayer(t);var r=qa.getLayers().getArray().find((e=>"gbz"===e.get("id")));qa.removeLayer(r);var l=qa.getLayers().getArray().find((e=>"dianjigaoliangs"===e.get("id")));qa.removeLayer(l);var o=(new ol.format.GeoJSON).readFeatures(e.result.features);Va(e.result.features.features[0].geometry.coordinates,"gbz","rgba( 105, 105, 105, 1)",9999);var n=new ol.source.Vector;n.addFeatures(o);const s=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var i=new ol.layer.Vector({id:"dianjigaoliang",source:n});i.setStyle(s),qa.addLayer(i),qa.getView().fit(n.getExtent())}}))}(e.name),a.forEach((e=>{qa.getLayers().getArray().forEach(((a,t)=>{a.A.name==e&&qa.getLayers().removeAt(t)}))})),["2019-2022gaobiaozhunnongtian","gbz","dianjigaoliang","dianjigaoliangs"].forEach((e=>{qa.getLayers().getArray().forEach(((a,t)=>{a.A.name!=e&&a.A.id!=e||qa.getLayers().removeAt(t)}))})),$a=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:`${serverAPI.geoserverUrl}/map-2019-2022gaobiaozhunnongtian/rest/maps/T2019_2022%E9%AB%98%E6%A0%87%E5%87%86%E5%86%9C%E7%94%B0%E7%89%87%E5%8C%BA@2019-2022gaobiaozhunnongtian`,cacheEnabled:!1}),name:"2019-2022gaobiaozhunnongtian",projection:"EPSG:4326",zIndex:9999}),qa.addLayer($a)}})),a&&e.setOption(a,{notMerge:!0,grid:{bottom:20}}),D(e,a),R().listenTo(j.value,(()=>{u((()=>{e.resize()}))}))}const ct=e=>{va.value=e,pa.value=La.value.slice((va.value-1)*fa.value,(va.value-1)*fa.value+fa.value)},gt=e=>e+1+(va.value-1)*fa.value;function mt(){const e=Y(C.value);var a={grid:{bottom:"8%",left:"10%",right:"6%",top:"12%",containLabel:!0},tooltip:{formatter:function(e){let a=0;return q.brr.forEach((t=>{t.type==e.seriesName&&t.streetName==e.name&&(a=Number(t.area).toFixed(2))})),e.seriesName+''+a+"亩"}},dataZoom:[{type:"slider",show:!1,zoomLock:!0,width:8,yAxisIndex:[0],bottom:30,top:20,right:10,startValue:0,endValue:4,handleIcon:"M-292,322.2c-3.2,0-6.4-0.6-9.3-1.9c-2.9-1.2-5.4-2.9-7.6-5.1s-3.9-4.8-5.1-7.6c-1.3-3-1.9-6.1-1.9-9.3c0-3.2,0.6-6.4,1.9-9.3c1.2-2.9,2.9-5.4,5.1-7.6s4.8-3.9,7.6-5.1c3-1.3,6.1-1.9,9.3-1.9c3.2,0,6.4,0.6,9.3,1.9c2.9,1.2,5.4,2.9,7.6,5.1s3.9,4.8,5.1,7.6c1.3,3,1.9,6.1,1.9,9.3c0,3.2-0.6,6.4-1.9,9.3c-1.2,2.9-2.9,5.4-5.1,7.6s-4.8,3.9-7.6,5.1C-285.6,321.5-288.8,322.2-292,322.2z",handleSize:"100%",handleStyle:{color:"#DBDBDB",height:"100%"},backgroundColor:"transparent",fillerColor:"#DBDBDB",textStyle:{color:"transparent"},dataBackground:{lineStyle:{color:"transparent"},areaStyle:{color:"transparent"}},borderColor:"transparent"},{type:"inside",id:"insideY",yAxisIndex:0,start:0,end:50,zoomOnMouseWheel:!1,moveOnMouseMove:!0,moveOnMouseWheel:!0}],xAxis:{type:"value",axisTick:{show:!1},axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:[{type:"category",axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#cdd3ee"}},splitLine:{show:!1},axisLabel:{show:!0,fontSize:12,color:"rgba(51, 51, 51, 1)",formatter:"{value}"},data:Aa.title,inverse:!0}],series:[{type:"bar",name:"湿润",stack:"总量",barMaxWidth:30,label:{show:!1,position:"湿润",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(0, 132, 255, 1)"},{offset:1,color:"rgba(0, 132, 255, 1)"}]}},data:ja.湿润},{type:"bar",name:"适宜",stack:"总量",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"适宜",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(32, 242, 255, 1)"},{offset:1,color:"rgba(32, 242, 255, 1)"}]}},data:ja.适宜},{type:"bar",name:"轻度干旱",stack:"总量",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"轻度干旱",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(255, 255, 0, 1)"},{offset:1,color:"rgba(255, 255, 0, 1)"}]}},data:ja.轻度干旱},{type:"bar",name:"中度干旱",stack:"总量",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"中度干旱",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(255, 168, 8, 1)"},{offset:1,color:"rgba(255, 168, 8, 1)"}]}},data:ja.中度干旱},{type:"bar",name:"重度干旱",stack:"总量",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"重度干旱",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(224, 13, 15, 1)"},{offset:1,color:"rgba(224, 13, 15, 1)"}]}},data:ja.重度干旱}]};D(e,a),R().listenTo(C.value,(()=>{u((()=>{e.resize()}))}))}const ht=()=>{ra.value=!ra.value;const e=ba.value;e.style.width=window.innerWidth-200+"px",e.style.height=window.innerHeight-200+"px";const a=Y(e);window.addEventListener("resize",(()=>{e.style.width=window.innerWidth-200+"px",e.style.height=window.innerHeight-200+"px",a.resize()})),vt()},pt=e=>{ka.value.area=e};function vt(){const e=Y(ba.value);let a=[],t=[],r=[],l=[],o=[],n=[];La.value.forEach((e=>{a.push(e.region),void 0!==e.湿润?t.push(e.湿润):t.push(0),void 0!==e.适宜?r.push(e.适宜):r.push(0),void 0!==e.轻度干旱?l.push(e.轻度干旱):l.push(0),void 0!==e.中度干旱?o.push(e.中度干旱):o.push(0),void 0!==e.重度干旱?n.push(e.重度干旱):n.push(0)}));let i={tooltip:{trigger:"axis",formatter:function(e){let a=e[0].axisValueLabel+"
",t=0;for(let r=0;r");for(let r=0;r",t=0;for(let r=0;r`;t+=e[r].value,a+=l+e[r].seriesName+":"+e[r].value+"
"}for(let r=0;r{const t=d("el-table-column"),r=d("el-table"),l=d("el-option"),o=d("el-select"),n=d("el-icon"),i=d("el-tooltip"),s=d("el-checkbox"),u=d("el-checkbox-group"),N=d("el-collapse-item"),F=d("el-collapse"),V=d("el-button"),I=d("el-form-item"),P=d("el-input-number"),D=d("el-form"),Q=d("el-pagination");return c(),g("div",te,[m("div",re,[le,m("div",oe,[m("div",{class:"tool",onClick:a[0]||(a[0]=e=>h(tt)())},ne),m("div",ie,[m("div",{class:p(h(ma)?"tabarS":""),onClick:a[1]||(a[1]=e=>Xa(!0))},"黄岛区",2),m("div",{class:p(h(ma)?"":"tabarS"),onClick:a[2]||(a[2]=e=>Xa(!1))},"行政区",2)]),v(m("div",se,[m("div",ue,[de,ce,m("p",{onClick:a[3]||(a[3]=e=>{X({divisions:W.value,yearMonth:ia.value.name,whetherToDownload:!0}).then((e=>{G(e.data[e.data.length-1].downloadPath)}))})},[b(" 下载   "),ge])]),m("div",{ref_key:"areaDiv",ref:z,class:"areaDiv"},null,512),m("div",{ref_key:"leftProgressBarDiv",ref:$,class:"ProgressBar"},null,512)],512),[[f,h(ma)]]),v(m("div",me,[m("div",he,[pe,ve,m("p",{onClick:a[4]||(a[4]=e=>{H({divisions:W.value,yearMonth:ia.value.name,whetherToDownload:!0}).then((e=>{G(e.data[e.data.length-1].downloadPath)}))})},[b(" 下载   "),fe])]),m("div",{ref_key:"typesofDiv",ref:A,class:"typesofDiv"},null,512),m("div",be,[y(r,{data:h(Ca),style:{width:"100%"}},{default:w((()=>[y(t,{prop:"date",label:"类型"}),y(t,{prop:"name",label:"面积(亩)"}),y(t,{prop:"address",label:"占比"})])),_:1},8,["data"])])],512),[[f,h(ma)]]),v(m("div",ye,[m("div",we,[Se,xe,h(Ma)?(c(),g("p",{key:0,onClick:a[5]||(a[5]=e=>{Z({divisions:W.value,yearMonth:ia.value.name,whetherToDownload:!1}).then((e=>{let a=[],t=[];e.data.forEach((e=>{-1==a.indexOf(e.region)&&a.push(e.region)})),a.forEach((e=>{t.push(Object.create(null,{regio:{value:e}}))})),t.forEach((a=>{e.data.map((e=>{a.regio===e.region&&(a.region=e.region,a[e.level]=Number(e.area).toFixed(2))}))})),Qa(t,"各干旱等级面积统计-高标准农田","Sheet1")}))})},[b(" 下载   "),_e])):S("",!0)]),v(m("div",{ref_key:"farmlandDiv",ref:j,class:"farmlandDiv"},null,512),[[f,h(Ma)]]),h(Ma)?S("",!0):(c(),g("div",ke,Le))],512),[[f,!h(ma)]]),v(m("div",Ee,[m("div",Ne,[ze,Ae,m("p",{onClick:a[6]||(a[6]=e=>(()=>{if("370211"===W.value){let e="";q.arr.forEach((a=>{a.subregion==W.value&&(e="全部"==a.subregionName?"黄岛区":a.subregionName)})),K({divisions:W.value,yearMonth:ia.value.name}).then((a=>{let t=[],r=[];a.data.forEach((e=>{-1==t.indexOf(e.streetName)&&t.push(e.streetName)})),t.forEach((e=>{r.push(Object.create(null,{regio:{value:e}}))})),r.forEach((e=>{a.data.map((a=>{e.regio===a.streetName&&(e.region=a.streetName,e[a.type]=Number(a.area).toFixed(2))}))})),r=r.sort(((e,a)=>e.region.length-a.region.length)),Qa(r,`${e}干旱等级面积-行政区划`,"Sheet1")}))}else{let e="";q.arr.forEach((a=>{a.subregion==W.value&&(e="全部"==a.subregionName?"黄岛区":a.subregionName)})),ee({divisions:W.value,yearMonth:ia.value.name,whetherToDownload:!1}).then((a=>{let t=[],r=[];a.data.forEach((e=>{-1==t.indexOf(e.streetName)&&t.push(e.streetName)})),t.forEach((e=>{r.push(Object.create(null,{regio:{value:e}}))})),r.forEach((e=>{a.data.map((a=>{e.regio===a.streetName&&(e.region=a.streetName,e[a.type]=Number(a.area).toFixed(2))}))})),Qa(r,`${e}作物干旱等级统计-行政区划`,"Sheet1")}))}})())},[b(" 下载   "),je])]),h(Ma)?(c(),x(o,{key:0,"popper-class":"select_city",modelValue:W.value,"onUpdate:modelValue":a[7]||(a[7]=e=>W.value=e),placeholder:"全部"},{default:w((()=>[(c(!0),g(_,null,k(h(q).arr,(e=>(c(),x(l,{key:e.streetCode,label:e.streetName,value:e.streetCode},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])):S("",!0),m("div",{ref_key:"ASdivisionDiv",ref:C,class:"ASdivision"},null,512)],512),[[f,!h(ma)]]),m("div",{class:"rightFoldDiv",onClick:a[8]||(a[8]=e=>(T.value=!T.value,void(T.value?document.querySelector(".rightWra").style.transform="translate(0,0)":document.querySelector(".rightWra").style.transform="translate(101%,0)")))},[y(i,{disabled:!h(T),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"收起",placement:"top"},{default:w((()=>[h(T)?(c(),x(n,{key:0},{default:w((()=>[Ce])),_:1})):S("",!0)])),_:1},8,["disabled"]),y(i,{disabled:h(T),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"展开",placement:"top"},{default:w((()=>[h(T)?S("",!0):(c(),x(n,{key:0},{default:w((()=>[We])),_:1}))])),_:1},8,["disabled"])])]),m("div",$e,[h(na).length>0?(c(),x(B,{key:0,dataSource:h(na),onDataHandle:it,allCount:h(da),onGetcurrentPage:Ha},null,8,["dataSource","allCount"])):S("",!0)]),qe,y(F,{class:"legend",accordion:""},{default:w((()=>[y(N,{name:"1"},{title:w((()=>[b("图例")])),default:w((()=>[m("div",Oe,[y(u,{modelValue:M.value,"onUpdate:modelValue":a[9]||(a[9]=e=>M.value=e),onChange:Ra},{default:w((()=>[(c(!0),g(_,null,k(h(za),((e,a,t)=>(c(),x(s,{key:t,"v-model":e.disabled,disabled:e.disabled,label:a},{default:w((()=>[m("span",{style:L({background:e.color,border:`1px solid ${e.color}`,width:"10px",height:"10px",display:"flex","margin-right":"5px"})},null,4),b(" "+E(a),1)])),_:2},1032,["v-model","disabled","label"])))),128))])),_:1},8,["modelValue"])])])),_:1})])),_:1}),m("div",Te,[Me,m("div",Fe,[(c(!0),g(_,null,k(h(sa),((e,a)=>(c(),g("div",{class:"perform",key:a},[m("div",Ve,[m("div",Ie,E(e.type)+":",1),m("span",null,E(Number(e.area).toFixed(2))+"(亩)",1)])])))),128))]),Pe]),O.value?(c(),x(V,{key:0,class:"back_button",onClick:a[10]||(a[10]=a=>e.back())},{default:w((()=>[b("返回")])),_:1})):S("",!0)]),m("div",Be,[m("div",De,[y(D,{inline:!0,model:h(ka),class:"demo-form-inline"},{default:w((()=>[y(I,{label:"时间:"},{default:w((()=>[y(o,{"popper-class":"selectCity",modelValue:h(ka).time,"onUpdate:modelValue":a[11]||(a[11]=e=>h(ka).time=e),placeholder:"请选择"},{default:w((()=>[(c(!0),g(_,null,k(h(la),((a,t)=>(c(),x(l,{key:t,label:e.Zitem,value:a},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),y(I,{label:"统计方式:"},{default:w((()=>[y(o,{"popper-class":"selectCity",modelValue:h(ka).statistical,"onUpdate:modelValue":a[12]||(a[12]=e=>h(ka).statistical=e),placeholder:"请选择"},{default:w((()=>[y(l,{label:"镇级",value:"镇"}),y(l,{label:"村级",value:"村"}),h(Ma)?(c(),x(l,{key:0,label:"高标准农田",value:"高标准农田"})):S("",!0)])),_:1},8,["modelValue"])])),_:1}),y(I,{label:"干旱等级"},{default:w((()=>[y(o,{modelValue:h(ka).droughtRating,"onUpdate:modelValue":a[13]||(a[13]=e=>h(ka).droughtRating=e),"popper-class":"selectCity",placeholder:"请选择"},{default:w((()=>[y(l,{label:"全部",value:""}),y(l,{label:"湿润",value:"湿润"}),y(l,{label:"适宜",value:"适宜"}),y(l,{label:"轻度干旱",value:"轻度干旱"}),y(l,{label:"中度干旱",value:"中度干旱"}),y(l,{label:"重度干旱",value:"重度干旱"})])),_:1},8,["modelValue"])])),_:1}),y(I,{label:"面积(亩)>"},{default:w((()=>[y(P,{modelValue:oa.value,"onUpdate:modelValue":a[14]||(a[14]=e=>oa.value=e),min:0,onChange:pt},null,8,["modelValue"])])),_:1}),y(I,null,{default:w((()=>[y(V,{type:"primary",onClick:Ya},{default:w((()=>[b("查询")])),_:1}),y(V,{plain:"",onClick:Ua,disabled:!h(ra)},{default:w((()=>[b(" 重置 ")])),_:1},8,["disabled"]),h(wa)?S("",!0):(c(),x(V,{key:0,type:"primary",text:"",onClick:nt},{default:w((()=>[Ge,b(" 下载 ")])),_:1}))])),_:1})])),_:1},8,["model"]),m("div",{class:"modeDiv",onClick:ht},[m("div",{class:p(h(ra)?"Selected":"")},"表格模式",2),m("div",{class:p(h(ra)?"":"Selecteds")},"图表模式",2)])]),v(m("div",Qe,[m("div",Je,[h(wa)?S("",!0):(c(),x(r,{key:0,data:h(ha),"header-cell-style":{"text-align":"center"},style:{width:"100%"},"highlight-current-row":"","header-row-class-name":"tabth"},{default:w((()=>[y(t,{align:"center",prop:"合计",width:"80"}),(c(!0),g(_,null,k(h(ya),((e,a)=>(c(),x(t,{key:a,prop:e.value,label:0==a?e.lable:e.lable+"(亩)",align:"center"},{default:w((a=>["轻度干旱"==e.value?(c(),g("span",Re,E(a.row[e.value]),1)):"中度干旱"==e.value?(c(),g("span",Ye,E(a.row[e.value]),1)):"重度干旱"==e.value?(c(),g("span",Ue,E(a.row[e.value]),1)):(c(),g("span",Xe,E(a.row[e.value]),1))])),_:2},1032,["prop","label"])))),128))])),_:1},8,["data"]))]),y(r,{data:h(pa),"header-cell-style":{"text-align":"center"},height:"80%","highlight-current-row":"","header-row-class-name":"tabth"},{default:w((()=>[y(t,{type:"index",width:"80",align:"center",label:"序号",index:gt}),(c(!0),g(_,null,k(h(ya),((e,a)=>(c(),x(t,{key:a,prop:e.value,label:0==a?e.lable:e.lable+"(亩)",align:"center"},{default:w((a=>["轻度干旱"==e.value?(c(),g("span",He,E(a.row[e.value]),1)):"中度干旱"==e.value?(c(),g("span",Ze,E(a.row[e.value]),1)):"重度干旱"==e.value?(c(),g("span",Ke,E(a.row[e.value]),1)):(c(),g("span",ea,E(a.row[e.value]),1))])),_:2},1032,["prop","label"])))),128))])),_:1},8,["data"]),m("div",aa,[b(" 共"+E(La.value.length)+"条 ",1),y(Q,{background:"",layout:"prev, pager, next",total:La.value.length,"current-page":h(va),"page-size":h(fa),onCurrentChange:ct},null,8,["total","current-page","page-size"])])],512),[[f,h(ra)]]),v(m("div",ta,[m("div",{ref_key:"chartModeDiv",ref:ba,class:"chartModeDiv"},null,512)],512),[[f,!h(ra)]])])])}}},[["__scopeId","data-v-b6bd2ce2"]]);export{ra as default};