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

20 lines
22 KiB
JavaScript
Raw Normal View History

2023-11-08 11:15:41 +08:00
import{_ as Me,a as Le}from"./zhankaiss.dd067ea4.js";import{m as j,g as ce,p as _e,a as $,b as ee,c as qe,d as Qe,e as Ue,f as Ye,z as Te,h as Ne}from"./information.28c899cc.js";import"./linesGL.901ceb35.js";import"./moment.9709ab41.js";import{_ as Ze,r as l,D as de,t as Pe,C as ze,Z as O,d as v,o as k,c as F,k as i,m as f,e as s,w as n,K as He,x as ue,l as te,Q as ae,R as le,j as se,F as oe,f as M,I as Oe,p as Ge,q as Ke}from"./index.4144b0df.js";import"./install.5b5161c6.js";const Je="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAO0SURBVHic7Zs7bttAEIZ/CTJdWIBpNwbCQr6BkUbHCOAitzBygCBlkAPkGikM5AZu1Ri+gVjQZUwDIkBQ4jKFOPSIWkoUX8vHfoAh2SZHi/l3Z2eGq9H7ehNBo5RJGAG/f/1UPY7B8u37D4yFXgdKEREwDoXqYQybUECvBNVsV4IWQSmhDkfqCQUwyQpH0+kU5+fnzY6oYnzfh+d5ye//zM94/fRFyViu3Wd8ev2793cdjlpAGAFjocORUoQAxmE0Uj2OQRNGI52iqkYXay1AF2stQGl25BoWXq7u1Xx4i1BarL1c3WshoDAccccPXQgl4YhWAEcmxNPNA55uHnov0LZYa1AEmQDEUFdEoynq8mKeKQDhGhaWF/NmBtQSDjbwqmR5MYc9zefcvNf1hUb2hFMEIIYkRO0NvCICDI24gVePcS1APmrLjqoUoO+bdS3ZkWtYla8AezrvrRBh1eGozly/r0JUGo6aKLb6KERl4ajJardvQlTWwLMbdkqfhBBRfCC4DK5h4TJwcBk4eDeso62JssxWi53PNgOn1s+rmzACJkKUe9BvBk7iiCWO94fKcustjl/UIYQY6XNHqmm8la3ZR5+2aAH6tEULqCQ7KgplOU1k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n3tcYW3/CpwSMVqZIInz9/EX3OEbLh08fMbGSSPc4Ro2VRJggZhG0EkeYgHeCXhIWQT/sjgwgjjAtC8xHR0c4ODhQPKJ2CYIAvu9n3799/RPv3/zQMpb7xzN8//3u2c//BeathiExGfGWY4J2ODAbAAdmA4gjrph1Y7E7MgCd7sierXF+fK3ls41CZ9vi/PiahQD0ZUfixI9eiCTCxFLsjmgHiMiEuDy5wuXJ1eAFslS7I5kAxGh3hEp3tJjflgpA2LM1FvNbJeMxhiTCVEV2tJjfYnF4V+3aitcNBhXF2ksEyP5mREJ0XqzVEWB0dNnKZgEq0lUru00BBh+su2hb2LN16ztgcXg3XCHaDsxd5vpDFaLVwKyi2BqkEG25I5XV7uCEaKttoToLGpQQSZTeENwEe7aG93QK7+kU9qtfe1sTTXH9Zf6zQ6fTz+ucJMK0aRfVC51sIhbY3x9qirtZdWpfNcq7qIwEPmM2AL7lxQDYHRlAsuOG4K6hLEdFRmUylqpDHcL1l8+zm036Qj2n0QnSxB29dLKkAgh4oYObh4tcHTAK0p3w8vMEalUXJ5beixV02eSTiFRwUa3hblZwN6usDSKKffNw8cyGPVv3u3aIt/Uq5nTC7tL2QUEMmkRZNVvuclLRRDvihMtsiWcWooi9o
<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>${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 D=c.getElement().querySelector(".close-btn");D&&D.addEventListener("click",()=>{c.setPosition(void 0)})}else if(Q==="0"){for(const u in p.value)R===p.value[u].contacts&&(m.name=R,m.phone=p.value[u].phone,m.region=p.value[u].region);c.setPosition(o.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>${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>
`,o.setStyle(new ol.style.Style({image:new ol.style.Icon({src:_e,scale:.5})})),r.getLayers().forEach(function(u){if(u instanceof ol.layer.Vector){let A=u.getSource().getFeatures()[0];A.get("type")==="0"&&A!==o&&(A.get("warning")==="0"?A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:$,scale:.5})})):A.get("warning")==="1"&&A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:ee,scale:.5})})))}});const D=c.getElement().querySelector(".close-btn");D&&D.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:$,scale:.5})})):A.get("warning")==="1"&&A.setStyle(new ol.style.Style({image:new ol.style.Icon({src:ee,scale:.5})})))}})})}})});var b=new ResizeObserver(function(d){d.forEach(function(E){var C=E.contentRect.width,y=E.contentRect.height;t.style.width=C+"px",t.style.height=y+"px",r.updateSize()})});b.observe(e)}function ke(){if(W.value=!W.value,W.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 Se=()=>{H(),j({data:S.value,alertRange:I.value,flag:3,divisions:V}).then(e=>{L.value=e.data,Z()})},H=()=>{for(const e in _.value)r.removeLayer(_.value[e]);_.value=[];for(const e in q.value)r.removeLayer(q.value[e]);q.value=[];for(const e in B.value)r.removeLayer(B.value[e]);B.value=[],qe({flag:3,data:S.value,divisions:V}).then(e=>{g.value=e.data;for(const t in g.value){const c=[parseFloat(g.value[t].msLongitude),parseFloat(g.value[t].msLatitude)],b=128,d=[];for(let x=0;x<b;x++){const o=2*Math.PI*x/b,R=ol.sphere.computeDestinationPoint(c,I.value,o);d.push(R)}const E=new ol.Feature({geometry:new ol.geom.Polygon([d])}),C=new ol.style.Style({stroke:new ol.style.Stroke({color:K[g.value[t].warning]&&K[g.value[t].warning].color,width:2})});_.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[E]}),style:C}),g.value[t].warning!=="\u65E0\u707E\u5BB3"&&r.addLayer(_.value[t]);const y=new ol.geom.Point(c),w=new ol.Feature({geometry:y,id:g.value[t].msName,type:g.value[t].flag});w.setStyle(new ol.style.Style({image:new ol.style.Icon({src:fe(g.value[t].warning),scale:.5})})),q.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[w]})}),r.addLayer(q.value[t])}}),Qe({flag:3,alertRange:I.value,data:S.value,divisions:V}).then(e=>{p.value=e.data;for(const t in p.value){const c=[parseFloat(p.value[t].latitude),parseFloat(p.value[t].longitude)],b=new ol.geom.Point(c),d=new ol.Feature({geometry:b,id:p.value[t].contacts,type:p.value[t].flag,warning:p.value[t].earlyWarning});p.value[t].earlyWarning==="0"?(d.setStyle(new ol.style.Style({image:new ol.style.Icon({src:$,scale:.5})})),B.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[d]})}),r.addLayer(B.value[t])):p.value[t].earlyWarning==="1"&&(d.setStyle(new ol.style.Style({image:new ol.style.Icon({src:ee,scale:.5})})),B.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[d]})}),r.addLayer(B.value[t]))}})},Ie=()=>{H(),j({data:S.value,alertRange:I.value,flag:3,divisions:V}).then(e=>{L.value=e.data,Z()})},Ve=()=>{h.value=!1,Ne(G.value).then(e=>{e.code=="200"?O({message:"\u53D1\u9001\u6210\u529F",type:"success"}):O.error("\u53D1\u9001\u5931\u8D25")})},xe=e=>{G.value=e},We=()=>{Ue({flag:3,divisions:V}).then(e=>{e.data.length<1?O({message:"\u8FD11\u5468\u6682\u65E0\u9884\u8B66",type:"success"}):O({message:`\u8FD11\u5468${e.data.length}\u6B21\u9884\u8B66`,type:"warning"})})},Be=()=>{let e=[];Ye({flag:3,divisions:V}).then(t=>{e=[],t.data.forEach(c=>{e.push(c.dataTime)}),ne.value=e})};return(e,t)=>{const c=v("el-date-picker"),b=v("el-radio"),d=v("el-radio-group"),E=v("el-option"),C=v("el-select"),y=v("el-button"),w=v("el-table-column"),x=v("el-table"),o=v("el-pagination"),R=v("el-icon"),Q=v("el-tooltip"),D=v("el-collapse-item"),u=v("el-collapse"),A=v("el-dialog");return k(),F("div",tt,[at,i("div",lt,