Agriculture-front-end/dist/assets/FloodExtraction.cfe7e75a.js
2023-06-08 09:27:01 +08:00

2 lines
30 KiB
JavaScript

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 w,c as k,l as i,m as F,e as d,w as m,f as g,g as E,L as j,N as G,k as q,F as yt,x as V,y as bt,p as _t,q as wt}from"./index.9ec53a6c.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.25f0d6b1.js";import{u as We}from"./useEcharts.ff70d170.js";import{d as H}from"./download.77748578.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(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),At={class:"leftWra"},Ot={class:"leftTop"},Rt={class:"title"},Zt=L(()=>i("span",null,"\u519C\u4F5C\u7269\u53D7\u707E\u9762\u79EF\u7EDF\u8BA1",-1)),Xt=L(()=>i("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),qt={class:"leftbottom"},Vt={class:"title"},Bt=L(()=>i("span",null,"\u519C\u4F5C\u7269\u53D7\u707E\u9762\u79EF\u5360\u6BD4",-1)),Jt=L(()=>i("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"},Gt={class:"rightTop"},Ht={class:"title"},Yt=L(()=>i("span",null,"\u6D2A\u6D9D\u9762\u79EF\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Kt=L(()=>i("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ea={class:"farmlandDiv"},ta={class:"rightbottom"},aa={class:"title"},oa=L(()=>i("span",null,"\u6D2A\u6D9D\u9762\u79EF\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),la=L(()=>i("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('<div class="tool" data-v-a89f9b9b><span data-v-a89f9b9b><img src="'+xt+'" alt="" data-v-a89f9b9b></span><span data-v-a89f9b9b><img src="'+Ct+'" alt="" data-v-a89f9b9b></span><span data-v-a89f9b9b><img src="'+St+'" alt="" data-v-a89f9b9b></span><span data-v-a89f9b9b><img src="'+Dt+'" alt="" data-v-a89f9b9b></span><span data-v-a89f9b9b><img src="'+kt+'" alt="" data-v-a89f9b9b></span><span data-v-a89f9b9b><img src="'+Ft+'" alt="" data-v-a89f9b9b></span></div>',1),da={class:"mt-4"},ca={id:"popup"},fa={id:"pop"},pa={key:0},ga=L(()=>i("div",null,"\u6751\u540D\uFF1A",-1)),ma={class:"tabulation"},va={class:"searchDiv"},ha=L(()=>i("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 x=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<e.length&&e.filter(l=>{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 n=[];l[0].forEach(o=>{n.push(o[0]),n.push(o[1])}),p.entities.add({name:e,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(n),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 n=Cesium.Cartographic.fromCartesian(l);if(n){let o=new Cesium.Cartesian2,r=p.camera.positionCartographic.height,c=Je(r);const b=p.imageryLayers._layers,u=b.findIndex(y=>y._imageryProvider._layers&&y._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(u>-1){const y=b[u];let C=y._imageryProvider;if(C&&C.ready&&C._layers&&y.show===!0){o=C.tilingScheme.positionToTileXY(n,c,o);let N=C.pickFeatures(o.x,o.y,c,n.longitude,n.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,x.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),Ge(`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(b,o,c,n,e);else R(["village_CQL"]),ae()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let ve="";function Ue(t,e,a,l,n){const o=t.findIndex(r=>r._imageryProvider._layers&&r._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(o>-1){const r=t[o];let c=r._imageryProvider;if(c&&c.ready&&c._layers&&r.show===!0){e=c.tilingScheme.positionToTileXY(l,a,e);let b=c.pickFeatures(e.x,e.y,a,l.longitude,l.latitude);b&&b.then(u=>{if(u.length>0){let y=u[0];if(console.log(y),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(y.data.bbox[0],y.data.bbox[1],y.data.bbox[2],y.data.bbox[3]),duration:2}),y.properties&&y.properties.XZQDM)if(ve!==y.properties.XZQDM){ve=y.properties.XZQDM;let C=y.data;W("villageLine"),me(C.geometry&&C.geometry.coordinates,"villageLine","yellow")}else je(t,e,a,l,n)}})}}}function je(t,e,a,l,n){console.log(l);const o=t.findIndex(r=>r._imageryProvider._layers&&r._imageryProvider._layers==="shuzisannong:result");if(o>-1){const r=t[o];let c=r._imageryProvider;if(c&&c.ready&&c._layers&&r.show===!0){e=c.tilingScheme.positionToTileXY(l,a,e);let b=c.pickFeatures(e.x,e.y,a,l.longitude,l.latitude);b&&b.then(u=>{if(u.length>0){let y=u[0],C="";switch(y.properties.value){case 2:C="\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:C},console.log(M.value),Pe(n.position),p.scene.postRender.addEventListener(ye)}})}}}function Ge(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(n=>{a[l]._imageryProvider&&a[l]._imageryProvider.customName&&(e?a[l]._imageryProvider.customName.indexOf(n)>-1&&p.imageryLayers.remove(a[l]):a[l]._imageryProvider.customName===n&&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 He(){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(r=>{o.regio===r.typeName&&(o.region=r.typeName,o.\u6D2A\u6D9D=Number(r.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(r=>{o.regio===r.type&&(o.region=r.type,o.\u6D2A\u6D9D=Number(r.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(r=>{o.regio===r.region&&(o.region=r.region,o.\u6D2A\u6D9D=Number(r.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 n=oe(l);window.addEventListener("resize",()=>{l.style.width=window.innerWidth-200+"px",l.style.height=window.innerHeight-200+"px",n.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((n,o)=>n.name.length-o.name.length),T.arr.forEach(n=>{Q.value.push({name:n.name,subregion:n.subregion,yesFloodingPercentage:n.yesFloodingPercentage,createdTime:n.createdTime})}),T.arr.unshift({subregion:"370211",name:"\u5168\u90E8"});let a=[],l=[];T.arr.forEach(n=>{a.indexOf(n.name)==-1&&(a.push(n.name),l.push({name:n.name,subregion:n.subregion,area:n.area,type:n.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(n=>{l.indexOf(n.name)==-1&&l.push(n.name),Q.value.push({name:n.name,subregion:n.subregion,yesFloodingPercentage:n.yesFloodingPercentage,createdTime:n.createdTime})}),De.title=[...Object.values(l)],De.title.forEach((n,o)=>{let r=e.data.map(c=>{if(n===c.name)return c});Object.keys(pe).forEach(c=>{r.findIndex(u=>u&&u.type===c)>-1?pe[c].push(1):pe[c].push(null)})})})},te=()=>{if(Mt().then(t=>{console.log(t),t.features.forEach(e=>{e.properties.XZDM==x.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(x.value),Le(x.value),Fe(x.value),x.value=="370211"){Ne(x.value);return}},lt=t=>{Ae({divisions:x.value,whetherToDownload:!0}).then(e=>{H(e.data[e.data.length-1].downloadPath)})},rt=t=>{Oe({divisions:x.value,whetherToDownload:!0}).then(e=>{H(e.data[e.data.length-1].downloadPath)})},nt=t=>{Re({divisions:x.value,whetherToDownload:!0}).then(e=>{H(e.data[e.data.length-1].downloadPath)})},it=t=>{x.value=="370211"?Ze({divisions:x.value,whetherToDownload:!0}).then(e=>{H(e.data[e.data.length-1].downloadPath)}):Xe({divisions:x.value,whetherToDownload:!0}).then(e=>{H(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 n={};for(const o in l)e[o]&&(n[e[o]]=l[o]);return n}),dt=(t,e="\u7528\u6237\u5217\u8868",a="Sheet1")=>{const n=ut(t,{region:"\u533A\u57DF\u540D\u79F0",\u6D2A\u6D9D:"\u6D2A\u6D9D (\u4EA9)"}),o=we.json_to_sheet(n),r=we.book_new();we.book_append_sheet(r,o,a),Tt(r,`${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%",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} <br/>{b} : {c} <br/>\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(r=>{e.push(r.region),r.\u6D2A\u6D9D!==void 0?a.push(r.\u6D2A\u6D9D):a.push(0)});let l={tooltip:{trigger:"axis",formatter:function(r){let c=r[0].axisValueLabel+"</br>",b=0;for(let u=0;u<r.length;u++)b+=r[u].value,r[u].seriesName!=="\u5408\u8BA1"&&(c+=r[u].seriesName+"\uFF1A"+r[u].value+"</br>");for(let u=0;u<r.length;u++)b+=Number(r[u].value),r[u].seriesName==="\u5408\u8BA1"&&(c+="\u5408\u8BA1\uFF1A"+b);return c},axisPointer:{type:"shadow"}},legend:{top:5,left:10,icon:"rect",itemWidth:4,itemHeight:12,data:["\u9910\u8D39","\u6253\u8F66\u8D39","\u96F6\u98DF","\u65E5\u7528\u54C1"]},dataZoom:[{type:"slider",show:!1,handleSize:0,startValue:0,endValue:6,height:10,left:"5%",right:"4%",bottom:5,borderColor:"#000",fillerColor:"#269cdb",borderRadius:5,backgroundColor:"#33384b",showDataShadow:!1,showDetail:!1,realtime:!0,filterMode:"filter"},{type:"inside",show:!0,start:1,end:100}],grid:{left:"3%",right:"10%",bottom:"15%",top:"5%",containLabel:!0},xAxis:{type:"category",name:"\u533A\u57DF",axisLabel:{fontSize:12,interval:0,rotate:40},axisLine:{lineStyle:{}},data:e},yAxis:[{type:"value",name:"\u9762\u79EF\uFF08\u4EA9\uFF09",axisLabel:{},axisLine:{lineStyle:{}},splitLine:{lineStyle:{},show:!0}}],series:[{name:"\u6D2A\u6D9D",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:{x:0,y:0,x2:0,y2:1,type:"linear",global:!1,colorStops:[{offset:0,color:"rgba(98, 161, 255, 1)"},{offset:1,color:"rgba(62, 109, 239, 1)"}]},barBorderRadius:[30,30,0,0]},data:a}]};l.series;var n=l.tooltip;function o(r){let c=r[0].axisValueLabel+"</br>",b=0;for(let u=0;u<r.length;u++)if(r[u].seriesName!=="\u5408\u8BA1"){const y=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${r[u].color}"></span>`;b+=r[u].value,c+=y+r[u].seriesName+"\uFF1A"+r[u].value+"</br>"}for(let u=0;u<r.length;u++)r[u].seriesName==="\u5408\u8BA1"&&(c+="\u5408\u8BA1\uFF1A"+b);return c}n.formatter=o,We(t,l)}function Ee(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=p.imageryLayers.addImageryProvider(a);e.indexOf("gbznt")>-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"]),x.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,n)=>{const o=Cesium.Rectangle.fromDegrees(l.bbox[0],l.bbox[1],l.bbox[2],l.bbox[3]),r=Cesium.Rectangle.center(o);Cesium.Math.toDegrees(r.longitude),Cesium.Math.toDegrees(r.latitude),l.properties.XZDM==="370211011"||l.properties.XZDM;const c=t[l.properties.XZMC];c&&c.map((b,u)=>b.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 n=l.properties.town;a[n]?a[n].push(l):a[n]=[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"),n=D("el-tooltip"),o=D("el-option"),r=D("el-select"),c=D("el-checkbox"),b=D("el-checkbox-group"),u=D("el-collapse-item"),y=D("el-collapse"),C=D("el-button"),N=D("el-form-item"),Z=D("el-input-number"),A=D("el-form");return w(),k("div",Pt,[i("div",zt,[Wt,i("div",At,[i("div",Ot,[i("div",Rt,[Zt,i("p",{onClick:e[0]||(e[0]=s=>lt())},[F(" \u4E0B\u8F7D \xA0 "),Xt])]),i("div",{ref_key:"areaDiv",ref:xe,class:"areaDiv"},null,512)]),i("div",qt,[i("div",Vt,[Bt,i("p",{onClick:e[1]||(e[1]=s=>rt())},[F(" \u4E0B\u8F7D \xA0 "),Jt])]),i("div",{ref_key:"typesofDiv",ref:Ce,class:"typesofDiv"},null,512),i("div",Qt,[d(l,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:g(ge),style:{width:"100%"}},{default:m(()=>[d(a,{prop:"type",label:"\u7C7B\u578B"}),d(a,{prop:"yesFlooding",label:"\u9762\u79EF"}),d(a,{prop:"zb",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),i("div",{class:"leftFoldDiv",onClick:e[2]||(e[2]=s=>He())},[d(n,{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):(w(),k("img",$t))]),_:1},8,["disabled"]),d(n,{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)?(w(),k("img",Ut)):E("v-if",!0)]),_:1},8,["disabled"])])]),i("div",jt,[i("div",Gt,[i("div",Ht,[Yt,i("p",{onClick:e[3]||(e[3]=s=>nt())},[F(" \u4E0B\u8F7D \xA0 "),Kt])]),i("div",ea,[d(l,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:g(fe),style:{width:"100%","font-size":"6px"}},{default:m(()=>[d(a,{prop:"region",label:"\u533A\u57DF\u540D\u79F0"}),d(a,{prop:"yesFlooding",width:"120",label:"\u6D2A\u6D9D\u9762\u79EF\uFF08\u4EA9\uFF09"}),d(a,{prop:"createdTime",label:"\u76D1\u6D4B\u65F6\u95F4"})]),_:1},8,["data"])]),E(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),i("div",ta,[i("div",aa,[oa,i("p",{onClick:e[4]||(e[4]=s=>it())},[F(" \u4E0B\u8F7D \xA0 "),la])]),d(r,{"popper-class":"select_city",onChange:e[5]||(e[5]=s=>te(t.item)),modelValue:x.value,"onUpdate:modelValue":e[6]||(e[6]=s=>x.value=s),placeholder:"\u5168\u90E8"},{default:m(()=>[(w(!0),k(j,null,G(g(T).arr,s=>(w(),q(o,{key:s.subregion,label:s.name,value:s.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i("div",ra,[d(l,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:g(Q),style:{width:"100%","font-size":"6px"}},{default:m(()=>[d(a,{prop:"name",label:"\u533A\u57DF\u540D\u79F0"}),d(a,{prop:"yesFloodingPercentage",width:"120",label:"\u6D2A\u6D9D\u9762\u79EF(\u4EA9\uFF09"}),d(a,{prop:"createdTime",width:"100",label:"\u76D1\u6D4B\u65F6\u95F4"})]),_:1},8,["data"])])]),i("div",{class:"rightFoldDiv",onClick:e[7]||(e[7]=s=>Ye())},[d(n,{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)?(w(),k("img",na)):E("v-if",!0)]),_:1},8,["disabled"]),d(n,{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):(w(),k("img",ia))]),_:1},8,["disabled"])])]),i("div",sa,[d(Nt)]),ua,d(y,{class:"legend",accordion:""},{default:m(()=>[d(u,{name:"1"},{title:m(()=>[F("\u56FE\u4F8B")]),default:m(()=>[i("div",da,[d(b,{modelValue:Y.value,"onUpdate:modelValue":e[8]||(e[8]=s=>Y.value=s),onChange:t.change},{default:m(()=>[(w(!0),k(j,null,G(g(ce),(s,S,X)=>(w(),q(c,{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}),i("div",ca,[i("div",null,[F(" \u7B49\u7EA7\uFF1A "),i("p",null,V(M.value.grade),1)]),i("div",null,[F(" \u7ECF\u5EA6\uFF1A "),i("p",null,V(M.value.lon),1)]),i("div",null,[F(" \u7EAC\u5EA6\uFF1A "),i("p",null,V(M.value.lat),1)]),i("div",{class:"cancel",onClick:ae},"X")]),i("div",fa,[(w(!0),k(j,null,G(g(U).label,(s,S)=>(w(),k("div",{key:S},[i("div",null,V(s.crop)+"\uFF1A",1),i("div",null,V(s.Shape_Area)+" \u4EA9",1)]))),128)),g(U).XZQMC?(w(),k("div",pa,[ga,i("div",null,V(g(U).XZQMC),1)])):E("v-if",!0),i("div",{class:"cancel",onClick:ae},"X")]),B.value?(w(),q(C,{key:0,class:"back_button",onClick:e[9]||(e[9]=s=>ft())},{default:m(()=>[F("\u8FD4\u56DE")]),_:1})):E("v-if",!0)]),i("div",ma,[i("div",va,[d(A,{inline:!0,model:g(v),class:"demo-form-inline"},{default:m(()=>[d(N,{label:"\u65F6\u95F4:"},{default:m(()=>[d(r,{"popper-class":"selectCity",modelValue:g(v).time,"onUpdate:modelValue":e[10]||(e[10]=s=>g(v).time=s),placeholder:"\u8BF7\u9009\u62E9"},{default:m(()=>[(w(!0),k(j,null,G(g(ue),(s,S)=>(w(),q(o,{key:S,label:t.Zitem,value:s},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),d(N,{label:"\u7EDF\u8BA1\u65B9\u5F0F:"},{default:m(()=>[d(r,{"popper-class":"selectCity",modelValue:g(v).statistical,"onUpdate:modelValue":e[11]||(e[11]=s=>g(v).statistical=s),placeholder:"\u8BF7\u9009\u62E9"},{default:m(()=>[d(o,{label:"\u4F5C\u7269\u7C7B\u578B",value:"\u4F5C\u7269\u7C7B\u578B"}),d(o,{label:"\u884C\u653F\u533A\u5212",value:"\u884C\u653F\u533A\u5212"}),d(o,{label:"\u9AD8\u6807\u51C6\u519C\u7530",value:"\u9AD8\u6807\u51C6\u519C\u7530"})]),_:1},8,["modelValue"])]),_:1}),d(N,{label:"\u9547"},{default:m(()=>[d(r,{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(()=>[(w(!0),k(j,null,G(g(K),(s,S)=>(w(),q(o,{key:S,label:s.name,value:s.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","placeholder"])]),_:1}),d(N,{label:"\u9762\u79EF(\u4EA9)>"},{default:m(()=>[d(Z,{modelValue:se.value,"onUpdate:modelValue":e[13]||(e[13]=s=>se.value=s),min:0,onChange:Ke},null,8,["modelValue"])]),_:1}),d(N,null,{default:m(()=>[d(C,{type:"primary",onClick:he},{default:m(()=>[F("\u67E5\u8BE2")]),_:1}),d(C,{plain:"",onClick:et},{default:m(()=>[F("\u91CD\u7F6E")]),_:1}),g($)?E("v-if",!0):(w(),q(C,{key:0,type:"primary",text:"",onClick:st},{default:m(()=>[ha,F(" \u4E0B\u8F7D ")]),_:1}))]),_:1})]),_:1},8,["model"])]),i("div",ya,[i("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};