13 lines
23 KiB
JavaScript
13 lines
23 KiB
JavaScript
import{H as R,_ as Xe,r as f,A as Ze,V as Ue,W as J,d as k,o as h,c as S,l as s,m as P,e as m,w as x,f as v,g as L,L as pe,N as fe,k as me,x as F,y as Ge,p as qe,q as Qe}from"./index.48137ccf.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.74a971ad.js";import{u as $,w as tt}from"./xlsx.86b9426e.js";import{u as ge}from"./useEcharts.5ac9cbca.js";import{d as at}from"./download.b1d8c1b6.js";function ve(g){return R({url:"equipment/cornTotalYearValue",method:"get",params:g})}function ye(g){return R({url:"equipment/cornHeightStandardFarmland",method:"get",params:g})}function be(g){return R({url:"equipment/cornGetAllTowns",method:"get",params:g})}function he(g){return R({url:"equipment/cornGetAllVillages",method:"get",params:g})}const D=g=>(qe("data-v-0ab5a17e"),g=g(),Qe(),g),ot={class:"center"},rt=D(()=>s("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),lt={class:"leftWra"},it={class:"leftTop"},nt={class:"title"},st=D(()=>s("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30",-1)),ut=D(()=>s("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:""},pt={class:"rightWra"},ft={class:"rightTop"},mt={class:"title"},gt=D(()=>s("span",null,"\u4F5C\u7269\u4EA7\u91CF\u9884\u4F30-\u9AD8\u6807\u51C6\u519C\u7530",-1)),vt=D(()=>s("img",{src:H,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),yt={class:"rightbottom"},bt={class:"title"},ht=D(()=>s("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),_t=D(()=>s("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-0ab5a17e><span data-v-0ab5a17e><img src="'+Je+'" alt="" data-v-0ab5a17e></span><span data-v-0ab5a17e><img src="'+Ye+'" alt="" data-v-0ab5a17e></span><span data-v-0ab5a17e><img src="'+$e+'" alt="" data-v-0ab5a17e></span><span data-v-0ab5a17e><img src="'+He+'" alt="" data-v-0ab5a17e></span><span data-v-0ab5a17e><img src="'+je+'" alt="" data-v-0ab5a17e></span><span data-v-0ab5a17e><img src="'+Ke+'" alt="" data-v-0ab5a17e></span></div>',1),kt={id:"popup"},Lt={id:"pop"},Dt={key:0},Tt=D(()=>s("div",null,"\u6751\u540D\uFF1A",-1)),At={class:"mt-4"},It={__name:"index",setup(g){let u=f(null);const j=f(null),K=f(null),ee=f(null),_=f("");let T=Ze({arr:[],brr:[],crr:[]});const te=f({name:"",value:""}),_e=f([]),Z=f(!1);let A=f(!0),I=f(!0),ae=f([]),oe=f({}),U=f([]);Ue(()=>{le(),Ie(),ie(),we(),se(),q(),Ce()});const xe={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 we(){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({...xe})}),u.cesiumWidget.creditContainer.style.display="none",ue("shuzisannong:huangdaoqu_town","tl"),u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),ke(),We()}function re(t,e,o){t.forEach(a=>{let i=[];a[0].forEach(r=>{i.push(r[0]),i.push(r[1])}),u.entities.add({name:e,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(i),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:o?Cesium.Color.fromCssColorString(o):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function Se(t){return t>48e6?0:t>24e6?1:t>12e6?2:t>6e6?3:t>3e6?4:t>15e5?5:t>75e4?6:t>375e3?7:t>187500?8:t>93750?9:t>46875?10:t>23437.5?11:t>11718.75?12:t>5859.38?13:t>2929.69?14:t>1464.84?15:t>732.42?16:t>366.21?17:18}function Ce(){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(t=>{console.log("\u519C\u7530\uFF1A",t),_e.value=t.data.features}).catch(t=>{})}let y=f({label:[]}),O="";function ke(){var t=new Cesium.ScreenSpaceEventHandler(u.canvas);t.setInputAction(function(e){var o=u.camera.getPickRay(e.position),a=u.scene.globe.pick(o,u.scene);if(a){let i=Cesium.Cartographic.fromCartesian(a);if(i){let r=new Cesium.Cartesian2,d=u.camera.positionCartographic.height,p=Se(d);const c=u.imageryLayers._layers,n=c.findIndex(l=>l._imageryProvider._layers&&l._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(n>-1){const l=c[n];let b=l._imageryProvider;if(b&&b.ready&&b._layers&&l.show===!0){r=b.tilingScheme.positionToTileXY(i,p,r);let M=b.pickFeatures(r.x,r.y,p,i.longitude,i.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,_.value=O,ne();let N=w.data;u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(N.bbox[0],N.bbox[1],N.bbox[2],N.bbox[3]),duration:2}),V("townLine"),re(N.geometry&&N.geometry.coordinates,"townLine","yellow"),C(["village_CQL"]),De(`XZDM=${w.properties.XZDM}`,"village_CQL");let B=u.entities._entities._array;for(var z=B.length-1;z>=0;z--)if(B[z]._name&&B[z]._name==="point"+w.properties.XZDM){let Re=B[z]._info;y.value=Re,console.log(y.value,"------------------"),Be(e.position),u.scene.postRender.addEventListener(ce)}V("villageLine"),E=""}else Le(c,r,p,i);else C(["village_CQL"]),Q()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let E="";function Le(t,e,o,a){const i=t.findIndex(r=>r._imageryProvider._layers&&r._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(i>-1){const r=t[i];let d=r._imageryProvider;if(d&&d.ready&&d._layers&&r.show===!0){e=d.tilingScheme.positionToTileXY(a,o,e);let p=d.pickFeatures(e.x,e.y,o,a.longitude,a.latitude);p&&p.then(c=>{if(c.length>0){let n=c[0];if(n.properties&&n.properties.XZQDM&&E!==n.properties.XZQDM){E=n.properties.XZQDM;let l=n.data;if(V("villageLine"),re(l.geometry&&l.geometry.coordinates,"villageLine","yellow"),n.properties.XZQDM==="370211104217"){const b=Cesium.Rectangle.fromDegrees(l.bbox[0],l.bbox[1],l.bbox[2],l.bbox[3]),M=Cesium.Rectangle.center(b);let W=Cesium.Math.toDegrees(M.longitude),z=Cesium.Math.toDegrees(M.latitude),w={lon:W,lat:z,...l.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=w}}}})}}}function De(t,e){let o=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:t}});o.customName=e,u.imageryLayers.addImageryProvider(o)}function C(t,e){if(u){const o=u.imageryLayers._layers;for(let a=o.length-1;a>=0;a--)t.forEach(i=>{o[a]._imageryProvider&&o[a]._imageryProvider.customName&&(e?o[a]._imageryProvider.customName.indexOf(i)>-1&&u.imageryLayers.remove(o[a]):o[a]._imageryProvider.customName===i&&u.imageryLayers.remove(o[a]))})}}function V(t){if(u){let o=u.entities._entities._array;for(var e=o.length-1;e>=0;e--)o[e]._name&&o[e]._name===t&&u.entities.remove(o[e])}}function Te(){if(A.value=!A.value,A.value){let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(0,0)")}else{let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(-107%,0)")}}function Ae(){if(I.value=!I.value,I.value){let t=document.querySelector(".rightWra");t.style.transform="translate(0,0)"}else{let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"}}const le=t=>{ve({divisions:t}).then(e=>{console.log(e.data),oe.value=e.data,Fe()})},Ie=t=>{ye({divisions:t}).then(e=>{ae.value=e.data,se()})},ie=()=>{be().then(t=>{U.value=t.data,T.brr=JSON.parse(JSON.stringify(t.data)),T.arr=T.brr.sort((a,i)=>a.subName.length-i.subName.length),T.arr.unshift({subregion:"",subName:"\u5168\u90E8"});let e=[],o=[];T.arr.forEach(a=>{e.indexOf(a.subName)==-1&&(e.push(a.subName),o.push({subName:a.subName,subregion:a.subregion,area:a.area,type:a.type}))}),T.arr=o,q()})},ze=t=>{he({divisions:t}).then(e=>{U.value=e.data,q()})},ne=()=>{console.log(_.value),_.value==""?(ie(),C(["village_CQL"]),C(["aaa"])):ze(_.value),le(_.value)},Me=t=>{ve({divisions:_.value,whetherToDownload:!0}).then(e=>{at(e.data[e.data.length-1].excelPath)})},Ne=t=>{ye().then(e=>{G(e.data,"\u9AD8\u6807\u51C6\u519C\u7530","Sheet1")})},Ve=t=>{_.value===""?be().then(e=>{G(e.data,"\u884C\u653F\u533A\u5212","Sheet1")}):he({divisions:_.value}).then(e=>{G(e.data,"\u884C\u653F\u533A\u5212","Sheet1")})},Pe=(t,e)=>t.map(a=>{const i={};for(const r in a)e[r]&&(i[e[r]]=a[r]);return i}),G=(t,e="\u7528\u6237\u5217\u8868",o="Sheet1")=>{const i=Pe(t,{subName:"\u533A\u57DF\u540D\u79F0",corn_UnitOutputValue:"\u5355\u4EA7\u91CF(\u65A4/\u4EA9)",cornOutput:"\u603B\u4EA7\u91CF(\u5428)"}),r=$.json_to_sheet(i),d=$.book_new();$.book_append_sheet(d,r,o),tt(d,`${e}.xlsx`)};function Fe(){const t=Y(j.value);let e={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(i=>{e.xData.push(i.year),e.yData[0].data.push(i.corn_UnitOutputValue),e.yData[1].data.push(i.cornOutput)});const o=(i,r=0)=>{let d=0;return i.forEach(n=>{n.yAxisIndex===r&&n.data.forEach(l=>{l===void 0||l===""||d<l&&(d=l)})}),Math.ceil(d/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:e.title,top:40,x:"center"},xAxis:[{type:"category",data:e.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(e.yData,0),interval:o(e.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(e.yData,1),interval:o(e.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:e.yData};a&&t.setOption(a),window.addEventListener("resize",function(){t.resize()})}function se(){const t=Y(K.value);let e=[],o=[],a=[];ae.value.forEach(r=>{console.log(r),e.push(r.subName),o.push(r.corn_UnitOutputValue),a.push(r.cornOutput)});let i={tooltip:{trigger:"axis",formatter:function(r,d,p){for(var c=r[0].name,n=0,l=r.length;n<l;n++)r[n].seriesType==="line"?c+="<br/>"+r[n].seriesName+" : "+(r[n].value?r[n].value:"-")+"h":c+="<br/>"+r[n].seriesName+" : "+(r[n].value?r[n].value:"-");return c}},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:e}],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}}}]};i&&t.setOption(i,{notMerge:!0,grid:{bottom:20}}),ge(t,i)}function ue(t,e){let o=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:t,parameters:{service:"WMS",format:"image/png",transparent:!0}});o.customName=e;let a=u.imageryLayers.addImageryProvider(o);e.indexOf("gbznt")>-1&&(u.imageryLayers.lowerToBottom(a),u.imageryLayers.raise(a))}function Oe(){C(["gbznt"],!0),ue("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 t=Y(ee.value);let e=[],o=[],a=[];U.value.forEach(r=>{console.log(),e.push(r.subName),o.push(r.corn_UnitOutputValue),a.push(r.cornOutput)}),ge(t,{tooltip:{trigger:"axis",formatter:function(r,d,p){for(var c=r[0].name,n=0,l=r.length;n<l;n++)r[n].seriesType==="line"?c+="<br/>"+r[n].seriesName+" : "+(r[n].value?r[n].value:"-")+"h":c+="<br/>"+r[n].seriesName+" : "+(r[n].value?r[n].value:"-");return c}},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:e}],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 Ee(){let t=de.value;console.log("fl:",t),J({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson"}).then(e=>{console.log("res1111:",e),e.data.features.forEach((a,i)=>{const r=Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),d=Cesium.Rectangle.center(r);let p=Cesium.Math.toDegrees(d.longitude),c=Cesium.Math.toDegrees(d.latitude);a.properties.XZDM==="370211011"?(p=120.0863,c=35.941):a.properties.XZDM==="370211003"&&(p=120.243682,c=35.97123201);const n=t[a.properties.XZMC];let l=[];n&&(l=n.map((b,M)=>b.properties)),u.entities.add({name:"point"+a.properties.XZDM,position:Cesium.Cartesian3.fromDegrees(p,c),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:l,...a.properties,lon:p,lat:c}})})}).catch(e=>{})}let de=f({});function We(){J({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(t=>{let e=t.data.features,o={};e.forEach(a=>{let i=a.properties.town;o[i]?o[i].push(a):o[i]=[a]}),de.value=o,Ee()}).catch(t=>{})}function ce(){if(y.value&&y.value.lon&&y.value.lat){const e=Cesium.Cartesian3.fromDegrees(Number(y.value.lon),Number(y.value.lat),0);var t=Cesium.SceneTransforms.wgs84ToWindowCoordinates(u.scene,e);if(Cesium.defined(t)){const o=document.getElementById("pop");o.style.top=t.y-10+"px",o.style.left=t.x+10+"px"}}}function Q(){O="",E="",C(["village_CQL"]),C(["aaa"]),V("villageLine"),V("townLine");const t=document.getElementById("pop");t.style.display="none",u.scene.postRender.removeEventListener(ce),u.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),C(["gbznt"],!0),Z.value=!1}function Be(t){console.log(t);const e=document.getElementById("pop");e.style.display="block",e.style.position="absolute",e.style.top=t.y-10+"px",e.style.left=t.x+10+"px",e.style.zIndex=99}return(t,e)=>{const o=k("el-tooltip"),a=k("el-option"),i=k("el-select"),r=k("el-button"),d=k("el-checkbox"),p=k("el-checkbox-group"),c=k("el-collapse-item"),n=k("el-collapse");return h(),S("div",ot,[rt,s("div",lt,[s("div",it,[s("div",nt,[st,s("p",{onClick:e[0]||(e[0]=l=>Me())},[P(" \u4E0B\u8F7D \xA0 "),ut])]),s("div",{ref_key:"areaDiv",ref:j,class:"areaDiv"},null,512)]),s("div",{class:"leftFoldDiv",onClick:e[1]||(e[1]=l=>Te())},[m(o,{class:"box-item","show-arrow":!1,disabled:v(A),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:x(()=>[v(A)?L("v-if",!0):(h(),S("img",dt))]),_:1},8,["disabled"]),m(o,{disabled:!v(A),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:x(()=>[v(A)?(h(),S("img",ct)):L("v-if",!0)]),_:1},8,["disabled"])])]),s("div",pt,[s("div",ft,[s("div",mt,[gt,s("p",{onClick:e[2]||(e[2]=l=>Ne())},[P(" \u4E0B\u8F7D \xA0 "),vt])]),s("div",{ref_key:"farmlandDiv",ref:K,class:"farmlandDiv"},null,512),L(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),s("div",yt,[s("div",bt,[ht,s("p",{onClick:e[3]||(e[3]=l=>Ve())},[P(" \u4E0B\u8F7D \xA0 "),_t])]),m(i,{"popper-class":"select_city",onChange:e[4]||(e[4]=l=>ne(t.item)),modelValue:_.value,"onUpdate:modelValue":e[5]||(e[5]=l=>_.value=l),placeholder:"\u5168\u90E8"},{default:x(()=>[(h(!0),S(pe,null,fe(v(T).arr,l=>(h(),me(a,{key:l.subregion,label:l.subName,value:l.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),s("div",{ref_key:"ASdivisionDiv",ref:ee,class:"ASdivision"},null,512)]),s("div",{class:"rightFoldDiv",onClick:e[6]||(e[6]=l=>Ae())},[m(o,{disabled:!v(I),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:x(()=>[v(I)?(h(),S("img",xt)):L("v-if",!0)]),_:1},8,["disabled"]),m(o,{disabled:v(I),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:x(()=>[v(I)?L("v-if",!0):(h(),S("img",wt))]),_:1},8,["disabled"])])]),s("div",St,[m(et)]),Ct,s("div",kt,[s("div",null,F(te.value.name)+"\uFF1A",1),s("div",null,F(te.value.value)+"\u4EA9",1),s("div",{class:"cancel",onClick:Q},"X")]),s("div",Lt,[(h(!0),S(pe,null,fe(v(y).label,(l,b)=>(h(),S("div",{key:b},[s("div",null,F(l.crop)+"\uFF1A",1),s("div",null,F((l.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]))),128)),v(y).XZQMC?(h(),S("div",Dt,[Tt,s("div",null,F(v(y).XZQMC),1)])):L("v-if",!0),s("div",{class:"cancel",onClick:Q},"X")]),Z.value?(h(),me(r,{key:0,class:"back_button",onClick:e[7]||(e[7]=l=>Oe())},{default:x(()=>[P("\u8FD4\u56DE")]),_:1})):L("v-if",!0),m(n,{class:"legend",accordion:""},{default:x(()=>[m(c,{name:"1"},{title:x(()=>[P("\u56FE\u4F8B")]),default:x(()=>[s("div",At,[m(p,{modelValue:t.checkList,"onUpdate:modelValue":e[13]||(e[13]=l=>t.checkList=l),onChange:t.change},{default:x(()=>[L(` <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(d,{style:{background:"rgba(255, 238, 204, 1)",border:"1px solid rgba(251, 171, 60, 1)",width:"100%"},modelValue:t.checked3,"onUpdate:modelValue":e[8]||(e[8]=l=>t.checked3=l),label:"0-200"},null,8,["modelValue"]),m(d,{style:{background:"rgba(255, 220, 153, 1)",border:"1px solid rgba(251, 219, 13, 1)",width:"100%"},modelValue:t.checked4,"onUpdate:modelValue":e[9]||(e[9]=l=>t.checked4=l),label:"200-400"},null,8,["modelValue"]),m(d,{style:{background:"rgba(255, 203, 102, 1)",border:"1px solid rgba(244, 218, 136, 1)",width:"100%"},modelValue:t.checked3,"onUpdate:modelValue":e[10]||(e[10]=l=>t.checked3=l),label:"400-600"},null,8,["modelValue"]),m(d,{style:{background:"rgba(255, 185, 51, 1)",border:"1px solid rgba(174, 83, 110, 1)",width:"100%"},modelValue:t.checked4,"onUpdate:modelValue":e[11]||(e[11]=l=>t.checked4=l),label:"600-800"},null,8,["modelValue"]),m(d,{style:{background:"rgba(255, 168, 0, 1)",border:"1px solid rgba(242, 177, 167, 1)",width:"100%"},modelValue:t.checked3,"onUpdate:modelValue":e[12]||(e[12]=l=>t.checked3=l),label:"800-1000"},null,8,["modelValue"])]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1})])}}},Bt=Xe(It,[["__scopeId","data-v-0ab5a17e"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/output/maize/index.vue"]]);export{Bt as default};
|