Agriculture-front-end/dist/assets/index.3641d75b.js

20 lines
20 KiB
JavaScript
Raw Normal View History

2023-07-11 08:43:34 +08:00
import{_ as Ve,r as l,A as ae,V as Ge,W as Ce,d as m,o as k,c as E,l as d,m as y,e as n,w as u,L as _,N as D,k as ke,f as N,g as te,F as Se,x as Fe,a2 as Re,p as Ee,q as Ue}from"./index.afd881ee.js";import{_ as oe}from"./close1.45635d81.js";import{m as W,g as le,p as xe,a as Z,b as X,c as ze,d as Be,z as Ne,e as Me}from"./information.f996c80f.js";import{_ as U}from"./icon.d0cb5387.js";import"./linesGL.306b5757.js";import"./install.6cb28b74.js";const Oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAOJSURBVHic7ZyxbtswEIb/uPYieKq0NoMNe80aoBnrZwk69QHasX2AjnkWZWyBrFlj2IPT0Q5QwBBgKJY6uBLsMynT0imiSH5LYEMmmDve/eIdpYu/r68pHI3STVLg54/vTc/DWr58/YbOtulZWM4WQCdpehaWkwDoJE4RGiVJXSQ0josEDUhSoCsT5n6//6aTqYM4jrHZbPLPvz5c4fflVSNz+bh4xM3z49H3WwBdWTrq9XrodDq1Tqxu4jhuegoncelIA5wwa0ACuM1a0+w2ay4dNUqSFgjzKcJghDAYY7J8wmQ5lV53d3mNmecXXhcGI8w9H4NoVTiWiST4X8A7l5nnIwzGAJD/FRkvDEaYeX5+3SB6wTBaCa4b5+POPR+3i4fzJ9VSkrSkJlBDZkakDKKXg8/3wejkeDPPzx1nA5UKeHS13l1eH10zjFZKBv5EokjmLBOptE/gNPAwWmGyfDoYK7TEEZX3CaoGps4SGZhqiizFmUblHbNqNNDUJTPwfjQA4hRnGqWFeR8VbQCODSyLBttEmq2zVsbAYTB2Ig3GAh6ngVVTnCmwFvA4DUzHMlkbWAt4dd6yAuIUZwLsBTzOPYFqims77P0E1WigBp5LjEudOvfeM81UH2rprA1IXUlUsANw4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ua18WaTUedku8rhPkckR9j4seYbcaYb8bCdg/BE0I3qWwX+TFCb4VFOqzsS0dyvBXw6hK6CSZ+DACHvzzjRX6M0E0O7V7SIRZZUGpX9BG6CUJvhcfkrv6gekq+b6gJrCELI7K8pMOT6+j6+Wx/oZscHGcCrQp47Gx9CJ5KbRZZIGXg+b/bk2uRs3Sk1TqB0sCLLMDsKJ2FboJIEF260XqdIGtg1lk8A7OaIkpxutF6xSwbDWzqEhl4xjiCl+J0o7EwHyOjDUDZwKJoME2kyXbWmhh4cvT4etLOMJEmK+BRGlg2xekCaQGP0sBsXzprA2kB75KPrAA/xekAeQGPck0gm+L6Dvl+gnQ0sE9B3orbH+vUG0G7PnORnbUFUy/iFewAnDiHvadAR6OzkEfCcXUVKD+6Fsjmd3ZRp2OZm3xnjZ25bBW14Ni4iywQlsGPETm075ALMxsFvFTEGleUikyIAoA4HVGmGFOiACAWZjYK2hjXlCgAiAp4gI2CNpAV8GwUNIckHdkoaAeJMFMal1056x4FAEEkUKaYiKkNmRAFAIEwXzLFmBAFQEth5hXmeL+JVs2le5lUpGPFlEfrIy+lmr/ERs7Ej/mla85GjgmOaH/khbMxL2Ng3t6ArFN1g6SAxzvOUqoPcQzM27KUdapOkBXweI5gZ/p8M5ZyhIxTdYK
<div class="info-window">
<div class="close-btn" ><span>\u7AD9\u70B9\u4FE1\u606F</span><img src="${le}" alt=""/> </div>
<div class="content" style="color:white;font-size: 16px">
<div class="line" style="margin-top: 10px"><img src="${U}" alt=""/> <span>\u540D\u79F0:</span><span>${p.name}</span></div>
<div class="line" style="margin-top: 10px"><img src="${U}" alt=""/> <span>\u7ECF\u5EA6:</span><span>${p.lon}</span></div>
<div class="line" style="margin-top: 10px"><img src="${U}" alt=""/> <span>\u7EF4\u5EA6:</span><span>${p.lat}</span></div>
</div>
</div>
`;const R=i.getElement().querySelector(".close-btn");R&&R.addEventListener("click",()=>{i.setPosition(void 0)})}else if(q==="0"){for(const t in g.value)V===g.value[t].contacts&&(p.name=V,p.phone=g.value[t].phone,p.region=g.value[t].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="${le}" alt=""/> </div>
<div class="content" style="color:white;font-size: 16px">
<div class="line" style="margin-top: 10px"><img src="${U}" alt=""/><span>\u59D3\u540D:</span><span>${p.name}</span></div>
<div class="line" style="margin-top: 10px"><img src="${U}" alt=""/><span>\u624B\u673A:</span><span>${p.phone}</span></div>
<div class="line" style="margin-top: 10px"><img src="${U}" alt=""/><span>\u4F4D\u7F6E:</span><span>${p.region}</span></div>
</div>
</div>
`,o.setStyle(new ol.style.Style({image:new ol.style.Icon({src:xe,scale:.5})})),s.getLayers().forEach(function(t){if(t instanceof ol.layer.Vector){let c=t.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:X,scale:.5})})))}});const R=i.getElement().querySelector(".close-btn");R&&R.addEventListener("click",()=>{i.setPosition(void 0),s.getLayers().forEach(function(t){if(t instanceof ol.layer.Vector){let c=t.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:X,scale:.5})})))}})})}})});var h=new ResizeObserver(function(r){r.forEach(function(b){var I=b.contentRect.width,f=b.contentRect.height;a.style.width=I+"px",a.style.height=f+"px",s.updateSize()})});h.observe(e)}function fe(){if(S.value=!S.value,S.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 ye=()=>{Q(),W({data:w.value,alertRange:G.value,flag:1}).then(e=>{x.value=e.data,Y()})},Q=()=>{for(const e in z.value)s.removeLayer(z.value[e]);z.value=[];for(const e in B.value)s.removeLayer(B.value[e]);B.value=[];for(const e in F.value)s.removeLayer(F.value[e]);F.value=[],ze({flag:1,data:w.value}).then(e=>{A.value=e.data;for(const a in A.value){const i=[parseFloat(A.value[a].msLongitude),parseFloat(A.value[a].msLatitude)],h=128,r=[];for(let C=0;C<h;C++){const o=2*Math.PI*C/h,V=ol.sphere.computeDestinationPoint(i,G.value,o);r.push(V)}const b=new ol.Feature({geometry:new ol.geom.Polygon([r])}),I=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgb(255,255,0)",width:2})});z.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[b]}),style:I}),A.value[a].warning!=="\u65E0\u707E\u5BB3"&&s.addLayer(z.value[a]);const f=new ol.geom.Point(i),v=new ol.Feature({geometry:f,id:A.value[a].msName,type:A.value[a].flag});v.setStyle(new ol.style.Style({image:new ol.style.Icon({src:de(A.value[a].warning),scale:.5})})),B.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[v]})}),s.addLayer(B.value[a])}}),Be({flag:1,alertRange:G.value,data:w.value}).then(e=>{g.value=e.data;for(const a in g.value){const i=[parseFloat(g.value[a].latitude),parseFloat(g.value[a].longitude)],h=new ol.geom.Point(i),r=new ol.Feature({geometry:h,id:g.value[a].contacts,type:g.value[a].flag,warning:g.value[a].earlyWarning});g.value[a].earlyWarning==="0"?(r.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Z,scale:.5})})),F.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),s.addLayer(F.value[a])):g.value[a].earlyWarning==="1"&&(r.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})),F.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),s.addLayer(F.value[a]))}})},we=()=>{Q(),W({data:w.value,alertRange:G.value,flag:1}).then(e=>{x.value=e.data,Y()})},he=()=>{Me(T.value).then(e=>{console.log(e.data),e.data.code=="OK"&&Re({message:"\u53D1\u9001\u6210\u529F",type:"success"})})},be=e=>{T.value=e};return(e,a)=>{const i=m("el-date-picker"),h=m("el-radio"),r=m("el-radio-group"),b=m("el-option"),I=m("el-select"),f=m("el-button"),v=m("el-table-column"),C=m("el-table"),o=m("el-pagination"),V=m("el-tooltip"),q=m("el-collapse-item"),R=m("el-collapse");return k(),E("div",qe,[Te,d("div",Ke,[d("div",Pe,[y(" \u76D1\u6D4B\u65E5\u671F:\u2003 "),n(i,{"popper-class":"date_poper",class:"m-2",modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=t=>w.value=t),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",Qe,[_e,d("div",De,[d("div",We,[y(" \u9884\u8B66\u8303\u56F4\uFF1A "),n(r,{onChange:a[1]||(a[1]=t=>ye()),modelValue:G.value,"o