11 lines
14 KiB
JavaScript
11 lines
14 KiB
JavaScript
import{_ as Pe,r as o,G as ee,t as Ue,d as h,o as T,c as te,k as m,e as l,w as n,m as g,f as b,H as We,I as V,y as D,K as x,j as le,l as Q,a2 as ae,p as ze,q as Ne}from"./index.9c864c60.js";import{_ as Ae,a as Te}from"./zhankaiss.dd067ea4.js";import{q,m as qe,g as Oe,p as je,a as B,b as Y,s as Re,c as Me,d as Qe,e as Be,f as Ye,i as Je,z as He}from"./information.ef765d82.js";import{d as Xe}from"./download.71b1811b.js";import"./linesGL.ef5bef0f.js";import"./linkSeriesData.77e8a68a.js";const O=U=>(ze("data-v-d59d92a7"),U=U(),Ne(),U),Ze={class:"center"},Ke=O(()=>m("div",{style:{width:"100%",height:"100%"},class:"cesiumContainer",id:"cesiumContainer"},null,-1)),et={class:"rightWra"},tt={class:"rightTop"},lt=O(()=>m("div",{class:"title"},[m("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}}),m("span",null,"\u5927\u7530\u519C\u6237\u4FE1\u606F\u7BA1\u7406")],-1)),at={style:{width:"100%"}},ot=O(()=>m("img",{src:Ae},null,-1)),nt=O(()=>m("img",{src:Te},null,-1)),st={key:0,class:"positionDiv"},it={__name:"index",setup(U){const j=o();o({name:"",value:""});let k=o(!1);o(""),o(!1),o([]);let L=ee({lat:"",lan:"",name:""}),f=o([]),y=o([]);const J=o([]),H=o(5e3),oe=o();o([]);const R=o([]),M=o([]),C=o([]),ne=o(),se=o([]);let $=o("");const X=o(1),Z=o(6),ie=o([]),_=o([{date:"2016-05-03",name:"Tom",address:"No. 189, Grove St, Los Angeles",value:"1"},{date:"2016-05-02",name:"Tom",address:"No. 189, Grove St, Los Angeles",value:"2"},{date:"2016-05-04",name:"Tom",address:"No. 189, Grove St, Los Angeles",value:"3"},{date:"2016-05-01",name:"Tom",address:"No. 189, Grove St, Los Angeles",value:"4"}]),c=o(-1),r=ee({contacts:"",phone:"",region:"",latitude:"",longitude:""}),re=e=>{c.value=_.value.indexOf(e),e.flag=!0},de=e=>{c.value=-1,Be(e).then(a=>{}),e.flag=!1},ue=e=>{me(e)},ce=()=>{console.log("cancel!")},me=e=>{_.value.splice(_.value.indexOf(e),1),Ye(e)},ve=()=>{Je(r).then(e=>{P.value=!1,K()})},pe=()=>{q({region:window.localStorage.getItem("deptName"),unitOrName:$.value}).then(e=>{_.value=e.data})},ge=()=>{$.value="",q({region:window.localStorage.getItem("deptName")}).then(e=>{_.value=e.data})},fe=()=>{q({region:window.localStorage.getItem("deptName"),whetherToDownload:!0}).then(e=>{Xe(e.data[e.data.length-1].downloadPath)})},ye=()=>{y.value.length>0?r.latitude=y.value[0].toFixed(6):ae("\u8BF7\u5148\u5728\u5730\u56FE\u4E0A\u9009\u62E9\u4F4D\u7F6E")},_e=()=>{y.value.length>0?r.longitude=y.value[1].toFixed(6):ae("\u8BF7\u5148\u5728\u5730\u56FE\u4E0A\u9009\u62E9\u4F4D\u7F6E")},we=()=>{P.value=!0,r.contacts="",r.phone="",r.region="",r.latitude="",r.longitude=""};function he(){const e=(X.value-1)*Z.value,a=X.value*Z.value;ie.value=J.value.slice(e,a)}const P=o(!1),be=()=>{let e=new Date;return e.setDate(e.getDate()-1),e};let d=o(null);const Ve=()=>{W=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"CJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999}),d.addLayer(W)},xe=()=>{var e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"XJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999});d.addLayer(e)};let W=o(null);Ue(()=>{K(),$e(),j.value=be().toJSON().substr(0,10),Ce(),Ge(),De(),Fe();let e=document.querySelector(".rightWra");e.style.transform="translate(101%,0)"}),o([]);let Se=o([]);const Ie=o([]),ke=o("");let z=window.localStorage.getItem("deptName");const K=()=>{q({region:window.localStorage.getItem("deptName")}).then(e=>{_.value=e.data})};function Ce(){qe({data:j.value,alertRange:H.value,flag:1,msName:ke.value,warning:ne.value,divisions:z}).then(e=>{J.value=e.data,he()})}function Ee(){He({divisions:z}).then(e=>{Ie.value=e.data})}Ee();function De(){var e=document.querySelector(".center"),a=document.getElementById("cesiumContainer");d=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.XYZ({url:`${serverAPI.tiandituLayers}`,projection:serverAPI.flag?"EPSG:4326":"EPSG:3857"}),preload:20})]}),Ve(),xe();const s=new ol.Overlay({element:document.createElement("div"),className:"overlay1",positioning:"bottom-center",offset:[0,-10],stopEvent:!0});d.on("moveend",function(){var i=d.getView().getZoom();i>=13?W.setVisible(!0):W.setVisible(!1)}),d.on("singleclick",function(i){o([]);const F=d.getEventPixel(i.originalEvent);var E=i.coordinate;y.value=E,_.value[c.value]&&_.value[c.value].flag&&(console.log(_.value[c.value]),_.value[c.value].latitude=y.value[0].toFixed(6),_.value[c.value].longitude=y.value[1].toFixed(6));var G=E[0],N=E[1],I=d.getView();Se.value.forEach(u=>{layersDic[u]?QueryData(i,layersDic[u].setOf,`http://192.168.0.113:8090/iserver/services/${layersDic[u].name}/rest/maps/${layersDic[u].setOf}`,u):layersGbz[u]&&QueryData(i,layersGbz[u].setOf,`http://192.168.0.113:8090/iserver/services/${layersGbz[u].name}/rest/maps/${layersGbz[u].setOf}`,u)}),d.forEachFeatureAtPixel(F,u=>{I.animate({center:[G,N],duration:1e3});const A=u.get("id"),t=u.get("type");if(d.addOverlay(s),t==="0"){for(const S in f.value)A===f.value[S].contacts&&(L.name=A,L.phone=f.value[S].phone,L.region=f.value[S].region);s.setPosition(u.getGeometry().getCoordinates()),s.getElement().innerHTML=`
|
|
<div class="info-window" >
|
|
<div class="close-btn" ><span>\u79CD\u7CAE\u5927\u6237\u4FE1\u606F</span><img src="${Oe}" 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>${L.name}</span></div>
|
|
<div class="line" style="margin-top: 10px"><div class="label">\u624B\u673A:</div><span>${L.phone}</span></div>
|
|
<div class="line" style="margin-top: 10px"><div class="label">\u4F4D\u7F6E:</div><span>${L.region}</span></div>
|
|
</div>
|
|
</div>
|
|
`,u.setStyle(new ol.style.Style({image:new ol.style.Icon({src:je,scale:.5})})),d.getLayers().forEach(function(S){if(S instanceof ol.layer.Vector){let w=S.getSource().getFeatures()[0];w.get("type")==="0"&&w!==u&&(w.get("warning")==="0"?w.setStyle(new ol.style.Style({image:new ol.style.Icon({src:B,scale:.5})})):w.get("warning")==="1"&&w.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Y,scale:.5})})))}});const p=s.getElement().querySelector(".close-btn");p&&p.addEventListener("click",()=>{s.setPosition(void 0),d.getLayers().forEach(function(S){if(S instanceof ol.layer.Vector){let w=S.getSource().getFeatures()[0];w.get("type")==="0"&&(w.get("warning")==="0"?w.setStyle(new ol.style.Style({image:new ol.style.Icon({src:B,scale:.5})})):w.get("warning")==="1"&&w.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Y,scale:.5})})))}})})}})});var v=new ResizeObserver(function(i){i.forEach(function(F){var E=F.contentRect.width,G=F.contentRect.height;a.style.width=E+"px",a.style.height=G+"px",d.updateSize()})});v.observe(e)}function Le(){if(k.value=!k.value,k.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 $e=()=>{Re().then(e=>{oe.value=Number(e.data[0].flag)})},Fe=()=>{for(const e in R.value)d.removeLayer(R.value[e]);R.value=[];for(const e in M.value)d.removeLayer(M.value[e]);M.value=[];for(const e in C.value)d.removeLayer(C.value[e]);C.value=[],Me({flag:1,alertRange:H.value,data:j.value,divisions:z}).then(e=>{f.value=e.data;for(const a in f.value){const s=[parseFloat(f.value[a].latitude),parseFloat(f.value[a].longitude)],v=new ol.geom.Point(s),i=new ol.Feature({geometry:v,id:f.value[a].contacts,type:f.value[a].flag,warning:f.value[a].earlyWarning});f.value[a].earlyWarning==="0"?(i.setStyle(new ol.style.Style({image:new ol.style.Icon({src:B,scale:.5})})),C.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[i]})}),d.addLayer(C.value[a])):f.value[a].earlyWarning==="1"&&(i.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Y,scale:.5})})),C.value[a]=new ol.layer.Vector({source:new ol.source.Vector({features:[i]})}),d.addLayer(C.value[a]))}})},Ge=()=>{let e=[];Qe({flag:1,divisions:z}).then(a=>{e=[],a.data.forEach(s=>{e.push(s.dataTime)}),se.value=e})};return(e,a)=>{const s=h("el-button"),v=h("el-input"),i=h("el-table-column"),F=h("el-popconfirm"),E=h("el-table"),G=h("el-icon"),N=h("el-tooltip"),I=h("el-form-item"),u=h("el-form"),A=h("el-drawer");return T(),te("div",Ze,[Ke,m("div",et,[m("div",tt,[lt,m("div",at,[m("div",null,[l(s,{type:"primary",style:{"margin-bottom":"10px"},onClick:we},{default:n(()=>[g("\u6DFB\u52A0")]),_:1}),l(s,{type:"primary",style:{"margin-bottom":"10px"},onClick:fe},{default:n(()=>[g("\u5BFC\u51FA")]),_:1}),g(" \xA0 "),l(v,{modelValue:b($),"onUpdate:modelValue":a[0]||(a[0]=t=>We($)?$.value=t:$=t),style:{width:"240px","margin-bottom":"10px"},placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u624B\u673A\u53F7\u67E5\u8BE2"},null,8,["modelValue"]),g(" \xA0 "),l(s,{type:"primary",style:{"margin-bottom":"10px"},onClick:pe},{default:n(()=>[g("\u641C\u7D22")]),_:1}),l(s,{type:"primary",style:{"margin-bottom":"10px"},onClick:ge},{default:n(()=>[g("\u91CD\u7F6E")]),_:1})]),l(E,{data:_.value,"header-cell-style":{"text-align":"center",color:"rgba(102, 102, 102, 1)"},border:"",height:"45rem"},{default:n(()=>[l(i,{prop:"contacts",label:"\u540D\u79F0"},{default:n(t=>[V(m("span",null,D(t.row.contacts),513),[[x,t.$index!==c.value]]),V(l(v,{modelValue:t.row.contacts,"onUpdate:modelValue":p=>t.row.contacts=p},null,8,["modelValue","onUpdate:modelValue"]),[[x,t.$index===c.value]])]),_:1}),l(i,{prop:"phone",label:"\u624B\u673A\u53F7"},{default:n(t=>[V(m("span",null,D(t.row.phone),513),[[x,t.$index!==c.value]]),V(l(v,{modelValue:t.row.phone,"onUpdate:modelValue":p=>t.row.phone=p},null,8,["modelValue","onUpdate:modelValue"]),[[x,t.$index===c.value]])]),_:1}),l(i,{prop:"region",label:"\u4F4D\u7F6E"},{default:n(t=>[V(m("span",null,D(t.row.region),513),[[x,t.$index!==c.value]]),V(l(v,{modelValue:t.row.region,"onUpdate:modelValue":p=>t.row.region=p},null,8,["modelValue","onUpdate:modelValue"]),[[x,t.$index===c.value]])]),_:1}),l(i,{label:"\u7ECF\u5EA6",width:"120"},{default:n(t=>[V(m("span",null,D(t.row.latitude),513),[[x,t.$index!==c.value]]),V(l(v,{modelValue:t.row.latitude,"onUpdate:modelValue":p=>t.row.latitude=p},null,8,["modelValue","onUpdate:modelValue"]),[[x,t.$index===c.value]])]),_:1}),l(i,{label:"\u7EAC\u5EA6",width:"120"},{default:n(t=>[V(m("span",null,D(t.row.longitude),513),[[x,t.$index!==c.value]]),V(l(v,{modelValue:t.row.longitude,"onUpdate:modelValue":p=>t.row.longitude=p},null,8,["modelValue","onUpdate:modelValue"]),[[x,t.$index===c.value]])]),_:1}),l(i,{label:"\u64CD\u4F5C"},{default:n(({row:t})=>[l(s,{type:"primary",link:"",onClick:p=>re(t)},{default:n(()=>[g("\xA0\xA0 \u7F16\u8F91")]),_:2},1032,["onClick"]),l(s,{type:"primary",link:"",onClick:p=>de(t)},{default:n(()=>[g("\u4FDD\u5B58")]),_:2},1032,["onClick"]),l(F,{"confirm-button-text":"\u786E\u5B9A","cancel-button-text":"\u53D6\u6D88","icon-color":"#626AEF",title:"\u786E\u5B9A\u5220\u9664?",onConfirm:p=>ue(t),onCancel:ce},{reference:n(()=>[l(s,{type:"danger",link:""},{default:n(()=>[g("\u5220\u9664")]),_:1})]),_:2},1032,["onConfirm"])]),_:1})]),_:1},8,["data","header-cell-style"])])]),m("div",{class:"rightFoldDiv",onClick:a[1]||(a[1]=t=>Le())},[l(N,{disabled:!b(k),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:n(()=>[b(k)?(T(),le(G,{key:0},{default:n(()=>[ot]),_:1})):Q("",!0)]),_:1},8,["disabled"]),l(N,{disabled:b(k),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:n(()=>[b(k)?Q("",!0):(T(),le(G,{key:0},{default:n(()=>[nt]),_:1}))]),_:1},8,["disabled"])])]),l(A,{modelValue:P.value,"onUpdate:modelValue":a[8]||(a[8]=t=>P.value=t),direction:e.direction,"before-close":e.handleClose,"append-to-body":!0,modal:!1,"modal-class":"AIdrawer",class:"AIdrawerWrapper"},{default:n(()=>[l(u,{"label-position":e.labelPosition,"label-width":"auto",model:r,style:{"max-width":"600px"}},{default:n(()=>[l(I,{label:"\u540D\u79F0:"},{default:n(()=>[l(v,{modelValue:r.contacts,"onUpdate:modelValue":a[2]||(a[2]=t=>r.contacts=t)},null,8,["modelValue"])]),_:1}),l(I,{label:"\u624B\u673A\u53F7:"},{default:n(()=>[l(v,{modelValue:r.phone,"onUpdate:modelValue":a[3]||(a[3]=t=>r.phone=t)},null,8,["modelValue"])]),_:1}),l(I,{label:"\u4F4D\u7F6E:"},{default:n(()=>[l(v,{modelValue:r.region,"onUpdate:modelValue":a[4]||(a[4]=t=>r.region=t)},null,8,["modelValue"])]),_:1}),l(I,{label:"\u7ECF\u5EA6:"},{default:n(()=>[l(v,{modelValue:r.latitude,"onUpdate:modelValue":a[5]||(a[5]=t=>r.latitude=t),style:{width:"12rem"}},null,8,["modelValue"]),g(" \u2003 "),l(s,{type:"primary",onClick:ye},{default:n(()=>[g("\u5750\u6807\u62FE\u53D6")]),_:1})]),_:1}),l(I,{label:"\u7EAC\u5EA6:"},{default:n(()=>[l(v,{modelValue:r.longitude,"onUpdate:modelValue":a[6]||(a[6]=t=>r.longitude=t),style:{width:"12rem"}},null,8,["modelValue"]),g(" \u2003 "),l(s,{type:"primary",onClick:_e},{default:n(()=>[g("\u5750\u6807\u62FE\u53D6")]),_:1})]),_:1}),l(I,{class:"butDiv"},{default:n(()=>[l(s,{type:"primary",onClick:ve},{default:n(()=>[g("\u6DFB\u52A0")]),_:1}),l(s,{onClick:a[7]||(a[7]=t=>P.value=!1)},{default:n(()=>[g("\u53D6\u6D88")]),_:1})]),_:1})]),_:1},8,["label-position","model"])]),_:1},8,["modelValue","direction","before-close"]),b(y)[0]?(T(),te("div",st," \u7ECF\u7EAC\u5EA6:"+D(b(y)[0]?b(y)[0].toFixed(6):"")+" / "+D(b(y)[1]?b(y)[1].toFixed(6):""),1)):Q("",!0)])}}},pt=Pe(it,[["__scopeId","data-v-d59d92a7"]]);export{pt as default};
|