13 lines
26 KiB
JavaScript
13 lines
26 KiB
JavaScript
import{_ as Xe,r as g,B as R,C as Ze,D as Fe,F as Y,d as h,o as L,c as z,l,m as w,e as b,w as k,g as N,G as fe,H as me,f as V,k as ge,x as I,y as We,p as Re,q as Ne}from"./index.be11ec00.js";import K from"./downloads.e955445d.js";import{i as ye,g as Ve,a as Oe,b as Ge,_ as Qe,c as qe,d as Ue,e as je,f as Je,h as $e}from"./linesGL.7d091c0b.js";import{i as H,L as be}from"./index.7fec779c.js";import{T as Ye}from"./TimeLine.00a17ad7.js";import{u as ve}from"./useEcharts.7c77fa00.js";const C=E=>(Re("data-v-7527f9ca"),E=E(),Ne(),E),He={class:"center"},Ke=C(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),eo={class:"leftWra"},oo={class:"leftTop"},ao={class:"title"},to=C(()=>l("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30",-1)),ro=C(()=>l("img",{src:K,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),lo=C(()=>l("div",{class:"production"},[l("div",{class:"leftProduction"},[l("p",null,[l("span",null,"900"),w(" \u5428 "),l("br"),w(" \u6700\u5C0F\u503C ")])]),l("div",{class:"rightProduction"},[l("p",null,[l("span",null,"960"),w(" \u5428 "),l("br"),w(" \u6700\u5C0F\u503C ")])])],-1)),so={class:"rightWra"},io={class:"rightTop"},no={class:"title"},co=C(()=>l("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30-\u9AD8\u6807\u51C6\u519C\u7530",-1)),uo=C(()=>l("img",{src:K,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),po={class:"rightbottom"},fo={class:"title"},mo=C(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),go=C(()=>l("img",{src:K,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),yo={class:"bottom_center"},bo=We('<div class="tool" data-v-7527f9ca><span data-v-7527f9ca><img src="'+Qe+'" alt="" data-v-7527f9ca></span><span data-v-7527f9ca><img src="'+qe+'" alt="" data-v-7527f9ca></span><span data-v-7527f9ca><img src="'+Ue+'" alt="" data-v-7527f9ca></span><span data-v-7527f9ca><img src="'+je+'" alt="" data-v-7527f9ca></span><span data-v-7527f9ca><img src="'+Je+'" alt="" data-v-7527f9ca></span><span data-v-7527f9ca><img src="'+$e+'" alt="" data-v-7527f9ca></span></div>',1),vo={id:"popup"},ho={id:"pop"},_o={key:0},xo=C(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),wo={class:"mt-4"},Co={__name:"index",setup(E){let n=g(null);const ee=g(null),oe=g(null);g(null);const ae=g(null),S=g("370211");g(null);let _=R({arr:[],brr:[],crr:[]});R({arr:[]});const te=g({name:"",value:""});g([]);const re=g([]),P=g(!1);let O=g(!0),G=g(!0);g("{x:765,y:191}");let le=R({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}}]});Ze(()=>_.arr,e=>{console.log("val:",e)});var Q={title:[]};let q={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]};Fe(()=>{ie(),Me(),ne(),Le(),_e(),ue(),Ae(),Z(),we()});const he={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 _e(){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({...he})}),n.cesiumWidget.creditContainer.style.display="none",J("shuzisannong:huangdaoqu_town","tl"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),Ce(),Pe()}function U(e,o,t){e.forEach(a=>{let s=[];a[0].forEach(r=>{s.push(r[0]),s.push(r[1])}),n.entities.add({name:o,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(s),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:t?Cesium.Color.fromCssColorString(t):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function xe(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 we(){Y({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),re.value=e.data.features}).catch(e=>{})}let y=g({label:[]}),B="";function Ce(){var e=new Cesium.ScreenSpaceEventHandler(n.canvas);e.setInputAction(function(o){var t=n.camera.getPickRay(o.position),a=n.scene.globe.pick(t,n.scene);if(a){let s=Cesium.Cartographic.fromCartesian(a);if(s){let r=new Cesium.Cartesian2,d=n.camera.positionCartographic.height,c=xe(d);const p=n.imageryLayers._layers,m=p.findIndex(u=>u._imageryProvider._layers&&u._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(m>-1){const u=p[m];let f=u._imageryProvider;if(f&&f.ready&&f._layers&&u.show===!0){r=f.tilingScheme.positionToTileXY(s,c,r);let i=f.pickFeatures(r.x,r.y,c,s.longitude,s.latitude);i&&i.then(T=>{if(T.length>0){let x=T[0];if(x.properties&&x.properties.XZDM)if(B!==x.properties.XZDM){B=x.properties.XZDM,S.value=B,ce();let A=x.data;n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(A.bbox[0],A.bbox[1],A.bbox[2],A.bbox[3]),duration:2}),M("townLine"),U(A.geometry&&A.geometry.coordinates,"townLine","yellow"),v(["village_CQL"]),se(`XZDM=${x.properties.XZDM}`,"village_CQL");let W=n.entities._entities._array;for(var D=W.length-1;D>=0;D--)if(W[D]._name&&W[D]._name==="point"+x.properties.XZDM){let Be=W[D]._info;y.value=Be,console.log(y.value,"------------------"),$(o.position),n.scene.postRender.addEventListener(pe)}M("villageLine"),X=""}else Se(p,r,c,s);else v(["village_CQL"]),F()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let X="";function Se(e,o,t,a){const s=e.findIndex(r=>r._imageryProvider._layers&&r._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(s>-1){const r=e[s];let d=r._imageryProvider;if(d&&d.ready&&d._layers&&r.show===!0){o=d.tilingScheme.positionToTileXY(a,t,o);let c=d.pickFeatures(o.x,o.y,t,a.longitude,a.latitude);c&&c.then(p=>{if(p.length>0){let m=p[0];if(m.properties&&m.properties.XZQDM&&X!==m.properties.XZQDM){X=m.properties.XZQDM;let u=m.data;if(M("villageLine"),U(u.geometry&&u.geometry.coordinates,"villageLine","yellow"),m.properties.XZQDM==="370211104217"){const f=Cesium.Rectangle.fromDegrees(u.bbox[0],u.bbox[1],u.bbox[2],u.bbox[3]),i=Cesium.Rectangle.center(f);let T=Cesium.Math.toDegrees(i.longitude),D=Cesium.Math.toDegrees(i.latitude),x={lon:T,lat:D,...u.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}]};y.value=x}}}})}}}function se(e,o){let t=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}});t.customName=o,n.imageryLayers.addImageryProvider(t)}function v(e,o){if(n){const t=n.imageryLayers._layers;for(let a=t.length-1;a>=0;a--)e.forEach(s=>{t[a]._imageryProvider&&t[a]._imageryProvider.customName&&(o?t[a]._imageryProvider.customName.indexOf(s)>-1&&n.imageryLayers.remove(t[a]):t[a]._imageryProvider.customName===s&&n.imageryLayers.remove(t[a]))})}}function M(e){if(n){let t=n.entities._entities._array;for(var o=t.length-1;o>=0;o--)t[o]._name&&t[o]._name===e&&n.entities.remove(t[o])}}function ke(){if(O.value=!O.value,O.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 De(){if(G.value=!G.value,G.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 ie=()=>{ye({time:"2023-04-25",subregion:"1",parent:"\u9EC4\u5C9B\u533A"}).then(e=>{console.log(e)})},ne=()=>{Ve().then(e=>{_.arr=e.features,_.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let o=[...e.features],t=[];o.splice(0,1),o.forEach(a=>{t.push(a.properties.XZMC)}),Q.title=[...Object.values(t)],Z()})},Le=()=>{Oe().then(e=>{_.brr=e.features})},Me=()=>{Ge().then(e=>{_.crr=e.features,Q.title.forEach((o,t)=>{let a=e.features.map(s=>{if(o===s.properties.town)return s.properties});Object.keys(q).forEach(s=>{const r=a.findIndex(d=>d&&d.crop===s);r>-1?q[s].push(a[r].Shape_Area):q[s].push(null)})}),Z()})},ce=()=>{ie(),le.arr=[{name:"\u5C0F\u9EA6",value:20,itemStyle:{opacity:.5,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:10,itemStyle:{opacity:.5,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:13,itemStyle:{opacity:.5,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:18,itemStyle:{opacity:.5,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u8336\u53F6",value:16,itemStyle:{opacity:.5,color:"rgba(26, 255, 140, 1)"},label:{show:!0}}],S.value=="370211"&&(v(["village_CQL"]),v(["aaa"]),ne(),le=R({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}}]}),F());let e=[..._.arr];console.log("arr:",e),e.forEach(a=>{a.properties.XZDM==S.value&&n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),duration:2});let s=[..._.brr],r=[];s.forEach(d=>{d.properties.XZDM==S.value&&r.push(d.properties.XZQMC)}),Q.title=[...Object.values(r)]}),Z(),ue();const t=[..._.arr].find(a=>a.properties.XZDM===S.value);t&&(M("townLine"),U(t.geometry.coordinates,"townLine","yellow")),v(["aaa"]),se(`XZDM=${S.value}`,"aaa"),ye({time:"2023-04-26",subregion:"1",parent:"\u9EC4\u5C9B\u533A"}).then(a=>{let s=[];a.data.map((r,d)=>{r.region==t.properties.XZMC&&s.push({crop:r.type,Shape_Area:r.area})}),y.value={label:s},console.log(),console.log(s),$({x:642,y:312})})},j=e=>{Te(e)},Te=e=>{let o=document.createElement("a");o.style.display="none",o.href=e,document.body.appendChild(o),o.click(),document.body.removeChild(o)};function ue(){const e=H(ee.value);for(var o=[2,8,5,8,10,12,11],t=[1,7,2,7,9,11,10],a={chart0:{xcategory:["2017\u5E74","2018\u5E74","2019\u5E74","2020\u5E74","2021\u5E74","2022\u5E74","2023\u5E74"],low:o,lowLine:[]}},s={chart0:{xcategory:["2017\u5E74","2018\u5E74","2019\u5E74","2020\u5E74","2021\u5E74","2022\u5E74","2023\u5E74"],low:t,lowLine:[]}},r=[{coords:[]}],d=[{coords:[]}],c=0;c<a.chart0.xcategory.length;c++)r[0].coords.push([a.chart0.xcategory[c],o[c]]);for(var c=0;c<a.chart0.xcategory.length;c++)d[0].coords.push([s.chart0.xcategory[c],t[c]]);var p={tooltip:{trigger:"axis",axisPointer:{lineStyle:{color:"#15ecf4"}},backgroundColor:"rgba(0,0,0,.8)",extraCssText:"box-shadow: 4px 4px 10px rgba(21, 250, 255,.6);",formatter:function(m){var u=m[0].name+"<br>";return m.forEach(function(f){u+='<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'+f.color+'"></span>',parseFloat(f.data)>=50?u+=f.seriesName+': <span class="growth">'+f.data+"\u5428</span><br>":parseFloat(f.data)<50&&(u+=f.seriesName+': <span class="reduce">'+f.data+"\u5428</span><br>")}),u}},legend:{data:["\u6700\u5927\u503C","\u6700\u5C0F\u503C"],itemWidth:20,itemHeight:12.5,icon:"rect",textStyle:{fontSize:12,color:"rgb(0,253,255,0.6)"},top:"5%",right:"5%"},grid:{bottom:50,left:70,right:50},xAxis:{axisLine:{show:!0,lineStyle:{color:"#15faff"}},axisTick:{show:!1},axisLabel:{show:!0},data:["2017\u5E74","2018\u5E74","2019\u5E74","2020\u5E74","2021\u5E74","2022\u5E74","2023\u5E74"]},yAxis:{axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{type:"dashed",color:"#4b4d64"}},axisLabel:{formatter:"{value}",textStyle:{color:"#ffffff"}}},series:[{name:"\u6700\u5927\u503C",type:"line",symbol:"none",symbolSize:10,areaStyle:{normal:{color:new be(0,0,0,1,[{offset:0,color:"rgba(255, 204,1, .9)"},{offset:.8,color:"rgba(6, 8, 41,.1)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:"#ffcb00"}},data:o},{name:"\u6700\u5927\u503C",type:"lines",coordinateSystem:"cartesian2d",zlevel:1,polyline:!0,smooth:!0,symbol:"circle",effect:{show:!0,trailLength:.4,symbol:"circle",period:8,symbolSize:8},lineStyle:{normal:{color:"#ffcb00",width:0,opacity:0,curveness:0}},data:r},{name:"\u6700\u5C0F\u503C",type:"line",symbol:"none",symbolSize:10,areaStyle:{normal:{color:new be(0,0,0,1,[{offset:0,color:"rgba(21, 250, 255,.9)"},{offset:.8,color:"rgba(6, 8, 41,.1)"}],!1),shadowColor:"rgba(0, 0, 0, 0.1)",shadowBlur:10}},itemStyle:{normal:{color:"#15faff"}},data:t},{name:"\u6700\u5C0F\u503C",type:"lines",coordinateSystem:"cartesian2d",zlevel:1,smooth:!0,polyline:!0,symbol:"circle",effect:{show:!0,trailLength:.4,symbol:"circle",period:8,symbolSize:8},lineStyle:{normal:{color:"#15faff",width:0,opacity:0,curveness:0}},data:d}]};p&&e.setOption(p),window.addEventListener("resize",function(){e.resize()})}function Ae(){const e=H(oe.value);let t={tooltip:{trigger:"axis",axisPointer:{type:"shadow",textStyle:{color:"#fff"}}},calculable:!0,legend:{top:"7%",right:"5%",icon:"rect",textStyle:{color:"#fff"}},grid:{left:"15%",bottom:"16%",right:"2%"},xAxis:[{type:"category",axisLine:{lineStyle:{color:"rgba(255,255,255,.5)"}},splitLine:{show:!1},axisTick:{show:!1},splitArea:{show:!1},axisLabel:{interval:0,color:"rgba(255,255,255,0.7)",fontSize:14},data:["\u533A\u57DF\u4E00","\u533A\u57DF\u4E8C","\u533A\u57DF\u4E09","\u533A\u57DF\u56DB","\u533A\u57DF\u4E94","\u533A\u57DF\u516D"]}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",nameTextStyle:{color:"rgba(255,255,255,0.8)",fontSize:14,padding:[0,60,0,10]},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,color:"rgba(255,255,255,0.5)",fontSize:14},splitArea:{show:!1}}],series:[{name:"\u6700\u5927\u503C",type:"bar",barWidth:14,barGap:"85%",label:{show:!1,position:"top",fontSize:14,color:"rgba(255, 255, 255, 1)"},itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(242, 252, 252, 0.5)"},{offset:.5,color:"rgba(242, 252, 252, 0.3)"},{offset:1,color:"rgba(242, 252, 252, 0)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}},data:[709,1917,2455,2610,1719,1433]},{name:"\u6700\u5C0F\u503C",type:"bar",barWidth:14,barGap:"85%",label:{show:!1,position:"top",fontSize:14,color:"rgba(255, 255, 255, 1)"},itemStyle:{normal:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(143, 186, 243, 0.5)"},{offset:.5,color:"rgba(143, 186, 243, 0.3)"},{offset:1,color:"rgba(143, 186, 243, 0)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}},data:[300,500,700,400,600,1200]}]};e.on("click",function(a){console.log(a.name)}),e.on("click",a=>Ie(a)),t&&e.setOption(t,{notMerge:!0,grid:{bottom:20}}),ve(e,t)}function J(e,o){let t=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:e,parameters:{service:"WMS",format:"image/png",transparent:!0}});t.customName=o;let a=n.imageryLayers.addImageryProvider(t);o.indexOf("gbznt")>-1&&(n.imageryLayers.lowerToBottom(a),n.imageryLayers.raise(a))}function ze(){v(["gbznt"],!0),J("shuzisannong:huangdaoqu_town","tl"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),P.value=!1}function Ie(e){console.log("item:",e),v(["huangdaoqu_town"],!0),v(["tl"],!0);let o="shuzisannong:farmland",t=!1;const a=n.imageryLayers._layers;for(let r=a.length-1;r>=0;r--)a[r]&&a[r]._imageryProvider.customName&&a[r]._imageryProvider.customName===o+"gbznt"&&(t=!0);t||J(o,o+"gbznt"),re.value.forEach(r=>{console.log("it.properties.name:",r.properties.name),console.log("item.name:",e.name),r.properties.name===e.name&&(console.log("dingwei"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(r.bbox[0],r.bbox[1],r.bbox[2],r.bbox[3]),duration:2}))}),P.value=!0,y.value={label:[{crop:"\u5C0F\u9EA6",Shape_Area:"53000"},{crop:"\u5730\u74DC",Shape_Area:"50000"}]},console.log(y.label),$({x:642,y:312})}function Z(){const e=H(ae.value);ve(e,{tooltip:{trigger:"axis",axisPointer:{type:"shadow",textStyle:{color:"#fff"}}},calculable:!0,legend:{top:"7%",right:"5%",icon:"rect",textStyle:{color:"#fff"}},grid:{left:"15%",bottom:"16%",right:"2%"},xAxis:[{type:"category",axisLine:{lineStyle:{color:"rgba(255,255,255,.5)"}},splitLine:{show:!1},axisTick:{show:!1},splitArea:{show:!1},axisLabel:{interval:0,color:"rgba(255,255,255,0.7)",fontSize:14},data:["\u533A\u57DF\u4E00","\u533A\u57DF\u4E8C","\u533A\u57DF\u4E09","\u533A\u57DF\u56DB","\u533A\u57DF\u4E94","\u533A\u57DF\u516D"]}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",nameTextStyle:{color:"rgba(255,255,255,0.8)",fontSize:14,padding:[0,60,0,10]},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,color:"rgba(255,255,255,0.5)",fontSize:14},splitArea:{show:!1}}],series:[{name:"\u6700\u5927\u503C",type:"bar",barWidth:14,barGap:"85%",label:{show:!1,position:"top",fontSize:14,color:"rgba(255, 255, 255, 1)"},itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(4, 247, 227, 1)"},{offset:.8,color:"rgba(4, 247, 227, 0.5)"},{offset:1,color:"rgba(4, 247, 227, 0.0)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}},data:[709,1917,2455,2610,1719,1433]},{name:"\u6700\u5C0F\u503C",type:"bar",barWidth:14,barGap:"85%",label:{show:!1,position:"top",fontSize:14,color:"rgba(255, 255, 255, 1)"},itemStyle:{normal:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(33, 187, 251, 0.5)"},{offset:.5,color:"rgba(33, 187, 251, 0.3)"},{offset:1,color:"rgba(33, 187, 251, 0)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}},data:[300,500,700,400,600,1200]}]})}function Ee(){let e=de.value;console.log("fl:",e),Y({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson"}).then(o=>{console.log("res1111:",o),o.data.features.forEach((a,s)=>{const r=Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),d=Cesium.Rectangle.center(r);let c=Cesium.Math.toDegrees(d.longitude),p=Cesium.Math.toDegrees(d.latitude);a.properties.XZDM==="370211011"?(c=120.0863,p=35.941):a.properties.XZDM==="370211003"&&(c=120.243682,p=35.97123201);const m=e[a.properties.XZMC];let u=[];m&&(u=m.map((f,i)=>f.properties)),n.entities.add({name:"point"+a.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(c,p),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:u,...a.properties,lon:c,lat:p}})})}).catch(o=>{})}let de=g({});function Pe(){Y({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(e=>{let o=e.data.features,t={};o.forEach(a=>{let s=a.properties.town;t[s]?t[s].push(a):t[s]=[a]}),de.value=t,Ee()}).catch(e=>{})}function pe(){if(y.value&&y.value.lon&&y.value.lat){const o=Cesium.Cartesian3.fromDegrees(Number(y.value.lon),Number(y.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(n.scene,o);if(Cesium.defined(e)){const t=document.getElementById("pop");t.style.top=e.y-10+"px",t.style.left=e.x+10+"px"}}}function F(){B="",X="",v(["village_CQL"]),v(["aaa"]),M("villageLine"),M("townLine");const e=document.getElementById("pop");e.style.display="none",n.scene.postRender.removeEventListener(pe),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),v(["gbznt"],!0),P.value=!1}function $(e){console.log(e);const o=document.getElementById("pop");o.style.display="block",o.style.position="absolute",o.style.top=e.y-10+"px",o.style.left=e.x+10+"px",o.style.zIndex=99}return(e,o)=>{const t=h("ArrowRightBold"),a=h("el-icon"),s=h("el-option"),r=h("el-select"),d=h("ArrowLeftBold"),c=h("el-button"),p=h("el-checkbox"),m=h("el-checkbox-group"),u=h("el-collapse-item"),f=h("el-collapse");return L(),z("div",He,[Ke,l("div",eo,[l("div",oo,[l("div",ao,[to,l("p",{onClick:o[0]||(o[0]=i=>j("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx"))},[w(" \u4E0B\u8F7D \xA0 "),ro])]),lo,l("div",{ref_key:"areaDiv",ref:ee,class:"areaDiv"},null,512)]),l("div",{class:"leftFoldDiv",onClick:o[1]||(o[1]=i=>ke())},[b(a,null,{default:k(()=>[b(t)]),_:1})])]),l("div",so,[l("div",io,[l("div",no,[co,l("p",{onClick:o[2]||(o[2]=i=>j("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"))},[w(" \u4E0B\u8F7D \xA0 "),uo])]),l("div",{ref_key:"farmlandDiv",ref:oe,class:"farmlandDiv"},null,512),N(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",po,[l("div",fo,[mo,l("p",{onClick:o[3]||(o[3]=i=>j("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"))},[w(" \u4E0B\u8F7D \xA0 "),go])]),b(r,{"popper-class":"select_city",onChange:o[4]||(o[4]=i=>ce(e.item)),modelValue:S.value,"onUpdate:modelValue":o[5]||(o[5]=i=>S.value=i),clearable:"",placeholder:"\u5168\u90E8"},{default:k(()=>[(L(!0),z(fe,null,me(V(_).arr,i=>(L(),ge(s,{key:i.properties.XZDM,label:i.properties.XZMC,value:i.properties.XZDM},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:ae,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:o[6]||(o[6]=i=>De())},[b(a,null,{default:k(()=>[b(d)]),_:1})])]),l("div",yo,[b(Ye)]),bo,l("div",vo,[l("div",null,I(te.value.name)+"\uFF1A",1),l("div",null,I(te.value.value)+"\u4EA9",1),l("div",{class:"cancel",onClick:F},"X")]),l("div",ho,[(L(!0),z(fe,null,me(V(y).label,(i,T)=>(L(),z("div",{key:T},[l("div",null,I(i.crop)+"\uFF1A",1),l("div",null,I((i.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),V(y).XZQMC?(L(),z("div",_o,[xo,l("div",null,I(V(y).XZQMC),1)])):N("v-if",!0),l("div",{class:"cancel",onClick:F},"X")]),P.value?(L(),ge(c,{key:0,class:"back_button",onClick:o[7]||(o[7]=i=>ze())},{default:k(()=>[w("\u8FD4\u56DE")]),_:1})):N("v-if",!0),b(f,{class:"legend",accordion:""},{default:k(()=>[b(u,{name:"1"},{title:k(()=>[w("\u56FE\u4F8B")]),default:k(()=>[l("div",wo,[b(m,{modelValue:e.checkList,"onUpdate:modelValue":o[13]||(o[13]=i=>e.checkList=i),onChange:e.change},{default:k(()=>[N(` <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"
|
|
/> `),b(p,{style:{background:"rgba(255, 238, 204, 1)",border:"1px solid rgba(251, 171, 60, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":o[8]||(o[8]=i=>e.checked3=i),label:"0-200"},null,8,["modelValue"]),b(p,{style:{background:"rgba(255, 220, 153, 1)",border:"1px solid rgba(251, 219, 13, 1)",width:"100%"},modelValue:e.checked4,"onUpdate:modelValue":o[9]||(o[9]=i=>e.checked4=i),label:"200-400"},null,8,["modelValue"]),b(p,{style:{background:"rgba(255, 203, 102, 1)",border:"1px solid rgba(244, 218, 136, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":o[10]||(o[10]=i=>e.checked3=i),label:"400-600"},null,8,["modelValue"]),b(p,{style:{background:"rgba(255, 185, 51, 1)",border:"1px solid rgba(174, 83, 110, 1)",width:"100%"},modelValue:e.checked4,"onUpdate:modelValue":o[11]||(o[11]=i=>e.checked4=i),label:"600-800"},null,8,["modelValue"]),b(p,{style:{background:"rgba(255, 168, 0, 1)",border:"1px solid rgba(242, 177, 167, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":o[12]||(o[12]=i=>e.checked3=i),label:"800-1000"},null,8,["modelValue"])]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1})])}}},Ao=Xe(Co,[["__scopeId","data-v-7527f9ca"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/output/wheat/index.vue"]]);export{Ao as default};
|