import{_ as e,a}from"./zhankaiss.6870329f.js";import{m as l,g as t,p as s,a as n,b as o,s as i,h as r,c,j as d,d as u,z as A,k as g,l as v}from"./information.2f37efab.js";import"./linesGL.76a64914.js";import{_ as m,r as p,I as y,x as w,H as f,a8 as h,d as b,o as I,c as G,l as V,n as k,e as C,w as U,O as R,A as E,m as S,V as F,W as j,k as x,J as Y,f as M,N,q as z,s as B}from"./index.e5c8b0d6.js";import"./linkSeriesData.e74eae00.js";const H=e=>(z("data-v-c7cd85ef"),e=e(),B(),e),O={class:"center"},q=H((()=>V("div",{style:{width:"100%",height:"100%"},class:"cesiumContainer",id:"cesiumContainer"},null,-1))),Q={class:"rightWra"},T={class:"farmlandHeader"},L={class:"text"},P={key:0,class:"holiday"},K={class:"rightTop"},D=H((()=>V("div",{class:"title"},[V("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}}),V("span",null,"预警信息发布")],-1))),Z={class:"farmlandDiv"},W={class:"radioDiv"},X={class:"radioDiv"},J={class:"selectDiv"},_={class:"selectDiv",style:{"margin-top":"10px"}},$={class:"btws"},ee=H((()=>V("img",{src:e},null,-1))),ae=H((()=>V("img",{src:a},null,-1))),le={class:"mt-4"},te={class:"tuli"},se=H((()=>V("span",null," 是否确认发送预警短信? ",-1))),ne={class:"dialog-footer"},oe=m({__name:"index",setup(e){const a=p();p({name:"",value:""});let m=p(!1);p("");let z=p(!1),B=p([]),H=y({lat:"",lan:"",name:""}),oe=p([]);const ie=p([]),re=p(5e3),ce=p(),de=p([]),ue=p([]),Ae=p([]),ge=p([]);let ve={"无预警":{color:"rgba(49, 235, 7, 1)",disabled:!1},"轻度干旱":{color:"rgba(9, 187, 222, 1)",disabled:!1},"中度干旱":{color:"rgba(255, 235, 59, 1)",disabled:!1},"严重干旱":{color:"rgba(234, 165, 93, 1)",disabled:!1},"特大干旱":{color:"rgba(215, 25, 28, 1)",disabled:!1}};const me=p(),pe=p([]),ye=({dayjs:e})=>pe.value.includes(e.format("YYYY-MM-DD")),we=e=>{const a=new Date;return a.setHours(0,0,0,0),e.getTime()>a.getTime()&&{disabled:!0,style:{color:"red",textDecoration:"line-through"}}};function fe(){xe()}function he(){re.value=5e3,Fe.value="",me.value="",xe(),Me()}const be=[{label:"轻度干旱",flag:1},{label:"中度干旱",flag:2},{label:"严重干旱",flag:3},{label:"特大干旱",flag:4}];y({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"}]});const Ie=p(1),Ge=p(6),Ve=p([]);function ke(e){Ie.value=e,Ce()}function Ce(){const e=(Ie.value-1)*Ge.value,a=Ie.value*Ge.value;Ve.value=ie.value.slice(e,a)}let Ue=p(null);let Re=p(null);w((()=>{Ye(),a.value=(()=>{let e=new Date;return e.setDate(e.getDate()-1),e})().toJSON().substr(0,10),xe(),He(),Oe(),function(){var e=document.querySelector(".center"),a=document.getElementById("cesiumContainer");Ue=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.XYZ({url:`${serverAPI.tiandituLayers}`,projection:serverAPI.flag?"EPSG:4326":"EPSG:3857"}),preload:20})]}),Re=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"CJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999}),Ue.addLayer(Re),l=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"XJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999}),Ue.addLayer(l);var l;const i=new ol.Overlay({element:document.createElement("div"),className:"overlay1",positioning:"bottom-center",offset:[0,-10],stopEvent:!0});Ue.on("moveend",(function(){Ue.getView().getZoom()>=13?Re.setVisible(!0):Re.setVisible(!1)})),Ue.on("singleclick",(function(e){p([]);const a=Ue.getEventPixel(e.originalEvent);var l=e.coordinate,r=l[0],c=l[1],d=Ue.getView();d.animate({center:[r,c],duration:1e3}),Ee.value.forEach((a=>{layersDic[a]?QueryData(e,layersDic[a].setOf,`http://192.168.0.113:8090/iserver/services/${layersDic[a].name}/rest/maps/${layersDic[a].setOf}`,a):layersGbz[a]&&QueryData(e,layersGbz[a].setOf,`http://192.168.0.113:8090/iserver/services/${layersGbz[a].name}/rest/maps/${layersGbz[a].setOf}`,a)})),Ue.forEachFeatureAtPixel(a,(e=>{d.animate({center:[r,c],duration:1e3});const a=e.get("id"),l=e.get("type");if(Ue.addOverlay(i),"1"===l){for(const e in B.value)a===B.value[e].msName&&(H.name=a,H.lon=B.value[e].msLongitude,H.lat=B.value[e].msLatitude);i.setPosition(e.getGeometry().getCoordinates()),i.getElement().innerHTML=`\n
\n
站点信息 \n
\n
\n `;const l=i.getElement().querySelector(".close-btn");l&&l.addEventListener("click",(()=>{i.setPosition(void 0)}))}else if("0"===l){for(const e in oe.value)a===oe.value[e].contacts&&(H.name=a,H.phone=oe.value[e].phone,H.region=oe.value[e].region);i.setPosition(e.getGeometry().getCoordinates()),i.getElement().innerHTML=`\n \n
种粮大户信息 \n
\n
\n `,e.setStyle(new ol.style.Style({image:new ol.style.Icon({src:s,scale:.5})})),Ue.getLayers().forEach((function(a){if(a instanceof ol.layer.Vector){let l=a.getSource().getFeatures()[0];"0"===l.get("type")&&l!==e&&("0"===l.get("warning")?l.setStyle(new ol.style.Style({image:new ol.style.Icon({src:n,scale:.5})})):"1"===l.get("warning")&&l.setStyle(new ol.style.Style({image:new ol.style.Icon({src:o,scale:.5})})))}}));const l=i.getElement().querySelector(".close-btn");l&&l.addEventListener("click",(()=>{i.setPosition(void 0),Ue.getLayers().forEach((function(e){if(e instanceof ol.layer.Vector){let a=e.getSource().getFeatures()[0];"0"===a.get("type")&&("0"===a.get("warning")?a.setStyle(new ol.style.Style({image:new ol.style.Icon({src:n,scale:.5})})):"1"===a.get("warning")&&a.setStyle(new ol.style.Style({image:new ol.style.Icon({src:o,scale:.5})})))}}))}))}}))})),new ResizeObserver((function(e){e.forEach((function(e){var l=e.contentRect.width,t=e.contentRect.height;a.style.width=l+"px",a.style.height=t+"px",Ue.updateSize()}))})).observe(e)}(),Me(),document.querySelector(".rightWra").style.transform="translate(101%,0)"})),f((()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"})),p([]);let Ee=p([]);const Se=p([]),Fe=p("");let je=window.localStorage.getItem("deptName");function xe(){l({data:a.value,alertRange:re.value,flag:1,msName:Fe.value,warning:me.value,divisions:je}).then((e=>{ie.value=e.data,Ce()}))}A({divisions:je}).then((e=>{Se.value=e.data}));const Ye=()=>{i().then((e=>{ce.value=Number(e.data[0].flag)}))},Me=()=>{for(const e in ue.value)Ue.removeLayer(ue.value[e]);ue.value=[];for(const e in Ae.value)Ue.removeLayer(Ae.value[e]);Ae.value=[];for(const e in ge.value)Ue.removeLayer(ge.value[e]);ge.value=[],r({flag:1,data:a.value,divisions:je}).then((e=>{B.value=e.data;for(const l in B.value){const e=[parseFloat(B.value[l].msLongitude),parseFloat(B.value[l].msLatitude)],t=128,s=[];for(let a=0;a{oe.value=e.data;for(const a in oe.value){const e=[parseFloat(oe.value[a].latitude),parseFloat(oe.value[a].longitude)],l=new ol.geom.Point(e),t=new ol.Feature({geometry:l,id:oe.value[a].contacts,type:oe.value[a].flag,warning:oe.value[a].earlyWarning});"0"===oe.value[a].earlyWarning?(t.setStyle(new ol.style.Style({image:new ol.style.Icon({src:n,scale:.5})})),ge.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[t]})}),Ue.addLayer(ge.value[a])):"1"===oe.value[a].earlyWarning&&(t.setStyle(new ol.style.Style({image:new ol.style.Icon({src:o,scale:.5})})),ge.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[t]})}),Ue.addLayer(ge.value[a]))}}))},Ne=()=>{Me(),l({data:a.value,alertRange:re.value,flag:1,divisions:je}).then((e=>{ie.value=e.data,Ce()}))},ze=()=>{z.value=!1,v(de.value).then((e=>{"200"==e.code?h({message:"预警短信已成功发送",type:"success"}):h.error("发送失败")}))},Be=e=>{de.value=e},He=()=>{d({flag:1,divisions:je}).then((e=>{e.data.length<1?h({message:"近1周暂无预警",type:"success"}):h({message:`近1周${e.data.length}次预警`,type:"warning"})}))},Oe=()=>{let e=[];u({flag:1,divisions:je}).then((a=>{e=[],a.data.forEach((a=>{e.push(a.dataTime)})),pe.value=e}))};return(e,t)=>{const s=b("el-date-picker"),n=b("el-radio"),o=b("el-radio-group"),i=b("el-option"),r=b("el-select"),c=b("el-button"),d=b("el-table-column"),u=b("el-table"),A=b("el-pagination"),v=b("el-icon"),p=b("el-tooltip"),y=b("el-collapse-item"),w=b("el-collapse"),f=b("el-dialog");return I(),G("div",O,[q,V("div",Q,[V("div",T,[k(" 监测日期: "),C(s,{"popper-class":"date_poper",class:"m-2",modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value=e),onChange:Ne,format:"YYYY 年 MM 月 DD 日","value-format":"YYYY-MM-DD",type:"date",placeholder:"选择日期",disabledDate:we},{default:U((e=>[V("div",{class:R(["cell",{current:e.isCurrent}])},[V("span",L,E(e.text),1),ye(e)?(I(),G("span",P)):S("",!0)],2)])),_:1},8,["modelValue"])]),V("div",K,[D,V("div",Z,[V("div",null,[V("div",W,[k(" 自动发送预警短信: "),C(o,{onChange:t[1]||(t[1]=e=>{g({flag:ce.value}).then((e=>{h({message:e.msg,type:"success"})}))}),modelValue:ce.value,"onUpdate:modelValue":t[2]||(t[2]=e=>ce.value=e),class:"ml-4"},{default:U((()=>[C(n,{label:0,size:"large"},{default:U((()=>[k("是")])),_:1}),C(n,{label:1,size:"large"},{default:U((()=>[k("否")])),_:1})])),_:1},8,["modelValue"])])]),V("div",X,[k(" 预警范围: "),C(o,{onChange:t[3]||(t[3]=e=>(Me(),void l({data:a.value,alertRange:re.value,flag:1,divisions:je}).then((e=>{ie.value=e.data,Ce()})))),modelValue:re.value,"onUpdate:modelValue":t[4]||(t[4]=e=>re.value=e),class:"ml-4"},{default:U((()=>[C(n,{label:5e3,size:"large"},{default:U((()=>[k("5km")])),_:1}),C(n,{label:1e4,size:"large"},{default:U((()=>[k("10km")])),_:1})])),_:1},8,["modelValue"])]),V("div",J,[k(" 站点名称: "),C(r,{"popper-class":"select_city",modelValue:Fe.value,"onUpdate:modelValue":t[5]||(t[5]=e=>Fe.value=e),placeholder:"请选择",style:{width:"76%"},teleported:"false"},{default:U((()=>[(I(!0),G(F,null,j(Se.value,(e=>(I(),x(i,{key:e.msName,label:e.msName,value:e.msName,title:e.msName},null,8,["label","value","title"])))),128))])),_:1},8,["modelValue"])]),V("div",_,[k(" 预警情况: "),C(r,{"popper-class":"select_city",modelValue:me.value,"onUpdate:modelValue":t[6]||(t[6]=e=>me.value=e),placeholder:"请选择",style:{width:"76%"}},{default:U((()=>[(I(),G(F,null,j(be,(e=>C(i,{key:e.flag,label:e.label,value:e.label},null,8,["label","value"]))),64))])),_:1},8,["modelValue"])]),V("div",$,[C(c,{class:"bt1",onClick:fe},{default:U((()=>[k("查询")])),_:1}),C(c,{class:"bt2",onClick:he},{default:U((()=>[k("重置")])),_:1})]),C(u,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center",color:"rgba(102, 102, 102, 1)"},data:Ve.value,style:{width:"100%"},onSelectionChange:Be},{default:U((()=>[C(d,{type:"selection",width:"20"}),C(d,{prop:"msName",width:"80",label:"站点名称"}),C(d,{prop:"warning",label:"预警情况"}),C(d,{prop:"name",width:"80",label:"联系人"}),C(d,{prop:"telephone",label:"联系电话"})])),_:1},8,["header-cell-style","data"]),C(A,{small:"",style:{display:"flex","justify-content":"center","margin-top":"10px"},onCurrentChange:ke,"current-page":Ie.value,"page-size":Ge.value,layout:" prev, pager, next",total:ie.value.length},null,8,["current-page","page-size","total"]),C(c,{class:"but",type:"primary",disabled:de.value.length<1||0==ce.value,onClick:t[7]||(t[7]=e=>Y(z)?z.value=!0:z=!0)},{default:U((()=>[k(" 发布预警短信 ")])),_:1},8,["disabled"])])]),V("div",{class:"rightFoldDiv",onClick:t[8]||(t[8]=e=>(m.value=!m.value,void(m.value?document.querySelector(".rightWra").style.transform="translate(0,0)":document.querySelector(".rightWra").style.transform="translate(101%,0)")))},[C(p,{disabled:!M(m),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"收起",placement:"top"},{default:U((()=>[M(m)?(I(),x(v,{key:0},{default:U((()=>[ee])),_:1})):S("",!0)])),_:1},8,["disabled"]),C(p,{disabled:M(m),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"展开",placement:"top"},{default:U((()=>[M(m)?S("",!0):(I(),x(v,{key:0},{default:U((()=>[ae])),_:1}))])),_:1},8,["disabled"])])]),C(w,{class:"legend",accordion:""},{default:U((()=>[C(y,{name:"1"},{title:U((()=>[k("图例")])),default:U((()=>[V("div",le,[V("div",te,[(I(!0),G(F,null,j(M(ve),((e,a,l)=>(I(),G("div",{key:l,style:N({backgroundColor:e.color,border:"1px solid value.color",width:"100%",height:"25px",marginTop:"5px",textAlign:"center"})},E(a),5)))),128))])])])),_:1})])),_:1}),C(f,{modelValue:M(z),"onUpdate:modelValue":t[10]||(t[10]=e=>Y(z)?z.value=e:z=e),title:"系统提示",width:"30%",center:""},{footer:U((()=>[V("span",ne,[C(c,{onClick:t[9]||(t[9]=e=>Y(z)?z.value=!1:z=!1)},{default:U((()=>[k("取消")])),_:1}),C(c,{type:"primary",onClick:ze},{default:U((()=>[k(" 确定 ")])),_:1})])])),default:U((()=>[se])),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-c7cd85ef"]]);export{oe as default};