import{_ as be,r as n,A as G,B as Ce,C as we,D as W,d as m,o as g,c as h,l,m as w,e as d,w as p,J as q,K as B,k as Z,f as c,g as Y,x as v,Q as xe,y as Me,p as De,q as ke}from"./index.68b143c5.js";import{_ as U}from"./close1.45635d81.js";import{_ as Te,a as Ie,b as Se,c as Pe,d as Le,e as ze}from"./linesGL.90f708a5.js";import"./index.c9f5bd8b.js";import{h as k}from"./moment.9709ab41.js";import{a as Ye}from"./classify.3cc97447.js";import{g as Q,a as Ne,b as Ee}from"./estimate.ae69e0f4.js";const y=T=>(De("data-v-7cff65d7"),T=T(),ke(),T),Fe={class:"center"},Ae=y(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),We={class:"rightWra"},qe={class:"farmlandHeader"},Be={class:"rightTop"},Ze=y(()=>l("div",{class:"title"},[l("span",null,"\u9884\u8B66\u4FE1\u606F\u53D1\u5E03")],-1)),Xe={class:"farmlandDiv"},Re={class:"radioDiv"},Ve={key:0,src:U,alt:""},Je={key:0,class:"imgrotate",src:U,alt:""},Oe=Me('
',1),Ge={id:"popup"},Qe=y(()=>l("span",null,"\u540D\u79F0\uFF1A",-1)),Ue=y(()=>l("span",null,"\u5F53\u524D\u4F4D\u7F6E\uFF1A",-1)),je=y(()=>l("span",null,"\u65F6\u95F4\uFF1A",-1)),He=y(()=>l("span",null,"\u6C14\u538B\uFF1A",-1)),$e=y(()=>l("span",null,"\u6700\u5927\u98CE\u901F\uFF1A",-1)),Ke=y(()=>l("span",null,"\u98CE\u529B\uFF1A",-1)),et={id:"pop"},tt={key:0},at=y(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),ot={class:"mt-4"},lt={__name:"index",setup(T){let s=n(null);const _=n("2023");let I=G({arr:[],brr:[],crr:[]}),S=n({name:"",value:""});const j=n([]),P=n(!1);let b=n(!1);const X=n(["false"]);n(null);const x=n(""),R=n([]);let C=n([]);n([]),n([]),n([]);const N=n([]),V=n("1");let H={"-0\xB0\u4EE5\u4E0B":{color:"rgba(9, 187, 222, 1)",disabled:!1},"-3\xB0\u4EE5\u4E0B":{color:"rgba(255, 235, 59, 1)",disabled:!1},"-5\xB0\u4EE5\u4E0B":{color:"rgba(234, 165, 93, 1)",disabled:!1}};G({power:[{required:!0,message:"Please select Activity zone",trigger:"change"}],count:[{required:!0,message:"Please select Activity count",trigger:"change"}],date1:[{type:"date",required:!0,message:"Please pick a date",trigger:"change"}],date2:[{type:"date",required:!0,message:"Please pick a time",trigger:"change"}],type:[{type:"array",required:!0,message:"Please select at least one activity type",trigger:"change"}],resource:[{required:!0,message:"Please select activity resource",trigger:"change"}],desc:[{required:!0,message:"Please input activity form",trigger:"blur"}]}),Ce(()=>x.value,e=>{let t=k(x.value[0]).format("YYYY-MM-DD")?k(x.value[0]).format("YYYY-MM-DD "):"",o=k(x.value[1]).format("YYYY-MM-DD")?k(x.value[1]).format("YYYY-MM-DD"):"";Q({startTime:t,endTime:o}).then(a=>{console.log(a.data),N.value=a.data})});let $=n([]);we(()=>{ee(),ae(),re(),ne(),ie();let e=document.querySelector(".rightWra");e.style.transform="translate(107%,0)"});const K={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 ee(){s=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({...K})}),s.cesiumWidget.creditContainer.style.display="none",J("shuzisannong:huangdaoqu_town","tl"),s.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),pe()}function te(e,t,o){e.forEach(a=>{let r=[];a[0].forEach(u=>{r.push(u[0]),r.push(u[1])}),s.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 ae(){W({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),j.value=e.data.features}).catch(e=>{})}let M=n({label:[]});function oe(e,t){let o=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:e}});o.customName=t,s.imageryLayers.addImageryProvider(o)}function D(e,t){if(s){const o=s.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&&s.imageryLayers.remove(o[a]):o[a]._imageryProvider.customName===r&&s.imageryLayers.remove(o[a]))})}}function le(e){if(s){let o=s.entities._entities._array;for(var t=o.length-1;t>=0;t--)o[t]._name&&o[t]._name===e&&s.entities.remove(o[t])}}function se(){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 re=()=>{Ne({year:2023}).then(e=>{$.value=e})},ne=()=>{Ee().then(e=>{e.forEach(t=>{Number(t.year)>=2e3&&R.value.push(t)})})},ie=()=>{Q({startTime:"",endTime:""}).then(e=>{N.value=e.data})},ce=()=>{if(I.arr.forEach(a=>{a.properties.XZDM==_.value}),_.value=="370211"){D(["village_CQL"]),D(["aaa"]);return}let e=[...I.arr];console.log("arr:",e),e.forEach(a=>{a.properties.XZDM==_.value&&s.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),duration:2});let r=[...I.brr],u=[];r.forEach(f=>{f.properties.XZDM==_.value&&u.push(f.properties.XZQMC)}),[...Object.values(u)]});const o=[...I.arr].find(a=>a.properties.XZDM===_.value);o&&(le("townLine"),te(o.geometry.coordinates,"townLine","yellow")),D(["aaa"]),oe(`XZDM=${_.value}`,"aaa"),Ye({time:"2023-04-26",subregion:"1",parent:"\u9EC4\u5C9B\u533A"}).then(a=>{let r=[];a.data.map((u,f)=>{u.region==o.properties.XZMC&&r.push({crop:u.type,Shape_Area:u.area})}),M.value={label:r},fe({x:642,y:312})})};function J(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=s.imageryLayers.addImageryProvider(o);t.indexOf("gbznt")>-1&&(s.imageryLayers.lowerToBottom(a),s.imageryLayers.raise(a))}function de(){delete M.value.XZQMC,D(["gbznt"],!0),D(["aaa"]),_.value="370211",ce(),P.value==="1"&&(console.log(P.value),J("shuzisannong:huangdaoqu_town","tl")),s.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),P.value=!1,E()}function ue(){let e=O.value;console.log("fl:",e),W({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 u=Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),f=Cesium.Rectangle.center(u);Cesium.Math.toDegrees(f.longitude),Cesium.Math.toDegrees(f.latitude),a.properties.XZDM==="370211011"||a.properties.XZDM;const L=e[a.properties.XZMC];L&&L.map((z,F)=>z.properties)})}).catch(t=>{})}let O=n({});function pe(){W({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]}),O.value=o,ue()}).catch(e=>{})}function me(){if(S.value.lon&&S.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(S.value.lon),Number(S.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,t);if(Cesium.defined(e)){const o=document.getElementById("popup");o&&(o.style.top=e.y-10+"px",o.style.left=e.x+10+"px")}}}function E(){const e=document.getElementById("popup");e&&(e.style.display="none"),s.scene.postRender.removeEventListener(me)}function fe(e){const t=document.getElementById("popup");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=m("el-option"),a=m("el-select"),r=m("el-radio"),u=m("el-radio-group"),f=m("el-table-column"),L=m("el-table"),z=m("el-button"),F=m("el-tooltip"),ge=m("el-checkbox"),ve=m("el-checkbox-group"),_e=m("el-collapse-item"),ye=m("el-collapse");return g(),h("div",Fe,[Ae,l("div",We,[l("div",qe,[w(" \u76D1\u6D4B\u65E5\u671F:\u2003 "),d(a,{modelValue:_.value,"onUpdate:modelValue":t[0]||(t[0]=i=>_.value=i),"popper-class":"select_city",class:"m-2",placeholder:"Select"},{default:p(()=>[(g(!0),h(q,null,B(R.value,i=>(g(),Z(o,{key:i.value,label:i.label,value:i.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),l("div",Be,[Ze,l("div",Xe,[l("div",Re,[w(" \u9884\u8B66\u8303\u56F4\uFF1A "),d(u,{modelValue:V.value,"onUpdate:modelValue":t[1]||(t[1]=i=>V.value=i),class:"ml-4"},{default:p(()=>[d(r,{label:"1",size:"large"},{default:p(()=>[w("5km")]),_:1}),d(r,{label:"2",size:"large"},{default:p(()=>[w("10km")]),_:1})]),_:1},8,["modelValue"])]),d(L,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center"},data:N.value,style:{width:"100%"}},{default:p(()=>[d(f,{prop:"createdTime",label:"\u8BBE\u5907\u53F7"}),d(f,{prop:"tyName",label:"\u9884\u8B66\u60C5\u51B5"}),d(f,{prop:"weizhi",label:"\u8054\u7CFB\u4EBA"}),d(f,{prop:"affectedArea",label:"\u8054\u7CFB\u7535\u8BDD"})]),_:1},8,["data"]),d(z,{class:"but",type:"primary"},{default:p(()=>[w("\u53D1\u5E03\u9884\u8B66\u77ED\u4FE1")]),_:1})])]),l("div",{class:"rightFoldDiv",onClick:t[2]||(t[2]=i=>se())},[d(F,{disabled:!c(b),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:p(()=>[c(b)?(g(),h("img",Ve)):Y("v-if",!0)]),_:1},8,["disabled"]),d(F,{disabled:c(b),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:p(()=>[c(b)?Y("v-if",!0):(g(),h("img",Je))]),_:1},8,["disabled"])])]),Oe,l("div",Ge,[l("div",null,[Qe,l("p",null,v(c(C).name),1)]),l("div",null,[Ue,l("p",null,v(c(C).fLongitude)+"\xB0E/"+v(c(C).fLatitude)+"\xB0N",1)]),l("div",null,[je,l("p",null,v(c(k)(c(C).time).format("YYYY-MM-DD HH:mm:ss")),1)]),l("div",null,[He,l("p",null,v(c(C).pressure)+"\u767E\u5E15",1)]),l("div",null,[$e,l("p",null,v(c(C).speed)+"\u7C73/\u79D2",1)]),l("div",null,[Ke,l("p",null,v(c(C).power)+"\u7EA7",1)]),l("div",{class:"cancel",onClick:E},"X")]),l("div",et,[(g(!0),h(q,null,B(c(M).label,(i,A)=>(g(),h("div",{key:A},[l("div",null,v(i.crop)+"\uFF1A",1),l("div",null,v((i.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),c(M).XZQMC?(g(),h("div",tt,[at,l("div",null,v(c(M).XZQMC),1)])):Y("v-if",!0),l("div",{class:"cancel",onClick:E},"X")]),d(ye,{class:"legend",accordion:""},{default:p(()=>[d(_e,{name:"1"},{title:p(()=>[w("\u56FE\u4F8B")]),default:p(()=>[l("div",ot,[d(ve,{modelValue:X.value,"onUpdate:modelValue":t[3]||(t[3]=i=>X.value=i),onChange:e.change},{default:p(()=>[(g(!0),h(q,null,B(c(H),(i,A,he)=>(g(),Z(ge,{key:he,style:xe({backgroundColor:i.color,border:"1px solid value.color",width:"100%"}),"v-model":i.disabled,disabled:i.disabled,label:A},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),P.value?(g(),Z(z,{key:0,class:"back_button",onClick:t[4]||(t[4]=i=>de())},{default:p(()=>[w("\u8FD4\u56DE")]),_:1})):Y("v-if",!0)])}}},pt=be(lt,[["__scopeId","data-v-7cff65d7"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/meteorological/monitor/freeze/index.vue"]]);export{pt as default};