Agriculture-front-end/dist/assets/FloodExtraction.df257c53.js
2023-06-06 10:46:36 +08:00

2 lines
30 KiB
JavaScript

import{z as I,_ as mt,r as f,A as be,B as ze,C as vt,D as _e,d as D,o as x,c as k,l as i,m as F,e as d,w as m,f as g,g as M,J as j,K as G,k as q,Q as ht,x as V,y as yt,p as bt,q as _t}from"./index.68b143c5.js";import le from"./downloads.e955445d.js";import{_ as re}from"./close1.45635d81.js";import{_ as xt,a as wt,b as Ct,c as St,d as Dt,e as kt}from"./linesGL.90f708a5.js";import{_ as Ft}from"./dow.f37c8d82.js";import{i as ae}from"./index.c9f5bd8b.js";import{T as Lt}from"./TimeLine.1547a2ac.js";import{u as We}from"./useEcharts.758855d9.js";import{d as oe}from"./download.f3809092.js";import{u as xe,w as Tt}from"./xlsx.86b9426e.js";function Ae(_){return I({url:"equipment/damageArea",method:"get",params:_})}function Re(_){return I({url:"equipment/proportion",method:"get",params:_})}function Oe(_){return I({url:"equipment/highStandard",method:"get",params:_})}function Ze(_){return I({url:"equipment/townInformation",method:"get",params:_})}function Nt(_){return I({url:"equipment/village",method:"get",params:_})}function Et(){return I({url:"http://121.36.229.60:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson",method:"get"})}function Mt(_){return I({url:"equipment/listDroughtsDamageYear",method:"get",params:_})}function It(_){return I({url:"equipment/listDroughtsDamage",method:"get",params:_})}const L=_=>(bt("data-v-a89f9b9b"),_=_(),_t(),_),Pt={class:"fatherDiv"},zt={class:"centerBox"},Wt=L(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),At={class:"leftWra"},Rt={class:"leftTop"},Ot={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)),Qt=L(()=>i("img",{src:le,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Jt={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=yt('<div class="tool" data-v-a89f9b9b><span data-v-a89f9b9b><img src="'+xt+'" alt="" data-v-a89f9b9b></span><span data-v-a89f9b9b><img src="'+wt+'" 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></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:Ft,alt:""},null,-1)),ya={class:"chartMode"},ba={__name:"FloodExtraction",setup(_){let p=f(null);const we=f(null),Ce=f(null);f(null);const C=f("370211");f(null);let N=be({arr:[],brr:[],crr:[]});const E=f({name:"",value:""}),Xe=f([]),B=f(!1);let P=f(!1),z=f(!1);const H=f(["false"]);let Se=f([]),Q=be({lable:[],value:[]}),ne=f([]),ie=f(0),J=f([]);const R=f([]);let Y=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(()=>N.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(()=>H.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=>{O([l])})});let ge=f([]);vt(()=>{Fe("370211"),Le("370211"),tt(),Te("370211"),et(),Ve(),Ne(),Ee(),Qe();for(const a in ce)ce[a].disabled!==!0&&Se.value.push(a);H.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 qe={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 Ve(){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({...qe})}),p.cesiumWidget.creditContainer.style.display="none",ke(2,"\u6D2A\u6D9D\u533A"),Me("shuzisannong:huangdaoqu_town","tl"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),Je(),pt()}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 Be(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),Xe.value=t.data.features}).catch(t=>{})}let U=f({label:[]}),K="";function Je(){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=Be(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 w=y._imageryProvider;if(w&&w.ready&&w._layers&&y.show===!0){o=w.tilingScheme.positionToTileXY(n,c,o);let T=w.pickFeatures(o.x,o.y,c,n.longitude,n.latitude);T&&T.then(Z=>{if(Z.length>0){let s=Z[0];if(s.properties&&s.properties.XZDM)if(console.log("XZDM:",K),console.log("newData.properties.XZDM:",s.properties.XZDM),K!==s.properties.XZDM){B.value=!0,K=s.properties.XZDM,C.value=K,ee&&ee();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"),O(["village_CQL"]),console.log(s.properties.XZDM),je(`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 gt=X[A]._info;U.value=gt,Pe(e.position),p.scene.postRender.addEventListener(ye)}W("villageLine"),ve=""}else $e(b,o,c,n,e);else O(["village_CQL"]),te()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let ve="";function $e(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 w=y.data;W("villageLine"),me(w.geometry&&w.geometry.coordinates,"villageLine","yellow")}else Ue(t,e,a,l,n)}})}}}function Ue(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],w="";switch(y.properties.value){case 2:w="\u6D2A\u6D9D\u533A";break}let T=Cesium.Math.toDegrees(l.longitude).toFixed(6),Z=Cesium.Math.toDegrees(l.latitude).toFixed(6);E.value={lon:T,lat:Z,grade:w},console.log(E.value),Pe(n.position),p.scene.postRender.addEventListener(ye)}})}}}function je(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 O(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 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 He(){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 Ye=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,R.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,R.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,R.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=ae(l);window.addEventListener("resize",()=>{l.style.width=window.innerWidth-200+"px",l.style.height=window.innerHeight-200+"px",n.resize()}),dt()})},Ke=()=>{v.value.time=ue.value[0],v.value.statistical="\u884C\u653F\u533A\u5212",v.value.droughtRating="",v.value.area=0,$.value=!0,he()},et=()=>{Mt().then(t=>{console.log(t),ue.value=t.data,v.value.time=t.data[0],he()})},Fe=t=>{Q=be({lable:[],value:[]}),Ae({divisions:t}).then(e=>{e.data.forEach(a=>{Q.lable.push(a.type),Q.value.push(a.yesFlooding)}),Ne()})},Le=t=>{ne=f([]),ge=f([]),ie=f(0),Re({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)}%`})}),Ee()})},tt=()=>{Oe().then(t=>{console.log(t.data),fe.value=t.data,t.data.forEach(e=>{fe.value.push({region:e.region,yesFlooding:e.yesFlooding,createdTime:e.createdTime})})})},Te=t=>{J=f([]),Ze({divisions:t}).then(e=>{N.arr=e.data.sort((n,o)=>n.name.length-o.name.length),N.arr.forEach(n=>{J.value.push({name:n.name,subregion:n.subregion,yesFloodingPercentage:n.yesFloodingPercentage,createdTime:n.createdTime})}),N.arr.unshift({subregion:"370211",name:"\u5168\u90E8"});let a=[],l=[];N.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}))}),N.arr=l,Y.value=JSON.parse(JSON.stringify(N.arr)),Y.value[0].subregion=null,console.log(Y.value)})},at=t=>{J=f([]),Nt({divisions:t}).then(e=>{N.brr=e.data;let a=[...e.data],l=[];a.splice(0,1),a.forEach(n=>{l.indexOf(n.name)==-1&&l.push(n.name),J.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)})})})},ee=()=>{if(Et().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"),at(C.value),Le(C.value),Fe(C.value),C.value=="370211"){Te(C.value);return}},ot=t=>{Ae({divisions:C.value,whetherToDownload:!0}).then(e=>{oe(e.data[e.data.length-1].downloadPath)})},lt=t=>{Re({divisions:C.value,whetherToDownload:!0}).then(e=>{oe(e.data[e.data.length-1].downloadPath)})},rt=t=>{Oe({divisions:C.value,whetherToDownload:!0}).then(e=>{oe(e.data[e.data.length-1].downloadPath)})},nt=t=>{Ze({divisions:C.value,whetherToDownload:!0}).then(e=>{oe(e.data[e.data.length-1].downloadPath)})},it=()=>{let t=JSON.parse(JSON.stringify(h.value[0]));t.region="\u5408\u8BA1",R.value.push(t),ut(R.value,"\u6D2A\u6D9D\u9762\u79EF\u7EDF\u8BA1\u8868","Sheet1")},st=(t,e)=>t.map(l=>{const n={};for(const o in l)e[o]&&(n[e[o]]=l[o]);return n}),ut=(t,e="\u7528\u6237\u5217\u8868",a="Sheet1")=>{const n=st(t,{region:"\u533A\u57DF\u540D\u79F0",\u6D2A\u6D9D:"\u6D2A\u6D9D (\u4EA9)"}),o=xe.json_to_sheet(n),r=xe.book_new();xe.book_append_sheet(r,o,a),Tt(r,`${e}.xlsx`)};function Ne(){const t=ae(we.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:Q.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:Q.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 Ee(){const t=ae(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 dt(){const t=ae(de.value);let e=[],a=[];R.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 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=p.imageryLayers.addImageryProvider(a);e.indexOf("gbznt")>-1&&(p.imageryLayers.lowerToBottom(l),p.imageryLayers.raise(l))}function ct(){W("villageLine"),O(["village_CQL"]),W("townLine"),delete U.value.XZQMC,O(["gbznt"],!0),O(["aaa"]),C.value="370211",ee(),B.value==="1"&&(console.log(B.value),Me("shuzisannong:huangdaoqu_town","tl")),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),B.value=!1,te()}function ft(){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 pt(){_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,ft()}).catch(t=>{})}function ye(){if(E.value.lon&&E.value.lat){const e=Cesium.Cartesian3.fromDegrees(Number(E.value.lon),Number(E.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 te(){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"),w=D("el-button"),T=D("el-form-item"),Z=D("el-input-number"),A=D("el-form");return x(),k("div",Pt,[i("div",zt,[Wt,i("div",At,[i("div",Rt,[i("div",Ot,[Zt,i("p",{onClick:e[0]||(e[0]=s=>ot())},[F(" \u4E0B\u8F7D \xA0 "),Xt])]),i("div",{ref_key:"areaDiv",ref:we,class:"areaDiv"},null,512)]),i("div",qt,[i("div",Vt,[Bt,i("p",{onClick:e[1]||(e[1]=s=>lt())},[F(" \u4E0B\u8F7D \xA0 "),Qt])]),i("div",{ref_key:"typesofDiv",ref:Ce,class:"typesofDiv"},null,512),i("div",Jt,[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=>Ge())},[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)?M("v-if",!0):(x(),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)?(x(),k("img",Ut)):M("v-if",!0)]),_:1},8,["disabled"])])]),i("div",jt,[i("div",Gt,[i("div",Ht,[Yt,i("p",{onClick:e[3]||(e[3]=s=>rt())},[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%"}},{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"])]),M(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),i("div",ta,[i("div",aa,[oa,i("p",{onClick:e[4]||(e[4]=s=>nt())},[F(" \u4E0B\u8F7D \xA0 "),la])]),d(r,{"popper-class":"select_city",onChange:e[5]||(e[5]=s=>ee(t.item)),modelValue:C.value,"onUpdate:modelValue":e[6]||(e[6]=s=>C.value=s),clearable:"",placeholder:"\u5168\u90E8"},{default:m(()=>[(x(!0),k(j,null,G(g(N).arr,s=>(x(),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(J),style:{width:"100%"}},{default:m(()=>[d(a,{prop:"name",label:"\u533A\u57DF\u540D\u79F0"}),d(a,{prop:"yesFloodingPercentage",width:"130",label:"\u6D2A\u6D9D\u9762\u79EF\uFF08\u4EA9\uFF09"}),d(a,{prop:"createdTime",label:"\u76D1\u6D4B\u65F6\u95F4"})]),_:1},8,["data"])])]),i("div",{class:"rightFoldDiv",onClick:e[7]||(e[7]=s=>He())},[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)?(x(),k("img",na)):M("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)?M("v-if",!0):(x(),k("img",ia))]),_:1},8,["disabled"])])]),i("div",sa,[d(Lt)]),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:H.value,"onUpdate:modelValue":e[8]||(e[8]=s=>H.value=s),onChange:t.change},{default:m(()=>[(x(!0),k(j,null,G(g(ce),(s,S,X)=>(x(),q(c,{key:X,style:ht({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(E.value.grade),1)]),i("div",null,[F(" \u7ECF\u5EA6\uFF1A "),i("p",null,V(E.value.lon),1)]),i("div",null,[F(" \u7EAC\u5EA6\uFF1A "),i("p",null,V(E.value.lat),1)]),i("div",{class:"cancel",onClick:te},"X")]),i("div",fa,[(x(!0),k(j,null,G(g(U).label,(s,S)=>(x(),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?(x(),k("div",pa,[ga,i("div",null,V(g(U).XZQMC),1)])):M("v-if",!0),i("div",{class:"cancel",onClick:te},"X")]),B.value?(x(),q(w,{key:0,class:"back_button",onClick:e[9]||(e[9]=s=>ct())},{default:m(()=>[F("\u8FD4\u56DE")]),_:1})):M("v-if",!0)]),i("div",ma,[i("div",va,[d(A,{inline:!0,model:g(v),class:"demo-form-inline"},{default:m(()=>[d(T,{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(()=>[(x(!0),k(j,null,G(g(ue),(s,S)=>(x(),q(o,{key:S,label:t.Zitem,value:s},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),d(T,{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(T,{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(()=>[(x(!0),k(j,null,G(g(Y),(s,S)=>(x(),q(o,{key:S,label:s.name,value:s.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","placeholder"])]),_:1}),d(T,{label:"\u9762\u79EF(\u4EA9)>"},{default:m(()=>[d(Z,{modelValue:se.value,"onUpdate:modelValue":e[13]||(e[13]=s=>se.value=s),min:0,onChange:Ye},null,8,["modelValue"])]),_:1}),d(T,null,{default:m(()=>[d(w,{type:"primary",onClick:he},{default:m(()=>[F("\u67E5\u8BE2")]),_:1}),d(w,{plain:"",onClick:Ke},{default:m(()=>[F("\u91CD\u7F6E")]),_:1}),g($)?M("v-if",!0):(x(),q(w,{key:0,type:"primary",text:"",onClick:it},{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)])])])}}},Na=mt(ba,[["__scopeId","data-v-a89f9b9b"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/meteorological/remoteSense/FloodExtraction/FloodExtraction.vue"]]);export{Na as default};