2 lines
6.1 KiB
JavaScript
2 lines
6.1 KiB
JavaScript
import{_ as e,r as a,a2 as l,a5 as t,a7 as s,x as i,a4 as o,d as n,o as r,c as d,l as u,O as c,f as h,J as v,K as m,M as p,n as g,e as y,w,V as b,W as f,k as x,m as _,q as j,s as T}from"./index.e5c8b0d6.js";import k from"./downloads.e955445d.js";import{_ as C,a as S}from"./zhankaiss.6870329f.js";import{g as E,a as P,b as M,c as A}from"./ssnyygsj.afabd865.js";import V from"./TimeLine2.d7161b1e.js";import G from"./EchartsMJ.c9f3d8c1.js";import I from"./EchartsHNT.e29382a8.js";import B from"./EchartsZB.9e099dec.js";import{d as z}from"./download.57166482.js";import"./index.2809c208.js";import"./linkSeriesData.e74eae00.js";const J=e=>(j("data-v-d60e21b7"),e=e(),T(),e),R={class:"PageBox"},U={class:"RightBoxContent"},q={class:"taber"},L={style:{width:"100%",height:"auto",display:"flex","flex-direction":"column","justify-content":"flex-start","align-items":"center"}},D=J((()=>u("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),W=J((()=>u("span",null,"设施农业遥感数据面积统计",-1))),Y=J((()=>u("img",{src:k,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1))),Z={class:"ManJi"},N={class:"title"},Q=J((()=>u("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),X=J((()=>u("span",null,"设施农业遥感数据面积占比",-1))),H={class:"Zanbi"},F={key:0,style:{width:"100%",height:"auto",display:"flex","flex-direction":"column","justify-content":"flex-start","align-items":"center"}},K=J((()=>u("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}},null,-1))),O=J((()=>u("span",null,"高标准农田",-1))),$=J((()=>u("img",{src:k,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1))),ee={class:"heightNT"},ae={key:0,src:C,style:{width:"100%",height:"100%"},alt:""},le={key:0,src:S,style:{width:"100%",height:"100%"},alt:""},te={class:"bottom_center"},se=e({__name:"index",setup(e){window.CESIUM_BASE_URL="../../../../node_modules/cesium/Build/CesiumUnminified/";var j=null,T=null;const k=a(null);let C=a(!1),S=a(0);const J=a("370211"),se=a([]);let ie=a(""),oe=a([]),ne=a([]),re=a([]),de=a([]),ue=a("");const ce=()=>{C.value=!C.value},he=e=>{ie.value=e},ve=()=>{"370211"==J.value?E({yearMonth:ie.value,whetherToDownload:!0}).then((e=>{z(e.data[e.data.length-1].downloadPath)})):P({divisions:J.value,yearMonth:ie.value,whetherToDownload:!0}).then((e=>{z(e.data[e.data.length-1].downloadPath)}))},me=()=>{A({divisions:"370211",yearMonth:ue.value,whetherToDownload:!0}).then((e=>{z(e.data[e.data.length-1].downloadPath)}))};function pe(){var e;j=new ol.Map({target:k.value,controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,maxZoom:16.5,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})]}),T=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}),j.addLayer(T),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}),j.addLayer(e),j.on("moveend",(function(e){j.getView().getZoom()>=13?T.setVisible(!0):T.setVisible(!1)}))}return l(ie,((e,a)=>{})),t((async()=>{if("370211"==J.value){const e=await E({divisions:J.value,yearMonth:ie.value});re.value=e.data,de.value=e.data}else{const e=await P({divisions:J.value,yearMonth:ie.value});re.value=e.data,de.value=e.data}})),s((async()=>{try{const e=await M();e.data.length>0&&200==e.code&&(oe.value=e.data,ie.value=e.data[0]);let a=e.data[e.data.length-1];ue.value=a;const l=await A({divisions:"370211",yearMonth:a,whetherToDownload:""});l.data.length>0&&200==l.code&&(ne.value=l.data);const t=await E();t.data.length>0&&200==t.code&&(se.value=t.data.map((e=>({value:e.subregionCode,label:e.subregionName}))))}catch(e){}})),i((()=>{pe(),function(){try{let e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+"/map-sheshinongye-2024-5-30/rest/maps/T2024_05_29_sheshinongye%40sheshinongye-2024-5-30",cacheEnabled:!1}),name:"T2024_05_29_sheshinongye",projection:"EPSG:4326",zIndex:99999});j.addLayer(e)}catch(e){}}()})),o((()=>{})),(e,a)=>{const l=n("el-option"),t=n("el-select"),s=n("el-tooltip");return r(),d("div",R,[u("div",{id:"CesiumJsBox",ref_key:"mapElement",ref:k},null,512),u("div",{class:c(h(C)?"RightBox":"RightBoxFlag")},[u("div",U,[u("div",q,[u("div",{class:c(0==h(S)?"TaberChild_Activit":"TaberChild"),onClick:a[0]||(a[0]=e=>v(S)?S.value=0:S=0)},"行政区划 ",2),u("div",{class:c(1==h(S)?"TaberChild_Activit":"TaberChild"),onClick:a[1]||(a[1]=e=>v(S)?S.value=1:S=1)},"高标准农田 ",2)]),m(u("div",L,[u("div",{class:"title"},[D,W,u("p",{onClick:ve},[g(" 下载 "),Y])]),y(t,{modelValue:J.value,"onUpdate:modelValue":a[2]||(a[2]=e=>J.value=e),placeholder:"全部",size:"small",style:{width:"80%",margin:"10px 0"}},{default:w((()=>[y(l,{key:"quanbu",label:"全部",value:"370211"}),(r(!0),d(b,null,f(se.value,(e=>(r(),x(l,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),u("div",Z,[y(G,{mj:h(re)},null,8,["mj"])]),u("div",N,[Q,X,_("",!0)]),u("div",H,[y(B,{zb:h(de)},null,8,["zb"])])],512),[[p,0==h(S)]]),1==h(S)?(r(),d("div",F,[u("div",{class:"title"},[K,O,u("p",{onClick:me},[g(" 下载 "),$])]),u("div",ee,[y(I,{heightArr:h(ne)},null,8,["heightArr"])])])):_("",!0)]),u("div",{class:"RightBoxTool",onClick:ce},[y(s,{class:"box-item",effect:"light",content:"收起",placement:"top-end"},{default:w((()=>[h(C)?(r(),d("img",ae)):_("",!0)])),_:1}),y(s,{class:"box-item",effect:"light",content:"展开",placement:"top-end"},{default:w((()=>[h(C)?_("",!0):(r(),d("img",le))])),_:1})])],2),u("div",te,[y(V,{nowValue:h(ie),yearArr:h(oe),onHandleNowValueChange:he},null,8,["nowValue","yearArr"])])])}}},[["__scopeId","data-v-d60e21b7"]]);export{se as default};
|