import{_ as xe,r as f,A as ee,U as Me,V as De,W as V,d as P,o as g,c as _,l,e as h,w as k,L as q,N as j,x as D,f as m,g as F,a2 as G,y as Se,p as Ie,q as Le}from"./index.9ec53a6c.js";import{_ as E}from"./close1.45635d81.js";import{_ as Te,a as Pe,b as ke,c as Fe,d as Xe,e as Ze}from"./linesGL.90f708a5.js";import"./index.c9f5bd8b.js";import{g as Ae,a as Oe,b as We,c as Ee}from"./classify.266268d4.js";const N=X=>(Ie("data-v-21cafe5e"),X=X(),Le(),X),Ne={class:"center"},Re=N(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),ze={class:"leftWra"},Be={class:"leftTop"},Qe=N(()=>l("div",{class:"title"},[l("span",null,"\u6444\u50CF\u5934\u9009\u62E9")],-1)),Ve={class:"search"},qe={class:"cameraDiv"},je={key:0,src:E,alt:""},Ge={key:0,class:"imgrotate",src:E,alt:""},Je={class:"rightWra"},Ue={class:"rightTop"},Ye=N(()=>l("div",{class:"title"},[l("span",null,"\u89C6\u9891\u76D1\u63A7")],-1)),He={class:"videoDiv"},$e={key:0,src:E,alt:""},Ke={key:0,class:"imgrotate",src:E,alt:""},et=Se('
',1),tt={id:"popup"},at={id:"pop"},rt={key:0},ot=N(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),st={__name:"index",setup(X){let o=f(null);f(null),f(null);const te=f("370211");f(null);let S=ee({arr:[],brr:[],crr:[]});const J=f({name:"",value:""}),ae=f([]),re=f(!1);let w=f(!0),x=f(!0);const U=f("");let oe=f(["\u6444\u50CF\u5934\u540D\u79F01","\u6444\u50CF\u5934\u540D\u79F01","\u6444\u50CF\u5934\u540D\u79F01"]);const se=[{value:"Option1",label:"Option1"},{value:"Option2",label:"Option2"},{value:"Option3",label:"Option3"},{value:"Option4",label:"Option4"},{value:"Option5",label:"Option5"}],R=ee({width:"100%",height:"100%",color:"#409eff",title:"",src:"https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4",muted:!1,webFullScreen:!1,speedRate:["0.75","1.0","1.25","1.5","2.0"],autoPlay:!1,loop:!1,mirror:!1,ligthOff:!1,volume:.3,control:!0,controlBtns:["quality","volume","fullScreen"]});Me(()=>S.arr,e=>{console.log("val:",e)});var Y={title:[]};let z={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]};De(()=>{ve(),ye(),ge(),_e(),le(),ce()});const ie={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 le(){o=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({...ie})}),o.cesiumWidget.creditContainer.style.display="none",he("shuzisannong:huangdaoqu_town","tl"),o.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),ue(),be()}function H(e,t,a){e.forEach(r=>{let i=[];r[0].forEach(n=>{i.push(n[0]),i.push(n[1])}),o.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(i),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:a?Cesium.Color.fromCssColorString(a):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function ne(e){return e>48e6?0:e>24e6?1:e>12e6?2:e>6e6?3:e>3e6?4:e>15e5?5:e>75e4?6:e>375e3?7:e>187500?8:e>93750?9:e>46875?10:e>23437.5?11:e>11718.75?12:e>5859.38?13:e>2929.69?14:e>1464.84?15:e>732.42?16:e>366.21?17:18}function ce(){V({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),ae.value=e.data.features}).catch(e=>{})}let v=f({label:[]}),Z="";function ue(){var e=new Cesium.ScreenSpaceEventHandler(o.canvas);e.setInputAction(function(t){var a=o.camera.getPickRay(t.position),r=o.scene.globe.pick(a,o.scene);if(r){let i=Cesium.Cartographic.fromCartesian(r);if(i){let n=new Cesium.Cartesian2,u=o.camera.positionCartographic.height,s=ne(u);const d=o.imageryLayers._layers,C=d.findIndex(c=>c._imageryProvider._layers&&c._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(C>-1){const c=d[C];let p=c._imageryProvider;if(p&&p.ready&&p._layers&&c.show===!0){n=p.tilingScheme.positionToTileXY(i,s,n);let L=p.pickFeatures(n.x,n.y,s,i.longitude,i.latitude);L&&L.then(T=>{if(T.length>0){let y=T[0];if(y.properties&&y.properties.XZDM)if(console.log("XZDM:",Z),console.log("newData.properties.XZDM:",y.properties.XZDM),Z!==y.properties.XZDM){re.value=!0,Z=y.properties.XZDM,te.value=Z;let b=y.data;o.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(b.bbox[0],b.bbox[1],b.bbox[2],b.bbox[3]),duration:2}),I("townLine"),H(b.geometry&&b.geometry.coordinates,"townLine","yellow"),O(["village_CQL"]),pe(`XZDM=${y.properties.XZDM}`,"village_CQL");let W=o.entities._entities._array;for(var M=W.length-1;M>=0;M--)if(W[M]._name&&W[M]._name==="point"+y.properties.XZDM){let we=W[M]._info;v.value=we,console.log(v.value,"------------------"),K(t.position),o.scene.postRender.addEventListener(B)}I("villageLine"),A=""}else de(d,n,s,i,t);else O(["village_CQL"]),Q()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let A="";function de(e,t,a,r,i){const n=e.findIndex(u=>u._imageryProvider._layers&&u._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(n>-1){const u=e[n];let s=u._imageryProvider;if(s&&s.ready&&s._layers&&u.show===!0){t=s.tilingScheme.positionToTileXY(r,a,t);let d=s.pickFeatures(t.x,t.y,a,r.longitude,r.latitude);d&&d.then(C=>{if(C.length>0){let c=C[0];if(console.log(c),o.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(c.data.bbox[0],c.data.bbox[1],c.data.bbox[2],c.data.bbox[3]),duration:2}),c.properties&&c.properties.XZQDM&&A!==c.properties.XZQDM){A=c.properties.XZQDM;let p=c.data;if(I("villageLine"),H(p.geometry&&p.geometry.coordinates,"villageLine","yellow"),c.properties.XZQDM==="370211104217"){const L=Cesium.Rectangle.fromDegrees(p.bbox[0],p.bbox[1],p.bbox[2],p.bbox[3]),T=Cesium.Rectangle.center(L);let M=Cesium.Math.toDegrees(T.longitude),y=Cesium.Math.toDegrees(T.latitude),b={lon:M,lat:y,...p.properties,label:[{crop:"\u8336\u53F6",Shape_Area:2820},{crop:"\u5927\u8C46",Shape_Area:2767},{crop:"\u82B1\u751F",Shape_Area:62356},{crop:"\u84DD\u8393",Shape_Area:5443},{crop:"\u5730\u74DC",Shape_Area:897},{crop:"\u5C0F\u9EA6",Shape_Area:20111}]};v.value=b,K(i.position),o.scene.postRender.addEventListener(B)}}}})}}}function pe(e,t){let a=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:e}});a.customName=t,o.imageryLayers.addImageryProvider(a)}function O(e,t){if(o){const a=o.imageryLayers._layers;for(let r=a.length-1;r>=0;r--)e.forEach(i=>{a[r]._imageryProvider&&a[r]._imageryProvider.customName&&(t?a[r]._imageryProvider.customName.indexOf(i)>-1&&o.imageryLayers.remove(a[r]):a[r]._imageryProvider.customName===i&&o.imageryLayers.remove(a[r]))})}}function I(e){if(o){let a=o.entities._entities._array;for(var t=a.length-1;t>=0;t--)a[t]._name&&a[t]._name===e&&o.entities.remove(a[t])}}function fe(){if(w.value=!w.value,w.value){let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(0,0)")}else{let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(-107%,0)")}}function me(){if(x.value=!x.value,x.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 ve=()=>{Ae({time:"2023-04-25",subregion:"1",parent:"\u9EC4\u5C9B\u533A"}).then(e=>{console.log(e)})},ge=()=>{Oe().then(e=>{S.arr=e.features,S.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let t=[...e.features],a=[];t.splice(0,1),t.forEach(r=>{a.push(r.properties.XZMC)}),Y.title=[...Object.values(a)]})},_e=()=>{We().then(e=>{S.brr=e.features})},ye=()=>{Ee().then(e=>{S.crr=e.features,Y.title.forEach((t,a)=>{let r=e.features.map(i=>{if(t===i.properties.town)return i.properties});Object.keys(z).forEach(i=>{const n=r.findIndex(u=>u&&u.crop===i);n>-1?z[i].push(r[n].Shape_Area):z[i].push(null)})})})};function he(e,t){let a=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:e,parameters:{service:"WMS",format:"image/png",transparent:!0}});a.customName=t;let r=o.imageryLayers.addImageryProvider(a);t.indexOf("gbznt")>-1&&(o.imageryLayers.lowerToBottom(r),o.imageryLayers.raise(r))}function Ce(){let e=$.value;console.log("fl:",e),V({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((r,i)=>{const n=Cesium.Rectangle.fromDegrees(r.bbox[0],r.bbox[1],r.bbox[2],r.bbox[3]),u=Cesium.Rectangle.center(n);let s=Cesium.Math.toDegrees(u.longitude),d=Cesium.Math.toDegrees(u.latitude);r.properties.XZDM==="370211011"?(s=120.0863,d=35.941):r.properties.XZDM==="370211003"&&(s=120.243682,d=35.97123201);const C=e[r.properties.XZMC];let c=[];C&&(c=C.map((p,L)=>p.properties)),o.entities.add({name:"point"+r.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(s,d),point:new Cesium.PointGraphics({show:!0,pixelSize:10,color:Cesium.Color.fromCssColorString("rgba(255, 255, 26, 1)"),outlineColor:new Cesium.Color(0,0,0,0),outlineWidth:0,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND}),info:{label:c,...r.properties,lon:s,lat:d}})})}).catch(t=>{})}let $=f({});function be(){V({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,a={};t.forEach(r=>{let i=r.properties.town;a[i]?a[i].push(r):a[i]=[r]}),$.value=a,Ce()}).catch(e=>{})}function B(){if(v.value&&v.value.lon&&v.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(v.value.lon),Number(v.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(o.scene,t);if(Cesium.defined(e)){const a=document.getElementById("pop");a.style.top=e.y-10+"px",a.style.left=e.x+10+"px"}}}function Q(){A="",O(["village_CQL"]),I("villageLine"),I("townLine");const e=document.getElementById("pop");e.style.display="none",o.scene.postRender.removeEventListener(B),O(["gbznt"],!0)}function K(e){console.log(e);const t=document.getElementById("pop");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 a=P("el-input"),r=P("el-option"),i=P("el-select"),n=P("el-tooltip"),u=P("vue3VideoPlay");return g(),_("div",Ne,[Re,l("div",ze,[l("div",Be,[Qe,l("div",Ve,[h(a,{class:"seach_input",modelValue:e.input,"onUpdate:modelValue":t[0]||(t[0]=s=>e.input=s),placeholder:"\u8BF7\u8F93\u5165\u8981\u7B5B\u9009\u6444\u50CF\u5934\u540D"},null,8,["modelValue"]),h(i,{"popper-class":"selectCity",class:"seach_input",modelValue:U.value,"onUpdate:modelValue":t[1]||(t[1]=s=>U.value=s),placeholder:"\u8BF7\u9009\u62E9\u8981\u7B5B\u9009\u8857\u9053"},{default:k(()=>[(g(),_(q,null,j(se,s=>h(r,{key:s.value,label:s.label,value:s.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),l("div",qe,[(g(!0),_(q,null,j(m(oe),(s,d)=>(g(),_("p",{key:d},D(s),1))),128))])]),l("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=s=>fe())},[h(n,{class:"box-item","show-arrow":!1,disabled:m(w),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:k(()=>[m(w)?F("v-if",!0):(g(),_("img",je))]),_:1},8,["disabled"]),h(n,{disabled:!m(w),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:k(()=>[m(w)?(g(),_("img",Ge)):F("v-if",!0)]),_:1},8,["disabled"])])]),l("div",Je,[l("div",Ue,[Ye,l("div",He,[l("div",null,[h(u,G(R,{poster:"https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/ironMan.jpg"}),null,16)]),l("div",null,[h(u,G(R,{poster:"https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/ironMan.jpg"}),null,16)]),l("div",null,[h(u,G(R,{poster:"https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/ironMan.jpg"}),null,16)])])]),l("div",{class:"rightFoldDiv",onClick:t[3]||(t[3]=s=>me())},[h(n,{disabled:!m(x),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:k(()=>[m(x)?(g(),_("img",$e)):F("v-if",!0)]),_:1},8,["disabled"]),h(n,{disabled:m(x),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:k(()=>[m(x)?F("v-if",!0):(g(),_("img",Ke))]),_:1},8,["disabled"])])]),et,l("div",tt,[l("div",null,D(J.value.name)+"\uFF1A",1),l("div",null,D(J.value.value)+"\u4EA9",1),l("div",{class:"cancel",onClick:Q},"X")]),l("div",at,[(g(!0),_(q,null,j(m(v).label,(s,d)=>(g(),_("div",{key:d},[l("div",null,D(s.crop)+"\uFF1A",1),l("div",null,D((s.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),m(v).XZQMC?(g(),_("div",rt,[ot,l("div",null,D(m(v).XZQMC),1)])):F("v-if",!0),l("div",{class:"cancel",onClick:Q},"X")])])}}},dt=xe(st,[["__scopeId","data-v-21cafe5e"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/plough/VideoSurveillance/index.vue"]]);export{dt as default};