2 lines
28 KiB
JavaScript
2 lines
28 KiB
JavaScript
import{z as ge,_ as $e,r as u,B as ce,C as Ue,D as Ye,F as de,d as k,o as b,c as M,l,m as P,e as h,w as _,f as g,g as F,J as ue,K as fe,k as pe,Q as He,x as Q,y as Ke,p as et,q as tt}from"./index.5f349928.js";import oe from"./downloads.e955445d.js";import{_ as ae}from"./close1.45635d81.js";import{g as ot,i as at,a as rt,h as lt,_ as st,b as it,c as nt,d as ct,e as dt,f as ut}from"./linesGL.badda9a7.js";import{i as ee,L as te}from"./index.c9f5bd8b.js";import{T as ft}from"./TimeLine.ca858622.js";import{u as me}from"./useEcharts.f096c4b4.js";function pt(x){return ge({url:"equipment/statisticsOfTheArea",method:"get",params:x})}function mt(x){return ge({url:"equipment/proportionOfTheArea",method:"get",params:x})}function gt(x){return ge({url:"equipment/eachFreezingGradeArea",method:"get",params:x})}const L=x=>(et("data-v-4e1915e9"),x=x(),tt(),x),vt={class:"center"},bt=L(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),ht={class:"leftWra"},yt={class:"leftTop"},_t={class:"title"},xt=L(()=>l("span",null,"\u5404\u51B7\u51BB\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1",-1)),wt=L(()=>l("img",{src:oe,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Ct={class:"leftbottom"},St={class:"title"},Dt=L(()=>l("span",null,"\u5404\u51B7\u51BB\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",-1)),kt=L(()=>l("img",{src:oe,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Mt={class:"tableDiv"},Lt={key:0,src:ae,alt:""},zt={key:0,class:"imgrotate",src:ae,alt:""},At={class:"rightWra"},Tt={class:"rightTop"},Wt={class:"title"},It=L(()=>l("span",null,"\u5404\u51B7\u51BB\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Et=L(()=>l("img",{src:oe,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Bt={class:"rightbottom"},Ft={class:"title"},Zt=L(()=>l("span",null,"\u5404\u51B7\u51BB\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Xt=L(()=>l("img",{src:oe,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Pt={key:0,src:ae,alt:""},Rt={key:0,class:"imgrotate",src:ae,alt:""},Nt={class:"bottom_center"},Ot=Ke('<div class="tool" data-v-4e1915e9><span data-v-4e1915e9><img src="'+st+'" alt="" data-v-4e1915e9></span><span data-v-4e1915e9><img src="'+it+'" alt="" data-v-4e1915e9></span><span data-v-4e1915e9><img src="'+nt+'" alt="" data-v-4e1915e9></span><span data-v-4e1915e9><img src="'+ct+'" alt="" data-v-4e1915e9></span><span data-v-4e1915e9><img src="'+dt+'" alt="" data-v-4e1915e9></span><span data-v-4e1915e9><img src="'+ut+'" alt="" data-v-4e1915e9></span></div>',1),qt={class:"mt-4"},Qt={id:"popup"},Gt={id:"pop"},Vt={key:0},jt=L(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),Jt={__name:"index",setup(x){let i=u(null);const ve=u(null),be=u(null),he=u(null);u(null);const ye=u(null),y=u("370211"),Ae=u(null);let w=ce({arr:[],brr:[],crr:[]});const _e=u({name:"",value:""}),xe=u([]),Z=u(!1);let E=u(!1),B=u(!1);const we=u(["false"]);let R=ce({lable:[],value:[]}),G=u([]),re=u(0),Ce=["\u9AD8\u6807\u51C6\u519C\u75301","\u9AD8\u6807\u51C6\u519C\u75302","\u9AD8\u6807\u51C6\u519C\u75303"],T={\u65E0\u51BB\u5BB3:[],\u8F7B\u5EA6\u51BB\u5BB3:[],\u4E2D\u5EA6\u51BB\u5BB3:[],\u91CD\u5EA6\u51BB\u5BB3:[]},Te={"-0\xB0\u4EE5\u4E0B":{color:"rgba(9, 187, 222, 1)",disabled:!1},"-3\xB0\u4EE5\u4E0B":{color:"rgba(255, 235, 59, 1)",disabled:!1},"-5\xB0\u4EE5\u4E0B":{color:"rgba(234, 165, 93, 1)",disabled:!1}};Ue(()=>w.arr,e=>{console.log("val:",e)});var V={title:[]};let W={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]},le=u([]);Ye(()=>{De("370211"),ke("370211"),Re(),Oe(),Me(),Ne(),Ie(),U(),Y(),Le(),O(),Be();let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(-107%,0)");let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"});const We={url:"http://{s}.tianditu.gov.cn/img_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=31091965e263284a501a723b8909f405",layer:"tdtCva",style:"default",format:"tiles",tileMatrixSetID:"c",subdomains:["t0","t1","t2","t3","t4","t5","t6","t7"],tilingScheme:new Cesium.GeographicTilingScheme,tileMatrixLabels:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],maximumLevel:18};Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYzcwZmJmNi02MzQ5LTQ1MGEtODgzMy0yZTZiZGExY2MzMGMiLCJpZCI6MTAxOTgsInNjb3BlcyI6WyJhc2wiLCJhc3IiLCJnYyJdLCJpYXQiOjE1ODEzMDgxNTR9.NeJU4yfUi-SnLrNDOBYsQgmiSh3B4axCTi1m84Qw99c";function Ie(){i=new Cesium.Viewer("cesiumContainer",{baseLayerPicker:!1,shouldAnimate:!0,infoBox:!1,animation:!1,timeline:!1,geocoder:!1,homeButton:!1,navigationHelpButton:!1,selectionIndicator:!1,fullscreenButton:!1,terrainProvider:new Cesium.EllipsoidTerrainProvider({}),sceneModePicker:!1,contextOptions:{webgl:{alpha:!0}},imageryProvider:new Cesium.WebMapTileServiceImageryProvider({...We})}),i.cesiumWidget.creditContainer.style.display="none",ie("shuzisannong:huangdaoqu_town","tl"),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),Fe(),je()}function se(e,t,o){e.forEach(a=>{let r=[];a[0].forEach(s=>{r.push(s[0]),r.push(s[1])}),i.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(r),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:o?Cesium.Color.fromCssColorString(o):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function Ee(e){return e>48e6?0:e>24e6?1:e>12e6?2:e>6e6?3:e>3e6?4:e>15e5?5:e>75e4?6:e>375e3?7:e>187500?8:e>93750?9:e>46875?10:e>23437.5?11:e>11718.75?12:e>5859.38?13:e>2929.69?14:e>1464.84?15:e>732.42?16:e>366.21?17:18}function Be(){de({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afarmland&maxFeatures=50&outputFormat=application%2Fjson",method:"get"}).then(e=>{console.log("\u519C\u7530\uFF1A",e),xe.value=e.data.features}).catch(e=>{})}let p=u({label:[]}),N="";function Fe(){var e=new Cesium.ScreenSpaceEventHandler(i.canvas);e.setInputAction(function(t){var o=i.camera.getPickRay(t.position),a=i.scene.globe.pick(o,i.scene);if(a){let r=Cesium.Cartographic.fromCartesian(a);if(r){let s=new Cesium.Cartesian2,f=i.camera.positionCartographic.height,c=Ee(f);const v=i.imageryLayers._layers,S=v.findIndex(d=>d._imageryProvider._layers&&d._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(S>-1){const d=v[S];let m=d._imageryProvider;if(m&&m.ready&&m._layers&&d.show===!0){s=m.tilingScheme.positionToTileXY(r,c,s);let n=m.pickFeatures(s.x,s.y,c,r.longitude,r.latitude);n&&n.then(z=>{if(z.length>0){let D=z[0];if(D.properties&&D.properties.XZDM)if(console.log("XZDM:",N),console.log("newData.properties.XZDM:",D.properties.XZDM),N!==D.properties.XZDM){Z.value=!0,N=D.properties.XZDM,y.value=N,J&&J();let I=D.data;i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(I.bbox[0],I.bbox[1],I.bbox[2],I.bbox[3]),duration:2}),X("townLine"),se(I.geometry&&I.geometry.coordinates,"townLine","yellow"),C(["village_CQL"]),Se(`XZDM=${D.properties.XZDM}`,"village_CQL");let K=i.entities._entities._array;for(var A=K.length-1;A>=0;A--)if(K[A]._name&&K[A]._name==="point"+D.properties.XZDM){let Je=K[A]._info;p.value=Je,console.log(p.value,"------------------"),H(t.position),i.scene.postRender.addEventListener(ne)}X("villageLine"),j=""}else Ze(v,s,c,r,t);else C(["village_CQL"]),q()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let j="";function Ze(e,t,o,a,r){const s=e.findIndex(f=>f._imageryProvider._layers&&f._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(s>-1){const f=e[s];let c=f._imageryProvider;if(c&&c.ready&&c._layers&&f.show===!0){t=c.tilingScheme.positionToTileXY(a,o,t);let v=c.pickFeatures(t.x,t.y,o,a.longitude,a.latitude);v&&v.then(S=>{if(S.length>0){let d=S[0];if(console.log(d),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(d.data.bbox[0],d.data.bbox[1],d.data.bbox[2],d.data.bbox[3]),duration:2}),d.properties&&d.properties.XZQDM&&j!==d.properties.XZQDM){j=d.properties.XZQDM;let m=d.data;if(X("villageLine"),se(m.geometry&&m.geometry.coordinates,"villageLine","yellow"),d.properties.XZQDM==="370211104217"){const n=Cesium.Rectangle.fromDegrees(m.bbox[0],m.bbox[1],m.bbox[2],m.bbox[3]),z=Cesium.Rectangle.center(n);let A=Cesium.Math.toDegrees(z.longitude),D=Cesium.Math.toDegrees(z.latitude),I={lon:A,lat:D,...m.properties,label:[{crop:"\u8336\u53F6",Shape_Area:2820},{crop:"\u5927\u8C46",Shape_Area:2767},{crop:"\u82B1\u751F",Shape_Area:62356},{crop:"\u84DD\u8393",Shape_Area:5443},{crop:"\u5730\u74DC",Shape_Area:897},{crop:"\u5C0F\u9EA6",Shape_Area:20111}]};p.value=I,H(r.position),i.scene.postRender.addEventListener(ne)}}}})}}}function Se(e,t){let o=new Cesium.WebMapServiceImageryProvider({url:"http://121.36.229.60:9080/geoserver/shuzisannong/wms",layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:e}});o.customName=t,i.imageryLayers.addImageryProvider(o)}function C(e,t){if(i){const o=i.imageryLayers._layers;for(let a=o.length-1;a>=0;a--)e.forEach(r=>{o[a]._imageryProvider&&o[a]._imageryProvider.customName&&(t?o[a]._imageryProvider.customName.indexOf(r)>-1&&i.imageryLayers.remove(o[a]):o[a]._imageryProvider.customName===r&&i.imageryLayers.remove(o[a]))})}}function X(e){if(i){let o=i.entities._entities._array;for(var t=o.length-1;t>=0;t--)o[t]._name&&o[t]._name===e&&i.entities.remove(o[t])}}function Xe(){if(E.value=!E.value,E.value){let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(0,0)")}else{let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(-107%,0)")}}function Pe(){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 De=e=>{R=ce({lable:[],value:[]}),pt({divisions:e}).then(t=>{t.data.forEach(o=>{R.lable.push(o.level),R.value.push((o.area/666.67).toFixed(2))}),U()})},ke=e=>{G=u([]),le=u([]),re=u(0),mt({divisions:e}).then(t=>{t.data.forEach(o=>{re.value+=Number(o.area),G.value.push({name:o.level,value:(o.area/666.67).toFixed(2)}),le.value.push({date:o.level,name:`${(o.area/666.67).toFixed(2)}\u4EA9`,address:`${(o.percentage*100).toFixed(2)}%`})}),console.log(G.value),Y()})},Re=()=>{gt().then(e=>{Ce.forEach((t,o)=>{let a=e.data.map(r=>{if(t===r.region)return r});Object.keys(T).forEach(r=>{let s=0;a.findIndex(c=>(console.log(c,r),c&&c.level===r&&(s=c.area),c&&c.level===r))>-1?T[r].push(s):T[r].push(0)})}),Le()})},Me=()=>{ot().then(e=>{w.arr=e.features.sort((a,r)=>a.properties.XZMC.length-r.properties.XZMC.length),w.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let t=[...e.features],o=[];t.splice(0,1),t.forEach(a=>{o.push(a.properties.XZMC)}),V.title=[...Object.values(o)],O()})},Ne=()=>{at().then(e=>{w.brr=e.features})},Oe=()=>{rt().then(e=>{w.crr=e.features,V.title.forEach((t,o)=>{let a=e.features.map(r=>{if(t===r.properties.town)return r.properties});Object.keys(W).forEach(r=>{const s=a.findIndex(f=>f&&f.crop===r);s>-1?W[r].push(a[s].Shape_Area):W[r].push(null)})}),O()})},J=()=>{if(w.arr.forEach(a=>{a.properties.XZDM==y.value&&(De(y.value),ke(y.value))}),y.value=="370211"){C(["village_CQL"]),N=null,C(["aaa"]),Me(),q(),O(),U(),Y();return}let e=[...w.arr];console.log("arr:",e),e.forEach(a=>{a.properties.XZDM==y.value&&i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),duration:2});let r=[...w.brr],s=[];r.forEach(f=>{f.properties.XZDM==y.value&&s.push(f.properties.XZQMC)}),V.title=[...Object.values(s)]}),O(),U(),Y();const o=[...w.arr].find(a=>a.properties.XZDM===y.value);o&&(X("townLine"),se(o.geometry.coordinates,"townLine","yellow")),C(["aaa"]),Se(`XZDM=${y.value}`,"aaa"),lt({time:"2023-04-26",subregion:"1",parent:"\u9EC4\u5C9B\u533A"}).then(a=>{let r=[];a.data.map((s,f)=>{s.region==o.properties.XZMC&&r.push({crop:s.type,Shape_Area:s.area})}),p.value={label:r},console.log(),console.log(r),H({x:642,y:312})})},$=e=>{qe(e)},qe=e=>{let t=document.createElement("a");t.style.display="none",t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)};function U(){const e=ee(ve.value);var t={textStyle:{fontSize:0},grid:{top:"15%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!0,top:"5%",data:["\u9762\u79EF"],right:"5%",icon:"rect",textStyle:{fontSize:14,color:"rgba(255, 255, 255, 0.7)"}},xAxis:{nameTextStyle:{color:"#c0c3cd",padding:[0,0,-10,0],fontSize:14},axisLabel:{color:"rgba(255, 255, 255, 0.7)",fontWeight:400,fontFamily:"SourceHanSansCN-Regular, SourceHanSansCN",fontSize:14},axisTick:{lineStyle:{color:"#0B1535",width:1},show:!1},splitLine:{show:!1},axisLine:{lineStyle:{color:"#384267",width:1,type:"dashed"},show:!0},data:R.lable,type:"category"},yAxis:{name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},type:"value",axisLabel:{color:"rgba(255,255,255,0.7)"},splitLine:{lineStyle:{type:"dashed"}},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{data:R.value,name:"\u9762\u79EF",type:"bar",barMaxWidth:"auto",barWidth:35,itemStyle:{color:{x:0,y:0,x2:0,y2:1,type:"linear",global:!1,colorStops:[{offset:0,color:"rgba(45, 204, 177, 1)"},{offset:1,color:"rgba(71, 179, 161, 0)"}]}},label:{normal:{show:!1,fontSize:14,color:"#ffffff",position:"top"}}}]};t&&e.setOption(t),window.addEventListener("resize",function(){e.resize()})}function Y(){const e=ee(be.value);var t=G.value;let o={color:["rgba(9, 187, 222, 0.8)","rgba(255, 235, 59, 0.8)","rgba(234, 165, 93, 0.8)","rgba(215, 25, 28, 0.8)","#585247","#7F6AAD","#009D85","rgba(250,250,250,0.3)"],title:{text:"\u603B\u9762\u79EF",subtext:`${(re.value/666.67).toFixed(2)}\u4EA9`,textStyle:{color:"#f2f2f2",fontSize:14},subtextStyle:{fontSize:14,color:["#ff9d19"]},x:"center",y:"center"},grid:{top:0},legend:{orient:"vertical",top:"middle",right:"2%",textStyle:{color:"#f2f2f2",fontSize:14},icon:"roundRect",data:t},tooltip:{trigger:"item",axisPointer:{type:"shadow"},formatter:"{a} <br/>{b} : {c} <br/>\u767E\u5206\u6BD4 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"\u5404\u51B7\u51BB\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",data:t},{radius:["50%","54%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1},emphasis:{show:!1}},labelLine:{normal:{show:!1},emphasis:{show:!1}},animation:!1,tooltip:{show:!1},data:[{value:1,itemStyle:{color:"rgba(250,250,250,0.3)"}}]},{name:"\u5916\u8FB9\u6846",type:"pie",clockWise:!1,hoverAnimation:!1,center:["50%","50%"],radius:["85%","85%"],label:{normal:{show:!1}},data:[{value:9,name:"",itemStyle:{normal:{borderWidth:2,borderColor:"#0b5263"}}}]}]};me(e,o)}function Le(){const e=ee(he.value);console.log(T);let t={title:{text:"",subtext:""},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"15%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:{type:"category",data:Ce,axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)",width:1,type:"solid"},axisLabel:{color:"rgba(255, 255, 255, 0.7)",fontWeight:400,fontFamily:"SourceHanSansCN-Regular, SourceHanSansCN",fontSize:14}}},yAxis:{name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.7)"},splitLine:{lineStyle:{type:"solid",color:"rgba(255, 255, 255, 0.3)"}},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"\u65E0\u51BB\u5BB3",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:T.\u65E0\u51BB\u5BB3,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(9, 187, 222, 1)",color:new te(0,0,0,1,[{offset:0,color:"rgba(9, 187, 222, 0.8)"},{offset:1,color:"rgba(9, 187, 222, 0.8)"}])}}},{name:"\u8F7B\u5EA6\u51BB\u5BB3",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:T.\u8F7B\u5EA6\u51BB\u5BB3,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(255, 235, 59, 1)",color:new te(0,0,0,1,[{offset:0,color:"rgba(255, 235, 59, 0.8)"},{offset:1,color:"rgba(255, 235, 59, 0.8)"}])}}},{name:"\u4E2D\u5EA6\u51BB\u5BB3",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:T.\u4E2D\u5EA6\u51BB\u5BB3,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(234, 165, 93, 1)",color:new te(0,0,0,1,[{offset:0,color:"rgba(234, 165, 93, 0.8)"},{offset:1,color:"rgba(234, 165, 93, 0.8)"}])}}},{name:"\u91CD\u5EA6\u51BB\u5BB3",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:T.\u91CD\u5EA6\u51BB\u5BB3,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(215, 25, 28, 1)",color:new te(0,0,0,1,[{offset:0,color:"rgba(215, 25, 28, 0.8)"},{offset:1,color:"rgba(215, 25, 28, 0.8)"}])}}}]};e.on("click",function(o){console.log(o.name)}),e.on("click",o=>Ge(o)),t&&e.setOption(t,{notMerge:!0,grid:{bottom:20}}),me(e,t)}function ie(e,t){let o=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:e,parameters:{service:"WMS",format:"image/png",transparent:!0}});o.customName=t;let a=i.imageryLayers.addImageryProvider(o);t.indexOf("gbznt")>-1&&(i.imageryLayers.lowerToBottom(a),i.imageryLayers.raise(a))}function Qe(){delete p.value.XZQMC,C(["gbznt"],!0),C(["aaa"]),y.value="370211",J(),Z.value==="1"&&(console.log(Z.value),ie("shuzisannong:huangdaoqu_town","tl")),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),Z.value=!1,q()}function Ge(e){delete p.value,C(["huangdaoqu_town"],!0),C(["tl"],!0);let t="shuzisannong:farmland",o=!1;const a=i.imageryLayers._layers;for(let s=a.length-1;s>=0;s--)a[s]&&a[s]._imageryProvider.customName&&a[s]._imageryProvider.customName===t+"gbznt"&&(o=!0);o||(ie(t,t+"gbznt"),p.value.label=[{crop:"\u5C0F\u9EA6",Shape_Area:"53000"},{crop:"\u5730\u74DC",Shape_Area:"50000"}]),xe.value.forEach(s=>{console.log("it.properties.name:",s.properties.name),console.log("item.name:",e.name),s.properties.name===e.name&&(console.log("dingwei"),i.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(s.bbox[0],s.bbox[1],s.bbox[2],s.bbox[3]),duration:2}))}),Z.value="1",H({x:642,y:312})}function O(){const e=ee(ye.value);var t={grid:{bottom:"8%",left:"10%",right:"6%",top:"12%",containLabel:!0},legend:{top:"5%",left:"10%",icon:"rect",textStyle:{color:"#fff"}},tooltip:{formatter:function(o){return o.seriesName+'<span style="font-size: 14px; color: #f00;">'+(o.value/666.67).toFixed(2)+"</span>\u4EA9"}},dataZoom:[{type:"slider",show:!1,zoomLock:!0,width:8,yAxisIndex:[0],bottom:30,top:20,right:10,startValue:0,endValue:4,handleIcon:"M-292,322.2c-3.2,0-6.4-0.6-9.3-1.9c-2.9-1.2-5.4-2.9-7.6-5.1s-3.9-4.8-5.1-7.6c-1.3-3-1.9-6.1-1.9-9.3c0-3.2,0.6-6.4,1.9-9.3c1.2-2.9,2.9-5.4,5.1-7.6s4.8-3.9,7.6-5.1c3-1.3,6.1-1.9,9.3-1.9c3.2,0,6.4,0.6,9.3,1.9c2.9,1.2,5.4,2.9,7.6,5.1s3.9,4.8,5.1,7.6c1.3,3,1.9,6.1,1.9,9.3c0,3.2-0.6,6.4-1.9,9.3c-1.2,2.9-2.9,5.4-5.1,7.6s-4.8,3.9-7.6,5.1C-285.6,321.5-288.8,322.2-292,322.2z",handleSize:"100%",handleStyle:{color:"#DBDBDB",height:"100%"},backgroundColor:"transparent",fillerColor:"#DBDBDB",textStyle:{color:"transparent"},dataBackground:{lineStyle:{color:"transparent"},areaStyle:{color:"transparent"}},borderColor:"transparent"},{type:"inside",id:"insideY",yAxisIndex:0,start:0,end:50,zoomOnMouseWheel:!1,moveOnMouseMove:!0,moveOnMouseWheel:!0}],xAxis:{type:"value",axisTick:{show:!1},axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:[{type:"category",axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#cdd3ee"}},splitLine:{show:!1},axisLabel:{show:!0,fontSize:12,color:"rgba(255, 255, 255, 1)",formatter:"{value}"},data:V.title,inverse:!0}],series:[{type:"bar",name:"\u7389\u7C73",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"\u7389\u7C73",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(4, 247, 227, 0.9)"},{offset:1,color:"rgba(4, 247, 227, 0.25)"}]}},data:W.\u7389\u7C73},{type:"bar",name:"\u5927\u8C46",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u5927\u8C46",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(143, 186, 243, 0.9)"},{offset:1,color:"rgba(143, 186, 243, 0.3)"}]}},data:W.\u5927\u8C46},{type:"bar",name:"\u82B1\u751F",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u82B1\u751F",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(4, 247, 227, 0.9)"},{offset:1,color:"rgba(4, 247, 227, 0.25)"}]}},data:W.\u82B1\u751F},{type:"bar",name:"\u5C0F\u9EA6",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u5C0F\u9EA6",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(33, 187, 251, 0.9)"},{offset:1,color:"rgba(33, 187, 251, 0.25)"}]}},data:W.\u5C0F\u9EA6},{type:"bar",name:"\u84DD\u8393",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u84DD\u8393",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(14, 223, 255, 0.9)"},{offset:1,color:"rgba(14, 223, 255, 0.25)"}]}},data:W.\u84DD\u8393}]};me(e,t)}function Ve(){let e=ze.value;console.log("fl:",e),de({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson"}).then(t=>{console.log("res1111:",t),t.data.features.forEach((a,r)=>{const s=Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),f=Cesium.Rectangle.center(s);let c=Cesium.Math.toDegrees(f.longitude),v=Cesium.Math.toDegrees(f.latitude);a.properties.XZDM==="370211011"?(c=120.0863,v=35.941):a.properties.XZDM==="370211003"&&(c=120.243682,v=35.97123201);const S=e[a.properties.XZMC];let d=[];S&&(d=S.map((m,n)=>m.properties)),i.entities.add({name:"point"+a.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(c,v),point:new Cesium.PointGraphics({show:!0,pixelSize:10,color:Cesium.Color.fromCssColorString("rgba(255, 255, 26, 1)"),outlineColor:new Cesium.Color(0,0,0,0),outlineWidth:0,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND}),info:{label:d,...a.properties,lon:c,lat:v}})})}).catch(t=>{})}let ze=u({});function je(){de({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(e=>{let t=e.data.features,o={};t.forEach(a=>{let r=a.properties.town;o[r]?o[r].push(a):o[r]=[a]}),ze.value=o,Ve()}).catch(e=>{})}function ne(){if(p.value&&p.value.lon&&p.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(p.value.lon),Number(p.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(i.scene,t);if(Cesium.defined(e)){const o=document.getElementById("pop");o&&(o.style.top=e.y-10+"px",o.style.left=e.x+10+"px")}}}function q(){delete p.value.XZQMC,j="",C(["village_CQL"]),X("villageLine"),X("townLine");const e=document.getElementById("pop");e&&(e.style.display="none"),i.scene.postRender.removeEventListener(ne)}function H(e){if(p.value.label.length){const t=document.getElementById("pop");t&&(t.style.display="block",t.style.position="absolute",t.style.top=e.y-10+"px",t.style.left=e.x+10+"px",t.style.zIndex=99)}}return(e,t)=>{const o=k("el-table-column"),a=k("el-table"),r=k("el-tooltip"),s=k("el-option"),f=k("el-select"),c=k("el-checkbox"),v=k("el-checkbox-group"),S=k("el-collapse-item"),d=k("el-collapse"),m=k("el-button");return b(),M("div",vt,[bt,l("div",ht,[l("div",yt,[l("div",_t,[xt,l("p",{onClick:t[0]||(t[0]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianj_zuoshang.xlsx"))},[P(" \u4E0B\u8F7D \xA0 "),wt])]),l("div",{ref_key:"areaDiv",ref:ve,class:"areaDiv"},null,512),l("div",{ref_key:"leftProgressBarDiv",ref:Ae,class:"ProgressBar"},null,512)]),l("div",Ct,[l("div",St,[Dt,l("p",{onClick:t[1]||(t[1]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianji%20.xlsx"))},[P(" \u4E0B\u8F7D \xA0 "),kt])]),l("div",{ref_key:"typesofDiv",ref:be,class:"typesofDiv"},null,512),l("div",Mt,[h(a,{data:g(le),style:{width:"100%"}},{default:_(()=>[h(o,{prop:"date",label:"\u7C7B\u578B"}),h(o,{prop:"name",label:"\u9762\u79EF"}),h(o,{prop:"address",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),l("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=n=>Xe())},[h(r,{class:"box-item","show-arrow":!1,disabled:g(E),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:_(()=>[g(E)?F("v-if",!0):(b(),M("img",Lt))]),_:1},8,["disabled"]),h(r,{disabled:!g(E),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:_(()=>[g(E)?(b(),M("img",zt)):F("v-if",!0)]),_:1},8,["disabled"])])]),l("div",At,[l("div",Tt,[l("div",Wt,[It,l("p",{onClick:t[3]||(t[3]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/81f3b011-7a5d-4a21-88aa-8ea51142e564_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx"))},[P(" \u4E0B\u8F7D \xA0 "),Et])]),l("div",{ref_key:"farmlandDiv",ref:he,class:"farmlandDiv"},null,512),F(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",Bt,[l("div",Ft,[Zt,l("p",{onClick:t[4]||(t[4]=n=>$("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/0c0ff4cf-151a-470e-856a-b0fce0fde997_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx"))},[P(" \u4E0B\u8F7D \xA0 "),Xt])]),h(f,{"popper-class":"select_city",onChange:t[5]||(t[5]=n=>J(e.item)),modelValue:y.value,"onUpdate:modelValue":t[6]||(t[6]=n=>y.value=n),clearable:"",placeholder:"\u5168\u90E8"},{default:_(()=>[(b(!0),M(ue,null,fe(g(w).arr,n=>(b(),pe(s,{key:n.properties.XZDM,label:n.properties.XZMC,value:n.properties.XZDM},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:ye,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=n=>Pe())},[h(r,{disabled:!g(B),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:_(()=>[g(B)?(b(),M("img",Pt)):F("v-if",!0)]),_:1},8,["disabled"]),h(r,{disabled:g(B),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:_(()=>[g(B)?F("v-if",!0):(b(),M("img",Rt))]),_:1},8,["disabled"])])]),l("div",Nt,[h(ft)]),Ot,h(d,{class:"legend",accordion:""},{default:_(()=>[h(S,{name:"1"},{title:_(()=>[P("\u56FE\u4F8B")]),default:_(()=>[l("div",qt,[h(v,{modelValue:we.value,"onUpdate:modelValue":t[8]||(t[8]=n=>we.value=n),onChange:e.change},{default:_(()=>[(b(!0),M(ue,null,fe(g(Te),(n,z,A)=>(b(),pe(c,{key:A,style:He({backgroundColor:n.color,border:"1px solid value.color",width:"100%"}),"v-model":n.disabled,disabled:n.disabled,label:z},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),l("div",Qt,[l("div",null,Q(_e.value.name)+"\uFF1A",1),l("div",null,Q(_e.value.value)+"\u4EA9",1),l("div",{class:"cancel",onClick:q},"X")]),l("div",Gt,[(b(!0),M(ue,null,fe(g(p).label,(n,z)=>(b(),M("div",{key:z},[l("div",null,Q(n.crop)+"\uFF1A",1),l("div",null,Q((n.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),g(p).XZQMC?(b(),M("div",Vt,[jt,l("div",null,Q(g(p).XZQMC),1)])):F("v-if",!0),l("div",{class:"cancel",onClick:q},"X")]),Z.value?(b(),pe(m,{key:0,class:"back_button",onClick:t[9]||(t[9]=n=>Qe())},{default:_(()=>[P("\u8FD4\u56DE")]),_:1})):F("v-if",!0)])}}},oo=$e(Jt,[["__scopeId","data-v-4e1915e9"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/meteorological/remoteSense/freeze/index.vue"]]);export{oo as default};
|