13 lines
22 KiB
JavaScript
13 lines
22 KiB
JavaScript
import{H as R,_ as We,r as p,A as Be,V as Re,X as J,d as N,o as _,c as C,l as n,m as V,e as m,w as x,f as v,g as k,x as F,L as Xe,N as Ze,k as Ue,y as Ge,p as qe,q as Qe}from"./index.9172db1d.js";import H from"./downloads.e955445d.js";import{_ as X}from"./close1.45635d81.js";import{_ as Je,a as Ye,b as $e,c as He,d as je,e as Ke}from"./linesGL.90f708a5.js";import{i as Y}from"./index.c9f5bd8b.js";import{T as et}from"./TimeLine.6ff87a01.js";import{u as $,w as tt}from"./xlsx.86b9426e.js";import{u as ce}from"./useEcharts.963c5809.js";import{d as at}from"./download.f7ec50f1.js";function fe(g){return R({url:"equipment/soybeanTotalYearValue",method:"get",params:g})}function pe(g){return R({url:"equipment/soybeanHeightStandardFarmland",method:"get",params:g})}function me(g){return R({url:"equipment/soybeanGetAllTowns",method:"get",params:g})}function ge(g){return R({url:"equipment/soybeanGetAllVillages",method:"get",params:g})}const L=g=>(qe("data-v-a678ffef"),g=g(),Qe(),g),ot={class:"center"},rt=L(()=>n("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),lt={class:"leftWra"},it={class:"leftTop"},st={class:"title"},nt=L(()=>n("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30",-1)),ut=L(()=>n("img",{src:H,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),dt={key:0,src:X,alt:""},ct={key:0,class:"imgrotate",src:X,alt:""},ft={class:"rightWra"},pt={class:"rightTop"},mt={class:"title"},gt=L(()=>n("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30-\u9AD8\u6807\u51C6\u519C\u7530",-1)),yt=L(()=>n("img",{src:H,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),vt={class:"rightbottom"},bt={class:"title"},ht=L(()=>n("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),_t=L(()=>n("img",{src:H,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),xt={key:0,src:X,alt:""},wt={key:0,class:"imgrotate",src:X,alt:""},St={class:"bottom_center"},Ct=Ge('<div class="tool" data-v-a678ffef><span data-v-a678ffef><img src="'+Je+'" alt="" data-v-a678ffef></span><span data-v-a678ffef><img src="'+Ye+'" alt="" data-v-a678ffef></span><span data-v-a678ffef><img src="'+$e+'" alt="" data-v-a678ffef></span><span data-v-a678ffef><img src="'+He+'" alt="" data-v-a678ffef></span><span data-v-a678ffef><img src="'+je+'" alt="" data-v-a678ffef></span><span data-v-a678ffef><img src="'+Ke+'" alt="" data-v-a678ffef></span></div>',1),kt={id:"popup"},Lt={id:"pop"},Dt={key:0},Tt=L(()=>n("div",null,"\u6751\u540D\uFF1A",-1)),At={class:"mt-4"},It={__name:"index",setup(g){let u=p(null);const j=p(null),K=p(null),ee=p(null),w=p("");let I=Be({arr:[],brr:[],crr:[]});const te=p({name:"",value:""}),ye=p([]),Z=p(!1);let D=p(!0),T=p(!0),ae=p([]),oe=p({}),U=p([]);Re(()=>{le(),Le(),ie(),be(),se(),q(),_e()});const ve={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 be(){u=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({...ve})}),u.cesiumWidget.creditContainer.style.display="none",ne("shuzisannong:huangdaoqu_town","tl"),u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),xe(),Fe()}function re(e,t,o){e.forEach(a=>{let l=[];a[0].forEach(r=>{l.push(r[0]),l.push(r[1])}),u.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(l),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:o?Cesium.Color.fromCssColorString(o):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function he(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 _e(){J({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),ye.value=e.data.features}).catch(e=>{})}let y=p({label:[]}),O="";function xe(){var e=new Cesium.ScreenSpaceEventHandler(u.canvas);e.setInputAction(function(t){var o=u.camera.getPickRay(t.position),a=u.scene.globe.pick(o,u.scene);if(a){let l=Cesium.Cartographic.fromCartesian(a);if(l){let r=new Cesium.Cartesian2,c=u.camera.positionCartographic.height,f=he(c);const i=u.imageryLayers._layers,s=i.findIndex(d=>d._imageryProvider._layers&&d._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(s>-1){const d=i[s];let b=d._imageryProvider;if(b&&b.ready&&b._layers&&d.show===!0){r=b.tilingScheme.positionToTileXY(l,f,r);let M=b.pickFeatures(r.x,r.y,f,l.longitude,l.latitude);M&&M.then(W=>{if(W.length>0){let h=W[0];if(h.properties&&h.properties.XZDM)if(O!==h.properties.XZDM){O=h.properties.XZDM,w.value=O,Te();let z=h.data;u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(z.bbox[0],z.bbox[1],z.bbox[2],z.bbox[3]),duration:2}),P("townLine"),re(z.geometry&&z.geometry.coordinates,"townLine","yellow"),S(["village_CQL"]),Se(`XZDM=${h.properties.XZDM}`,"village_CQL");let B=u.entities._entities._array;for(var A=B.length-1;A>=0;A--)if(B[A]._name&&B[A]._name==="point"+h.properties.XZDM){let Ee=B[A]._info;y.value=Ee,console.log(y.value,"------------------"),Oe(t.position),u.scene.postRender.addEventListener(de)}P("villageLine"),E=""}else we(i,r,f,l);else S(["village_CQL"]),Q()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let E="";function we(e,t,o,a){const l=e.findIndex(r=>r._imageryProvider._layers&&r._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(l>-1){const r=e[l];let c=r._imageryProvider;if(c&&c.ready&&c._layers&&r.show===!0){t=c.tilingScheme.positionToTileXY(a,o,t);let f=c.pickFeatures(t.x,t.y,o,a.longitude,a.latitude);f&&f.then(i=>{if(i.length>0){let s=i[0];if(s.properties&&s.properties.XZQDM&&E!==s.properties.XZQDM){E=s.properties.XZQDM;let d=s.data;if(P("villageLine"),re(d.geometry&&d.geometry.coordinates,"villageLine","yellow"),s.properties.XZQDM==="370211104217"){const b=Cesium.Rectangle.fromDegrees(d.bbox[0],d.bbox[1],d.bbox[2],d.bbox[3]),M=Cesium.Rectangle.center(b);let W=Cesium.Math.toDegrees(M.longitude),A=Cesium.Math.toDegrees(M.latitude),h={lon:W,lat:A,...d.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=h}}}})}}}function Se(e,t){let o=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:e}});o.customName=t,u.imageryLayers.addImageryProvider(o)}function S(e,t){if(u){const o=u.imageryLayers._layers;for(let a=o.length-1;a>=0;a--)e.forEach(l=>{o[a]._imageryProvider&&o[a]._imageryProvider.customName&&(t?o[a]._imageryProvider.customName.indexOf(l)>-1&&u.imageryLayers.remove(o[a]):o[a]._imageryProvider.customName===l&&u.imageryLayers.remove(o[a]))})}}function P(e){if(u){let o=u.entities._entities._array;for(var t=o.length-1;t>=0;t--)o[t]._name&&o[t]._name===e&&u.entities.remove(o[t])}}function Ce(){if(D.value=!D.value,D.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 ke(){if(T.value=!T.value,T.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 le=e=>{fe({divisions:e}).then(t=>{console.log(t.data),oe.value=t.data,Ne()})},Le=e=>{pe({divisions:e}).then(t=>{ae.value=t.data,se()})},ie=()=>{me().then(e=>{console.log(e.data),U.value=e.data,I.brr=JSON.parse(JSON.stringify(e.data)),I.arr=I.brr.sort((a,l)=>a.subName.length-l.subName.length),I.arr.unshift({subregion:"",subName:"\u5168\u90E8"});let t=[],o=[];I.arr.forEach(a=>{t.indexOf(a.subName)==-1&&(t.push(a.subName),o.push({subName:a.subName,subregion:a.subregion,area:a.area,type:a.type}))}),I.arr=o,q()})},De=e=>{ge({divisions:e}).then(t=>{U.value=t.data,q()})},Te=()=>{console.log(w.value),w.value==""?(ie(),S(["village_CQL"]),S(["aaa"])):De(w.value),le(w.value)},Ae=e=>{fe({divisions:w.value,whetherToDownload:!0}).then(t=>{at(t.data[t.data.length-1].excelPath)})},Ie=e=>{pe().then(t=>{G(t.data,"\u9AD8\u6807\u51C6\u519C\u7530","Sheet1")})},Me=e=>{w.value===""?me().then(t=>{G(t.data,"\u884C\u653F\u533A\u5212","Sheet1")}):ge({divisions:w.value}).then(t=>{G(t.data,"\u884C\u653F\u533A\u5212","Sheet1")})},ze=(e,t)=>e.map(a=>{const l={};for(const r in a)t[r]&&(l[t[r]]=a[r]);return l}),G=(e,t="\u7528\u6237\u5217\u8868",o="Sheet1")=>{const l=ze(e,{subName:"\u533A\u57DF\u540D\u79F0",wheatUnitOutputValue:"\u5355\u4EA7\u91CF(\u65A4/\u4EA9)",soybeanOutput:"\u603B\u4EA7\u91CF(\u5428)"}),r=$.json_to_sheet(l),c=$.book_new();$.book_append_sheet(c,r,o),tt(c,`${t}.xlsx`)};function Ne(){const e=Y(j.value);let t={title:["\u5355\u4EA7\u91CF","\u603B\u4EA7\u91CF"],xData:[],yData:[{data:[],name:"\u5355\u4EA7\u91CF",type:"line",yAxisIndex:0,smooth:!0,symbol:"circle",symbolSize:2},{data:[],name:"\u603B\u4EA7\u91CF",type:"line",yAxisIndex:1,smooth:!0,symbol:"circle",symbolSize:2}]};oe.value.forEach(l=>{t.xData.push(l.year),t.yData[0].data.push(l.soybean_UnitOutputValue),t.yData[1].data.push(l.soybeanOutput)});const o=(l,r=0)=>{let c=0;return l.forEach(s=>{s.yAxisIndex===r&&s.data.forEach(d=>{d===void 0||d===""||c<d&&(c=d)})}),Math.ceil(c/9.5)*10};let a={grid:{left:50,right:50,bottom:"14%",top:"22%"},color:["rgba(205, 92, 92, 1)","rgba(0, 191, 255, 1)"],tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{icon:"rect",textStyle:{color:"rgba(255, 255, 255, 0.7)"},data:t.title,top:40,x:"center"},xAxis:[{type:"category",data:t.xData,axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},axisTick:{show:!1},axisLabel:{textStyle:{color:"rgba(255, 255, 255, 0.7)"}},boundaryGap:!1}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",min:0,max:o(t.yData,0),interval:o(t.yData,0)/5,axisLabel:{formatter:"{value}"},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.8)",opacity:0}},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}}},{type:"value",name:"\u4EA7\u91CF(\u65A4/\u4EA9)",min:0,max:o(t.yData,1),interval:o(t.yData,1)/5,axisLabel:{formatter:"{value}"},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.8)",opacity:0}},axisTick:{show:!1},splitLine:{lineStyle:{opacity:0}}}],series:t.yData};a&&e.setOption(a),window.addEventListener("resize",function(){e.resize()})}function se(){const e=Y(K.value);let t=[],o=[],a=[];ae.value.forEach(r=>{console.log(r),t.push(r.subName),o.push(r.soybean_UnitOutputValue),a.push(r.soybeanOutput)});let l={tooltip:{trigger:"axis",formatter:function(r,c,f){for(var i=r[0].name,s=0,d=r.length;s<d;s++)r[s].seriesType==="line"?i+="<br/>"+r[s].seriesName+" : "+(r[s].value?r[s].value:"-")+"h":i+="<br/>"+r[s].seriesName+" : "+(r[s].value?r[s].value:"-");return i}},grid:{top:"15%",bottom:"15%",left:"15%",right:"15%"},legend:{data:["\u5355\u4EA7\u91CF","\u603B\u4EA7\u91CF"],textStyle:{color:"#fff",fontSize:12},type:"scroll",top:"3%"},xAxis:[{type:"category",nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,textStyle:{color:"rgba(255, 255, 255, 0.7)"}},splitLine:{show:!1},axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},axisPointer:{type:"shadow"},data:t}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",splitLine:{show:!0},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}},splitLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},min:0,position:"top"},{type:"value",name:"\u4EA7\u91CF(\u65A4/\u4EA9)",min:0,position:"bottom",splitLine:{show:!1},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}}}],series:[{name:"\u5355\u4EA7\u91CF",type:"bar",barWidth:"10%",yAxisIndex:0,data:o,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(242, 252, 252, 1)"},{offset:.8,color:"rgba(242, 252, 252, 0.2)"},{offset:1,color:"rgba(242, 252, 252, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}},{name:"\u603B\u4EA7\u91CF",type:"bar",yAxisIndex:1,barWidth:"10%",data:a,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(143, 186, 243,1)"},{offset:.8,color:"rgba(143, 186, 243, 0.2)"},{offset:1,color:"rgba(143, 186, 243, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}}]};l&&e.setOption(l,{notMerge:!0,grid:{bottom:20}}),ce(e,l)}function ne(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=u.imageryLayers.addImageryProvider(o);t.indexOf("gbznt")>-1&&(u.imageryLayers.lowerToBottom(a),u.imageryLayers.raise(a))}function Pe(){S(["gbznt"],!0),ne("shuzisannong:huangdaoqu_town","tl"),u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),Z.value=!1}function q(){const e=Y(ee.value);let t=[],o=[],a=[];U.value.forEach(r=>{console.log(),t.push(r.subName),o.push(r.soybean_UnitOutputValue),a.push(r.soybeanOutput)}),ce(e,{tooltip:{trigger:"axis",formatter:function(r,c,f){for(var i=r[0].name,s=0,d=r.length;s<d;s++)r[s].seriesType==="line"?i+="<br/>"+r[s].seriesName+" : "+(r[s].value?r[s].value:"-")+"h":i+="<br/>"+r[s].seriesName+" : "+(r[s].value?r[s].value:"-");return i}},grid:{top:"15%",bottom:"15%",left:"15%",right:"15%"},legend:{data:["\u5355\u4EA7\u91CF","\u603B\u4EA7\u91CF"],textStyle:{color:"#fff",fontSize:12},type:"scroll",top:"5%"},xAxis:[{type:"category",nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,textStyle:{color:"rgba(255, 255, 255, 0.7)"}},splitLine:{show:!1},axisTick:{show:!1},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},axisPointer:{type:"shadow"},data:t}],yAxis:[{type:"value",name:"\u4EA7\u91CF(\u5428)",splitLine:{show:!0},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}},splitLine:{lineStyle:{color:"rgba(255, 255, 255, 0.3)"}},min:0,position:"top"},{type:"value",name:"\u4EA7\u91CF(\u65A4/\u4EA9)",min:0,position:"bottom",splitLine:{show:!1},nameTextStyle:{fontSize:12},axisLabel:{fontSize:14,relativeSize:-2,formatter:"{value}"},axisLine:{lineStyle:{color:"#fff"}}}],series:[{name:"\u5355\u4EA7\u91CF",type:"bar",barWidth:"10%",yAxisIndex:0,data:o,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.2)"},{offset:1,color:"rgba(4, 247, 227, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}},{name:"\u603B\u4EA7\u91CF",type:"bar",yAxisIndex:1,barWidth:"10%",data:a,itemStyle:{normal:{barBorderRadius:2,color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(33, 187, 251, 1)"},{offset:.8,color:"rgba(33, 187, 251, 0.2)"},{offset:1,color:"rgba(33, 187, 251, 0.1)"}],global:!1},shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:10}}}]})}function Ve(){let e=ue.value;console.log("fl:",e),J({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,l)=>{const r=Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),c=Cesium.Rectangle.center(r);let f=Cesium.Math.toDegrees(c.longitude),i=Cesium.Math.toDegrees(c.latitude);a.properties.XZDM==="370211011"?(f=120.0863,i=35.941):a.properties.XZDM==="370211003"&&(f=120.243682,i=35.97123201);const s=e[a.properties.XZMC];let d=[];s&&(d=s.map((b,M)=>b.properties)),u.entities.add({name:"point"+a.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(f,i),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:f,lat:i}})})}).catch(t=>{})}let ue=p({});function Fe(){J({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 l=a.properties.town;o[l]?o[l].push(a):o[l]=[a]}),ue.value=o,Ve()}).catch(e=>{})}function de(){if(y.value&&y.value.lon&&y.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(y.value.lon),Number(y.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(u.scene,t);if(Cesium.defined(e)){const o=document.getElementById("pop");o.style.top=e.y-10+"px",o.style.left=e.x+10+"px"}}}function Q(){O="",E="",S(["village_CQL"]),S(["aaa"]),P("villageLine"),P("townLine");const e=document.getElementById("pop");e.style.display="none",u.scene.postRender.removeEventListener(de),u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),S(["gbznt"],!0),Z.value=!1}function Oe(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 o=N("el-tooltip"),a=N("el-button"),l=N("el-checkbox"),r=N("el-checkbox-group"),c=N("el-collapse-item"),f=N("el-collapse");return _(),C("div",ot,[rt,n("div",lt,[n("div",it,[n("div",st,[nt,n("p",{onClick:t[0]||(t[0]=i=>Ae())},[V(" \u4E0B\u8F7D \xA0 "),ut])]),n("div",{ref_key:"areaDiv",ref:j,class:"areaDiv"},null,512)]),n("div",{class:"leftFoldDiv",onClick:t[1]||(t[1]=i=>Ce())},[m(o,{class:"box-item","show-arrow":!1,disabled:v(D),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:x(()=>[v(D)?k("v-if",!0):(_(),C("img",dt))]),_:1},8,["disabled"]),m(o,{disabled:!v(D),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:x(()=>[v(D)?(_(),C("img",ct)):k("v-if",!0)]),_:1},8,["disabled"])])]),n("div",ft,[n("div",pt,[n("div",mt,[gt,n("p",{onClick:t[2]||(t[2]=i=>Ie())},[V(" \u4E0B\u8F7D \xA0 "),yt])]),n("div",{ref_key:"farmlandDiv",ref:K,class:"farmlandDiv"},null,512),k(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),n("div",vt,[n("div",bt,[ht,n("p",{onClick:t[3]||(t[3]=i=>Me())},[V(" \u4E0B\u8F7D \xA0 "),_t])]),n("div",{ref_key:"ASdivisionDiv",ref:ee,class:"ASdivision"},null,512)]),n("div",{class:"rightFoldDiv",onClick:t[4]||(t[4]=i=>ke())},[m(o,{disabled:!v(T),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:x(()=>[v(T)?(_(),C("img",xt)):k("v-if",!0)]),_:1},8,["disabled"]),m(o,{disabled:v(T),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:x(()=>[v(T)?k("v-if",!0):(_(),C("img",wt))]),_:1},8,["disabled"])])]),n("div",St,[m(et)]),Ct,n("div",kt,[n("div",null,F(te.value.name)+"\uFF1A",1),n("div",null,F(te.value.value)+"\u4EA9",1),n("div",{class:"cancel",onClick:Q},"X")]),n("div",Lt,[(_(!0),C(Xe,null,Ze(v(y).label,(i,s)=>(_(),C("div",{key:s},[n("div",null,F(i.crop)+"\uFF1A",1),n("div",null,F((i.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),v(y).XZQMC?(_(),C("div",Dt,[Tt,n("div",null,F(v(y).XZQMC),1)])):k("v-if",!0),n("div",{class:"cancel",onClick:Q},"X")]),Z.value?(_(),Ue(a,{key:0,class:"back_button",onClick:t[5]||(t[5]=i=>Pe())},{default:x(()=>[V("\u8FD4\u56DE")]),_:1})):k("v-if",!0),m(f,{class:"legend",accordion:""},{default:x(()=>[m(c,{name:"1"},{title:x(()=>[V("\u56FE\u4F8B")]),default:x(()=>[n("div",At,[m(r,{modelValue:e.checkList,"onUpdate:modelValue":t[11]||(t[11]=i=>e.checkList=i),onChange:e.change},{default:x(()=>[k(` <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(l,{style:{background:"rgba(255, 238, 204, 1)",border:"1px solid rgba(251, 171, 60, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":t[6]||(t[6]=i=>e.checked3=i),label:"0-200"},null,8,["modelValue"]),m(l,{style:{background:"rgba(255, 220, 153, 1)",border:"1px solid rgba(251, 219, 13, 1)",width:"100%"},modelValue:e.checked4,"onUpdate:modelValue":t[7]||(t[7]=i=>e.checked4=i),label:"200-400"},null,8,["modelValue"]),m(l,{style:{background:"rgba(255, 203, 102, 1)",border:"1px solid rgba(244, 218, 136, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":t[8]||(t[8]=i=>e.checked3=i),label:"400-600"},null,8,["modelValue"]),m(l,{style:{background:"rgba(255, 185, 51, 1)",border:"1px solid rgba(174, 83, 110, 1)",width:"100%"},modelValue:e.checked4,"onUpdate:modelValue":t[9]||(t[9]=i=>e.checked4=i),label:"600-800"},null,8,["modelValue"]),m(l,{style:{background:"rgba(255, 168, 0, 1)",border:"1px solid rgba(242, 177, 167, 1)",width:"100%"},modelValue:e.checked3,"onUpdate:modelValue":t[10]||(t[10]=i=>e.checked3=i),label:"800-1000"},null,8,["modelValue"])]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1})])}}},Bt=We(It,[["__scopeId","data-v-a678ffef"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/output/soybean/index.vue"]]);export{Bt as default};
|