Agriculture-front-end/dist/assets/index.9003591e.js
2023-05-22 18:07:32 +08:00

2 lines
28 KiB
JavaScript

import{z as ge,_ as $e,r as c,B as Ue,C as Ye,D as He,F as de,d as k,o as v,c as M,l,m as X,e as h,w as _,f as g,g as Z,J as ue,K as fe,k as pe,Q as Ke,x as Q,y as et,p as tt,q as ot}from"./index.5f349928.js";import ee from"./downloads.e955445d.js";import{_ as te}from"./close1.45635d81.js";import{g as at,i as rt,a as lt,h as st,_ as it,b as nt,c as ct,d as dt,e as ut,f as ft}from"./linesGL.badda9a7.js";import{i as K,L as R}from"./index.c9f5bd8b.js";import{T as pt}from"./TimeLine.ca858622.js";import{u as me}from"./useEcharts.f096c4b4.js";function mt(x){return ge({url:"equipment/areaStatisticsDrought",method:"get",params:x})}function gt(x){return ge({url:"equipment/proportionOfArea",method:"get",params:x})}function bt(x){return ge({url:"equipment/statisticsOfArea",method:"get",params:x})}const L=x=>(tt("data-v-e73613e6"),x=x(),ot(),x),vt={class:"center"},ht=L(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),yt={class:"leftWra"},_t={class:"leftTop"},xt={class:"title"},wt=L(()=>l("span",null,"\u5404\u5E72\u65F1\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1",-1)),Ct=L(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),St={class:"leftbottom"},Dt={class:"title"},kt=L(()=>l("span",null,"\u5404\u5E72\u65F1\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",-1)),Mt=L(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Lt={class:"tableDiv"},Wt={key:0,src:te,alt:""},zt={key:0,class:"imgrotate",src:te,alt:""},At={class:"rightWra"},Tt={class:"rightTop"},It={class:"title"},Et=L(()=>l("span",null,"\u5404\u5E72\u65F1\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Bt=L(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Zt={class:"rightbottom"},Ft={class:"title"},Pt=L(()=>l("span",null,"\u5404\u5E72\u65F1\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Xt=L(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Rt={key:0,src:te,alt:""},Nt={key:0,class:"imgrotate",src:te,alt:""},Ot={class:"bottom_center"},qt=et('<div class="tool" data-v-e73613e6><span data-v-e73613e6><img src="'+it+'" alt="" data-v-e73613e6></span><span data-v-e73613e6><img src="'+nt+'" alt="" data-v-e73613e6></span><span data-v-e73613e6><img src="'+ct+'" alt="" data-v-e73613e6></span><span data-v-e73613e6><img src="'+dt+'" alt="" data-v-e73613e6></span><span data-v-e73613e6><img src="'+ut+'" alt="" data-v-e73613e6></span><span data-v-e73613e6><img src="'+ft+'" alt="" data-v-e73613e6></span></div>',1),Qt={class:"mt-4"},Gt={id:"popup"},Vt={id:"pop"},jt={key:0},Jt=L(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),$t={__name:"index",setup(x){let i=c(null);const be=c(null),ve=c(null),he=c(null);c(null);const ye=c(null),y=c("370211"),ze=c(null);let w=Ue({arr:[],brr:[],crr:[]});const _e=c({name:"",value:""}),xe=c([]),F=c(!1);let E=c(!1),B=c(!1);const we=c(["false"]);let oe=c([]),G=c([]),ae=c([]),re=c(0),Ce=["\u9AD8\u6807\u51C6\u519C\u75301.0","\u9AD8\u6807\u51C6\u519C\u75302.0","\u9AD8\u6807\u51C6\u519C\u75303.0","\u9AD8\u6807\u51C6\u519C\u75304.0","\u9AD8\u6807\u51C6\u519C\u75305.0","\u9AD8\u6807\u51C6\u519C\u75306.0","\u9AD8\u6807\u51C6\u519C\u75307.0"],W={\u8F7B\u5EA6\u5E72\u65F1:[],\u4E2D\u5EA6\u5E72\u65F1:[],\u91CD\u5EA6\u5E72\u65F1:[],\u7279\u5927\u5E72\u65F1:[],\u9002\u5B9C:[],\u6E7F\u6DA6:[]},Ae={\u8F7B\u5FAE\u5E72\u65F1:{color:"rgba(9, 187, 222, 1)",disabled:!1},\u4E2D\u5EA6\u5E72\u65F1:{color:"rgba(255, 235, 59, 1)",disabled:!1},\u4E25\u91CD\u5E72\u65F1:{color:"rgba(234, 165, 93, 1)",disabled:!1},\u7279\u5927\u5E72\u65F1:{color:"rgba(215, 25, 28, 1)",disabled:!1}};Ye(()=>w.arr,e=>{console.log("val:",e)});var V={title:[]};let T={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]},le=c([]);He(()=>{De("370211"),ke("370211"),Re(),Oe(),Me(),Ne(),Ie(),U(),Le(),O(),Be();let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(-107%,0)");let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"});const Te={url:"http://{s}.tianditu.gov.cn/img_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=31091965e263284a501a723b8909f405",layer:"tdtCva",style:"default",format:"tiles",tileMatrixSetID:"c",subdomains:["t0","t1","t2","t3","t4","t5","t6","t7"],tilingScheme:new Cesium.GeographicTilingScheme,tileMatrixLabels:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],maximumLevel:18};Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYzcwZmJmNi02MzQ5LTQ1MGEtODgzMy0yZTZiZGExY2MzMGMiLCJpZCI6MTAxOTgsInNjb3BlcyI6WyJhc2wiLCJhc3IiLCJnYyJdLCJpYXQiOjE1ODEzMDgxNTR9.NeJU4yfUi-SnLrNDOBYsQgmiSh3B4axCTi1m84Qw99c";function Ie(){i=new Cesium.Viewer("cesiumContainer",{baseLayerPicker:!1,shouldAnimate:!0,infoBox:!1,animation:!1,timeline:!1,geocoder:!1,homeButton:!1,navigationHelpButton:!1,selectionIndicator:!1,fullscreenButton:!1,terrainProvider:new Cesium.EllipsoidTerrainProvider({}),sceneModePicker:!1,contextOptions:{webgl:{alpha:!0}},imageryProvider:new Cesium.WebMapTileServiceImageryProvider({...Te})}),i.cesiumWidget.creditContainer.style.display="none",ne("shuzisannong:huangdaoqu_town","tl"),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),Ze(),je()}function se(e,t,o){e.forEach(a=>{let r=[];a[0].forEach(s=>{r.push(s[0]),r.push(s[1])}),i.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(r),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:o?Cesium.Color.fromCssColorString(o):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function Ee(e){return e>48e6?0:e>24e6?1:e>12e6?2:e>6e6?3:e>3e6?4:e>15e5?5:e>75e4?6:e>375e3?7:e>187500?8:e>93750?9:e>46875?10:e>23437.5?11:e>11718.75?12:e>5859.38?13:e>2929.69?14:e>1464.84?15:e>732.42?16:e>366.21?17:18}function Be(){de({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afarmland&maxFeatures=50&outputFormat=application%2Fjson",method:"get"}).then(e=>{console.log("\u519C\u7530\uFF1A",e),xe.value=e.data.features}).catch(e=>{})}let p=c({label:[]}),N="";function Ze(){var e=new Cesium.ScreenSpaceEventHandler(i.canvas);e.setInputAction(function(t){var o=i.camera.getPickRay(t.position),a=i.scene.globe.pick(o,i.scene);if(a){let r=Cesium.Cartographic.fromCartesian(a);if(r){let s=new Cesium.Cartesian2,f=i.camera.positionCartographic.height,d=Ee(f);const b=i.imageryLayers._layers,S=b.findIndex(u=>u._imageryProvider._layers&&u._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(S>-1){const u=b[S];let m=u._imageryProvider;if(m&&m.ready&&m._layers&&u.show===!0){s=m.tilingScheme.positionToTileXY(r,d,s);let n=m.pickFeatures(s.x,s.y,d,r.longitude,r.latitude);n&&n.then(z=>{if(z.length>0){let D=z[0];if(D.properties&&D.properties.XZDM)if(console.log("XZDM:",N),console.log("newData.properties.XZDM:",D.properties.XZDM),N!==D.properties.XZDM){F.value=!0,N=D.properties.XZDM,y.value=N,J&&J();let I=D.data;i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(I.bbox[0],I.bbox[1],I.bbox[2],I.bbox[3]),duration:2}),P("townLine"),se(I.geometry&&I.geometry.coordinates,"townLine","yellow"),C(["village_CQL"]),Se(`XZDM=${D.properties.XZDM}`,"village_CQL");let H=i.entities._entities._array;for(var A=H.length-1;A>=0;A--)if(H[A]._name&&H[A]._name==="point"+D.properties.XZDM){let Je=H[A]._info;p.value=Je,console.log(p.value,"------------------"),Y(t.position),i.scene.postRender.addEventListener(ce)}P("villageLine"),j=""}else Fe(b,s,d,r,t);else C(["village_CQL"]),q()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let j="";function Fe(e,t,o,a,r){const s=e.findIndex(f=>f._imageryProvider._layers&&f._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(s>-1){const f=e[s];let d=f._imageryProvider;if(d&&d.ready&&d._layers&&f.show===!0){t=d.tilingScheme.positionToTileXY(a,o,t);let b=d.pickFeatures(t.x,t.y,o,a.longitude,a.latitude);b&&b.then(S=>{if(S.length>0){let u=S[0];if(console.log(u),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(u.data.bbox[0],u.data.bbox[1],u.data.bbox[2],u.data.bbox[3]),duration:2}),u.properties&&u.properties.XZQDM&&j!==u.properties.XZQDM){j=u.properties.XZQDM;let m=u.data;if(P("villageLine"),se(m.geometry&&m.geometry.coordinates,"villageLine","yellow"),u.properties.XZQDM==="370211104217"){const n=Cesium.Rectangle.fromDegrees(m.bbox[0],m.bbox[1],m.bbox[2],m.bbox[3]),z=Cesium.Rectangle.center(n);let A=Cesium.Math.toDegrees(z.longitude),D=Cesium.Math.toDegrees(z.latitude),I={lon:A,lat:D,...m.properties,label:[{crop:"\u8336\u53F6",Shape_Area:2820},{crop:"\u5927\u8C46",Shape_Area:2767},{crop:"\u82B1\u751F",Shape_Area:62356},{crop:"\u84DD\u8393",Shape_Area:5443},{crop:"\u5730\u74DC",Shape_Area:897},{crop:"\u5C0F\u9EA6",Shape_Area:20111}]};p.value=I,Y(r.position),i.scene.postRender.addEventListener(ce)}}}})}}}function Se(e,t){let o=new Cesium.WebMapServiceImageryProvider({url:"http://121.36.229.60:9080/geoserver/shuzisannong/wms",layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:e}});o.customName=t,i.imageryLayers.addImageryProvider(o)}function C(e,t){if(i){const o=i.imageryLayers._layers;for(let a=o.length-1;a>=0;a--)e.forEach(r=>{o[a]._imageryProvider&&o[a]._imageryProvider.customName&&(t?o[a]._imageryProvider.customName.indexOf(r)>-1&&i.imageryLayers.remove(o[a]):o[a]._imageryProvider.customName===r&&i.imageryLayers.remove(o[a]))})}}function P(e){if(i){let o=i.entities._entities._array;for(var t=o.length-1;t>=0;t--)o[t]._name&&o[t]._name===e&&i.entities.remove(o[t])}}function Pe(){if(E.value=!E.value,E.value){let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(0,0)")}else{let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(-107%,0)")}}function Xe(){if(B.value=!B.value,B.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 De=e=>{oe=c([]),G=c([]),mt({divisions:e}).then(t=>{t.data.forEach(o=>{oe.value.push(o.level),G.value.push((o.area/666.67).toFixed(2))}),ie()})},ke=e=>{ae=c([]),le=c([]),re=c(0),gt({divisions:e}).then(t=>{t.data.forEach(o=>{re.value+=Number(o.area),ae.value.push({name:o.level,value:(o.area/666.67).toFixed(2)}),le.value.push({date:o.level,name:`${(o.area/666.67).toFixed(2)}\u4EA9`,address:`${(o.percentage*100).toFixed(2)}%`})}),U()})},Re=()=>{bt().then(e=>{Ce.forEach((t,o)=>{let a=e.data.map(r=>{if(t===r.region)return r});Object.keys(W).forEach(r=>{let s=0;a.findIndex(d=>(d&&d.level===r&&(s=d.area),d&&d.level===r))>-1?W[r].push(s):W[r].push(0)})}),Le()})},Me=()=>{at().then(e=>{w.arr=e.features.sort((a,r)=>a.properties.XZMC.length-r.properties.XZMC.length),w.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let t=[...e.features],o=[];t.splice(0,1),t.forEach(a=>{o.push(a.properties.XZMC)}),V.title=[...Object.values(o)],O()})},Ne=()=>{rt().then(e=>{w.brr=e.features})},Oe=()=>{lt().then(e=>{w.crr=e.features,V.title.forEach((t,o)=>{let a=e.features.map(r=>{if(t===r.properties.town)return r.properties});Object.keys(T).forEach(r=>{const s=a.findIndex(f=>f&&f.crop===r);s>-1?T[r].push(a[s].Shape_Area):T[r].push(null)})}),O()})},J=()=>{if(w.arr.forEach(a=>{a.properties.XZDM==y.value&&(De(y.value),ke(y.value))}),y.value=="370211"){C(["village_CQL"]),N=null,C(["aaa"]),Me(),q(),O(),ie(),U();return}let e=[...w.arr];console.log("arr:",e),e.forEach(a=>{a.properties.XZDM==y.value&&i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),duration:2});let r=[...w.brr],s=[];r.forEach(f=>{f.properties.XZDM==y.value&&s.push(f.properties.XZQMC)}),V.title=[...Object.values(s)]}),O(),ie(),U();const o=[...w.arr].find(a=>a.properties.XZDM===y.value);o&&(P("townLine"),se(o.geometry.coordinates,"townLine","yellow")),C(["aaa"]),Se(`XZDM=${y.value}`,"aaa"),st({time:"2023-04-26",subregion:"1",parent:"\u9EC4\u5C9B\u533A"}).then(a=>{let r=[];a.data.map((s,f)=>{s.region==o.properties.XZMC&&r.push({crop:s.type,Shape_Area:s.area})}),p.value={label:r},console.log(),console.log(r),Y({x:642,y:312})})},$=e=>{qe(e)},qe=e=>{let t=document.createElement("a");t.style.display="none",t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)};function ie(){const e=K(be.value);console.log(G.value);var t={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:["\u9762\u79EF"],right:"5%",icon:"rect",textStyle:{fontSize:14,color:"rgba(255, 255, 255, 0.7)"}},xAxis:{nameTextStyle:{color:"#c0c3cd",padding:[0,0,-10,0],fontSize:14},axisLabel:{color:"rgba(255, 255, 255, 0.7)",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:oe.value,type:"category"},yAxis:{name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},type:"value",axisLabel:{color:"rgba(255,255,255,0.7)"},splitLine:{lineStyle:{type:"dashed"}},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{data:G.value,name:"\u9762\u79EF",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(45, 204, 177, 1)"},{offset:1,color:"rgba(71, 179, 161, 0)"}]}},label:{normal:{show:!1,fontSize:14,color:"#ffffff",position:"top"}}}]};t&&e.setOption(t),window.addEventListener("resize",function(){e.resize()})}function U(){const e=K(ve.value);var t=ae.value;let o={color:["rgba(9, 187, 222, 0.8)","rgba(255, 235, 59, 0.8)","rgba(234, 165, 93, 0.8)","rgba(215, 25, 28, 0.8)","#585247","#7F6AAD","#009D85","rgba(250,250,250,0.3)"],title:{text:"\u603B\u9762\u79EF",subtext:`${(re.value/666.67).toFixed(2)}\u4EA9`,textStyle:{color:"#f2f2f2",fontSize:14},subtextStyle:{fontSize:14,color:["#ff9d19"]},x:"center",y:"center"},grid:{top:0},legend:{orient:"vertical",top:"middle",right:"2%",textStyle:{color:"#f2f2f2",fontSize:14},icon:"roundRect",data:t},tooltip:{trigger:"item",axisPointer:{type:"shadow"},formatter:"{a} <br/>{b} : {c}\u4EA9 <br/>\u767E\u5206\u6BD4 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"\u5404\u5E72\u65F1\u7B49\u7EA7\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"}}}]}]};me(e,o)}function Le(){const e=K(he.value);let t={title:{text:"",subtext:""},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"15%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:{type:"category",data:Ce,axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)",width:1,type:"solid"},axisLabel:{color:"rgba(255, 255, 255, 0.7)",fontWeight:400,fontFamily:"SourceHanSansCN-Regular, SourceHanSansCN",fontSize:14}}},yAxis:{name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.7)"},splitLine:{lineStyle:{type:"solid",color:"rgba(255, 255, 255, 0.3)"}},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"\u8F7B\u5EA6\u5E72\u65F1",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:W.\u8F7B\u5EA6\u5E72\u65F1,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(9, 187, 222, 1)",color:new R(0,0,0,1,[{offset:0,color:"rgba(9, 187, 222, 0.8)"},{offset:1,color:"rgba(9, 187, 222, 0.8)"}])}}},{name:"\u4E2D\u5EA6\u5E72\u65F1",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:W.\u4E2D\u5EA6\u5E72\u65F1,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(255, 235, 59, 1)",color:new R(0,0,0,1,[{offset:0,color:"rgba(255, 235, 59, 0.8)"},{offset:1,color:"rgba(255, 235, 59, 0.8)"}])}}},{name:"\u4E25\u91CD\u5E72\u65F1",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:W.\u91CD\u5EA6\u5E72\u65F1,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(234, 165, 93, 1)",color:new R(0,0,0,1,[{offset:0,color:"rgba(234, 165, 93, 0.8)"},{offset:1,color:"rgba(234, 165, 93, 0.8)"}])}}},{name:"\u7279\u5927\u5E72\u65F1",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:W.\u7279\u5927\u5E72\u65F1,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(215, 25, 28, 1)",color:new R(0,0,0,1,[{offset:0,color:"rgba(215, 25, 28, 0.8)"},{offset:1,color:"rgba(215, 25, 28, 0.8)"}])}}},{name:"\u9002\u5B9C",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:W.\u9002\u5B9C,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(23, 194, 180, 1)",color:new R(0,0,0,1,[{offset:0,color:"rgba(23, 194, 180, 0.7)"},{offset:1,color:"rgba(23, 194, 180, 0.7)"}])}}},{name:"\u6E7F\u6DA6",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:W.\u6E7F\u6DA6,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(9, 222, 133, 1)",color:new R(0,0,0,1,[{offset:0,color:"rgba(9, 222, 133, 0.7)"},{offset:1,color:"rgba(9, 222, 133, 0.7)"}])}}}]};e.on("click",function(o){console.log(o.name)}),e.on("click",o=>Ge(o)),t&&e.setOption(t,{notMerge:!0,grid:{bottom:20}}),me(e,t)}function ne(e,t){let o=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:e,parameters:{service:"WMS",format:"image/png",transparent:!0}});o.customName=t;let a=i.imageryLayers.addImageryProvider(o);t.indexOf("gbznt")>-1&&(i.imageryLayers.lowerToBottom(a),i.imageryLayers.raise(a))}function Qe(){delete p.value.XZQMC,C(["gbznt"],!0),C(["aaa"]),y.value="370211",J(),F.value==="1"&&(console.log(F.value),ne("shuzisannong:huangdaoqu_town","tl")),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),F.value=!1,q()}function Ge(e){delete p.value,C(["huangdaoqu_town"],!0),C(["tl"],!0);let t="shuzisannong:farmland",o=!1;const a=i.imageryLayers._layers;for(let s=a.length-1;s>=0;s--)a[s]&&a[s]._imageryProvider.customName&&a[s]._imageryProvider.customName===t+"gbznt"&&(o=!0);o||(ne(t,t+"gbznt"),p.value.label=[{crop:"\u5C0F\u9EA6",Shape_Area:"53000"},{crop:"\u5730\u74DC",Shape_Area:"50000"}]),xe.value.forEach(s=>{console.log("it.properties.name:",s.properties.name),console.log("item.name:",e.name),s.properties.name===e.name&&(console.log("dingwei"),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(s.bbox[0],s.bbox[1],s.bbox[2],s.bbox[3]),duration:2}))}),F.value="1",Y({x:642,y:312})}function O(){const e=K(ye.value);var t={grid:{bottom:"8%",left:"10%",right:"6%",top:"12%",containLabel:!0},legend:{top:"5%",left:"10%",icon:"rect",textStyle:{color:"#fff"}},tooltip:{formatter:function(o){return o.seriesName+'<span style="font-size: 14px; color: #f00;">'+(o.value/666.67).toFixed(2)+"</span>\u4EA9"}},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(255, 255, 255, 1)",formatter:"{value}"},data:V.title,inverse:!0}],series:[{type:"bar",name:"\u7389\u7C73",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"\u7389\u7C73",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(4, 247, 227, 0.9)"},{offset:1,color:"rgba(4, 247, 227, 0.25)"}]}},data:T.\u7389\u7C73},{type:"bar",name:"\u5927\u8C46",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u5927\u8C46",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(143, 186, 243, 0.9)"},{offset:1,color:"rgba(143, 186, 243, 0.3)"}]}},data:T.\u5927\u8C46},{type:"bar",name:"\u82B1\u751F",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u82B1\u751F",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(4, 247, 227, 0.9)"},{offset:1,color:"rgba(4, 247, 227, 0.25)"}]}},data:T.\u82B1\u751F},{type:"bar",name:"\u5C0F\u9EA6",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u5C0F\u9EA6",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(33, 187, 251, 0.9)"},{offset:1,color:"rgba(33, 187, 251, 0.25)"}]}},data:T.\u5C0F\u9EA6},{type:"bar",name:"\u84DD\u8393",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u84DD\u8393",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(14, 223, 255, 0.9)"},{offset:1,color:"rgba(14, 223, 255, 0.25)"}]}},data:T.\u84DD\u8393}]};me(e,t)}function Ve(){let e=We.value;console.log("fl:",e),de({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson"}).then(t=>{console.log("res1111:",t),t.data.features.forEach((a,r)=>{const s=Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),f=Cesium.Rectangle.center(s);let d=Cesium.Math.toDegrees(f.longitude),b=Cesium.Math.toDegrees(f.latitude);a.properties.XZDM==="370211011"?(d=120.0863,b=35.941):a.properties.XZDM==="370211003"&&(d=120.243682,b=35.97123201);const S=e[a.properties.XZMC];let u=[];S&&(u=S.map((m,n)=>m.properties)),i.entities.add({name:"point"+a.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(d,b),point:new Cesium.PointGraphics({show:!0,pixelSize:10,color:Cesium.Color.fromCssColorString("rgba(255, 255, 26, 1)"),outlineColor:new Cesium.Color(0,0,0,0),outlineWidth:0,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND}),info:{label:u,...a.properties,lon:d,lat:b}})})}).catch(t=>{})}let We=c({});function je(){de({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(e=>{let t=e.data.features,o={};t.forEach(a=>{let r=a.properties.town;o[r]?o[r].push(a):o[r]=[a]}),We.value=o,Ve()}).catch(e=>{})}function ce(){if(p.value&&p.value.lon&&p.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(p.value.lon),Number(p.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(i.scene,t);if(Cesium.defined(e)){const o=document.getElementById("pop");o&&(o.style.top=e.y-10+"px",o.style.left=e.x+10+"px")}}}function q(){delete p.value.XZQMC,j="",C(["village_CQL"]),P("villageLine"),P("townLine");const e=document.getElementById("pop");e&&(e.style.display="none"),i.scene.postRender.removeEventListener(ce)}function Y(e){if(p.value.label.length){const t=document.getElementById("pop");t&&(t.style.display="block",t.style.position="absolute",t.style.top=e.y-10+"px",t.style.left=e.x+10+"px",t.style.zIndex=99)}}return(e,t)=>{const o=k("el-table-column"),a=k("el-table"),r=k("el-tooltip"),s=k("el-option"),f=k("el-select"),d=k("el-checkbox"),b=k("el-checkbox-group"),S=k("el-collapse-item"),u=k("el-collapse"),m=k("el-button");return v(),M("div",vt,[ht,l("div",yt,[l("div",_t,[l("div",xt,[wt,l("p",{onClick:t[0]||(t[0]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianj_zuoshang.xlsx"))},[X(" \u4E0B\u8F7D \xA0 "),Ct])]),l("div",{ref_key:"areaDiv",ref:be,class:"areaDiv"},null,512),l("div",{ref_key:"leftProgressBarDiv",ref:ze,class:"ProgressBar"},null,512)]),l("div",St,[l("div",Dt,[kt,l("p",{onClick:t[1]||(t[1]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianji%20.xlsx"))},[X(" \u4E0B\u8F7D \xA0 "),Mt])]),l("div",{ref_key:"typesofDiv",ref:ve,class:"typesofDiv"},null,512),l("div",Lt,[h(a,{data:g(le),style:{width:"100%"}},{default:_(()=>[h(o,{prop:"date",label:"\u7C7B\u578B"}),h(o,{prop:"name",label:"\u9762\u79EF"}),h(o,{prop:"address",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),l("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=n=>Pe())},[h(r,{class:"box-item","show-arrow":!1,disabled:g(E),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:_(()=>[g(E)?Z("v-if",!0):(v(),M("img",Wt))]),_:1},8,["disabled"]),h(r,{disabled:!g(E),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:_(()=>[g(E)?(v(),M("img",zt)):Z("v-if",!0)]),_:1},8,["disabled"])])]),l("div",At,[l("div",Tt,[l("div",It,[Et,l("p",{onClick:t[3]||(t[3]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/81f3b011-7a5d-4a21-88aa-8ea51142e564_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx"))},[X(" \u4E0B\u8F7D \xA0 "),Bt])]),l("div",{ref_key:"farmlandDiv",ref:he,class:"farmlandDiv"},null,512),Z(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",Zt,[l("div",Ft,[Pt,l("p",{onClick:t[4]||(t[4]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/0c0ff4cf-151a-470e-856a-b0fce0fde997_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx"))},[X(" \u4E0B\u8F7D \xA0 "),Xt])]),h(f,{"popper-class":"select_city",onChange:t[5]||(t[5]=n=>J(e.item)),modelValue:y.value,"onUpdate:modelValue":t[6]||(t[6]=n=>y.value=n),clearable:"",placeholder:"\u5168\u90E8"},{default:_(()=>[(v(!0),M(ue,null,fe(g(w).arr,n=>(v(),pe(s,{key:n.properties.XZDM,label:n.properties.XZMC,value:n.properties.XZDM},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:ye,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=n=>Xe())},[h(r,{disabled:!g(B),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:_(()=>[g(B)?(v(),M("img",Rt)):Z("v-if",!0)]),_:1},8,["disabled"]),h(r,{disabled:g(B),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:_(()=>[g(B)?Z("v-if",!0):(v(),M("img",Nt))]),_:1},8,["disabled"])])]),l("div",Ot,[h(pt)]),qt,h(u,{class:"legend",accordion:""},{default:_(()=>[h(S,{name:"1"},{title:_(()=>[X("\u56FE\u4F8B")]),default:_(()=>[l("div",Qt,[h(b,{modelValue:we.value,"onUpdate:modelValue":t[8]||(t[8]=n=>we.value=n),onChange:e.change},{default:_(()=>[(v(!0),M(ue,null,fe(g(Ae),(n,z,A)=>(v(),pe(d,{key:A,style:Ke({backgroundColor:n.color,border:"1px solid value.color",width:"100%"}),"v-model":n.disabled,disabled:n.disabled,label:z},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),l("div",Gt,[l("div",null,Q(_e.value.name)+"\uFF1A",1),l("div",null,Q(_e.value.value)+"\u4EA9",1),l("div",{class:"cancel",onClick:q},"X")]),l("div",Vt,[(v(!0),M(ue,null,fe(g(p).label,(n,z)=>(v(),M("div",{key:z},[l("div",null,Q(n.crop)+"\uFF1A",1),l("div",null,Q((n.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),g(p).XZQMC?(v(),M("div",jt,[Jt,l("div",null,Q(g(p).XZQMC),1)])):Z("v-if",!0),l("div",{class:"cancel",onClick:q},"X")]),F.value?(v(),pe(m,{key:0,class:"back_button",onClick:t[9]||(t[9]=n=>Qe())},{default:_(()=>[X("\u8FD4\u56DE")]),_:1})):Z("v-if",!0)])}}},ao=$e($t,[["__scopeId","data-v-e73613e6"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/meteorological/remoteSense/drought/index.vue"]]);export{ao as default};