20 lines
20 KiB
JavaScript
20 lines
20 KiB
JavaScript
import{_ as ke,r as l,A as te,V as Ce,W as Re,d as v,o as V,c as x,l as d,m as f,e as o,w as u,L as P,N as G,k as Ve,f as M,g as ae,F as Be,x as Se,a2 as Ie,p as xe,q as We}from"./index.afd881ee.js";import{_ as se}from"./close1.45635d81.js";import{m as T,g as le,p as De,a as J,b as X,c as Fe,d as qe,z as Me,e as Le}from"./information.f996c80f.js";import{_ as W}from"./icon.d0cb5387.js";import"./linesGL.306b5757.js";import"./install.6cb28b74.js";const Qe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAA+CAYAAAA73nWBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAO0SURBVHic7Zs7bttAEIZ/CTJdWIBpNwbCQr6BkUbHCOAitzBygCBlkAPkGikM5AZu1Ri+gVjQZUwDIkBQ4jKFOPSIWkoUX8vHfoAh2SZHi/l3Z2eGq9H7ehNBo5RJGAG/f/1UPY7B8u37D4yFXgdKEREwDoXqYQybUECvBNVsV4IWQSmhDkfqCQUwyQpH0+kU5+fnzY6oYnzfh+d5ye//zM94/fRFyViu3Wd8ev2793cdjlpAGAFjocORUoQAxmE0Uj2OQRNGI52iqkYXay1AF2stQGl25BoWXq7u1Xx4i1BarL1c3WshoDAccccPXQgl4YhWAEcmxNPNA55uHnov0LZYa1AEmQDEUFdEoynq8mKeKQDhGhaWF/NmBtQSDjbwqmR5MYc9zefcvNf1hUb2hFMEIIYkRO0NvCICDI24gVePcS1APmrLjqoUoO+bdS3ZkWtYla8AezrvrRBh1eGozly/r0JUGo6aKLb6KERl4ajJardvQlTWwLMbdkqfhBBRfCC4DK5h4TJwcBk4eDeso62JssxWi53PNgOn1s+rmzACJkKUe9BvBk7iiCWO94fKcustjl/UIYQY6XNHqmm8la3ZR5+2aAH6tEULqCQ7KgplOU1kVG0mjIBJk+FotlrsZzfxoWnXsGDnePrWN0qFo1OdJRWAYQYO7t4ed+qAIVA4HFGrOu1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Yd3BSyNFiXFsBgIJPW5CjyHH01WX7SMB+OKHfmWYun9lZbQ1rLgBQICdw+IylvaNkuMnisKSoAHLbqhMaCmd5TtaSYYOEoFlLM3e4fT3NYaZYz8UAsLOVtoLqvpOqykjMwP/V0D2SICme0zUnrdI6ZmsZhLie3tZWiNw5gSfmtGTKydKIZbFjslX7xFwkJyR7Au5EIF4tpllPMZ2uTTaSdgDswhy3dUywOlD4ZM2UTNOOHQ8lVN5jcCHSoO66CZT2QDAXg8/WPJWMyRa9v0lVEVFKicopMzTUPcxkRQ51PGArgvxHv0s0tJysuUbJ5x25R3KCBxzsE6IoQhRFlodULb3nAXrPA9fD2ONgn6CUrBAbyGfgeYDkBA+Qj9rxAL1ROPn4+718YLlj/gHgcPHpWCtfPgAAAABJRU5ErkJggg==";const oe=L=>(xe("data-v-08d6a053"),L=L(),We(),L),ze={class:"center"},_e=oe(()=>d("div",{style:{width:"100%",height:"100%"},class:"cesiumContainer",id:"cesiumContainer"},null,-1)),He={class:"rightWra"},Oe={class:"farmlandHeader"},Ke={class:"rightTop"},Pe=oe(()=>d("div",{class:"title"},[d("span",null,"\u9884\u8B66\u4FE1\u606F\u53D1\u5E03")],-1)),Ge={class:"farmlandDiv"},Te={class:"radioDiv"},Je={class:"selectDiv"},Xe={class:"selectDiv",style:{"margin-top":"10px"}},je={class:"btws"},$e={key:0,src:se,alt:""},et={key:0,class:"imgrotate",src:se,alt:""},tt={class:"mt-4"},at={class:"tuli"},lt={__name:"index",setup(L){const h=l();l({name:"",value:""});let B=l(!1);l("");let A=l([]),p=te({lat:"",lan:"",name:""}),g=l([]);const D=l([]),C=l(5e3),_=l([]),F=l([]),q=l([]),S=l([]);let ne={\u65E0\u9884\u8B66:{color:"rgba(49, 235, 7, 1)",disabled:!1},\u84DD\u8272\u9884\u8B66:{color:"rgba(9, 187, 222, 1)",disabled:!1},\u9EC4\u8272\u9884\u8B66:{color:"rgba(255, 235, 59, 1)",disabled:!1},\u6A59\u8272\u9884\u8B66:{color:"rgba(234, 165, 93, 1)",disabled:!1},\u7EA2\u8272\u9884\u8B66:{color:"rgba(215, 25, 28, 1)",disabled:!1}};const Q=l();function re(){O()}function ie(){h.value=$().toJSON().substr(0,10),C.value=5e3,Y.value="",Q.value="",O()}const ce=[{label:"\u84DD\u8272\u9884\u8B66",flag:1},{label:"\u9EC4\u8272\u9884\u8B66",flag:2},{label:"\u6A59\u8272\u9884\u8B66",flag:3},{label:"\u7EA2\u8272\u9884\u8B66",flag:4}];te({power:[{required:!0,message:"Please select Activity zone",trigger:"change"}],count:[{required:!0,message:"Please select Activity count",trigger:"change"}],date1:[{type:"date",required:!0,message:"Please pick a date",trigger:"change"}],date2:[{type:"date",required:!0,message:"Please pick a time",trigger:"change"}],type:[{type:"array",required:!0,message:"Please select at least one activity type",trigger:"change"}],resource:[{required:!0,message:"Please select activity resource",trigger:"change"}],desc:[{required:!0,message:"Please input activity form",trigger:"blur"}]});const U=l(1),H=l(6),j=l([]);function ue(e){U.value=e,N()}function N(){const e=(U.value-1)*H.value,t=U.value*H.value;j.value=D.value.slice(e,t)}function de(e){if(e==="\u8F7B\u5EA6\u5E72\u65F1")return Qe;if(e==="\u4E2D\u5EA6\u5E72\u65F1")return Ue;if(e==="\u4E25\u91CD\u5E72\u65F1")return Ne;if(e==="\u7279\u5927\u5E72\u65F1")return Ze;if(e==="\u65E0\u707E\u5BB3")return Ye}const $=()=>{let e=new Date;return e.setDate(e.getDate()-1),e};let n=l(null);const ge=()=>{Z=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84@huangdaoqu_bianjie",cacheEnabled:!1}),name:"huangdaoqu_village",projection:"EPSG:4326",zIndex:9999}),n.addLayer(Z)},Ae=()=>{var e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84@huangdaoqu_bianjie",cacheEnabled:!1}),projection:"EPSG:4326",zIndex:9999});n.addLayer(e)};let Z=l(null);Ce(()=>{h.value=$().toJSON().substr(0,10),O(),me(),K();let e=document.querySelector(".rightWra");e.style.transform="translate(107%,0)"}),Re(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"}),l([]);let pe=l([]);const ee=l([]),Y=l("");function O(){T({data:h.value,alertRange:C.value,flag:3,msName:Y.value,warning:Q.value}).then(e=>{D.value=e.data,N()})}function ve(){Me().then(e=>{ee.value=e.data})}ve();function me(){var e=document.querySelector(".center"),t=document.getElementById("cesiumContainer");n=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.Tianditu({layerType:"img",key:"1d109683f4d84198e37a38c442d68311"})})]}),ge(),Ae();const i=new ol.Overlay({element:document.createElement("div"),className:"overlay1",positioning:"bottom-center",offset:[0,-10],stopEvent:!0});n.on("moveend",function(){var r=n.getView().getZoom();r>=13?Z.setVisible(!0):Z.setVisible(!1)}),n.on("singleclick",function(r){l([]);const b=n.getEventPixel(r.originalEvent);var E=r.coordinate,y=E[0],m=E[1],R=n.getView();R.animate({center:[y,m],duration:1e3}),pe.value.forEach(s=>{layersDic[s]?QueryData(r,layersDic[s].setOf,`http://192.168.0.113:8090/iserver/services/${layersDic[s].name}/rest/maps/${layersDic[s].setOf}`,s):layersGbz[s]&&QueryData(r,layersGbz[s].setOf,`http://192.168.0.113:8090/iserver/services/${layersGbz[s].name}/rest/maps/${layersGbz[s].setOf}`,s)}),n.forEachFeatureAtPixel(b,s=>{R.animate({center:[y,m],duration:1e3,zoom:13});const k=s.get("id"),z=s.get("type");if(n.addOverlay(i),z==="1"){for(const a in A.value)k===A.value[a].msName&&(p.name=k,p.lon=A.value[a].msLongitude,p.lat=A.value[a].msLatitude);i.setPosition(s.getGeometry().getCoordinates()),i.getElement().innerHTML=`
|
|
<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="${W}" alt=""/> <span>\u540D\u79F0:</span><span>${p.name}</span></div>
|
|
<div class="line" style="margin-top: 10px"><img src="${W}" alt=""/> <span>\u7ECF\u5EA6:</span><span>${p.lon}</span></div>
|
|
<div class="line" style="margin-top: 10px"><img src="${W}" alt=""/> <span>\u7EF4\u5EA6:</span><span>${p.lat}</span></div>
|
|
</div>
|
|
</div>
|
|
`;const I=i.getElement().querySelector(".close-btn");I&&I.addEventListener("click",()=>{i.setPosition(void 0)})}else if(z==="0"){for(const a in g.value)k===g.value[a].contacts&&(p.name=k,p.phone=g.value[a].phone,p.region=g.value[a].region);i.setPosition(s.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="${W}" alt=""/><span>\u59D3\u540D:</span><span>${p.name}</span></div>
|
|
<div class="line" style="margin-top: 10px"><img src="${W}" alt=""/><span>\u624B\u673A:</span><span>${p.phone}</span></div>
|
|
<div class="line" style="margin-top: 10px"><img src="${W}" alt=""/><span>\u4F4D\u7F6E:</span><span>${p.region}</span></div>
|
|
</div>
|
|
</div>
|
|
`,s.setStyle(new ol.style.Style({image:new ol.style.Icon({src:De,scale:.5})})),n.getLayers().forEach(function(a){if(a instanceof ol.layer.Vector){let c=a.getSource().getFeatures()[0];c.get("type")==="0"&&c!==s&&(c.get("warning")==="0"?c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:J,scale:.5})})):c.get("warning")==="1"&&c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})))}});const I=i.getElement().querySelector(".close-btn");I&&I.addEventListener("click",()=>{i.setPosition(void 0),n.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:J,scale:.5})})):c.get("warning")==="1"&&c.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})))}})})}})});var w=new ResizeObserver(function(r){r.forEach(function(b){var E=b.contentRect.width,y=b.contentRect.height;t.style.width=E+"px",t.style.height=y+"px",n.updateSize()})});w.observe(e)}function ye(){if(B.value=!B.value,B.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 fe=()=>{K(),T({data:h.value,alertRange:C.value,flag:3}).then(e=>{D.value=e.data,N()})},K=()=>{for(const e in F.value)n.removeLayer(F.value[e]);F.value=[];for(const e in q.value)n.removeLayer(q.value[e]);q.value=[];for(const e in S.value)n.removeLayer(S.value[e]);S.value=[],Fe({flag:3,data:h.value}).then(e=>{A.value=e.data;for(const t in A.value){const i=[parseFloat(A.value[t].msLongitude),parseFloat(A.value[t].msLatitude)],w=128,r=[];for(let R=0;R<w;R++){const s=2*Math.PI*R/w,k=ol.sphere.computeDestinationPoint(i,C.value,s);r.push(k)}const b=new ol.Feature({geometry:new ol.geom.Polygon([r])}),E=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgb(255,255,0)",width:2})});F.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[b]}),style:E}),A.value[t].warning!=="\u65E0\u707E\u5BB3"&&n.addLayer(F.value[t]);const y=new ol.geom.Point(i),m=new ol.Feature({geometry:y,id:A.value[t].msName,type:A.value[t].flag});m.setStyle(new ol.style.Style({image:new ol.style.Icon({src:de(A.value[t].warning),scale:.5})})),q.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[m]})}),n.addLayer(q.value[t])}}),qe({flag:3,alertRange:C.value,data:h.value}).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:J,scale:.5})})),S.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),n.addLayer(S.value[t])):g.value[t].earlyWarning==="1"&&(r.setStyle(new ol.style.Style({image:new ol.style.Icon({src:X,scale:.5})})),S.value[t]=new ol.layer.Vector({source:new ol.source.Vector({features:[r]})}),n.addLayer(S.value[t]))}})},he=()=>{K(),T({data:h.value,alertRange:C.value,flag:3}).then(e=>{D.value=e.data,N()})},we=()=>{Le(_.value).then(e=>{e.data.code=="OK"&&Ie({message:"\u53D1\u9001\u6210\u529F",type:"success"})})},be=e=>{_.value=e};return(e,t)=>{const i=v("el-date-picker"),w=v("el-radio"),r=v("el-radio-group"),b=v("el-option"),E=v("el-select"),y=v("el-button"),m=v("el-table-column"),R=v("el-table"),s=v("el-pagination"),k=v("el-tooltip"),z=v("el-collapse-item"),I=v("el-collapse");return V(),x("div",ze,[_e,d("div",He,[d("div",Oe,[f(" \u76D1\u6D4B\u65E5\u671F:\u2003 "),o(i,{"popper-class":"date_poper",class:"m-2",modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=a=>h.value=a),onChange:he,format:"YYYY \u5E74 MM \u6708 DD \u65E5","value-format":"YYYY-MM-DD",type:"date",placeholder:"\u9009\u62E9\u65E5\u671F"},null,8,["modelValue"])]),d("div",Ke,[Pe,d("div",Ge,[d("div",Te,[f(" \u9884\u8B66\u8303\u56F4\uFF1A "),o(r,{onChange:t[1]||(t[1]=a=>fe()),modelValue:C.value,"onUpdate:modelValue":t[2]||(t[2]=a=>C.value=a),class:"ml-4"},{default:u(()=>[o(w,{label:5e3,size:"large",style:{color:"white"}},{default:u(()=>[f("5km")]),_:1}),o(w,{label:1e4,size:"large",style:{color:"white"}},{default:u(()=>[f("10km")]),_:1})]),_:1},8,["modelValue"])]),d("div",Je,[f(" \u7AD9\u70B9\u540D\u79F0: "),o(E,{modelValue:Y.value,"onUpdate:modelValue":t[3]||(t[3]=a=>Y.value=a),placeholder:"\u8BF7\u9009\u62E9"},{default:u(()=>[(V(!0),x(P,null,G(ee.value,a=>(V(),Ve(b,{key:a.msName,label:a.msName,value:a.msName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),d("div",Xe,[f(" \u9884\u8B66\u60C5\u51B5: "),o(E,{modelValue:Q.value,"onUpdate:modelValue":t[4]||(t[4]=a=>Q.value=a),placeholder:"\u8BF7\u9009\u62E9"},{default:u(()=>[(V(),x(P,null,G(ce,a=>o(b,{key:a.flag,label:a.label,value:a.label},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),d("div",je,[o(y,{class:"bt1",onClick:re},{default:u(()=>[f("\u67E5\u8BE2")]),_:1}),o(y,{class:"bt2",onClick:ie},{default:u(()=>[f("\u91CD\u7F6E")]),_:1})]),o(R,{"cell-style":{textAlign:"center"},"header-cell-style":{"text-align":"center",color:"white"},data:j.value,style:{width:"100%"},"max-height":"470px",onSelectionChange:be},{default:u(()=>[o(m,{type:"selection",width:"20"}),o(m,{prop:"msName",width:"80",label:"\u7AD9\u70B9\u540D\u79F0"}),o(m,{prop:"warning",label:"\u9884\u8B66\u60C5\u51B5"}),o(m,{prop:"name",width:"80",label:"\u8054\u7CFB\u4EBA"}),o(m,{prop:"telephone",label:"\u8054\u7CFB\u7535\u8BDD"})]),_:1},8,["data"]),o(s,{small:"",style:{display:"flex","justify-content":"center","margin-top":"10px"},onCurrentChange:ue,"current-page":U.value,"page-size":H.value,layout:" prev, pager, next",total:D.value.length},null,8,["current-page","page-size","total"]),o(y,{class:"but",type:"primary",disabled:_.value.length<1,onClick:we},{default:u(()=>[f(" \u53D1\u5E03\u9884\u8B66\u77ED\u4FE1 ")]),_:1},8,["disabled"])])]),d("div",{class:"rightFoldDiv",onClick:t[5]||(t[5]=a=>ye())},[o(k,{disabled:!M(B),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:u(()=>[M(B)?(V(),x("img",$e)):ae("v-if",!0)]),_:1},8,["disabled"]),o(k,{disabled:M(B),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:u(()=>[M(B)?ae("v-if",!0):(V(),x("img",et))]),_:1},8,["disabled"])])]),o(I,{class:"legend",accordion:""},{default:u(()=>[o(z,{name:"1"},{title:u(()=>[f("\u56FE\u4F8B")]),default:u(()=>[d("div",tt,[d("div",at,[(V(!0),x(P,null,G(M(ne),(a,c,Ee)=>(V(),x("div",{key:Ee,style:Be({backgroundColor:a.color,border:"1px solid value.color",width:"100%",height:"25px",marginTop:"5px",textAlign:"center"})},Se(c),5))),128))])])]),_:1})]),_:1})])}}},ut=ke(lt,[["__scopeId","data-v-08d6a053"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/meteorological/monitor/FloodWarning/index.vue"]]);export{ut as default};
|