Agriculture-front-end/dist/assets/index.ad8bb506.js

20 lines
19 KiB
JavaScript
Raw Normal View History

2023-09-21 17:37:29 +08:00
import{_ as xe,a as Ue}from"./zhankaiss.dd067ea4.js";import{m as B,g as oe,p as We,a as X,b as j,c as Ye,d as De,e as Ne,f as qe,z as Ge,h as Le}from"./information.cdff1427.js";import"./linesGL.901ceb35.js";import{_ as Oe,r as l,D as ie,t as He,C as Fe,Z as K,d as v,o as C,c as x,k as i,m as f,e as n,w as d,K as Me,x as re,l as $,Q as ee,R as te,j as ae,f as N,I as Ze,p as Pe,q as Qe}from"./index.57224d07.js";import"./install.5b5161c6.js";const ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAMVSURBVHic7Zs9rptAEMfHloMLI5m4fBT2Daw0HCNSilwjB4hSRjlArpHCUo5BY+UGpuCVMZaMhLB3SYFB2GYNPO8ym2V+HfiDkYaZ+c8wjA6ncwYEKhOWAfz88R3bjsHy5es3GHOKA1R4BjBmHNuMYcM4UCRgk0cCOQEVRukIH8YBJqJ0ZNs2TKfTfi2STJIkEMdxefzX+QCvLx9RbFlEW3h5/X13ntKRBrAMYMwpHaHCOcCYZSNsOwYNy0YkUbHhGcCkrTrazTwIbK88Xu834KShItPac2vX8ujDKvYRLeoGNWsaQOpIA9Cbtchy8S6uCQ+bNZVU87iThrCMfS3qCwZo6ahaSCPLhejdcCMib9YUOiGy3LuUU5eCqk4ZGp0kahciy4U/7z+Vx04awnq/yT9ruOsjy4Vg5pXO+t8kZ1eUSdRgdn1n3zpFRPG9arSYHiW91oQmR+xmnvBzk1WUsgHeXKB0IssV3tmP7niTldNlgCf/j1exD8ujnDxe1BJTUaqOZDhCl/mUSpSoo2r+dk4hHNLwTTm9cODV/xnoEMYvy18yuJWWzxLYHgQ356pS1xSkpiOZDhARWS7sZmZJVqnLX33JyINhclVqsyZLDTVex7DuOS/Mkpywin1wT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fnxWTU8TWDyedTRxUW9RbC3v5awR1zqRb3VtQaowy0xAGW5vC95gpfQc2pE5T9DVRrqvHrWcRxsybQtZ3ZAp59GGTNvCP8whiCfCfv85o0QkwsFxbJ84cwZdmS7qWTivL1Idu0J4rOPYbs/oCeUuatEHaoI3XNsnwiIu5agr9bh1DbtbpKXN6hGhy0XNU1bTy/a3wkVV9TxBhB/OSs29KovC6rLEFVnZojayzsOZskRY1xHlcFR4RwDnGp5OqtI7v25dX+4WmQWS/tbmJECicLXFPR6PqNW1Foyl8aIRYd0suAnJCWfd0XK3uKw7asmkrBQu0cpuQqvKzQ3oFVoTwF6LSgC9qWMEWGtRiQvKXVSiBvc81JHhkhJAb+oYAZUjA1DlohL1aeSi+od5u+0FVVA5MgCarBkA/cuLASQnEmZsKoU5iiKIokhzSGrZ7Kew2U+xw7im6vEmYzRCtEDCbABkWxiAzldoCTEOZ+DwnwP6w3Jk/gEJuNpNUi+YCwAAAABJRU5ErkJggg==",Xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAL7SURBVHic7Zy/ittAEMbnHIMJuBZW5UJVwGCbvMEVAudNXFyb6sqr
2023-09-11 21:56:39 +08:00
<div class="info-window">
<div class="close-btn" ><span>\u7AD9\u70B9\u4FE1\u606F</span><img src="${oe}" alt=""/> </div>
<div class="content" style="color:white;font-size: 16px">
<div class="line" style="margin-top: 10px"><div class="label">\u540D\u79F0:</div><span>${m.name}</span></div>
<div class="line" style="margin-top: 10px"><div class="label">\u7ECF\u5EA6:</div><span>${m.lon}</span></div>
<div class="line" style="margin-top: 10px"><div class="label">\u7EAC\u5EA6:</div><span>${m.lat}</span></div>
</div>
</div>
`;const k=r.getElement().querySelector(".close-btn");k&&k.addEventListener("click",()=>{r.setPosition(void 0)})}else if(D==="0"){for(const u in p.value)b===p.value[u].contacts&&(m.name=b,m.phone=p.value[u].phone,m.region=p.value[u].region);r.setPosition(s.getGeometry().getCoordinates()),r.getElement().innerHTML=`
<div class="info-window" >
<div class="close-btn" ><span>\u4EBA\u5458\u4FE1\u606F</span><img src="${oe}" alt=""/> </div>
<div class="content" style="color:white;font-size: 16px">
<div class="line" style="margin-top: 10px"><div class="label">\u59D3\u540D:</div><span>${m.name}</span></div>
<div class="line" style="margin-top: 10px"><div class="label">\u624B\u673A:</div><span>${m.phone}</span></div>
<div class="line" style="margin-top: 10px"><div class="label">\u4F4D\u7F6E:</div><span>${m.region}</span></div>
</div>
</div>
2023-09-19 14:34:21 +08:00
`,s.setStyle(new ol.style.Style({image:new ol.style.Icon({src:We,scale:.5})})),o.getLayers().forEach(function(u){if(u instanceof ol.layer.Vector){let a=u.getSource().getFeatures()[0];a.get("type")==="0"&&a!==s&&(a.get("warning")==="0"?a.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})):a.get("warning")==="1"&&a.setStyle(new ol.style.Style({image:new ol.style.Icon({src:j,scale:.5})})))}});const k=r.getElement().querySelector(".close-btn");k&&k.addEventListener("click",()=>{r.setPosition(void 0),o.getLayers().forEach(function(u){if(u instanceof ol.layer.Vector){let a=u.getSource().getFeatures()[0];a.get("type")==="0"&&(a.get("warning")==="0"?a.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})):a.get("warning")==="1"&&a.setStyle(new ol.style.Style({image:new ol.style.Icon({src:j,scale:.5})})))}})})}})});var h=new ResizeObserver(function(c){c.forEach(function(w){var S=w.contentRect.width,y=w.contentRect.height;t.style.width=S+"px",t.style.height=y+"px",o.updateSize()})});h.observe(e)}function be(){if(R.value=!R.value,R.value){let e=document.querySelector(".rightWra");e.style.transform="translate(0,0)"}else{let e=document.querySelector(".rightWra");e.style.transform="translate(101%,0)"}}const Ce=()=>{M(),B({data:I.value,alertRange:_.value,flag:2,divisions:E}).then(e=>{U.value=e.data,O()})},M=()=>{for(const e in W.value)o.removeLayer(W.value[e]);W.value=[];for(const e in Y.value)o.removeLayer(Y.value[e]);Y.value=[];for(const e in T.value)o.removeLayer(T.value[e]);T.value=[],Ye({flag:2,data:I.value,divisions:E}).then(e=>{g.value=e.data;for(const t in g.value){const r=[parseFloat(g.value[t].msLongitude),parseFloat(g.value[t].msLatitude)],h=128,c=[];for(let V=0;V<h;V++){const s=2*Math.PI*V/h,b=ol.sphere.computeDestinationPoint(r,_.value,s);c.push(b)}const w=new ol.Feature({geometry:new ol.geom.Polygon([c])}),S=new ol.style.Style({stroke:new ol.style.Stroke({color:Q[g.value[t].warning]&&Q[g.value[t].warning].color,width:2})});W.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[w]}),style:S}),g.value[t].warning!=="\u65E0\u707E\u5BB3"&&o.addLayer(W.value[t]);const y=new ol.geom.Point(r),A=new ol.Feature({geometry:y,id:g.value[t].msName,type:g.value[t].flag});A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:me(g.value[t].warning),scale:.5})})),Y.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[A]})}),o.addLayer(Y.value[t])}}),De({flag:2,alertRange:_.value,data:I.value,divisions:E}).then(e=>{p.value=e.data;for(const t in p.value){const r=[parseFloat(p.value[t].latitude),parseFloat(p.value[t].longitude)],h=new ol.geom.Point(r),c=new ol.Feature({geometry:h,id:p.value[t].contacts,type:p.value[t].flag,warning:p.value[t].earlyWarning});p.value[t].earlyWarning==="0"?(c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})),T.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[c]})}),o.addLayer(T.value[t])):p.value[t].earlyWarning==="1"&&(c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:j,scale:.5})})),T.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[c]})}),o.addLayer(T.value[t]))}})},Ie=()=>{M(),B({data:I.value,alertRange:_.value,flag:2,divisions:E}).then(e=>{U.value=e.data,O()})},Ee=()=>{Le(P.value).then(e=>{e.data.code=="200"&&K({message:"\u53D1\u9001\u6210\u529F",type:"success"})})},_e=e=>{P.value=e},Ve=()=>{Ne({flag:2,divisions:E}).then(e=>{e.data.length<1?K({message:"\u8FD11\u5468\u6682\u65E0\u9884\u8B66",type:"success"}):K({message:`\u8FD11\u5468${e.data.length}\u6B21\u9884\u8B66`,type:"warning"})})},Re=()=>{let e=[];qe({flag:2,divisions:E}).then(t=>{e=[],t.data.forEach(r=>{e.push(r.dataTime)}),le.value=e})};return(e,t)=>{const r=v("el-date-picker"),h=v("el-radio"),c=v("el-radio-group"),w=v("el-option"),S=v("el-select"),y=v("el-button"),A=v("el-table-column"),V=v("el-table"),s=v("el-pagination"),b=v("el-icon"),D=v("el-tooltip"),k=v("el-collapse-item"),u=v("el-collapse");return C(),x("div",je,[Ke,i("div",$e,[i("div",et,[f(" \u76D1\u6D4B\u65E5\u671F:\u2003 "),n(r,{"pop