import{H as A,_ as ve,r as d,A as ge,V as be,a1 as ye,d as L,o as v,c as h,l as r,m as T,e as u,w as g,f,g as x,x as C,L as he,N as xe,k as _e,y as Se,p as we,q as ke}from"./index.ae0c781d.js";import B from"./downloads.4cdbbcc5.js";import{_ as N}from"./close1.45635d81.js";import{_ as Le,a as Te,b as Ce,c as ze,d as De,e as Ae}from"./linesGL.97ae14ae.js";import{i as W}from"./index.c9f5bd8b.js";import{T as Ne}from"./TimeLine.64a8bde3.js";import{u as M,w as Ve}from"./xlsx.86b9426e.js";import{u as j}from"./useEcharts.dbdb546a.js";import{d as Ie}from"./download.8084913c.js";function Q(m){return A({url:"equipment/cornTotalYearValue",method:"get",params:m})}function $(m){return A({url:"equipment/cornHeightStandardFarmland",method:"get",params:m})}function H(m){return A({url:"equipment/cornGetAllTowns",method:"get",params:m})}function Oe(m){return A({url:"equipment/cornGetAllVillages",method:"get",params:m})}const _=m=>(we("data-v-0ab5a17e"),m=m(),ke(),m),We={class:"center"},Me=_(()=>r("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),Be={class:"leftWra"},Ee={class:"leftTop"},Fe={class:"title"},Ue=_(()=>r("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30",-1)),Ge=_(()=>r("img",{src:B,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Je={key:0,src:N,alt:""},Pe={key:0,class:"imgrotate",src:N,alt:""},Re={class:"rightWra"},qe={class:"rightTop"},Ye={class:"title"},Xe=_(()=>r("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Ze=_(()=>r("img",{src:B,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),je={class:"rightbottom"},Qe={class:"title"},$e=_(()=>r("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),He=_(()=>r("img",{src:B,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Ke={key:0,src:N,alt:""},et={key:0,class:"imgrotate",src:N,alt:""},tt={class:"bottom_center"},at=Se('
',1),ot={id:"popup"},lt={id:"pop"},rt={key:0},it=_(()=>r("div",null,"\u6751\u540D\uFF1A",-1)),st={class:"mt-4"},nt={__name:"index",setup(m){let c=d(null);const E=d(null),F=d(null),U=d(null),V=d("");let k=ge({arr:[],brr:[],crr:[]});const G=d({name:"",value:""}),K=d([]),I=d(!1);let S=d(!0),w=d(!0),J=d([]),P=d({}),R=d([]);d(null);const ee=()=>{new ol.Map({target:"cesiumContainer",layers:[new ol.layer.Tile({title:"\u5929\u5730\u56FE\u77E2\u91CF\u56FE\u5C42",source:new ol.source.XYZ({url:"http://t0.tianditu.com/DataServer?T=vec_w&tk=5956e6519f2bb0ae8e57bc834298c9f1&x={x}&y={y}&l={z}",wrapX:!1})}),new ol.layer.Tile({title:"\u5929\u5730\u56FE\u77E2\u91CF\u56FE\u5C42\u6CE8\u8BB0",source:new ol.source.XYZ({url:"http://t0.tianditu.com/DataServer?T=cia_w&tk=5956e6519f2bb0ae8e57bc834298c9f1&x={x}&y={y}&l={z}",wrapX:!1})})],controls:ol.control.defaults({attributionOptions:{collapsed:!1}}).extend([new ol.supermap.control.Logo]),view:new ol.View({center:[116,39],zoom:2,projection:"EPSG:3857"})})};be(()=>{le(),re(),ie(),ee(),Y(),X(),te()}),new Cesium.GeographicTilingScheme,Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYzcwZmJmNi02MzQ5LTQ1MGEtODgzMy0yZTZiZGExY2MzMGMiLCJpZCI6MTAxOTgsInNjb3BlcyI6WyJhc2wiLCJhc3IiLCJnYyJdLCJpYXQiOjE1ODEzMDgxNTR9.NeJU4yfUi-SnLrNDOBYsQgmiSh3B4axCTi1m84Qw99c";function te(){ye({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afarmland&maxFeatures=50&outputFormat=application%2Fjson",method:"get"}).then(t=>{console.log("\u519C\u7530\uFF1A",t),K.value=t.data.features}).catch(t=>{})}let b=d({label:[]});function z(t,e){if(c){const a=c.imageryLayers._layers;for(let l=a.length-1;l>=0;l--)t.forEach(s=>{a[l]._imageryProvider&&a[l]._imageryProvider.customName&&(e?a[l]._imageryProvider.customName.indexOf(s)>-1&&c.imageryLayers.remove(a[l]):a[l]._imageryProvider.customName===s&&c.imageryLayers.remove(a[l]))})}}function q(t){if(c){let a=c.entities._entities._array;for(var e=a.length-1;e>=0;e--)a[e]._name&&a[e]._name===t&&c.entities.remove(a[e])}}function ae(){if(S.value=!S.value,S.value){let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(0,0)")}else{let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(-107%,0)")}}function oe(){if(w.value=!w.value,w.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 le=t=>{Q({divisions:t}).then(e=>{console.log(e.data),P.value=e.data,ue()})},re=t=>{$({divisions:t}).then(e=>{J.value=e.data,Y()})},ie=()=>{H().then(t=>{R.value=t.data,k.brr=JSON.parse(JSON.stringify(t.data)),k.arr=k.brr.sort((l,s)=>l.subName.length-s.subName.length),k.arr.unshift({subregion:"",subName:"\u5168\u90E8"});let e=[],a=[];k.arr.forEach(l=>{e.indexOf(l.subName)==-1&&(e.push(l.subName),a.push({subName:l.subName,subregion:l.subregion,area:l.area,type:l.type}))}),k.arr=a,X()})},se=t=>{Q({divisions:V.value,whetherToDownload:!0}).then(e=>{Ie(e.data[e.data.length-1].excelPath)})},ne=t=>{$().then(e=>{O(e.data,"\u9AD8\u6807\u51C6\u519C\u7530","Sheet1")})},de=t=>{V.value===""?H().then(e=>{O(e.data,"\u884C\u653F\u533A\u5212","Sheet1")}):Oe({divisions:V.value}).then(e=>{O(e.data,"\u884C\u653F\u533A\u5212","Sheet1")})},ce=(t,e)=>t.map(l=>{const s={};for(const o in l)e[o]&&(s[e[o]]=l[o]);return s}),O=(t,e="\u7528\u6237\u5217\u8868",a="Sheet1")=>{const s=ce(t,{subName:"\u533A\u57DF\u540D\u79F0",corn_UnitOutputValue:"\u5355\u4EA7\u91CF(\u65A4/\u4EA9)",cornOutput:"\u603B\u4EA7\u91CF(\u5428)"}),o=M.json_to_sheet(s),p=M.book_new();M.book_append_sheet(p,o,a),Ve(p,`${e}.xlsx`)};function ue(){const t=W(E.value);let e={title:["\u5355\u4EA7\u91CF","\u603B\u4EA7\u91CF"],xData:[],yData:[{data:[],name:"\u5355\u4EA7\u91CF",type:"line",yAxisIndex:0,smooth:!0,symbol:"circle",symbolSize:2},{data:[],name:"\u603B\u4EA7\u91CF",type:"line",yAxisIndex:1,smooth:!0,symbol:"circle",symbolSize:2}]};P.value.forEach(s=>{e.xData.push(s.year),e.yData[0].data.push(s.corn_UnitOutputValue),e.yData[1].data.push(s.cornOutput)});const a=(s,o=0)=>{let p=0;return s.forEach(n=>{n.yAxisIndex===o&&n.data.forEach(y=>{y===void 0||y===""||p{console.log(o),e.push(o.subName),a.push(o.corn_UnitOutputValue),l.push(o.cornOutput)});let s={tooltip:{trigger:"axis",formatter:function(o,p,D){for(var i=o[0].name,n=0,y=o.length;n"+o[n].seriesName+" : "+(o[n].value?o[n].value:"-")+"h":i+="
"+o[n].seriesName+" : "+(o[n].value?o[n].value:"-");return i}},grid:{top:"15%",bottom:"15%",left:"15%",right:"15%"},legend:{data:["\u5355\u4EA7\u91CF","\u603B\u4EA7\u91CF"],textStyle:{color:"#fff",fontSize:12},type:"scroll",top:"3%"},xAxis:[{type:"category",nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,textStyle:{color:"rgba(255, 255, 255, 0.7)"}},splitLine:{show:!1},axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},axisPointer:{type:"shadow"},data:e}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",splitLine:{show:!0},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}},splitLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},min:0,position:"top"},{type:"value",name:"\u4EA7\u91CF(\u65A4/\u4EA9)",min:0,position:"bottom",splitLine:{show:!1},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}}}],series:[{name:"\u5355\u4EA7\u91CF",type:"bar",barWidth:"10%",yAxisIndex:0,data:a,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(242, 252, 252, 1)"},{offset:.8,color:"rgba(242, 252, 252, 0.2)"},{offset:1,color:"rgba(242, 252, 252, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}},{name:"\u603B\u4EA7\u91CF",type:"bar",yAxisIndex:1,barWidth:"10%",data:l,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(143, 186, 243,1)"},{offset:.8,color:"rgba(143, 186, 243, 0.2)"},{offset:1,color:"rgba(143, 186, 243, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}}]};s&&t.setOption(s,{notMerge:!0,grid:{bottom:20}}),j(t,s)}function me(t,e){let a=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:t,parameters:{service:"WMS",format:"image/png",transparent:!0}});a.customName=e;let l=c.imageryLayers.addImageryProvider(a);e.indexOf("gbznt")>-1&&(c.imageryLayers.lowerToBottom(l),c.imageryLayers.raise(l))}function fe(){z(["gbznt"],!0),me("shuzisannong:huangdaoqu_town","tl"),c.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),I.value=!1}function X(){const t=W(U.value);let e=[],a=[],l=[];R.value.forEach(o=>{console.log(),e.push(o.subName),a.push(o.corn_UnitOutputValue),l.push(o.cornOutput)}),j(t,{tooltip:{trigger:"axis",formatter:function(o,p,D){for(var i=o[0].name,n=0,y=o.length;n"+o[n].seriesName+" : "+(o[n].value?o[n].value:"-")+"h":i+="
"+o[n].seriesName+" : "+(o[n].value?o[n].value:"-");return i}},grid:{top:"15%",bottom:"15%",left:"15%",right:"15%"},legend:{data:["\u5355\u4EA7\u91CF","\u603B\u4EA7\u91CF"],textStyle:{color:"#fff",fontSize:12},type:"scroll",top:"5%"},xAxis:[{type:"category",nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,textStyle:{color:"rgba(255, 255, 255, 0.7)"}},splitLine:{show:!1},axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},axisPointer:{type:"shadow"},data:e}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",splitLine:{show:!0},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}},splitLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},min:0,position:"top"},{type:"value",name:"\u4EA7\u91CF(\u65A4/\u4EA9)",min:0,position:"bottom",splitLine:{show:!1},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}}}],series:[{name:"\u5355\u4EA7\u91CF",type:"bar",barWidth:"10%",yAxisIndex:0,data:a,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(4, 247, 227, 1)"},{offset:.8,color:"rgba(4, 247, 227, 0.2)"},{offset:1,color:"rgba(4, 247, 227, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}},{name:"\u603B\u4EA7\u91CF",type:"bar",yAxisIndex:1,barWidth:"10%",data:l,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(33, 187, 251, 1)"},{offset:.8,color:"rgba(33, 187, 251, 0.2)"},{offset:1,color:"rgba(33, 187, 251, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}}]})}d({});function pe(){if(b.value&&b.value.lon&&b.value.lat){const e=Cesium.Cartesian3.fromDegrees(Number(b.value.lon),Number(b.value.lat),0);var t=Cesium.SceneTransforms.wgs84ToWindowCoordinates(c.scene,e);if(Cesium.defined(t)){const a=document.getElementById("pop");a.style.top=t.y-10+"px",a.style.left=t.x+10+"px"}}}function Z(){z(["village_CQL"]),z(["aaa"]),q("villageLine"),q("townLine");const t=document.getElementById("pop");t.style.display="none",c.scene.postRender.removeEventListener(pe),c.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),z(["gbznt"],!0),I.value=!1}return(t,e)=>{const a=L("el-tooltip"),l=L("el-button"),s=L("el-checkbox"),o=L("el-checkbox-group"),p=L("el-collapse-item"),D=L("el-collapse");return v(),h("div",We,[Me,r("div",Be,[r("div",Ee,[r("div",Fe,[Ue,r("p",{onClick:e[0]||(e[0]=i=>se())},[T(" \u4E0B\u8F7D \xA0 "),Ge])]),r("div",{ref_key:"areaDiv",ref:E,class:"areaDiv"},null,512)]),r("div",{class:"leftFoldDiv",onClick:e[1]||(e[1]=i=>ae())},[u(a,{class:"box-item","show-arrow":!1,disabled:f(S),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:g(()=>[f(S)?x("v-if",!0):(v(),h("img",Je))]),_:1},8,["disabled"]),u(a,{disabled:!f(S),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:g(()=>[f(S)?(v(),h("img",Pe)):x("v-if",!0)]),_:1},8,["disabled"])])]),r("div",Re,[r("div",qe,[r("div",Ye,[Xe,r("p",{onClick:e[2]||(e[2]=i=>ne())},[T(" \u4E0B\u8F7D \xA0 "),Ze])]),r("div",{ref_key:"farmlandDiv",ref:F,class:"farmlandDiv"},null,512),x(' ')]),r("div",je,[r("div",Qe,[$e,r("p",{onClick:e[3]||(e[3]=i=>de())},[T(" \u4E0B\u8F7D \xA0 "),He])]),r("div",{ref_key:"ASdivisionDiv",ref:U,class:"ASdivision"},null,512)]),r("div",{class:"rightFoldDiv",onClick:e[4]||(e[4]=i=>oe())},[u(a,{disabled:!f(w),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:g(()=>[f(w)?(v(),h("img",Ke)):x("v-if",!0)]),_:1},8,["disabled"]),u(a,{disabled:f(w),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:g(()=>[f(w)?x("v-if",!0):(v(),h("img",et))]),_:1},8,["disabled"])])]),r("div",tt,[u(Ne)]),at,r("div",ot,[r("div",null,C(G.value.name)+"\uFF1A",1),r("div",null,C(G.value.value)+"\u4EA9",1),r("div",{class:"cancel",onClick:Z},"X")]),r("div",lt,[(v(!0),h(he,null,xe(f(b).label,(i,n)=>(v(),h("div",{key:n},[r("div",null,C(i.crop)+"\uFF1A",1),r("div",null,C((i.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),f(b).XZQMC?(v(),h("div",rt,[it,r("div",null,C(f(b).XZQMC),1)])):x("v-if",!0),r("div",{class:"cancel",onClick:Z},"X")]),I.value?(v(),_e(l,{key:0,class:"back_button",onClick:e[5]||(e[5]=i=>fe())},{default:g(()=>[T("\u8FD4\u56DE")]),_:1})):x("v-if",!0),u(D,{class:"legend",accordion:""},{default:g(()=>[u(p,{name:"1"},{title:g(()=>[T("\u56FE\u4F8B")]),default:g(()=>[r("div",st,[u(o,{modelValue:t.checkList,"onUpdate:modelValue":e[11]||(e[11]=i=>t.checkList=i),onChange:t.change},{default:g(()=>[x(` `),u(s,{style:{background:"rgba(255, 238, 204, 1)",border:"1px solid rgba(251, 171, 60, 1)",width:"100%"},modelValue:t.checked3,"onUpdate:modelValue":e[6]||(e[6]=i=>t.checked3=i),label:"0-200"},null,8,["modelValue"]),u(s,{style:{background:"rgba(255, 220, 153, 1)",border:"1px solid rgba(251, 219, 13, 1)",width:"100%"},modelValue:t.checked4,"onUpdate:modelValue":e[7]||(e[7]=i=>t.checked4=i),label:"200-400"},null,8,["modelValue"]),u(s,{style:{background:"rgba(255, 203, 102, 1)",border:"1px solid rgba(244, 218, 136, 1)",width:"100%"},modelValue:t.checked3,"onUpdate:modelValue":e[8]||(e[8]=i=>t.checked3=i),label:"400-600"},null,8,["modelValue"]),u(s,{style:{background:"rgba(255, 185, 51, 1)",border:"1px solid rgba(174, 83, 110, 1)",width:"100%"},modelValue:t.checked4,"onUpdate:modelValue":e[9]||(e[9]=i=>t.checked4=i),label:"600-800"},null,8,["modelValue"]),u(s,{style:{background:"rgba(255, 168, 0, 1)",border:"1px solid rgba(242, 177, 167, 1)",width:"100%"},modelValue:t.checked3,"onUpdate:modelValue":e[10]||(e[10]=i=>t.checked3=i),label:"800-1000"},null,8,["modelValue"])]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1})])}}},yt=ve(nt,[["__scopeId","data-v-0ab5a17e"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/output/maize/index.vue"]]);export{yt as default};