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

20 lines
22 KiB
JavaScript
Raw Normal View History

2023-11-08 11:15:41 +08:00
import{_ as Ye,a as ze}from"./zhankaiss.dd067ea4.js";import{m as X,g as ce,p as Le,a as J,b as $,c as Te,d as Be,e as Ne,f as Oe,z as _e,h as je}from"./information.28c899cc.js";import"./linesGL.901ceb35.js";import{_ as He,r as l,D as de,t as Pe,C as qe,Z as ee,d as p,o as E,c as M,k as i,m as f,e as s,w as o,K as Qe,x as ue,l as ae,Q as te,R as le,j as se,F as ne,f as Y,I as De,p as Ke,q as We}from"./index.4144b0df.js";import"./install.5b5161c6.js";const Ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAOJSURBVHic7ZyxbtswEIb/uPYieKq0NoMNe80aoBnrZwk69QHasX2AjnkWZWyBrFlj2IPT0Q5QwBBgKJY6uBLsMynT0imiSH5LYEMmmDve/eIdpYu/r68pHI3STVLg54/vTc/DWr58/YbOtulZWM4WQCdpehaWkwDoJE4RGiVJXSQ0josEDUhSoCsT5n6//6aTqYM4jrHZbPLPvz5c4fflVSNz+bh4xM3z49H3WwBdWTrq9XrodDq1Tqxu4jhuegoncelIA5wwa0ACuM1a0+w2ay4dNUqSFgjzKcJghDAYY7J8wmQ5lV53d3mNmecXXhcGI8w9H4NoVTiWiST4X8A7l5nnIwzGAJD/FRkvDEaYeX5+3SB6wTBaCa4b5+POPR+3i4fzJ9VSkrSkJlBDZkakDKKXg8/3wejkeDPPzx1nA5UKeHS13l1eH10zjFZKBv5EokjmLBOptE/gNPAwWmGyfDoYK7TEEZX3CaoGps4SGZhqiizFmUblHbNqNNDUJTPwfjQA4hRnGqWFeR8VbQCODSyLBttEmq2zVsbAYTB2Ig3GAh6ngVVTnCmwFvA4DUzHMlkbWAt4dd6yAuIUZwLsBTzOPYFqims77P0E1WigBp5LjEudOvfeM81UH2rprA1IXU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yAG7WOua18WaTUedku8rhPkckR9j4seYbcaYb8bCdg/BE0I3qWwX+TFCb4VFOqzsS0dyvBXw6hK6CSZ+DACHvzzjRX6M0E0O7V7SIRZZUGpX9BG6CUJvhcfkrv6gekq+b6gJrCELI7K8pMOT6+j6+Wx/oZscHGcCrQp47Gx9CJ5KbRZZIGXg+b/bk2uRs3Sk1TqB0sCLLMDsKJ2FboJIEF260XqdIGtg1lk8A7OaIkpxutF6xSwbDWzqEhl4xjiCl+J0o7EwHyOjDUDZwKJoME2kyXbWmhh4cvT4etLOMJEmK+BRGlg2xekCaQGP0sBsXzprA2kB75KPrAA/xekAeQGPck0gm+L6Dvl+gnQ0sE9B3orbH+vUG0G7PnORnbUFUy/iFewAnDiHvadAR6OzkEfCcXUVKD+6Fsjmd3ZRp2OZm3xnjZ25bBW14Ni4iywQlsGPETm075ALMxsFvFTEGleUikyIAoA4HVGmGFOiACAWZjYK2hjXlCgAiAp4gI2CNpAV8GwUNIckHdkoaAeJMFMal1056x4FAEEkUKaYiKkNmRAFAIEwXzLFmBAFQEth5hXmeL+JVs2le5lUpGPFlEfrIy+lmr/ERs7Ej/mla85GjgmOaH/khbMxL2Ng3t6ArFN1g6SAxzvOUqoPcQzM27KUdapOkBXweI5gZ/p8M5ZyhI
<div class="info-window">
<div class="close-btn" ><span>\u7AD9\u70B9\u4FE1\u606F</span><img src="${ce}" 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>${v.name}</span></div>
<div class="line" style="margin-top: 10px">" <div class="label">\u7ECF\u5EA6:</div><span>${v.lon}</span></div>
<div class="line" style="margin-top: 10px">" <div class="label">\u7EAC\u5EA6:</div><span>${v.lat}</span></div>
</div>
</div>
`;const U=c.getElement().querySelector(".close-btn");U&&U.addEventListener("click",()=>{c.setPosition(void 0)})}else if(B==="0"){for(const u in m.value)V===m.value[u].contacts&&(v.name=V,v.phone=m.value[u].phone,v.region=m.value[u].region);c.setPosition(n.getGeometry().getCoordinates()),c.getElement().innerHTML=`
<div class="info-window" >
<div class="close-btn" ><span>\u79CD\u7CAE\u5927\u6237\u4FE1\u606F</span><img src="${ce}" 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>${v.name}</span></div>
<div class="line" style="margin-top: 10px"><div class="label">\u624B\u673A:</div><span>${v.phone}</span></div>
<div class="line" style="margin-top: 10px"><div class="label">\u4F4D\u7F6E:</div><span>${v.region}</span></div>
</div>
</div>
`,n.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Le,scale:.5})})),r.getLayers().forEach(function(u){if(u instanceof ol.layer.Vector){let A=u.getSource().getFeatures()[0];A.get("type")==="0"&&A!==n&&(A.get("warning")==="0"?A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:J,scale:.5})})):A.get("warning")==="1"&&A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:$,scale:.5})})))}});const U=c.getElement().querySelector(".close-btn");U&&U.addEventListener("click",()=>{c.setPosition(void 0),r.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:J,scale:.5})})):A.get("warning")==="1"&&A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:$,scale:.5})})))}})})}})});var b=new ResizeObserver(function(d){d.forEach(function(I){var S=I.contentRect.width,y=I.contentRect.height;a.style.width=S+"px",a.style.height=y+"px",r.updateSize()})});b.observe(e)}function Ee(){if(F.value=!F.value,F.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=()=>{Q(),X({data:C.value,alertRange:G.value,flag:1,divisions:R}).then(e=>{z.value=e.data,H()})},Q=()=>{for(const e in L.value)r.removeLayer(L.value[e]);L.value=[];for(const e in T.value)r.removeLayer(T.value[e]);T.value=[];for(const e in x.value)r.removeLayer(x.value[e]);x.value=[],Te({flag:1,data:C.value,divisions:R}).then(e=>{g.value=e.data;for(const a in g.value){const c=[parseFloat(g.value[a].msLongitude),parseFloat(g.value[a].msLatitude)],b=128,d=[];for(let k=0;k<b;k++){const n=2*Math.PI*k/b,V=ol.sphere.computeDestinationPoint(c,G.value,n);d.push(V)}const I=new ol.Feature({geometry:new ol.geom.Polygon([d])}),S=new ol.style.Style({stroke:new ol.style.Stroke({color:K[g.value[a].warning]&&K[g.value[a].warning].color,width:2})});L.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[I]}),style:S}),g.value[a].warning!=="\u65E0\u707E\u5BB3"&&r.addLayer(L.value[a]);const y=new ol.geom.Point(c),h=new ol.Feature({geometry:y,id:g.value[a].msName,type:g.value[a].flag});h.setStyle(new ol.style.Style({image:new ol.style.Icon({src:fe(g.value[a].warning),scale:.5})})),T.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[h]})}),r.addLayer(T.value[a])}}),Be({flag:1,alertRange:G.value,data:C.value,divisions:R}).then(e=>{m.value=e.data;for(const a in m.value){const c=[parseFloat(m.value[a].latitude),parseFloat(m.value[a].longitude)],b=new ol.geom.Point(c),d=new ol.Feature({geometry:b,id:m.value[a].contacts,type:m.value[a].flag,warning:m.value[a].earlyWarning});m.value[a].earlyWarning==="0"?(d.setStyle(new ol.style.Style({image:new ol.style.Icon({src:J,scale:.5})})),x.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[d]})}),r.addLayer(x.value[a])):m.value[a].earlyWarning==="1"&&(d.setStyle(new ol.style.Style({image:new ol.style.Icon({src:$,scale:.5})})),x.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[d]})}),r.addLayer(x.value[a]))}})},Ge=()=>{Q(),X({data:C.value,alertRange:G.value,flag:1,divisions:R}).then(e=>{z.value=e.data,H()})},Re=()=>{w.value=!1,je(D.value).then(e=>{e.data.code=="200"&&ee({message:"\u53D1\u9001\u6210\u529F",type:"success"})})},ke=e=>{D.value=e},Fe=()=>{Ne({flag:1,divisions:R}).then(e=>{e.data.length<1?ee({message:"\u8FD11\u5468\u6682\u65E0\u9884\u8B66",type:"success"}):ee({message:`\u8FD11\u5468${e.data.length}\u6B21\u9884\u8B66`,type:"warning"})})},xe=()=>{let e=[];Oe({flag:1,divisions:R}).then(a=>{e=[],a.data.forEach(c=>{e.push(c.dataTime)}),oe.value=e})};return(e,a)=>{const c=p("el-date-picker"),b=p("el-radio"),d=p("el-radio-group"),I=p("el-option"),S=p("el-select"),y=p("el-button"),h=p("el-table-column"),k=p("el-table"),n=p("el-pagination"),V=p("el-icon"),B=p("el-tooltip"),U=p("el-collapse-item"),u=p("el-collapse"),A=p("el-dialog");return E(),M("div",aa,[ta,i("div",la,[i("div",sa,[f(" \u76D1\u6D4B\