import{Q as e,G as t,r as a,x as o,a2 as i,a4 as n,o as l,c as s,l as r,S as c,a8 as A,_ as u,I as d,H as m,d as p,n as h,A as g,f as v,e as y,w as C,J as f,k as I,m as S,O as w,K as b,M as k,q as E,s as x}from"./index.e5c8b0d6.js";import{_ as H}from"./dow.b4b83e88.js";import{b as M,g as B,L as T,i as V,_ as Y,a as D}from"./VideoSurveillance.452e9058.js";import"./index.2809c208.js";import{u as R}from"./useEcharts.31b48034.js";import{v as U}from"./video.vue_vue_type_style_index_1_lang.1cc62507.js";import{h as L}from"./moment.2cad4b18.js";import{d as N}from"./download.57166482.js";import{e as z}from"./element-resize-detector.d4d1cd8d.js";import{ai as j}from"./linkSeriesData.e74eae00.js";import"./browser-detector.d146ab9e.js";function K(t){return e({url:"equipment/meteorologyFtb",method:"get",params:t})}const Z={class:"videoPlay"},J=["src"],P=u(t({__name:"video",props:{videoSrc:null,autoPlay:{type:Boolean,default:!1},sonData:null},setup(e){const t=e,u=a();let d;const m=async()=>{await c();const e={muted:!0,controls:!0,autoplay:!0,loop:!0,language:"zh-CN",techOrder:["html5"],controlBar:{children:[]}};d=U(u.value,e,(()=>{U.log("播放器已经准备好了!"),t.autoPlay&&t.videoSrc&&d.play(),d.on("ended",(()=>{U.log("播放结束了!")})),d.on("error",(()=>{U.log("播放器解析出错!")}))}));const a=U(u.value,e,(function(){const e=U.getComponent("Component"),o=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"上",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:0,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),i=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"下",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:1,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),n=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"左",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:2,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),l=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"右",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:3,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),s=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"左上",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:4,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),r=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"左下",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:5,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),c=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"右上",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:6,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),u=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"右下",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:7,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),d=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"放大",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:8,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),m=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"缩小",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:9,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}}),p=U.extend(e,{constructor:function(t,a){e.apply(this,arguments),this.on("click",this.clickIcon)},createEl:function(){return U.dom.createEl("div",{className:"vjs-my-components",innerHTML:'',title:"暂停",style:{cursor:"pointer"}})},clickIcon:function(){M({name:t.sonData}).then((e=>{B({...e.data[0],operation:10,duration:1e3}).then((e=>{"失败"==e?A.error(e):A({message:"成功",type:"success"})}))}))}});U.registerComponent("myComponent",o),U.registerComponent("myComponent2",i),U.registerComponent("myComponent3",n),U.registerComponent("myComponent4",l),U.registerComponent("myComponent5",s),U.registerComponent("myComponent6",r),U.registerComponent("myComponent7",c),U.registerComponent("myComponent8",u),U.registerComponent("myComponent9",d),U.registerComponent("myComponent10",m),U.registerComponent("myComponent11",p);const h=a.getChild("controlBar");h&&(h.addChild("myComponent"),h.addChild("myComponent2"),h.addChild("myComponent3"),h.addChild("myComponent4"),h.addChild("myComponent5"),h.addChild("myComponent6"),h.addChild("myComponent7"),h.addChild("myComponent8"),h.addChild("myComponent9"),h.addChild("myComponent10"),h.addChild("myComponent11"))})),o=U.extend(U.getComponent("Button"),{constructor:function(e,t){U.getComponent("Button").apply(this,arguments),this.controlText("全屏按钮")},handleClick:function(){d.isFullscreen()?d.exitFullscreen():d.requestFullscreen()}});U.registerComponent("fullscreenToggle",o);const i=new o(d);i.addClass("vjs-icon-fullscreen-enter"),i.addClass("custom-fullscreen-btn");const n=d.getChild("controlBar");n&&n.addChild(i)};return o((()=>{m()})),i((()=>t.videoSrc),(()=>{d.pause(),d.src(t.videoSrc),d.load(),t.videoSrc&&d.play()})),n((()=>{null==d||d.dispose()})),(t,a)=>(l(),s("div",Z,[r("video",{ref_key:"m3u8_video",ref:u,class:"video-js vjs-default-skin vjs-big-play-centered",controls:""},[r("source",{src:e.videoSrc},null,8,J)],512)]))}}),[["__scopeId","data-v-a367990d"]]),F=e=>(E("data-v-e5c022aa"),e=e(),x(),e),X={class:"fatherDiv"},O={class:"tabulation"},Q={class:"tabulationCente"},q={class:"left"},W={style:{color:"rgba(100, 195, 164, 1)"}},G={class:"freckle"},_={class:"searchDiv"},$=F((()=>r("img",{src:H,alt:""},null,-1))),ee={class:"chartModeFather"},te={class:"tableBox"},ae={class:"example-pagination-block"},oe={class:"chartMode"},ie={class:"depth"},ne={class:"centent"},le={key:0},se=[F((()=>r("img",{style:{width:"300%"},src:Y},null,-1)))],re={key:1},ce=[F((()=>r("img",{style:{width:"300%"},src:D},null,-1)))],Ae={class:"cesiumContainersDiv"},ue=[F((()=>r("div",{id:"cesiumContainers",class:"detailed"},null,-1)))],de={class:"myVideo"},me=u({__name:"index",setup(t){let n=T.Map,A=a([]);a({});let u=a([]);a("");let E=a("全部"),x=a([]);const H=a(null);let M=window.localStorage.getItem("deptName");const B=a(!1);let Y=a(""),D=a({yearMonth:"",flag:"",divisions:""}),U=a(!1),Z=a(1),J=a(14),F=null,me=a({airTemperature:[],airHumidity:[],windSpeed:[],windDirection:[],rainfall:[],atmosphericPressure:[],evaporation:[],lightIntensity:[],sunlightHours:[],photosyntheticEffectiveRadiation:[],dataTimeArr:[]}),pe=a(""),he=a(!0);a(!0);let ge=a("1");const ve=d({videoSrc:"http://cmgw-vpc.lechange.com:8888/LCO/9C023C5FACFE48F/0/1/20230530T033445/a44e6e04b0608347f0209ab2b25aa258.m3u8"});o((()=>{fe(),Ce(),Se()})),m((()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="none"}));let ye=null;const Ce=()=>{n=T.map("cesiumContainers",{center:[36.4,119.166326],zoom:7,zoomControl:!1,doubleClickZoom:!1,attributionControl:!1,maxZoom:16,crs:serverAPI.flag?T.CRS.EPSG4326:T.CRS.EPSG3857});let e=null,t=null;serverAPI.flag?(e=T.tileLayer(serverAPI.tiandituLayers,{maxZoom:20,tileSize:256,zoomOffset:1}),t=T.tileLayer(serverAPI.tiandituzhuji,{maxZoom:20,tileSize:256,zoomOffset:1})):(e=T.tileLayer(serverAPI.tiandituLayers,{}),t=T.tileLayer(serverAPI.tiandituzhuji,{})),e.addTo(n),t.addTo(n),ye={"Image Base Map":e,"CIA Base Map":t},T.Util.requestAnimFrame(n.invalidateSize,n,!1,n._container)},fe=()=>{var t;(t={divisions:M},e({url:"equipment/meteorological",method:"get",params:t})).then((e=>{E.value=e.data[0].children[0].label,pe.value=e.data[0].children[0].label,Ie(),e.data.forEach((e=>{u.value.push(e)}))}))},Ie=()=>{K({msName:pe.value,whetherToDownload:!1,startTime:Y.value[0]?L(Y.value[0]).format("YYYY-MM-DD HH:mm:ss"):null,endTime:Y.value[1]?L(Y.value[1]).format("YYYY-MM-DD HH:mm:ss"):null,divisions:M,pageNums:Z.value,pageSizes:J.value}).then((e=>{A.value=e.data[0]&&e.data[0].pageCount,x.value=e.data})),Se()},Se=()=>{var t;(t={name:pe.value,whetherToDownload:!1,startTime:Y.value[0]?L(Y.value[0]).format("YYYY-MM-DD HH:mm:ss"):null,endTime:Y.value[1]?L(Y.value[1]).format("YYYY-MM-DD HH:mm:ss"):null,divisions:M},e({url:"equipment/meteorologyTb",method:"get",params:t})).then((e=>{me.value.airTemperature=[],me.value.airHumidity=[],me.value.windSpeed=[],me.value.windDirection=[],me.value.rainfall=[],me.value.atmosphericPressure=[],me.value.evaporation=[],me.value.lightIntensity=[],me.value.sunlightHours=[],me.value.photosyntheticEffectiveRadiation=[],me.value.dataTimeArr=[],e.data.forEach((e=>{me.value.airTemperature.unshift(e.airTemperature),me.value.airHumidity.unshift(e.airHumidity),me.value.windSpeed.unshift(e.windSpeed),me.value.windDirection.unshift(e.windDirection),me.value.rainfall.unshift(e.rainfall),me.value.atmosphericPressure.unshift(e.atmosphericPressure),me.value.evaporation.unshift(e.evaporation),me.value.lightIntensity.unshift(e.lightIntensity),me.value.sunlightHours.unshift(e.sunlightHours),me.value.photosyntheticEffectiveRadiation.unshift(e.photosyntheticEffectiveRadiation),me.value.dataTimeArr.unshift(e.dataTime)})),xe()}))};i((()=>E.value),((t,a)=>{var o;(o={divisions:M},e({url:"equipment/meteorologicals",method:"get",params:o})).then((e=>{n.eachLayer((e=>{Object.values(ye).includes(e)||n.removeLayer(e)})),e.data.forEach((e=>{e.msName==E.value&&(F=T.latLng(e.msLatitude,e.msLongitude),n.setView(F,17),T.marker([e.msLatitude,e.msLongitude],{icon:ke}).addTo(n).bindPopup(`${e.msName}

经度:${e.msLongitude}

纬度:${e.msLatitude}`).openPopup())}))})),Se()}));const we=(e,t,a,o)=>{Z.value=1,e.children||(E.value=e.label,D.value.flag="",Y.value=[],pe.value=E.value,Ie())},be=e=>{Z.value=1,Ie(),Se(),xe()};var ke=new(T.Icon.extend({options:{iconSize:[50,50],shadowSize:[50,64],iconAnchor:[22,94],shadowAnchor:[4,62],popupAnchor:[0,-86]}}))({iconUrl:V});const Ee=()=>{he.value=!he.value,xe()},xe=()=>{const e=H.value;e.style.width=document.querySelector(".chartModeFather").offsetWidth+"px",e.style.height=document.querySelector(".chartModeFather").offsetHeight-100+"px";const t=j(e);window.addEventListener("resize",(()=>{e.style.width=document.querySelector(".chartModeFather").offsetWidth+"px",e.style.height=document.querySelector(".chartModeFather").offsetHeight-100+"px",t.resize()})),Ye()},He=()=>{U.value=!U.value},Me=e=>{Z.value=e,K({msName:pe.value,whetherToDownload:!1,startTime:Y.value[0]?L(Y.value[0]).format("YYYY-MM-DD HH:mm:ss"):null,endTime:Y.value[1]?L(Y.value[1]).format("YYYY-MM-DD HH:mm:ss"):null,divisions:M,pageNums:Z.value,pageSizes:J.value}).then((e=>{x.value=e.data}))},Be=()=>{Y.value="",D.value.flag="",Z.value=1,Ie()},Te=e=>{ge.value=e,Ye()},Ve=()=>{K({msName:pe.value,whetherToDownload:!0,startTime:Y.value[0]?L(Y.value[0]).format("YYYY-MM-DD HH:mm:ss"):null,endTime:Y.value[1]?L(Y.value[1]).format("YYYY-MM-DD HH:mm:ss"):null,divisions:M}).then((e=>{N(e.data[e.data.length-1].excelPath)}))};function Ye(){const e=j(H.value);let t="温度(℃)",a="湿度(%)",o=me.value.airTemperature,i=me.value.airHumidity,n="rgba(255, 235, 59, 1)";switch(ge.value){case 1:t="温度(℃)",a="湿度(%)",o=me.value.airTemperature,i=me.value.airHumidity,n="rgba(0, 209, 195, 1)";break;case 2:t="风速(m/s)",a="风向(°)",o=me.value.windSpeed,i=me.value.windDirection,n="rgba(201, 255, 148, 1)";break;case 3:t="光照强度(LUX)",a="光合有效(umol)",o=me.value.lightIntensity,i=me.value.photosyntheticEffectiveRadiation,n="rgba(0, 209, 195, 1)";break;case 4:t="日照时数(h)",a="",o=me.value.sunlightHours,i=[],n="rgba(201, 255, 148, 1)";break;case 5:t="雨量(mm)",a="蒸发量(mm)",o=me.value.rainfall,i=me.value.evaporation,n="rgba(0, 209, 195, 1)";break;case 6:t="大气压力(hpa)",a="",o=me.value.atmosphericPressure,i=[],n="rgba(9, 187, 222, 0.8)"}var l=me.value.dataTimeArr;let s=30/l.length*100;R(e,{color:[n,"rgba(199, 125, 231, 1)"],tooltip:{trigger:"axis"},grid:{top:"15%",left:"5%",right:"7%",bottom:"15%",containLabel:!0},legend:{show:!0,top:"7%",x:"center",textStyle:{color:"black"},itemWidth:20,itemHeight:12.5,icon:"rect",backgroundColor:"transparent"},dataZoom:[{type:"slider",width:"40%",zoomLock:!0,top:"90%",start:0,end:s,showDataShadow:!1,showDetail:!1,fillerColor:"rgba(64, 158, 255)",borderRadius:"50%",moveHandleSize:0,moveHandleStyle:{},left:"35%",height:12,handleSize:"80%",handleIcon:"path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z",handleStyle:{borderWidth:0,color:"rgba(64, 158, 255)"}},{type:"inside"}],xAxis:[{type:"category",data:l,axisLine:{show:!1},axisLabel:{textStyle:{color:"rgba(102, 102, 102, 1)"},interval:0,rotate:45,formatter:function(e){var t="",a=e.length,o=Math.ceil(a/10);if(a>10)for(var i=0;ie.color},smooth:!0,showSymbol:!0,symbol:"circle",lineStyle:{width:3,color:"rgba(199, 125, 231, 1)"}}]}),z().listenTo(H.value,(()=>{c((()=>{e.resize()}))}))}return(e,t)=>{const a=p("el-tree"),o=p("el-date-picker"),i=p("el-form-item"),n=p("el-button"),c=p("el-form"),d=p("el-table-column"),m=p("el-table"),M=p("el-pagination"),T=p("el-dialog");return l(),s("div",X,[r("div",O,[r("div",Q,[r("div",q,[r("p",null,[h(" 当前选择 : "),r("span",W,g(v(E)),1)]),y(a,{data:v(u),props:e.defaultProps,onNodeClick:we},null,8,["data","props"])]),r("div",G,[r("div",_,[y(c,{inline:!0,model:v(D),class:"demo-form-inline"},{default:C((()=>[y(i,{style:{width:"300px"},label:"监测时间:"},{default:C((()=>[y(o,{modelValue:v(Y),"onUpdate:modelValue":t[0]||(t[0]=e=>f(Y)?Y.value=e:Y=e),type:"daterange","range-separator":"➡️","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])])),_:1}),y(i,null,{default:C((()=>[y(n,{type:"primary",onClick:be},{default:C((()=>[h("查询")])),_:1}),y(n,{plain:"",onClick:Be},{default:C((()=>[h("重置")])),_:1}),e.operate?S("",!0):(l(),I(n,{key:0,type:"primary",text:"",onClick:Ve},{default:C((()=>[$,h(" 下载 ")])),_:1}))])),_:1})])),_:1},8,["model"]),r("div",{class:"modeDiv",onClick:Ee},[r("div",{class:w(v(he)?"Selected":"")},"表格模式",2),r("div",{class:w(v(he)?"":"Selecteds")},"图表模式",2)])]),r("div",ee,[b(r("div",te,[y(m,{data:v(x),"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"},"header-row-class-name":"tabth",height:"90%","highlight-current-row":""},{default:C((()=>[y(d,{prop:"dataTime",label:"日期",width:"160"},{default:C((e=>[r("div",null,g(e.row.dataTime),1)])),_:1}),y(d,{prop:"airTemperature",label:"空气温度(℃)"}),y(d,{prop:"airHumidity",label:"空气湿度(%)"}),y(d,{prop:"windSpeed",label:"风速(m/s)"}),y(d,{prop:"windDirection",label:"风向(°)"}),y(d,{prop:"rainfall",label:"雨量(mm)"}),y(d,{prop:"atmosphericPressure",label:"大气压力(hpa)"}),y(d,{prop:"evaporation",label:"蒸发(mm)"}),y(d,{prop:"lightIntensity",label:"光照强度(LUX)"}),y(d,{prop:"sunlightHours",label:"日照时数(h)"}),y(d,{prop:"photosyntheticEffectiveRadiation",label:"光合有效(umol)"})])),_:1},8,["data"]),r("div",ae,[h(" 共"+g(v(A))+"条 ",1),y(M,{background:"",layout:"prev, pager, next",total:Number(v(A)),"current-page":v(Z),"page-size":v(J),onCurrentChange:Me},null,8,["total","current-page","page-size"])])],512),[[k,v(he)]]),b(r("div",oe,[r("div",ie,[r("p",{class:w("1"==v(ge)?"SelectedDiv":""),onClick:t[1]||(t[1]=e=>Te(1))}," 温度/湿度 ",2),r("p",{class:w("2"==v(ge)?"SelectedDiv":""),onClick:t[2]||(t[2]=e=>Te(2))}," 风速/风向 ",2),r("p",{class:w("3"==v(ge)?"SelectedDiv":""),onClick:t[3]||(t[3]=e=>Te(3))}," 光照强度/光合有效 ",2),r("p",{class:w("4"==v(ge)?"SelectedDiv":""),onClick:t[4]||(t[4]=e=>Te(4))}," 日照时数 ",2),r("p",{class:w("5"==v(ge)?"SelectedDiv":""),onClick:t[5]||(t[5]=e=>Te(5))}," 雨量/蒸发量 ",2),r("p",{class:w("6"==v(ge)?"SelectedDiv":""),onClick:t[6]||(t[6]=e=>Te(6))}," 大气压力 ",2)]),r("div",{ref_key:"chartDiv",ref:H,class:"chartDiv"},null,512)],512),[[k,!v(he)]])])]),r("div",ne,[r("div",{class:"arrow",onClick:He},[v(U)?S("",!0):(l(),s("p",le,se)),v(U)?(l(),s("p",re,ce)):S("",!0)])]),b(r("div",Ae,ue,512),[[k,!v(U)]])]),y(T,{modelValue:B.value,"onUpdate:modelValue":t[7]||(t[7]=e=>B.value=e),"append-to-body":"",class:"video","destroy-on-close":"",title:"实时监控",width:"30%","before-close":e.handleClose},{default:C((()=>[r("div",de,[y(P,{videoSrc:ve.videoSrc,autoPlay:""},null,8,["videoSrc"])])])),_:1},8,["modelValue","before-close"])])])}}},[["__scopeId","data-v-e5c022aa"]]);export{me as default};