Agriculture-front-end/dist/assets/index.93241c06.js
2023-05-25 08:33:42 +08:00

13 lines
28 KiB
JavaScript

import{z as R,_ as Ge,r as f,A as oe,B as Je,C as $e,D as re,d as _,o as z,c as N,l as r,m as T,e as m,w as D,f as P,g as q,I as Ce,J as Se,k as ke,x as F,y as Ye,p as He,q as Ke}from"./index.b3a66a9e.js";import G from"./downloads.e955445d.js";import{_ as et,a as tt,b as at,c as ot,d as rt,e as lt}from"./linesGL.90f708a5.js";import{i as U,L as B}from"./index.c9f5bd8b.js";import{T as st}from"./TimeLine.6cac5abc.js";import{u as le}from"./useEcharts.83442be8.js";function it(v){return R({url:"crops/farmland",method:"get",params:v})}function nt(v){return R({url:"crops/statistics",method:"get",params:v})}function dt(v){return R({url:"crops/highStandards",method:"get",params:v})}function ct(v){return R({url:"crops/gradeStatistics",method:"get",params:v})}function ut(v){return R({url:"crops/administrativeDivisions",method:"get",params:v})}const S=v=>(He("data-v-6a6af1d2"),v=v(),Ke(),v),ft={class:"center"},pt=S(()=>r("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),mt={class:"leftWra"},gt={class:"leftTop"},vt={class:"title"},bt=S(()=>r("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1",-1)),ht=S(()=>r("img",{src:G,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),yt={class:"leftbottom"},_t={class:"title"},xt=S(()=>r("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",-1)),wt=S(()=>r("img",{src:G,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Ct={class:"tableDiv"},St={class:"rightWra"},kt={class:"rightTop"},Dt={class:"title"},Lt=S(()=>r("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Mt=S(()=>r("img",{src:G,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),zt={class:"rightbottom"},It={class:"title"},Wt=S(()=>r("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),At=S(()=>r("img",{src:G,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Tt={class:"bottom_center"},Bt=Ye('<div class="tool" data-v-6a6af1d2><span data-v-6a6af1d2><img src="'+et+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+tt+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+at+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+ot+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+rt+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+lt+'" alt="" data-v-6a6af1d2></span></div>',1),Et={id:"popup"},Nt={id:"pop"},Pt={key:0},Ft=S(()=>r("div",null,"\u6751\u540D\uFF1A",-1)),Rt={class:"mt-4"},Vt={__name:"index",setup(v){let n=f(null);const se=f(null),ie=f(null),ne=f(null);f(null);const de=f(null),k=f("370211"),De=f(null);let C=oe({arr:[],brr:[],crr:[]});oe({arr:[]});const ce=f({name:"",value:""}),Le=f([]),ue=f([]),V=f(!1);let J=f(!0),$=f(!0);f("{x:765,y:191}");let Y=f([]),H=f([]),K=f(0);f([]);let fe=["\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A1.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A2.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A3.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A4.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A5.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A6.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A7.0"],L={\u597D:[],\u8F83\u597D:[],\u9002\u4E2D:[],\u8F83\u5DEE:[],\u5DEE:[]};oe({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.5,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.5,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.5,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:156,itemStyle:{opacity:.5,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u84DD\u8393",value:56,itemStyle:{opacity:.5,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}},{name:"\u8336\u53F6",value:56,itemStyle:{opacity:.5,color:"rgba(26, 255, 140, 1)"},label:{show:!0}}]});let ee=f([]);Je(()=>C.arr,e=>{console.log("val:",e)});var I={title:[]};let y={\u597D:[],\u8F83\u597D:[],\u9002\u4E2D:[],\u8F83\u5DEE:[],\u5DEE:[]};const Me=()=>{console.log(Le.value)};let te=f([]);$e(()=>{ge("370211"),ve("370211"),Pe(),be("370211"),Ie(),Ae()});const ze={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(){n=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({...ze})}),n.cesiumWidget.creditContainer.style.display="none",ae("shuzisannong:huangdaoqu_town","tl"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),Te(),qe()}function pe(e,t,a){e.forEach(o=>{let l=[];o[0].forEach(s=>{l.push(s[0]),l.push(s[1])}),n.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(l),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:a?Cesium.Color.fromCssColorString(a):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function We(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 Ae(){re({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),ue.value=e.data.features}).catch(e=>{})}let h=f({label:[]}),O="";function Te(){var e=new Cesium.ScreenSpaceEventHandler(n.canvas);e.setInputAction(function(t){var a=n.camera.getPickRay(t.position),o=n.scene.globe.pick(a,n.scene);if(o){let l=Cesium.Cartographic.fromCartesian(o);if(l){let s=new Cesium.Cartesian2,d=n.camera.positionCartographic.height,c=We(d);const g=n.imageryLayers._layers,u=g.findIndex(p=>p._imageryProvider._layers&&p._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(u>-1){const p=g[u];let b=p._imageryProvider;if(b&&b.ready&&b._layers&&p.show===!0){s=b.tilingScheme.positionToTileXY(l,c,s);let M=b.pickFeatures(s.x,s.y,c,l.longitude,l.latitude);M&&M.then(W=>{if(W.length>0){let w=W[0];if(w.properties&&w.properties.XZDM)if(O!==w.properties.XZDM){O=w.properties.XZDM,k.value=O,he();let A=w.data;n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(A.bbox[0],A.bbox[1],A.bbox[2],A.bbox[3]),duration:2}),E("townLine"),pe(A.geometry&&A.geometry.coordinates,"townLine","yellow"),x(["village_CQL"]),me(`XZDM=${w.properties.XZDM}`,"village_CQL");let j=n.entities._entities._array;for(var i=j.length-1;i>=0;i--)if(j[i]._name&&j[i]._name==="point"+w.properties.XZDM){let Ue=j[i]._info;h.value=Ue,console.log(h.value,"------------------"),we(t.position),n.scene.postRender.addEventListener(xe)}E("villageLine"),Z=""}else Be(g,s,c,l);else x(["village_CQL"]),Q()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let Z="";function Be(e,t,a,o){const l=e.findIndex(s=>s._imageryProvider._layers&&s._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(l>-1){const s=e[l];let d=s._imageryProvider;if(d&&d.ready&&d._layers&&s.show===!0){t=d.tilingScheme.positionToTileXY(o,a,t);let c=d.pickFeatures(t.x,t.y,a,o.longitude,o.latitude);c&&c.then(g=>{if(g.length>0){let u=g[0];if(u.properties&&u.properties.XZQDM&&Z!==u.properties.XZQDM){Z=u.properties.XZQDM;let p=u.data;if(E("villageLine"),pe(p.geometry&&p.geometry.coordinates,"villageLine","yellow"),u.properties.XZQDM==="370211104217"){const b=Cesium.Rectangle.fromDegrees(p.bbox[0],p.bbox[1],p.bbox[2],p.bbox[3]),M=Cesium.Rectangle.center(b);let W=Cesium.Math.toDegrees(M.longitude),i=Cesium.Math.toDegrees(M.latitude),w={lon:W,lat:i,...p.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}]};h.value=w}}}})}}}function me(e,t){let a=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}});a.customName=t,n.imageryLayers.addImageryProvider(a)}function x(e,t){if(n){const a=n.imageryLayers._layers;for(let o=a.length-1;o>=0;o--)e.forEach(l=>{a[o]._imageryProvider&&a[o]._imageryProvider.customName&&(t?a[o]._imageryProvider.customName.indexOf(l)>-1&&n.imageryLayers.remove(a[o]):a[o]._imageryProvider.customName===l&&n.imageryLayers.remove(a[o]))})}}function E(e){if(n){let a=n.entities._entities._array;for(var t=a.length-1;t>=0;t--)a[t]._name&&a[t]._name===e&&n.entities.remove(a[t])}}function Ee(){if(J.value=!J.value,J.value){let e=document.querySelector(".leftWra");e.style.transform="translate(0,0)"}else{let e=document.querySelector(".leftWra");e.style.transform="translate(-107%,0)"}}function Ne(){if($.value=!$.value,$.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 ge=e=>{Y=f([]),H=f([]),it({divisions:e}).then(t=>{t.data.forEach(a=>{Y.value.push(a.level),H.value.push((a.area/666.67).toFixed(2))}),Ve()})},ve=e=>{ee=f([]),te=f([]),K=f(0),nt({divisions:e}).then(t=>{t.data.forEach(a=>{K.value+=Number(a.area),ee.value.push({name:a.level,value:(a.area/666.67).toFixed(2)}),te.value.push({date:a.level,name:`${(a.area/666.67).toFixed(2)}\u4EA9`,address:`${(a.percentage*100).toFixed(2)}%`})}),Oe()})},Pe=()=>{f([]),dt().then(e=>{fe.forEach((t,a)=>{let o=e.data.map(l=>{if(t===l.streetName)return l});Object.keys(L).forEach(l=>{let s=0;o.findIndex(c=>(c&&c.type===l&&(s=c.area),c&&c.type===l))!==-1?L[l].push(s):L[l].push(0)})}),Ze()})},be=e=>{ct({divisions:e}).then(t=>{C.brr=t.data,C.arr=t.data.sort((d,c)=>d.streetName.length-c.streetName.length),C.arr.unshift({streetCode:"370211",streetName:"\u5168\u90E8"});let a=[],o=[];C.arr.forEach(d=>{a.indexOf(d.streetName)==-1&&(a.push(d.streetName),o.push({streetName:d.streetName,streetCode:d.streetCode,area:d.area,type:d.type}))}),C.arr=o;let l=[...t.data],s=[];l.splice(0,1),l.forEach(d=>{s.indexOf(d.streetName)==-1&&s.push(d.streetName)}),I.title=[...Object.values(s)],I.title.forEach((d,c)=>{let g=t.data.map(u=>{if(d===u.streetName)return u});console.log(g),Object.keys(y).forEach(u=>{console.log(u),g.findIndex(b=>b&&b.type===u)>-1?y[u].push(1):y[u].push(null)})}),ye()})},Fe=e=>{ut({divisions:e}).then(t=>{C.brr=t.data;let a=[...t.data],o=[];a.forEach(l=>{o.indexOf(l.streetName)==-1&&o.push(l.streetName)}),I.title=[...Object.values(o)],I.title.forEach((l,s)=>{let d=t.data.map(c=>{if(l===c.streetName)return c});Object.keys(y).forEach(c=>{d.findIndex(u=>u&&u.type===c)>-1?y[c].push(1):y[c].push(null)})}),ye()})},he=()=>{ge(k.value),ve(k.value),k.value!=="370211"&&Fe(k.value),k.value=="370211"&&(x(["village_CQL"]),x(["aaa"]),be(),Q());let e=[...C.arr];console.log("arr:",e),[...C.arr],x(["aaa"]),me(`XZDM=${k.value}`,"aaa")},X=e=>{Re(e)},Re=e=>{let t=document.createElement("a");t.style.display="none",t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)};function Ve(){const e=U(se.value);let t=Y.value,a=H.value,o=!1;a.length>14?o=!0:o=!1;var l={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"10%",right:"5%",left:"15%",bottom:"10%"},xAxis:[{type:"category",data:t,axisLine:{lineStyle:{color:"rgba(66, 192, 255, .3)"}},axisLabel:{interval:0,margin:10,color:"#05D5FF",textStyle:{fontSize:11},rotate:"0"},axisTick:{show:!1}}],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:{show:!1},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},dataZoom:[{show:o,type:"slider",realtime:!0,startValue:0,endValue:14,xAxisIndex:[0],bottom:"10",left:"30",height:10,borderColor:"rgba(0,0,0,0)",textStyle:{color:"#05D5FF"}}],series:[{type:"bar",data:a,barWidth:"10",itemStyle:{normal:{color:new B(0,0,0,1,[{offset:0,color:"rgba(45, 204, 177, 1)"},{offset:.98,color:"rgba(71, 179, 161, 0)"}],!1),shadowColor:"rgba(5, 213, 255, 1)",shadowBlur:4}},label:{normal:{show:!0,lineHeight:10,formatter:"{c}",position:"top",textStyle:{color:"#fff",fontSize:10}}}}]};l&&e.setOption(l),window.addEventListener("resize",function(){e.resize()})}function Oe(){const e=U(ie.value);var t=ee.value;let a={color:["rgba(9, 187, 222, 0.8)","rgba(255, 235, 59, 0.8)","rgba(234, 165, 93, 0.8)","rgb(152,251,152,0.8)","red"],title:{text:"\u603B\u9762\u79EF",subtext:`${(K.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}\u4EA9 <br/>\u767E\u5206\u6BD4 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"\u5404\u5E72\u65F1\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%"],tooltip:{show:!1},label:{normal:{show:!1}},data:[{value:9,name:"",itemStyle:{normal:{borderWidth:2,borderColor:"#0b5263"}}}]}]};le(e,a)}function Ze(){const e=U(ne.value);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:fe,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:"\u597D",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:L.\u597D,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(9, 187, 222, 1)",color:new B(0,0,0,1,[{offset:0,color:"rgba(9, 187, 222, 0.8)"},{offset:1,color:"rgba(9, 187, 222, 0.8)"}])}}},{name:"\u8F83\u597D",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:L.\u8F83\u597D,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(255, 235, 59, 1)",color:new B(0,0,0,1,[{offset:0,color:"rgba(255, 235, 59, 0.8)"},{offset:1,color:"rgba(255, 235, 59, 0.8)"}])}}},{name:"\u9002\u4E2D",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:L.\u9002\u4E2D,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(234, 165, 93, 1)",color:new B(0,0,0,1,[{offset:0,color:"rgba(234, 165, 93, 0.8)"},{offset:1,color:"rgba(234, 165, 93, 0.8)"}])}}},{name:"\u8F83\u5DEE",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:L.\u8F83\u5DEE,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(215, 25, 28, 1)",color:new B(0,0,0,1,[{offset:0,color:"rgba(215, 25, 28, 0.8)"},{offset:1,color:"rgba(215, 25, 28, 0.8)"}])}}},{name:"\u5DEE",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:L.\u5DEE,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(23, 194, 180, 1)",color:new B(0,0,0,1,[{offset:0,color:"rgba(23, 194, 180, 0.7)"},{offset:1,color:"rgba(23, 194, 180, 0.7)"}])}}}]};e.on("click",function(a){console.log(a.name)}),e.on("click",a=>Qe(a)),t&&e.setOption(t,{notMerge:!0,grid:{bottom:20}}),le(e,t)}function ae(e,t){let a=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:e,parameters:{service:"WMS",format:"image/png",transparent:!0}});a.customName=t;let o=n.imageryLayers.addImageryProvider(a);t.indexOf("gbznt")>-1&&(n.imageryLayers.lowerToBottom(o),n.imageryLayers.raise(o))}function Xe(){x(["gbznt"],!0),ae("shuzisannong:huangdaoqu_town","tl"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),V.value=!1}function Qe(e){console.log("item:",e),x(["huangdaoqu_town"],!0),x(["tl"],!0);let t="shuzisannong:farmland",a=!1;const o=n.imageryLayers._layers;for(let s=o.length-1;s>=0;s--)o[s]&&o[s]._imageryProvider.customName&&o[s]._imageryProvider.customName===t+"gbznt"&&(a=!0);a||ae(t,t+"gbznt"),ue.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"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(s.bbox[0],s.bbox[1],s.bbox[2],s.bbox[3]),duration:2}))}),V.value=!0,h.value={label:[{crop:"\u5C0F\u9EA6",Shape_Area:"53000"},{crop:"\u5730\u74DC",Shape_Area:"50000"}]},console.log(h.label),we({x:642,y:312})}function ye(){const e=U(de.value);console.log(y),console.log(I);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(a){return a.seriesName+'<span style="font-size: 14px; color: #f00;">'+(a.value/66.72).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:I.title,inverse:!0}],series:[{type:"bar",name:"\u597D",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"\u597D",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:y.\u597D},{type:"bar",name:"\u8F83\u597D",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u8F83\u597D",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:y.\u8F83\u597D},{type:"bar",name:"\u9002\u4E2D",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u9002\u4E2D",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:y.\u9002\u4E2D},{type:"bar",name:"\u8F83\u5DEE",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u8F83\u5DEE",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:y.\u8F83\u5DEE},{type:"bar",name:"\u5DEE",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u5DEE",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:y.\u5DEE}]};le(e,t)}function je(){let e=_e.value;console.log("fl:",e),re({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((o,l)=>{const s=Cesium.Rectangle.fromDegrees(o.bbox[0],o.bbox[1],o.bbox[2],o.bbox[3]),d=Cesium.Rectangle.center(s);let c=Cesium.Math.toDegrees(d.longitude),g=Cesium.Math.toDegrees(d.latitude);o.properties.XZDM==="370211011"?(c=120.0863,g=35.941):o.properties.XZDM==="370211003"&&(c=120.243682,g=35.97123201);const u=e[o.properties.XZMC];let p=[];u&&(p=u.map((b,M)=>b.properties)),n.entities.add({name:"point"+o.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(c,g),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:p,...o.properties,lon:c,lat:g}})})}).catch(t=>{})}let _e=f({});function qe(){re({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,a={};t.forEach(o=>{let l=o.properties.town;a[l]?a[l].push(o):a[l]=[o]}),_e.value=a,je()}).catch(e=>{})}function xe(){if(h.value&&h.value.lon&&h.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(h.value.lon),Number(h.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(n.scene,t);if(Cesium.defined(e)){const a=document.getElementById("pop");a.style.top=e.y-10+"px",a.style.left=e.x+10+"px"}}}function Q(){O="",Z="",x(["village_CQL"]),x(["aaa"]),E("villageLine"),E("townLine");const e=document.getElementById("pop");e.style.display="none",n.scene.postRender.removeEventListener(xe),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),x(["gbznt"],!0),V.value=!1}function we(e){console.log(e);const t=document.getElementById("pop");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 a=_("el-table-column"),o=_("el-table"),l=_("ArrowRightBold"),s=_("el-icon"),d=_("el-option"),c=_("el-select"),g=_("ArrowLeftBold"),u=_("el-checkbox"),p=_("el-checkbox-group"),b=_("el-collapse-item"),M=_("el-collapse"),W=_("el-button");return z(),N("div",ft,[pt,r("div",mt,[r("div",gt,[r("div",vt,[bt,r("p",{onClick:t[0]||(t[0]=i=>X("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx"))},[T(" \u4E0B\u8F7D \xA0 "),ht])]),r("div",{ref_key:"areaDiv",ref:se,class:"areaDiv"},null,512),r("div",{ref_key:"leftProgressBarDiv",ref:De,class:"ProgressBar"},null,512)]),r("div",yt,[r("div",_t,[xt,r("p",{onClick:t[1]||(t[1]=i=>X("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianji%20.xlsx"))},[T(" \u4E0B\u8F7D \xA0 "),wt])]),r("div",{ref_key:"typesofDiv",ref:ie,class:"typesofDiv"},null,512),r("div",Ct,[m(o,{data:P(te),style:{width:"100%"}},{default:D(()=>[m(a,{prop:"date",label:"\u7C7B\u578B"}),m(a,{prop:"name",label:"\u9762\u79EF"}),m(a,{prop:"address",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),r("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=i=>Ee())},[m(s,null,{default:D(()=>[m(l)]),_:1})])]),r("div",St,[r("div",kt,[r("div",Dt,[Lt,r("p",{onClick:t[3]||(t[3]=i=>X("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"))},[T(" \u4E0B\u8F7D \xA0 "),Mt])]),r("div",{ref_key:"farmlandDiv",ref:ne,class:"farmlandDiv"},null,512),q(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),r("div",zt,[r("div",It,[Wt,r("p",{onClick:t[4]||(t[4]=i=>X("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"))},[T(" \u4E0B\u8F7D \xA0 "),At])]),m(c,{"popper-class":"select_city",onChange:t[5]||(t[5]=i=>he(e.item)),modelValue:k.value,"onUpdate:modelValue":t[6]||(t[6]=i=>k.value=i),clearable:"",placeholder:"\u5168\u90E8"},{default:D(()=>[(z(!0),N(Ce,null,Se(P(C).arr,i=>(z(),ke(d,{key:i.streetCode,label:i.streetName,value:i.streetCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),r("div",{ref_key:"ASdivisionDiv",ref:de,class:"ASdivision"},null,512)]),r("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=i=>Ne())},[m(s,null,{default:D(()=>[m(g)]),_:1})])]),r("div",Tt,[m(st)]),Bt,r("div",Et,[r("div",null,F(ce.value.name)+"\uFF1A",1),r("div",null,F(ce.value.value)+"\u4EA9",1),r("div",{class:"cancel",onClick:Q},"X")]),r("div",Nt,[(z(!0),N(Ce,null,Se(P(h).label,(i,w)=>(z(),N("div",{key:w},[r("div",null,F(i.crop)+"\uFF1A",1),r("div",null,F((i.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),P(h).XZQMC?(z(),N("div",Pt,[Ft,r("div",null,F(P(h).XZQMC),1)])):q("v-if",!0),r("div",{class:"cancel",onClick:Q},"X")]),m(M,{class:"legend",accordion:""},{default:D(()=>[m(b,{name:"1"},{title:D(()=>[T("\u56FE\u4F8B")]),default:D(()=>[r("div",Rt,[m(p,{modelValue:e.checkList,"onUpdate:modelValue":t[13]||(t[13]=i=>e.checkList=i),onChange:Me},{default:D(()=>[q(` <el-checkbox
v-for="(value, item, key) in dic"
:key="key"
:style="{
background: value.color,
border: \`1px solid \${value.color}\`,
width: \`100%\`,
}"
v-model="checked3"
:disabled="value.disabled"
:label="item"
/> `),m(u,{style:{background:"rgba(50, 148, 1, 1)",border:"1px solid rgba(251, 171, 60, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":t[8]||(t[8]=i=>e.checked3=i),label:"\u597D"},null,8,["modelValue"]),m(u,{style:{background:"rgba(154, 208, 0, 1)",border:"1px solid rgba(251, 219, 13, 1)",width:"100%"},modelValue:e.checked4,"onUpdate:modelValue":t[9]||(t[9]=i=>e.checked4=i),label:"\u8F83\u597D"},null,8,["modelValue"]),m(u,{style:{background:"rgba(234, 219, 0, 1)",border:"1px solid rgba(244, 218, 136, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":t[10]||(t[10]=i=>e.checked3=i),label:"\u9002\u4E2D"},null,8,["modelValue"]),m(u,{style:{background:"rgba(239, 152, 0, 1)",border:"1px solid rgba(174, 83, 110, 1)",width:"100%"},modelValue:e.checked4,"onUpdate:modelValue":t[11]||(t[11]=i=>e.checked4=i),label:"\u8F83\u5DEE"},null,8,["modelValue"]),m(u,{style:{background:"rgba(247, 85, 0, 1)",border:"1px solid rgba(242, 177, 167, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":t[12]||(t[12]=i=>e.checked3=i),label:"\u5DEE"},null,8,["modelValue"])]),_:1},8,["modelValue"])])]),_:1})]),_:1}),V.value?(z(),ke(W,{key:0,class:"back_button",onClick:t[14]||(t[14]=i=>Xe())},{default:D(()=>[T("\u8FD4\u56DE")]),_:1})):q("v-if",!0)])}}},Ut=Ge(Vt,[["__scopeId","data-v-6a6af1d2"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/site/index.vue"]]);export{Ut as default};