Agriculture-front-end/dist/assets/index.3d6541eb.js

20 lines
18 KiB
JavaScript
Raw Normal View History

2023-07-26 17:29:34 +08:00
import{_ as oe}from"./linesGL.99030c5a.js";import{m as Q,g as te,p as Ie,a as z,b as B,c as Ee,d as _e,z as Ve,e as ke}from"./information.91fc7e1c.js";import{_ as T}from"./icon.d0cb5387.js";import{_ as Re,r as l,D as ae,t as xe,X as Te,d as v,o as _,c as x,k as d,m as f,e as n,w as u,P as X,Q as j,j as Ue,f as W,l as le,I as Ne,y as qe,a2 as We,p as Oe,q as Ye}from"./index.1974707a.js";import"./install.49294472.js";const De="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAMVSURBVHic7Zs9rptAEMfHloMLI5m4fBT2Daw0HCNSilwjB4hSRjlArpHCUo5BY+UGpuCVMZaMhLB3SYFB2GYNPO8ym2V+HfiDkYaZ+c8wjA6ncwYEKhOWAfz88R3bjsHy5es3GHOKA1R4BjBmHNuMYcM4UCRgk0cCOQEVRukIH8YBJqJ0ZNs2TKfTfi2STJIkEMdxefzX+QCvLx9RbFlEW3h5/X13ntKRBrAMYMwpHaHCOcCYZSNsOwYNy0YkUbHhGcCkrTrazTwIbK88Xu834KShItPac2vX8ujDKvYRLeoGNWsaQOpIA9Cbtchy8S6uCQ+bNZVU87iThrCMfS3qCwZo6ahaSCPLhejdcCMib9YUOiGy3LuUU5eCqk4ZGp0kahciy4U/7z+Vx04awnq/yT9ruOsjy4Vg5pXO+t8kZ1eUSdRgdn1n3zpFRPG9arSYHiW91oQmR+xmnvBzk1WUsgHeXKB0IssV3tmP7niTldNlgCf/j1exD8ujnDxe1BJTUaqOZDhCl/mUSpSoo2r+dk4hHNLwTTm9cODV/xnoEMYvy18yuJWWzxLYHgQ356pS1xSkpiOZDhARWS7sZmZJVqnLX33JyINhclVqsyZLDTVex7DuOS/Mkpywin1wTuFdtwzwtiipK8LzNDS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9RbC3v5awR1zqRb3VtQaowy0xAGW5vC95gpfQc2pE5T9DVRrqvHrWcRxsybQtZ3ZAp59GGTNvCP8whiCfCfv85o0QkwsFxbJ84cwZdmS7qWTivL1Idu0J4rOPYbs/oCeUuatEHaoI3XNsnwiIu5agr9bh1DbtbpKXN6hGhy0XNU1bTy/a3wkVV9TxBhB/OSs29KovC6rLEFVnZojayzsOZskRY1xHlcFR4RwDnGp5OqtI7v25dX+4WmQWS/tbmJECicLXFPR6PqNW1Foyl8aIRYd0suAnJCWfd0XK3uKw7asmkrBQu0cpuQqvKzQ3oFVoTwF6LSgC9qWMEWGtRiQvKXVSiBvc81JHhkhJAb+oYAZUjA1DlohL1aeSi+od5u+0FVVA5MgCarBkA/cuLASQnEmZsKoU5iiKIokhzSGrZ7Kew2U+xw7im6vEmYzRCtEDCbABkWxiAzldoCTEOZ+DwnwP6w3Jk/gEJuNpNUi+YCwAAAABJRU5ErkJggg==",Ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAL7SURBVHic7Zy/ittAEMbnHIMJuBZW5UJVwGCbvMEVAudNXFyb6sqr0qbImyTgQq9gBwSuVKRSUJo0
2023-07-24 18:07:54 +08:00
<div class="info-window">
<div class="close-btn" ><span>\u7AD9\u70B9\u4FE1\u606F</span><img src="${te}" alt=""/> </div>
<div class="content" style="color:white;font-size: 16px">
<div class="line" style="margin-top: 10px"><img src="${T}" alt=""/> <span>\u540D\u79F0:</span><span>${m.name}</span></div>
<div class="line" style="margin-top: 10px"><img src="${T}" alt=""/> <span>\u7ECF\u5EA6:</span><span>${m.lon}</span></div>
<div class="line" style="margin-top: 10px"><img src="${T}" alt=""/> <span>\u7EF4\u5EA6:</span><span>${m.lat}</span></div>
</div>
</div>
`;const R=i.getElement().querySelector(".close-btn");R&&R.addEventListener("click",()=>{i.setPosition(void 0)})}else if(F==="0"){for(const a in g.value)C===g.value[a].contacts&&(m.name=C,m.phone=g.value[a].phone,m.region=g.value[a].region);i.setPosition(o.getGeometry().getCoordinates()),i.getElement().innerHTML=`
<div class="info-window" >
<div class="close-btn" ><span>\u4EBA\u5458\u4FE1\u606F</span><img src="${te}" alt=""/> </div>
<div class="content" style="color:white;font-size: 16px">
<div class="line" style="margin-top: 10px"><img src="${T}" alt=""/><span>\u59D3\u540D:</span><span>${m.name}</span></div>
<div class="line" style="margin-top: 10px"><img src="${T}" alt=""/><span>\u624B\u673A:</span><span>${m.phone}</span></div>
<div class="line" style="margin-top: 10px"><img src="${T}" alt=""/><span>\u4F4D\u7F6E:</span><span>${m.region}</span></div>
</div>
</div>
`,o.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Ie,scale:.5})})),s.getLayers().forEach(function(a){if(a instanceof ol.layer.Vector){let c=a.getSource().getFeatures()[0];c.get("type")==="0"&&c!==o&&(c.get("warning")==="0"?c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:z,scale:.5})})):c.get("warning")==="1"&&c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:B,scale:.5})})))}});const R=i.getElement().querySelector(".close-btn");R&&R.addEventListener("click",()=>{i.setPosition(void 0),s.getLayers().forEach(function(a){if(a instanceof ol.layer.Vector){let c=a.getSource().getFeatures()[0];c.get("type")==="0"&&(c.get("warning")==="0"?c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:z,scale:.5})})):c.get("warning")==="1"&&c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:B,scale:.5})})))}})})}})});var w=new ResizeObserver(function(r){r.forEach(function(S){var b=S.contentRect.width,y=S.contentRect.height;t.style.width=b+"px",t.style.height=y+"px",s.updateSize()})});w.observe(e)}function fe(){if(V.value=!V.value,V.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 he=()=>{P(),Q({data:h.value,alertRange:I.value,flag:2}).then(e=>{U.value=e.data,G()})},P=()=>{for(const e in N.value)s.removeLayer(N.value[e]);N.value=[];for(const e in q.value)s.removeLayer(q.value[e]);q.value=[];for(const e in k.value)s.removeLayer(k.value[e]);k.value=[],Ee({flag:2,data:h.value}).then(e=>{p.value=e.data;for(const t in p.value){const i=[parseFloat(p.value[t].msLongitude),parseFloat(p.value[t].msLatitude)],w=128,r=[];for(let E=0;E<w;E++){const o=2*Math.PI*E/w,C=ol.sphere.computeDestinationPoint(i,I.value,o);r.push(C)}const S=new ol.Feature({geometry:new ol.geom.Polygon([r])}),b=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgb(255,255,0)",width:2})});N.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[S]}),style:b}),p.value[t].warning!=="\u65E0\u707E\u5BB3"&&s.addLayer(N.value[t]);const y=new ol.geom.Point(i),A=new ol.Feature({geometry:y,id:p.value[t].msName,type:p.value[t].flag});A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:ge(p.value[t].warning),scale:.5})})),q.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[A]})}),s.addLayer(q.value[t])}}),_e({flag:2,alertRange:I.value,data:h.value,divisions:se}).then(e=>{g.value=e.data;for(const t in g.value){const i=[parseFloat(g.value[t].latitude),parseFloat(g.value[t].longitude)],w=new ol.geom.Point(i),r=new ol.Feature({geometry:w,id:g.value[t].contacts,type:g.value[t].flag,warning:g.value[t].earlyWarning});g.value[t].earlyWarning==="0"?(r.setStyle(new ol.style.Style({image:new ol.style.Icon({src:z,scale:.5})})),k.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),s.addLayer(k.value[t])):g.value[t].earlyWarning==="1"&&(r.setStyle(new ol.style.Style({image:new ol.style.Icon({src:B,scale:.5})})),k.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),s.addLayer(k.value[t]))}})},we=()=>{P(),Q({data:h.value,alertRange:I.value,flag:2}).then(e=>{U.value=e.data,G()})},Se=()=>{ke(L.value).then(e=>{console.log(e.data),e.data.code=="OK"&&We({message:"\u53D1\u9001\u6210\u529F",type:"success"})})},be=e=>{L.value=e};return(e,t)=>{const i=v("el-date-picker"),w=v("el-radio"),r=v("el-radio-group"),S=v("el-option"),b=v("el-select"),y=v("el-button"),A=v("el-table-column"),E=v("el-table"),o=v("el-pagination"),C=v("el-tooltip"),F=v("el-collapse-item"),R=v("el-collapse");return _(),x("div",Fe,[Le,d("div",Me,[d("div",Je,[f(" \u76D1\u6D4B\u65E5\u671F:\u2003 "),n(i,{"popper-class":"date_poper",class:"m-2",modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=a=>h.value=a),onChange:we,format:"YYYY \u5E74 MM \u6708 DD \u65E5","value-format":"YYYY-MM-DD",type:"date",placeholder:"\u9009\u62E9\u65E5\u671F"},null,8,["modelValue"])]),d("div",Pe,[Qe,d("div",ze,[d("div",Be,[f(" \u9884\u8B66\u8303\u56F4\uFF1A "),n(r,{onChange:t[1]||(t[1]=a=>he()),modelVal