import{H as I,_ as vt,r as f,A as be,U as ze,V as ht,W as _e,d as D,o as x,c as k,l as n,m as F,e as c,w as m,f as g,g as E,L as j,N as H,k as q,F as yt,x as V,y as bt,p as _t,q as wt}from"./index.48137ccf.js";import le from"./downloads.e955445d.js";import{_ as re}from"./close1.45635d81.js";import{_ as xt,a as Ct,b as St,c as Dt,d as kt,e as Ft}from"./linesGL.90f708a5.js";import{_ as Lt}from"./dow.f37c8d82.js";import{i as oe}from"./index.c9f5bd8b.js";import{T as Nt}from"./TimeLine.74a971ad.js";import{u as We}from"./useEcharts.5ac9cbca.js";import{d as G}from"./download.b1d8c1b6.js";import{u as we,w as Tt}from"./xlsx.86b9426e.js";function Ae(_){return I({url:"equipment/damageArea",method:"get",params:_})}function Oe(_){return I({url:"equipment/proportion",method:"get",params:_})}function Re(_){return I({url:"equipment/highStandard",method:"get",params:_})}function Ze(_){return I({url:"equipment/townInformation",method:"get",params:_})}function Xe(_){return I({url:"equipment/village",method:"get",params:_})}function Mt(){return I({url:"http://36.134.44.75:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson",method:"get"})}function Et(_){return I({url:"equipment/listDroughtsDamageYear",method:"get",params:_})}function It(_){return I({url:"equipment/listDroughtsDamage",method:"get",params:_})}const L=_=>(_t("data-v-a89f9b9b"),_=_(),wt(),_),Pt={class:"fatherDiv"},zt={class:"centerBox"},Wt=L(()=>n("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),At={class:"leftWra"},Ot={class:"leftTop"},Rt={class:"title"},Zt=L(()=>n("span",null,"\u519C\u4F5C\u7269\u53D7\u707E\u9762\u79EF\u7EDF\u8BA1",-1)),Xt=L(()=>n("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),qt={class:"leftbottom"},Vt={class:"title"},Bt=L(()=>n("span",null,"\u519C\u4F5C\u7269\u53D7\u707E\u9762\u79EF\u5360\u6BD4",-1)),Jt=L(()=>n("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Qt={class:"tableDiv"},$t={key:0,src:re,alt:""},Ut={key:0,class:"imgrotate",src:re,alt:""},jt={class:"rightWra"},Ht={class:"rightTop"},Gt={class:"title"},Yt=L(()=>n("span",null,"\u6D2A\u6D9D\u9762\u79EF\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Kt=L(()=>n("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ea={class:"farmlandDiv"},ta={class:"rightbottom"},aa={class:"title"},oa=L(()=>n("span",null,"\u6D2A\u6D9D\u9762\u79EF\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),la=L(()=>n("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ra={class:"ASdivision"},na={key:0,src:re,alt:""},ia={key:0,class:"imgrotate",src:re,alt:""},sa={class:"bottom_center"},ua=bt('
',1),da={class:"mt-4"},ca={id:"popup"},fa={id:"pop"},pa={key:0},ga=L(()=>n("div",null,"\u6751\u540D\uFF1A",-1)),ma={class:"tabulation"},va={class:"searchDiv"},ha=L(()=>n("img",{src:Lt,alt:""},null,-1)),ya={class:"chartMode"},ba={__name:"FloodExtraction",setup(_){let p=f(null);const xe=f(null),Ce=f(null);f(null);const C=f("370211");f(null);let T=be({arr:[],brr:[],crr:[]});const M=f({name:"",value:""}),qe=f([]),B=f(!1);let P=f(!1),z=f(!1);const Y=f(["false"]);let Se=f([]),J=be({lable:[],value:[]}),ne=f([]),ie=f(0),Q=f([]);const O=f([]);let K=f([]);const se=f(0);let $=f(!0);f(1),f(12);let ue=f([]);const de=f(null);let h=f([{\u6D2A\u6D9D:0}]),v=f({time:"",statistical:"\u884C\u653F\u533A\u5212",droughtRating:"",area:se.value}),ce={\u6D2A\u6D9D\u533A:{color:"rgba(9, 187, 222, 1)",disabled:!1}},fe=f([]);ze(()=>T.arr,t=>{console.log("val:",t)});var De={title:[]};let pe={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]};ze(()=>Y.value,(t,e)=>{t.length>e.length?t.filter(l=>{if(e.findIndex(o=>o===l)<0)return l}).forEach(l=>{switch(l){case"\u6D2A\u6D9D\u533A":ke(2,l);break}}):t.length{if(t.findIndex(o=>o===l)<0)return l}).forEach(l=>{R([l])})});let ge=f([]);ht(()=>{Fe("370211"),Le("370211"),at(),Ne("370211"),tt(),Be(),Te(),Me(),Qe();for(const a in ce)ce[a].disabled!==!0&&Se.value.push(a);Y.value=Se.value;let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(-107%,0)");let e=document.querySelector(".rightWra");e.style.transform="translate(107%,0)"});const Ve={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 Be(){p=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({...Ve})}),p.cesiumWidget.creditContainer.style.display="none",ke(2,"\u6D2A\u6D9D\u533A"),Ee("shuzisannong:huangdaoqu_town","tl"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),$e(),gt()}function me(t,e,a){t.forEach(l=>{let r=[];l[0].forEach(o=>{r.push(o[0]),r.push(o[1])}),p.entities.add({name:e,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(r),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:a?Cesium.Color.fromCssColorString(a):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function Je(t){return t>48e6?0:t>24e6?1:t>12e6?2:t>6e6?3:t>3e6?4:t>15e5?5:t>75e4?6:t>375e3?7:t>187500?8:t>93750?9:t>46875?10:t>23437.5?11:t>11718.75?12:t>5859.38?13:t>2929.69?14:t>1464.84?15:t>732.42?16:t>366.21?17:18}function Qe(){_e({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),qe.value=t.data.features}).catch(t=>{})}let U=f({label:[]}),ee="";function $e(){var t=new Cesium.ScreenSpaceEventHandler(p.canvas);t.setInputAction(function(e){var a=p.camera.getPickRay(e.position),l=p.scene.globe.pick(a,p.scene);if(l){let r=Cesium.Cartographic.fromCartesian(l);if(r){let o=new Cesium.Cartesian2,d=p.camera.positionCartographic.height,i=Je(d);const y=p.imageryLayers._layers,b=y.findIndex(u=>u._imageryProvider._layers&&u._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(b>-1){const u=y[b];let w=u._imageryProvider;if(w&&w.ready&&w._layers&&u.show===!0){o=w.tilingScheme.positionToTileXY(r,i,o);let N=w.pickFeatures(o.x,o.y,i,r.longitude,r.latitude);N&&N.then(Z=>{if(Z.length>0){let s=Z[0];if(s.properties&&s.properties.XZDM)if(console.log("XZDM:",ee),console.log("newData.properties.XZDM:",s.properties.XZDM),ee!==s.properties.XZDM){B.value=!0,ee=s.properties.XZDM,C.value=ee,te&&te();let S=s.data;p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(S.bbox[0],S.bbox[1],S.bbox[2],S.bbox[3]),duration:2}),W("townLine"),me(S.geometry&&S.geometry.coordinates,"townLine","yellow"),R(["village_CQL"]),console.log(s.properties.XZDM),He(`XZDM=${s.properties.XZDM}`,"village_CQL");let X=p.entities._entities._array;for(var A=X.length-1;A>=0;A--)if(X[A]._name&&X[A]._name==="point"+s.properties.XZDM){let mt=X[A]._info;U.value=mt,Pe(e.position),p.scene.postRender.addEventListener(ye)}W("villageLine"),ve=""}else Ue(y,o,i,r,e);else R(["village_CQL"]),ae()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let ve="";function Ue(t,e,a,l,r){const o=t.findIndex(d=>d._imageryProvider._layers&&d._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(o>-1){const d=t[o];let i=d._imageryProvider;if(i&&i.ready&&i._layers&&d.show===!0){e=i.tilingScheme.positionToTileXY(l,a,e);let y=i.pickFeatures(e.x,e.y,a,l.longitude,l.latitude);y&&y.then(b=>{if(b.length>0){let u=b[0];if(console.log(u),p.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)if(ve!==u.properties.XZQDM){ve=u.properties.XZQDM;let w=u.data;W("villageLine"),me(w.geometry&&w.geometry.coordinates,"villageLine","yellow")}else je(t,e,a,l,r)}})}}}function je(t,e,a,l,r){console.log(l);const o=t.findIndex(d=>d._imageryProvider._layers&&d._imageryProvider._layers==="shuzisannong:result");if(o>-1){const d=t[o];let i=d._imageryProvider;if(i&&i.ready&&i._layers&&d.show===!0){e=i.tilingScheme.positionToTileXY(l,a,e);let y=i.pickFeatures(e.x,e.y,a,l.longitude,l.latitude);y&&y.then(b=>{if(b.length>0){let u=b[0],w="";switch(u.properties.value){case 2:w="\u6D2A\u6D9D\u533A";break}let N=Cesium.Math.toDegrees(l.longitude).toFixed(6),Z=Cesium.Math.toDegrees(l.latitude).toFixed(6);M.value={lon:N,lat:Z,grade:w},console.log(M.value),Pe(r.position),p.scene.postRender.addEventListener(ye)}})}}}function He(t,e){let a=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:t}});a.customName=e,p.imageryLayers.addImageryProvider(a)}function R(t,e){if(p){const a=p.imageryLayers._layers;for(let l=a.length-1;l>=0;l--)t.forEach(r=>{a[l]._imageryProvider&&a[l]._imageryProvider.customName&&(e?a[l]._imageryProvider.customName.indexOf(r)>-1&&p.imageryLayers.remove(a[l]):a[l]._imageryProvider.customName===r&&p.imageryLayers.remove(a[l]))})}}function W(t){if(p){let a=p.entities._entities._array;for(var e=a.length-1;e>=0;e--)a[e]._name&&a[e]._name===t&&p.entities.remove(a[e])}}function Ge(){if(P.value=!P.value,P.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 Ye(){if(z.value=!z.value,z.value){let t=document.querySelector(".rightWra");t.style.transform="translate(0,0)"}else{let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"}}function ke(t,e){let a=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:result",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:`value in (${t})`}});a.customName=e,p.imageryLayers.addImageryProvider(a)}const Ke=t=>{v.value.area=t},he=()=>{v.value.statistical!=="\u884C\u653F\u533A\u5212"&&(v.value.droughtRating=null);let t=[],e=[];It({time:v.value.time,statistical:v.value.statistical,droughtRating:v.value.droughtRating,area:v.value.area}).then(a=>{if(v.value.statistical=="\u884C\u653F\u533A\u5212"){a.data.forEach(o=>{t.indexOf(o.typeName)==-1&&t.push(o.typeName)}),t.forEach(o=>{e.push(Object.create(null,{regio:{value:o}}))}),e.forEach(o=>{a.data.map(d=>{o.regio===d.typeName&&(o.region=d.typeName,o.\u6D2A\u6D9D=Number(d.yesFlooding).toFixed(2))})}),$.value=!1,O.value=e,h.value[0].\u6D2A\u6D9D=0,h.value[0].region="\u5408\u8BA1",e.forEach(o=>{o.\u6D2A\u6D9D&&(h.value[0].\u6D2A\u6D9D+=Number(o.\u6D2A\u6D9D)!==NaN?Number(o.\u6D2A\u6D9D):0)});for(const o in h.value[0])h.value[0][o]!=="\u5408\u8BA1"&&(h.value[0][o]=h.value[0][o].toFixed(2))}else if(v.value.statistical=="\u4F5C\u7269\u7C7B\u578B"){a.data.forEach(o=>{t.indexOf(o.type)==-1&&t.push(o.type)}),t.forEach(o=>{e.push(Object.create(null,{regio:{value:o}}))}),e.forEach(o=>{a.data.map(d=>{o.regio===d.type&&(o.region=d.type,o.\u6D2A\u6D9D=Number(d.yesFlooding).toFixed(2))})}),$.value=!1,O.value=e,h.value[0].\u6D2A\u6D9D=0,h.value[0].region="\u5408\u8BA1",e.forEach(o=>{o.\u6D2A\u6D9D&&(h.value[0].\u6D2A\u6D9D+=Number(o.\u6D2A\u6D9D)!==NaN?Number(o.\u6D2A\u6D9D):0)});for(const o in h.value[0])h.value[0][o]!=="\u5408\u8BA1"&&(h.value[0][o]=h.value[0][o].toFixed(2))}else if(v.value.statistical=="\u9AD8\u6807\u51C6\u519C\u7530"){console.log(a.data),a.data.forEach(o=>{t.indexOf(o.region)==-1&&t.push(o.region)}),t.forEach(o=>{e.push(Object.create(null,{regio:{value:o}}))}),e.forEach(o=>{a.data.map(d=>{o.regio===d.region&&(o.region=d.region,o.\u6D2A\u6D9D=Number(d.yesFlooding).toFixed(2))})}),$.value=!1,O.value=e,h.value[0].\u6D2A\u6D9D=0,h.value[0].region="\u5408\u8BA1",e.forEach(o=>{o.\u6D2A\u6D9D&&(h.value[0].\u6D2A\u6D9D+=Number(o.\u6D2A\u6D9D)!==NaN?Number(o.\u6D2A\u6D9D):0)});for(const o in h.value[0])h.value[0][o]!=="\u5408\u8BA1"&&(h.value[0][o]=h.value[0][o].toFixed(2))}const l=de.value;l.style.width=window.innerWidth-100+"px",l.style.height=window.innerHeight-100+"px";const r=oe(l);window.addEventListener("resize",()=>{l.style.width=window.innerWidth-200+"px",l.style.height=window.innerHeight-200+"px",r.resize()}),ct()})},et=()=>{v.value.time=ue.value[0],v.value.statistical="\u884C\u653F\u533A\u5212",v.value.droughtRating="",v.value.area=0,$.value=!0,he()},tt=()=>{Et().then(t=>{console.log(t),ue.value=t.data,v.value.time=t.data[0],he()})},Fe=t=>{J=be({lable:[],value:[]}),Ae({divisions:t}).then(e=>{e.data.forEach(a=>{J.lable.push(a.type),J.value.push(a.yesFlooding)}),Te()})},Le=t=>{ne=f([]),ge=f([]),ie=f(0),Oe({divisions:t}).then(e=>{e.data.forEach(a=>{ie.value+=Number(a.yesFlooding),ne.value.push({name:a.type,value:a.yesFlooding}),ge.value.push({type:a.type,yesFlooding:`${a.yesFlooding}\u4EA9`,zb:`${(a.zb*100).toFixed(2)}%`})}),Me()})},at=()=>{Re().then(t=>{console.log(t.data),fe.value=JSON.parse(JSON.stringify(t.data)),console.log(fe.value)})},Ne=t=>{Q=f([]),Ze({divisions:t}).then(e=>{T.arr=e.data.sort((r,o)=>r.name.length-o.name.length),T.arr.forEach(r=>{Q.value.push({name:r.name,subregion:r.subregion,yesFloodingPercentage:r.yesFloodingPercentage,createdTime:r.createdTime})}),T.arr.unshift({subregion:"370211",name:"\u5168\u90E8"});let a=[],l=[];T.arr.forEach(r=>{a.indexOf(r.name)==-1&&(a.push(r.name),l.push({name:r.name,subregion:r.subregion,area:r.area,type:r.type}))}),T.arr=l,K.value=JSON.parse(JSON.stringify(T.arr)),K.value[0].subregion=null,console.log(K.value)})},ot=t=>{Q=f([]),Xe({divisions:t}).then(e=>{T.brr=e.data;let a=[...e.data],l=[];a.splice(0,1),a.forEach(r=>{l.indexOf(r.name)==-1&&l.push(r.name),Q.value.push({name:r.name,subregion:r.subregion,yesFloodingPercentage:r.yesFloodingPercentage,createdTime:r.createdTime})}),De.title=[...Object.values(l)],De.title.forEach((r,o)=>{let d=e.data.map(i=>{if(r===i.name)return i});Object.keys(pe).forEach(i=>{d.findIndex(b=>b&&b.type===i)>-1?pe[i].push(1):pe[i].push(null)})})})},te=()=>{if(Mt().then(t=>{console.log(t),t.features.forEach(e=>{e.properties.XZDM==C.value&&(W("townLine"),me(e.geometry.coordinates,"townLine","yellow"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(e.bbox[0],e.bbox[1],e.bbox[2],e.bbox[3]),duration:0}))})}),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),W("townLine"),ot(C.value),Le(C.value),Fe(C.value),C.value=="370211"){Ne(C.value);return}},lt=t=>{Ae({divisions:C.value,whetherToDownload:!0}).then(e=>{G(e.data[e.data.length-1].downloadPath)})},rt=t=>{Oe({divisions:C.value,whetherToDownload:!0}).then(e=>{G(e.data[e.data.length-1].downloadPath)})},nt=t=>{Re({divisions:C.value,whetherToDownload:!0}).then(e=>{G(e.data[e.data.length-1].downloadPath)})},it=t=>{C.value=="370211"?Ze({divisions:C.value,whetherToDownload:!0}).then(e=>{G(e.data[e.data.length-1].downloadPath)}):Xe({divisions:C.value,whetherToDownload:!0}).then(e=>{G(e.data[e.data.length-1].downloadPath)})},st=()=>{let t=JSON.parse(JSON.stringify(h.value[0]));t.region="\u5408\u8BA1",O.value.push(t),dt(O.value,"\u6D2A\u6D9D\u9762\u79EF\u7EDF\u8BA1\u8868","Sheet1")},ut=(t,e)=>t.map(l=>{const r={};for(const o in l)e[o]&&(r[e[o]]=l[o]);return r}),dt=(t,e="\u7528\u6237\u5217\u8868",a="Sheet1")=>{const r=ut(t,{region:"\u533A\u57DF\u540D\u79F0",\u6D2A\u6D9D:"\u6D2A\u6D9D (\u4EA9)"}),o=we.json_to_sheet(r),d=we.book_new();we.book_append_sheet(d,o,a),Tt(d,`${e}.xlsx`)};function Te(){const t=oe(xe.value);var e={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%",bottom: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:J.lable,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:J.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"}}}]};e&&t.setOption(e),window.addEventListener("resize",function(){t.resize()})}function Me(){const t=oe(Ce.value);var e=ne.value;let a={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:`${ie.value}\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:e},tooltip:{trigger:"item",axisPointer:{type:"shadow"},formatter:"{a}
{b} : {c}
\u767E\u5206\u6BD4 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"\u5404\u51B7\u51BB\u7B49\u7EA7\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%"],label:{normal:{show:!1}},data:[{value:9,name:"",itemStyle:{normal:{borderWidth:2,borderColor:"#0b5263"}}}]}]};We(t,a)}function ct(){const t=oe(de.value);let e=[],a=[];O.value.forEach(i=>{e.push(i.region),i.\u6D2A\u6D9D!==void 0?a.push(i.\u6D2A\u6D9D):a.push(0)});let l=10/e.length*100,r={tooltip:{trigger:"axis",formatter:function(i){let y=i[0].axisValueLabel+"
",b=0;for(let u=0;u");for(let u=0;u",b=0;for(let u=0;u`;b+=i[u].value,y+=w+i[u].seriesName+"\uFF1A"+i[u].value+"
"}for(let u=0;u-1&&(p.imageryLayers.lowerToBottom(l),p.imageryLayers.raise(l))}function ft(){W("villageLine"),R(["village_CQL"]),W("townLine"),delete U.value.XZQMC,R(["gbznt"],!0),R(["aaa"]),C.value="370211",te(),B.value==="1"&&(console.log(B.value),Ee("shuzisannong:huangdaoqu_town","tl")),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),B.value=!1,ae()}function pt(){let t=Ie.value;console.log("fl:",t),_e({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson"}).then(e=>{console.log("res1111:",e),e.data.features.forEach((l,r)=>{const o=Cesium.Rectangle.fromDegrees(l.bbox[0],l.bbox[1],l.bbox[2],l.bbox[3]),d=Cesium.Rectangle.center(o);Cesium.Math.toDegrees(d.longitude),Cesium.Math.toDegrees(d.latitude),l.properties.XZDM==="370211011"||l.properties.XZDM;const i=t[l.properties.XZMC];i&&i.map((y,b)=>y.properties)})}).catch(e=>{})}let Ie=f({});function gt(){_e({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(t=>{let e=t.data.features,a={};e.forEach(l=>{let r=l.properties.town;a[r]?a[r].push(l):a[r]=[l]}),Ie.value=a,pt()}).catch(t=>{})}function ye(){if(M.value.lon&&M.value.lat){const e=Cesium.Cartesian3.fromDegrees(Number(M.value.lon),Number(M.value.lat),0);var t=Cesium.SceneTransforms.wgs84ToWindowCoordinates(p.scene,e);if(Cesium.defined(t)){const a=document.getElementById("popup");a&&(a.style.top=t.y-10+"px",a.style.left=t.x+10+"px")}}}function ae(){const t=document.getElementById("popup");t&&(t.style.display="none"),p.scene.postRender.removeEventListener(ye)}function Pe(t){const e=document.getElementById("popup");e&&(e.style.display="block",e.style.position="absolute",e.style.top=t.y-10+"px",e.style.left=t.x+10+"px",e.style.zIndex=99)}return(t,e)=>{const a=D("el-table-column"),l=D("el-table"),r=D("el-tooltip"),o=D("el-option"),d=D("el-select"),i=D("el-checkbox"),y=D("el-checkbox-group"),b=D("el-collapse-item"),u=D("el-collapse"),w=D("el-button"),N=D("el-form-item"),Z=D("el-input-number"),A=D("el-form");return x(),k("div",Pt,[n("div",zt,[Wt,n("div",At,[n("div",Ot,[n("div",Rt,[Zt,n("p",{onClick:e[0]||(e[0]=s=>lt())},[F(" \u4E0B\u8F7D \xA0 "),Xt])]),n("div",{ref_key:"areaDiv",ref:xe,class:"areaDiv"},null,512)]),n("div",qt,[n("div",Vt,[Bt,n("p",{onClick:e[1]||(e[1]=s=>rt())},[F(" \u4E0B\u8F7D \xA0 "),Jt])]),n("div",{ref_key:"typesofDiv",ref:Ce,class:"typesofDiv"},null,512),n("div",Qt,[c(l,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:g(ge),style:{width:"100%"}},{default:m(()=>[c(a,{prop:"type",label:"\u7C7B\u578B"}),c(a,{prop:"yesFlooding",label:"\u9762\u79EF"}),c(a,{prop:"zb",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),n("div",{class:"leftFoldDiv",onClick:e[2]||(e[2]=s=>Ge())},[c(r,{class:"box-item","show-arrow":!1,disabled:g(P),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:m(()=>[g(P)?E("v-if",!0):(x(),k("img",$t))]),_:1},8,["disabled"]),c(r,{disabled:!g(P),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:m(()=>[g(P)?(x(),k("img",Ut)):E("v-if",!0)]),_:1},8,["disabled"])])]),n("div",jt,[n("div",Ht,[n("div",Gt,[Yt,n("p",{onClick:e[3]||(e[3]=s=>nt())},[F(" \u4E0B\u8F7D \xA0 "),Kt])]),n("div",ea,[c(l,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:g(fe),style:{width:"100%","font-size":"12px"}},{default:m(()=>[c(a,{prop:"region",label:"\u533A\u57DF\u540D\u79F0"}),c(a,{prop:"yesFlooding",width:"120",label:"\u6D2A\u6D9D\u9762\u79EF\uFF08\u4EA9\uFF09"}),c(a,{prop:"createdTime",label:"\u76D1\u6D4B\u65F6\u95F4"})]),_:1},8,["data"])]),E('
')]),n("div",ta,[n("div",aa,[oa,n("p",{onClick:e[4]||(e[4]=s=>it())},[F(" \u4E0B\u8F7D \xA0 "),la])]),c(d,{"popper-class":"select_city",onChange:e[5]||(e[5]=s=>te(t.item)),modelValue:C.value,"onUpdate:modelValue":e[6]||(e[6]=s=>C.value=s),placeholder:"\u5168\u90E8"},{default:m(()=>[(x(!0),k(j,null,H(g(T).arr,s=>(x(),q(o,{key:s.subregion,label:s.name,value:s.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),n("div",ra,[c(l,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:g(Q),style:{width:"100%","font-size":"12px"}},{default:m(()=>[c(a,{prop:"name",label:"\u533A\u57DF\u540D\u79F0"}),c(a,{prop:"yesFloodingPercentage",width:"120",label:"\u6D2A\u6D9D\u9762\u79EF(\u4EA9\uFF09"}),c(a,{prop:"createdTime",width:"100",label:"\u76D1\u6D4B\u65F6\u95F4"})]),_:1},8,["data"])])]),n("div",{class:"rightFoldDiv",onClick:e[7]||(e[7]=s=>Ye())},[c(r,{disabled:!g(z),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:m(()=>[g(z)?(x(),k("img",na)):E("v-if",!0)]),_:1},8,["disabled"]),c(r,{disabled:g(z),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:m(()=>[g(z)?E("v-if",!0):(x(),k("img",ia))]),_:1},8,["disabled"])])]),n("div",sa,[c(Nt)]),ua,c(u,{class:"legend",accordion:""},{default:m(()=>[c(b,{name:"1"},{title:m(()=>[F("\u56FE\u4F8B")]),default:m(()=>[n("div",da,[c(y,{modelValue:Y.value,"onUpdate:modelValue":e[8]||(e[8]=s=>Y.value=s),onChange:t.change},{default:m(()=>[(x(!0),k(j,null,H(g(ce),(s,S,X)=>(x(),q(i,{key:X,style:yt({backgroundColor:s.color,border:"1px solid value.color",width:"100%"}),"v-model":s.disabled,disabled:s.disabled,label:S},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),n("div",ca,[n("div",null,[F(" \u7B49\u7EA7\uFF1A "),n("p",null,V(M.value.grade),1)]),n("div",null,[F(" \u7ECF\u5EA6\uFF1A "),n("p",null,V(M.value.lon),1)]),n("div",null,[F(" \u7EAC\u5EA6\uFF1A "),n("p",null,V(M.value.lat),1)]),n("div",{class:"cancel",onClick:ae},"X")]),n("div",fa,[(x(!0),k(j,null,H(g(U).label,(s,S)=>(x(),k("div",{key:S},[n("div",null,V(s.crop)+"\uFF1A",1),n("div",null,V(s.Shape_Area)+" \u4EA9",1)]))),128)),g(U).XZQMC?(x(),k("div",pa,[ga,n("div",null,V(g(U).XZQMC),1)])):E("v-if",!0),n("div",{class:"cancel",onClick:ae},"X")]),B.value?(x(),q(w,{key:0,class:"back_button",onClick:e[9]||(e[9]=s=>ft())},{default:m(()=>[F("\u8FD4\u56DE")]),_:1})):E("v-if",!0)]),n("div",ma,[n("div",va,[c(A,{inline:!0,model:g(v),class:"demo-form-inline"},{default:m(()=>[c(N,{label:"\u65F6\u95F4:"},{default:m(()=>[c(d,{"popper-class":"selectCity",modelValue:g(v).time,"onUpdate:modelValue":e[10]||(e[10]=s=>g(v).time=s),placeholder:"\u8BF7\u9009\u62E9"},{default:m(()=>[(x(!0),k(j,null,H(g(ue),(s,S)=>(x(),q(o,{key:S,label:t.Zitem,value:s},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),c(N,{label:"\u7EDF\u8BA1\u65B9\u5F0F:"},{default:m(()=>[c(d,{"popper-class":"selectCity",modelValue:g(v).statistical,"onUpdate:modelValue":e[11]||(e[11]=s=>g(v).statistical=s),placeholder:"\u8BF7\u9009\u62E9"},{default:m(()=>[c(o,{label:"\u4F5C\u7269\u7C7B\u578B",value:"\u4F5C\u7269\u7C7B\u578B"}),c(o,{label:"\u884C\u653F\u533A\u5212",value:"\u884C\u653F\u533A\u5212"}),c(o,{label:"\u9AD8\u6807\u51C6\u519C\u7530",value:"\u9AD8\u6807\u51C6\u519C\u7530"})]),_:1},8,["modelValue"])]),_:1}),c(N,{label:"\u9547"},{default:m(()=>[c(d,{modelValue:g(v).droughtRating,"onUpdate:modelValue":e[12]||(e[12]=s=>g(v).droughtRating=s),"popper-class":"selectCity",disabled:g(v).statistical!=="\u884C\u653F\u533A\u5212",placeholder:g(v).statistical==="\u884C\u653F\u533A\u5212"?"\u5168\u90E8":"\u8BF7\u9009\u62E9"},{default:m(()=>[(x(!0),k(j,null,H(g(K),(s,S)=>(x(),q(o,{key:S,label:s.name,value:s.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","placeholder"])]),_:1}),c(N,{label:"\u9762\u79EF(\u4EA9)>"},{default:m(()=>[c(Z,{modelValue:se.value,"onUpdate:modelValue":e[13]||(e[13]=s=>se.value=s),min:0,onChange:Ke},null,8,["modelValue"])]),_:1}),c(N,null,{default:m(()=>[c(w,{type:"primary",onClick:he},{default:m(()=>[F("\u67E5\u8BE2")]),_:1}),c(w,{plain:"",onClick:et},{default:m(()=>[F("\u91CD\u7F6E")]),_:1}),g($)?E("v-if",!0):(x(),q(w,{key:0,type:"primary",text:"",onClick:st},{default:m(()=>[ha,F(" \u4E0B\u8F7D ")]),_:1}))]),_:1})]),_:1},8,["model"])]),n("div",ya,[n("div",{ref_key:"chartModeDiv",ref:de,class:"chartModeDiv"},null,512)])])])}}},Ta=vt(ba,[["__scopeId","data-v-a89f9b9b"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/meteorological/remoteSense/FloodExtraction/FloodExtraction.vue"]]);export{Ta as default};