2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
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 <div class="info-window">\n <div class="close-btn" ><span>站点信息</span><img src="${t}" alt=""/> </div>\n <div class="content" style="color:white;font-size: 16px">\n <div class="line" style="margin-top: 10px">" <div class="label">名称:</div><span>${H.name}</span></div>\n <div class="line" style="margin-top: 10px">" <div class="label">经度:</div><span>${H.lon}</span></div>\n <div class="line" style="margin-top: 10px">" <div class="label">纬度:</div><span>${H.lat}</span></div>\n </div>\n </div>\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 <div class="info-window" >\n <div class="close-btn" ><span>种粮大户信息</span><img src="${t}" alt=""/> </div>\n <div class="content" style="color:white;font-size: 16px">\n <div class="line" style="margin-top: 10px"><div class="label">姓名:</div><span>${H.name}</span></div>\n <div class="line" style="margin-top: 10px"><div class="label">手机:</div><span>${H.phone}</span></div>\n <div class="line" style="margin-top: 10px"><div class="label">位置:</div><span>${H.region}</span></div>\n </div>\n </div>\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<t;a++){const l=2*Math.PI*a/t,n=ol.sphere.computeDestinationPoint(e,re.value,l);s.push(n)}const n=new ol.Feature({geometry:new ol.geom.Polygon([s])}),o=new ol.style.Style({stroke:new ol.style.Stroke({color:ve[B.value[l].warning]&&ve[B.value[l].warning].color,width:2})});ue.value[l]=new ol.layer.Vector({source:new ol.source.Vector({features:[n]}),style:o}),"无灾害"!==B.value[l].warning&&Ue.addLayer(ue.value[l]);const i=new ol.geom.Point(e),r=new ol.Feature({geometry:i,id:B.value[l].msName,type:B.value[l].flag});r.setStyle(new ol.style.Style({image:new ol.style.Icon({src:(a=B.value[l].warning,"轻度干旱"===a?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAOJSURBVHic7ZyxbtswEIb/uPYieKq0NoMNe80aoBnrZwk69QHasX2AjnkWZWyBrFlj2IPT0Q5QwBBgKJY6uBLsMynT0imiSH5LYEMmmDve/eIdpYu/r68pHI3STVLg54/vTc/DWr58/YbOtulZWM4WQCdpehaWkwDoJE4RGiVJXSQ0josEDUhSoCsT5n6//6aTqYM4jrHZbPLPvz5c4fflVSNz+bh4xM3z49H3WwBdWTrq9XrodDq1Tqxu4jhuegoncelIA5wwa0ACuM1a0+w2ay4dNUqSFgjzKcJghDAYY7J8wmQ5lV53d3mNmecXXhcGI8w9H4NoVTiWiST4X8A7l5nnIwzGAJD/FRkvDEaYeX5+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2UUiGiLeS7WvE0Qg+Mtz8ntpKo64h7FfViKMRfOSH5kVqK41CDxDGgUYcjeAjQ80L1KYYdQ2hD+yLXtWyOBrBR76b+YbaFKOQDBEL2q9qYRyN4CMXZ85Rm2jUC4ThWxhHI/jIhZlAbaJRqHrUzjQW1L6xYBxHI/jIt9OnqU030puFZ+pLhFjB3mVxHI3gI+enT1CbaGTvBVtB3xaNCuNoBB85O/3s8u0kGmmF+EXrjOIXzeYrjKMRfCRMH6c20ahz3vg5bQV9TzQqi6MRfOTMFJVJRl0r2AeWxdEIPnJq6ktqU4w6J42f01bQN0QjI45G8JGvp76gttKoawX7QCOORvCRganD1FYadc4YP6etoO+GRnYcjeAjxycPUmsbda1gH2jH0Qg+cmzyc2ptI31GGtkK+otyGlXG0Qg+8tXkPioNI1tBX4xG9oGVcTSCjxyd2EutYaRPRyNbQU9plBJHI/jIkYmPqS0zoh/9GD8PiY3s734r42gEHzk88RG1ZUbh+e0Qf5OhIYjJ9q2MoxF85NBEP7WGUegBwva142gEHznQeJ9a2yg8/6lETBqiL/roMXztOBrBR/Y3dlNbadTLftEHpjM5GsFHPmvsoLbSKFRBGPvF9i2LoxF8ZG9jG7UpRqGKSV/YeB/jAwvjaAQf+WT8bWoTjUIP++X/MjkawUf2jG+httAID4kHo6WN+haZ9NKj7Yu/x1Y2pRFf29UIPvLh+GZqYyN6pCVYtO8cjeAj/fVN1MZG8ble9KIX0NEIPvJB/TVql4MRvXGORvCR9+qvUhsbLfG7Fn+KOxrBR3bVX6E2NmoHnxFLs/jCrkbwkXdrG6gtM3KMoxF8ZFttPbXZSAc+8k5tHbXZSAc+8lZtLbX8B3bLINpoiQMfeXNsDdc5KvCRzWMvcZ2jAh95Y2w11zkq8JHXR1dxnaMCH9k4ujIve/0H1Yd+GeYE2McAAAAASUVORK5CYII=":void 0),scale:.5})})),Ae.value[l]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),Ue.addLayer(Ae.value[l])}var a})),c({flag:1,alertRange:re.value,data:a.value,divisions:je}).then((e=>{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};
|