Agriculture-front-end/dist/assets/index.22b985c1.js

2 lines
13 KiB
JavaScript
Raw Normal View History

import{_ as e,r as a,I as l,x as t,d as o,o as n,c as s,l as r,e as i,w as d,n as u,f as c,J as m,K as v,A as p,M as g,k as y,m as f,a8 as w,q as h,s as b}from"./index.e5c8b0d6.js";import{_ as V,a as x}from"./zhankaiss.6870329f.js";import{q as S,m as _,g as k,p as C,a as I,b as E,s as G,c as U,d as $,e as L,f as P,i as j,z as D}from"./information.2f37efab.js";import{d as F}from"./download.57166482.js";import"./linesGL.76a64914.js";import"./linkSeriesData.e74eae00.js";const N=e=>(h("data-v-8ac7fbb9"),e=e(),b(),e),A={class:"center"},T=N((()=>r("div",{style:{width:"100%",height:"100%"},class:"cesiumContainer",id:"cesiumContainer"},null,-1))),z={class:"rightWra"},W={class:"rightTop"},q=N((()=>r("div",{class:"title"},[r("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}}),r("span",null,"大田农户信息管理")],-1))),O={style:{width:"100%"}},R=N((()=>r("img",{src:V},null,-1))),J=N((()=>r("img",{src:x},null,-1))),Q={key:0,class:"positionDiv"},M=e({__name:"index",setup(e){const h=a();a({name:"",value:""});let b=a(!1);a(""),a(!1),a([]);let V=l({lat:"",lan:"",name:""}),x=a([]),N=a([]);const M=a([]),Y=a(5e3),X=a();a([]);const Z=a([]),B=a([]),H=a([]),K=a(),ee=a([]);let ae=a("");const le=a(1),te=a(6),oe=a([]),ne=a([{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"}]),se=a(-1),re=l({contacts:"",phone:"",region:"",latitude:"",longitude:""}),ie=()=>{},de=e=>{ne.value.splice(ne.value.indexOf(e),1),P(e)},ue=()=>{j(re).then((e=>{fe.value=!1,_e()}))},ce=()=>{S({region:window.localStorage.getItem("deptName"),unitOrName:ae.value}).then((e=>{ne.value=e.data}))},me=()=>{ae.value="",S({region:window.localStorage.getItem("deptName")}).then((e=>{ne.value=e.data}))},ve=()=>{S({region:window.localStorage.getItem("deptName"),whetherToDownload:!0}).then((e=>{F(e.data[e.data.length-1].downloadPath)}))},pe=()=>{N.value.length>0?re.latitude=N.value[0].toFixed(6):w("请先在地图上选择位置")},ge=()=>{N.value.length>0?re.longitude=N.value[1].toFixed(6):w("请先在地图上选择位置")},ye=()=>{fe.value=!0,re.contacts="",re.phone="",re.region="",re.latitude="",re.longitude=""};const fe=a(!1);let we=a(null);let he=a(null);t((()=>{_e(),ke(),h.value=(()=>{let e=new Date;return e.setDate(e.getDate()-1),e})().toJSON().substr(0,10),_({data:h.value,alertRange:Y.value,flag:1,msName:xe.value,warning:K.value,divisions:Se}).then((e=>{M.value=e.data,function(){const e=(le.value-1)*te.value,a=le.value*te.value;oe.value=M.value.slice(e,a)}()})),Ie(),function(){var e=document.querySelector(".center"),l=document.getElementById("cesiumContainer");we=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})]}),he=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}),we.addLayer(he),t=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}),we.addLayer(t);var t;const o=new ol.Overlay({element:document.createElement("div"),className:"overlay1",positioning:"bottom-center",offset:[0,-10],stopEvent:!0});we.on("moveend",(function(){we.getView().getZoom()>=13?he.setVisible(!0):he.setVisible(!1)})),we.on("singleclick",(function(e){a([]);const l=we.getEventPixel(e.originalEvent);var t=e.coordinate;N.value=t,ne.value[se.value]&&ne.val