47 lines
31 KiB
JavaScript
47 lines
31 KiB
JavaScript
import{_ as Ve,r as h,B as ee,D as $e,C as Je,F as Qe,d as R,o as y,c as S,l,m as N,e as W,w as M,g as k,f as D,G as fe,H as pe,k as me,S as Ge,x as V,y as je,p as Ye,q as He}from"./index.be11ec00.js";import re from"./downloads.e955445d.js";import{_ as se}from"./close1.45635d81.js";import{i as Ue,g as Ke,a as et,b as tt,_ as ot,c as at,d as rt,e as st,f as lt,h as it}from"./linesGL.7d091c0b.js";import{i as te,L as oe}from"./index.7fec779c.js";import{T as nt}from"./TimeLine.00a17ad7.js";import{u as ae}from"./useEcharts.7c77fa00.js";const v=$=>(Ye("data-v-076bbc79"),$=$(),He(),$),ct={class:"center"},dt=v(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),ut={class:"leftWra"},ft={class:"leftTop"},pt={class:"title"},mt=v(()=>l("span",null,"\u4F5C\u7269\u5206\u7C7B\u9762\u79EF\u7EDF\u8BA1",-1)),bt=v(()=>l("img",{src:re,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),gt={class:"leftbottom"},ht={class:"title"},yt=v(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1",-1)),vt=v(()=>l("img",{src:re,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),_t={key:0,src:se,alt:""},xt={key:0,class:"imgrotate",src:se,alt:""},wt={class:"rightWra"},St={class:"rightTop"},kt={class:"title"},Ct=v(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Mt=v(()=>l("img",{src:re,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Dt={class:"rightbottom"},It={class:"title"},zt=v(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Lt=v(()=>l("img",{src:re,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Wt={key:0,src:se,alt:""},Tt={key:0,class:"imgrotate",src:se,alt:""},Rt={class:"mt-4"},Bt={class:"bottom_center"},Pt=je('<div class="tool" data-v-076bbc79><span data-v-076bbc79><img src="'+ot+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+at+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+rt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+st+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+lt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+it+'" alt="" data-v-076bbc79></span></div><div id="pop" data-v-076bbc79></div>',2),Et={id:"popup1"},At={class:"rowWra"},qt=v(()=>l("span",null,"\u4F5C\u7269\uFF1A",-1)),Nt={class:"rowWra"},Ot=v(()=>l("span",null,"\u9762\u79EF\uFF1A",-1)),Ft={class:"rowWra"},Xt=v(()=>l("span",null,"\u9547\u540D\uFF1A",-1)),Zt={key:0,class:"rowWra"},Vt=v(()=>l("span",null,"\u6751\u540D\uFF1A",-1)),$t={key:1,class:"rowWra"},Jt=v(()=>l("span",null,"\u571F\u5730\u6240\u6709\u4EBA\uFF1A",-1)),Qt={__name:"Classify",setup($){let p=h(null);const le=h(null),be=h(null),ge=h(null);h(null);const he=h(null);let B=ee({arr:[],brr:[],crr:[]});const I=h("370211"),P=h({info:[]}),ie=h(!1);let E=h(!1),A=h(!1),ye=h([]);const J=e=>{De(e)},De=e=>{let t=document.createElement("a");t.style.display="none",t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)};let T={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]},ne={\u5C0F\u9EA6:{color:"rgba(255, 141, 26, 1)",disabled:!1},\u7389\u7C73:{color:"rgba(255, 255, 26, 1)",disabled:!0},\u5927\u8C46:{color:"rgba(255, 201, 148, 1)",disabled:!1},\u5730\u74DC:{color:"rgba(255, 84, 84, 1)",disabled:!1},\u82B1\u751F:{color:"rgba(255, 140, 255, 1)",disabled:!1},\u84DD\u8393:{color:"rgba(26, 255, 255, 1)",disabled:!1},\u8336\u53F6:{color:"rgba(26, 255, 140, 1)",disabled:!1},\u9A6C\u94C3\u85AF:{color:"rgba(255, 171, 87, 1)",disabled:!0},\u767D\u83DC\u548C\u841D\u535C:{color:"rgba(140, 255, 26, 1)",disabled:!0},\u5176\u4ED6:{color:"rgba(140, 26, 255, 1)",disabled:!1}},Q={\u5C0F\u9EA6:"shuzisannong:xiaomai",\u5927\u8C46:"shuzisannong:dadou",\u5730\u74DC:"shuzisannong:digua",\u82B1\u751F:"shuzisannong:huasheng",\u84DD\u8393:"shuzisannong:lanmei",\u8336\u53F6:"shuzisannong:chaye",\u5176\u4ED6:"shuzisannong:other"},ce=ee({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.8,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.8,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.8,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:156,itemStyle:{opacity:.8,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u84DD\u8393",value:56,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}}]});var G={title:["\u533A\u57DF\u4E00","\u533A\u57DF\u4E8C","\u533A\u57DF\u4E09","\u533A\u57DF\u56DB","\u533A\u57DF\u4E94","\u533A\u57DF\u516D","\u533A\u57DF\u4E03","\u533A\u57DF\u516B"],corn:[333.3,null,500,500,333.3,null,333.3,500],soybean:[333.3,null,null,null,333.3,null,333.3,null],peanut:[333.3,500,500,null,333.3,500,333.3,null],wheat:[null,500,null,500,null,500,null,null],Blueberries:[null,null,null,null,null,null,null,500]};let j=[302034,243990,42344,34234,304235];$e(()=>{Ie()});function Ie(){Oe(),Ce(),Ne(),Le(),ue(),Me(),Fe(),K(),ke(),Pe();for(const r in ne)ne[r].disabled!==!0&&(console.log(r),ye.value.push(r));Y.value=ye.value;let e=document.querySelector(".leftWra");e&&(e.style.transform="translate(-107%,0)");let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"}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 Le(){p=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})}),p.cesiumWidget.creditContainer.style.display="none",p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),Re(),H("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town")}const Y=h(["false"]);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 Te(e,t){}Je(()=>Y.value,(e,t)=>{e.length>t.length?e.filter(o=>{if(t.findIndex(n=>n===o)<0)return o}).forEach(o=>{Q[o]&&H(Q[o],o+"zuowu")}):e.length<t.length&&t.filter(o=>{if(e.findIndex(n=>n===o)<0)return o}).forEach(o=>{Q[o]&&z([o+"zuowu"])})});function H(e,t,r){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=p.imageryLayers.addImageryProvider(o);r&&(p.imageryLayers.lowerToBottom(a),p.imageryLayers.raise(a))}let U="";function Re(){var e=new Cesium.ScreenSpaceEventHandler(p.canvas);e.setInputAction(async function(t){var r=p.camera.getPickRay(t.position),o=p.scene.globe.pick(r,p.scene);if(o){let a=Cesium.Cartographic.fromCartesian(o);if(a){let n=new Cesium.Cartesian2,C=p.camera.positionCartographic.height,c=We(C);const m=p.imageryLayers._layers,d=m.findIndex(s=>s._imageryProvider._layers&&s._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(d>-1){const s=m[d];let u=s._imageryProvider;if(u&&u.ready&&u._layers&&s.show===!0){n=u.tilingScheme.positionToTileXY(a,c,n);let b=u.pickFeatures(n.x,n.y,c,a.longitude,a.latitude);b&&b.then(async _=>{if(_.length>0){let g=_[0];if(g.properties&&g.properties.XZDM)if(U!==g.properties.XZDM){U=g.properties.XZDM,I.value=U,Z();let x=g.data;p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(x.bbox[0],x.bbox[1],x.bbox[2],x.bbox[3]),duration:2}),X("townLine"),_e(x.geometry.coordinates,"townLine","red"),z(["village_CQL"]),xe(`XZDM=${g.properties.XZDM}`,"village_CQL"),de()}else ve(m,a,c,n,t);else z(["village_CQL"])}})}}else ve(m,a,c,n,t)}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}async function ve(e,t,r,o,a){let n=[],C=e.map(async d=>{if(d._imageryProvider._layers&&Object.values(Q).findIndex(s=>s===d._imageryProvider._layers)>-1){const s=d;let u=s._imageryProvider;if(u&&u.ready&&u._layers&&s.show===!0){o=u.tilingScheme.positionToTileXY(t,r,o);let b=u.pickFeatures(o.x,o.y,r,t.longitude,t.latitude);b&&await b.then(_=>{if(_.length>0){X("landtype"),_e(_[0].data.geometry.coordinates,"landtype","red");let g=_[0].properties;n.findIndex(f=>f&&f.crop===g.crop)<0&&n.push(g)}})}}});if(await Promise.all(C),n.length>0){const d=a.position;var c=p.scene.globe.ellipsoid,m=p.camera.pickEllipsoid(d,c);if(m){let s=c.cartesianToCartographic(m),u=Cesium.Math.toDegrees(s.longitude).toFixed(6),b=Cesium.Math.toDegrees(s.latitude).toFixed(6);P.value={info:n,lon:u,lat:b}}Be(d),p.scene.postRender.addEventListener(we)}else de()}function _e(e,t,r){e.forEach(o=>{let a=[];o[0].forEach(n=>{a.push(n[0]),a.push(n[1])}),p.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(a),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:r?Cesium.Color.fromCssColorString(r):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function xe(e,t){let r=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}});r.customName=t,p.imageryLayers.addImageryProvider(r)}function z(e,t){if(p){const r=p.imageryLayers._layers;for(let o=r.length-1;o>=0;o--)e.forEach(a=>{r[o]&&r[o]._imageryProvider&&r[o]._imageryProvider.customName&&(t?r[o]._imageryProvider.customName.indexOf(a)>-1&&p.imageryLayers.remove(r[o]):r[o]._imageryProvider.customName===a&&p.imageryLayers.remove(r[o]))})}}function X(e){if(p){let r=p.entities._entities._array;for(var t=r.length-1;t>=0;t--)r[t]._name&&r[t]._name===e&&p.entities.remove(r[t])}}function we(){if(P.value&&P.value.lon&&P.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(P.value.lon),Number(P.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(p.scene,t);if(Cesium.defined(e)){const r=document.getElementById("popup1");r.style.top=e.y-10+"px",r.style.left=e.x+10+"px"}}}function de(){const e=document.getElementById("popup1");e.style.display="none",p.scene.postRender.removeEventListener(we),X("landtype")}function Be(e){const t=document.getElementById("popup1");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}const Se=h([]);function Pe(){Qe({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),Se.value=e.data.features}).catch(e=>{})}function Ee(){I.value="370211",Z(),z(["huangdaoqu_town"],!0),z(["shuzisannong:farmlandgbzn"],!0),H("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),ie.value=!1}function Ae(){if(E.value=!E.value,E.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 qe(){if(A.value=!A.value,A.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 ke=(e,t)=>Ue({time:"2023-04-19",subregion:t,parent:e}).then(r=>r.data),Ce=()=>{Ke().then(e=>{B.arr=e.features,B.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let t=[...e.features],r=[];t.splice(0,1),t.forEach(o=>{r.push(o.properties.XZMC)}),G.title=[...Object.values(r)],K()})},Ne=()=>{et().then(e=>{B.brr=e.features})},Oe=()=>{tt().then(e=>{console.log("res:",e),B.crr=e.features,G.title.forEach((t,r)=>{let o=e.features.map(a=>{if(t===a.properties.town)return a.properties});Object.keys(T).forEach(a=>{o.findIndex(C=>C&&C.crop===a)>-1?T[a].push(1):T[a].push(null)})}),K(),Z()})},Z=()=>{ue(),I.value=="370211"?(U=null,Ce(),j=[302034,243990,42344,34234,304235],X("townLine"),z(["village_CQL"]),ce=ee({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.8,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.8,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.8,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:156,itemStyle:{opacity:.8,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u84DD\u8393",value:56,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}}]})):I.value&&(j=[102034,173990,22344,14234,104235],ce=ee({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.8,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.8,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.8,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:0,itemStyle:{opacity:.8,color:"rgba(27, 85, 222, 1)"},label:{show:!1}},{name:"\u84DD\u8393",value:156,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!1}}]})),Me(),ue(),[...B.arr].forEach(t=>{t.properties.XZDM==I.value&&(ke(t.properties.XZMC,"2"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(t.bbox[0],t.bbox[1],t.bbox[2],t.bbox[3]),duration:2}));let r=[...B.brr],o=[];r.forEach(a=>{a.properties.XZDM==I.value&&o.push(a.properties.XZQMC)}),G.title=[...Object.values(o)],K()}),z(["village_CQL"]),X("townLine"),xe(`XZDM=${I.value}`,"village_CQL")};function ue(){if(le.value){const e=te(le.value);ae(e,{textStyle:{color:"#c0c3cd",fontSize:14},toolbox:{show:!1,feature:{saveAsImage:{backgroundColor:"#031245"},restore:{}},iconStyle:{borderColor:"#c0c3cd"}},legend:{top:10,itemWidth:8,itemHeight:8,icon:"circle",left:"center",padding:0,textStyle:{color:"#c0c3cd",fontSize:14,padding:[2,0,0,0]},border:"1px solid rgba(4, 153, 153, 1)"},color:["#00D7E9","rgba(0, 215, 233, 0.9)"],grid:{containLabel:!0,left:20,right:20,bottom:10,top:40},xAxis:[{type:"category",data:["\u5C0F\u9EA6","\u82B1\u751F","\u5927\u8C46","\u5730\u74DC","\u84DD\u8393"],axisLine:{lineStyle:{color:"#C0C4CC",width:1}},axisTick:{show:!1},axisLabel:{margin:10,color:"rgba(255, 255, 255, 0.7)",textStyle:{fontSize:14}}}],yAxis:{nameTextStyle:{color:"#c0c3cd",padding:[0,0,0,0],fontSize:14},axisLabel:{color:"#c0c3cd",fontSize:14},axisTick:{lineStyle:{color:"#668092",width:1},show:!1},splitLine:{show:!0,lineStyle:{color:"rgba(255, 255, 255, 0.7)",type:"dashed"}},axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.7)",width:1},show:!1},name:"\u9762\u79EF(\u4EA9)"},series:[{data:j,type:"bar",barMaxWidth:"auto",barWidth:30,itemStyle:{color:{x:0,y:0,x2:0,y2:1,type:"linear",colorStops:[{offset:0,color:" rgba(0, 208, 255, 0.1)"},{offset:1,color:"rgba(0, 208, 255, 0.9) "}]},borderWidth:1,borderColor:"black"},label:{show:!0,position:"top",distance:10,color:"#fff"}},{data:[1,1,1,1,1],type:"pictorialBar",barMaxWidth:"20",symbol:"diamond",symbolOffset:[0,"50%"],symbolSize:[30,15]},{data:j,type:"pictorialBar",barMaxWidth:"20",symbolPosition:"end",symbol:"diamond",symbolOffset:[0,"-50%"],symbolSize:[30,12],zlevel:2}],tooltip:{show:!0,formatter:"\u9762\u79EF:{c0}"}})}}function Me(){const e=te(be.value);let t="",r="",o="",a=C(ce.arr,0);function n(c,m,d,s,u,b){const _=(c+m)/2,g=c*Math.PI*2,x=m*Math.PI*2,f=_*Math.PI*2;c===0&&m===1&&(d=!1),u=typeof u<"u"?u:1/3;const O=d?Math.cos(f)*.1:0,q=d?Math.sin(f)*.1:0,F=s?1.05:1;return{u:{min:-Math.PI,max:Math.PI*3,step:Math.PI/32},v:{min:0,max:Math.PI*2,step:Math.PI/20},x(w,L){return w<g?O+Math.cos(g)*(1+Math.cos(L)*u)*F:w>x?O+Math.cos(x)*(1+Math.cos(L)*u)*F:O+Math.cos(w)*(1+Math.cos(L)*u)*F},y(w,L){return w<g?q+Math.sin(g)*(1+Math.cos(L)*u)*F:w>x?q+Math.sin(x)*(1+Math.cos(L)*u)*F:q+Math.sin(w)*(1+Math.cos(L)*u)*F},z(w,L){return w<-Math.PI*.5?Math.sin(w):w>Math.PI*2.5?Math.sin(w)*b*.1:Math.sin(L)>0?1*b*.1:-1}}}function C(c,m){const d=[];let s=0,u=0,b=0;const _=[],g=typeof m<"u"?(1-m)/(1+m):1/3;for(let f=0;f<c.length;f+=1){s+=c[f].value;const O={name:typeof c[f].name>"u"?`series${f}`:c[f].name,type:"surface",parametric:!0,wireframe:{show:!1},pieData:c[f],pieStatus:{selected:!1,hovered:!1,k:g}};if(typeof c[f].itemStyle<"u"){const{itemStyle:q}=c[f];typeof c[f].itemStyle.color<"u"&&(q.color=c[f].itemStyle.color),typeof c[f].itemStyle.opacity<"u"&&(q.opacity=c[f].itemStyle.opacity),O.itemStyle=q}d.push(O)}console.log(d);for(let f=0;f<d.length;f+=1)b=u+d[f].pieData.value,d[f].pieData.startRatio=u/s,d[f].pieData.endRatio=b/s,d[f].parametricEquation=n(d[f].pieData.startRatio,d[f].pieData.endRatio,!1,!1,g,d[f].pieData.value===d[0].pieData.value?35:10),u=b,_.push(d[f].name);return{legend:{show:!0,bottom:0,textStyle:{color:"rgba(255,255,255,.9)"}},tooltip:{formatter:f=>f.seriesName!=="mouseoutSeries"?`${f.seriesName}<br/><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${f.color};"></span>`:""},xAxis3D:{min:-1,max:1},yAxis3D:{min:-1,max:1},zAxis3D:{min:-1,max:1},grid3D:{show:!1,boxHeight:10,top:"-10%",viewControl:{alpha:35,beta:30,rotateSensitivity:1,zoomSensitivity:0,panSensitivity:0,autoRotate:!0,distance:300},postEffect:{enable:!0,bloom:{enable:!0,bloomIntensity:.1},SSAO:{enable:!0,quality:"medium",radius:2}}},series:d}}e.on("mouseover",function(c){let m,d,s,u,b,_;o!==c.seriesIndex&&(o!==""&&(m=a.series[o].pieStatus.selected,d=!1,s=a.series[o].pieData.startRatio,u=a.series[o].pieData.endRatio,b=a.series[o].pieStatus.k,_=a.series[o].pieData.value===a.series[0].pieData.value?35:10,a.series[o].parametricEquation=n(s,u,m,d,b,_),a.series[o].pieStatus.hovered=d,o=""),c.seriesName!=="mouseoutSeries"&&(m=a.series[c.seriesIndex].pieStatus.selected,d=!0,s=a.series[c.seriesIndex].pieData.startRatio,u=a.series[c.seriesIndex].pieData.endRatio,b=a.series[c.seriesIndex].pieStatus.k,a.series[c.seriesIndex].parametricEquation=n(s,u,m,d,b,a.series[c.seriesIndex].pieData.value+5),a.series[c.seriesIndex].pieStatus.hovered=d,o=c.seriesIndex),e.setOption(a))}),e.on("globalout",function(){if(o!==""){t=a.series[o].pieStatus.selected,r=!1;let c=a.series[o].pieStatus.k;startRatio=a.series[o].pieData.startRatio,endRatio=a.series[o].pieData.endRatio,i=a.series[o].pieData.value===a.series[0].pieData.value?35:10,a.series[o].parametricEquation=n(startRatio,endRatio,t,r,c,i),a.series[o].pieStatus.hovered=r,o=""}e.setOption(a)}),ae(e,a)}function Fe(){const e=te(ge.value);let t={grid:{left:"3%",right:"4%",bottom:"3%",top:"10%",containLabel:!0},legend:{show:!0,top:"10",left:"center",textStyle:{color:"rgba(255,255,255,.9)"},itemWidth:20,itemHeight:12.5,icon:"stack"},xAxis:{type:"value",max:500,show:!1,axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",inverse:!0,splitLine:{show:!1},axisTick:{show:!1},axisLine:{show:!1},axisLabel:{interval:0,color:"rgba(255, 255, 255, 1)",fontSize:14},data:["\u7247\u533A1","\u7247\u533A2","\u7247\u533A3","\u7247\u533A4","\u7247\u533A5","\u7247\u533A6","\u7247\u533A7"]},series:[{name:"\u5C0F\u9EA6",type:"bar",barWidth:12,stack:"stack",data:[200,300,0,200,0,100,300],itemStyle:{normal:{barBorderRadius:0,color:new oe(0,0,.9,0,[{offset:1,color:"rgba(33, 187, 251, 0.9)"},{offset:0,color:"rgba(33, 187, 251, 0.05)"}])}}},{name:"\u5927\u8C46",type:"bar",barWidth:12,stack:"stack",data:[200,300,200,100,0,100,300],itemStyle:{normal:{barBorderRadius:0,color:new oe(0,0,.9,0,[{offset:1,color:"rgba(143, 186, 243, 0.9)"},{offset:0,color:"rgba(143, 186, 243, 0.05)"}])}}},{name:"\u5730\u74DC",type:"bar",barWidth:12,stack:"stack",data:[200,0,200,100,300,200,0],itemStyle:{normal:{barBorderRadius:0,color:new oe(0,0,.9,0,[{offset:1,color:"rgba(255, 225, 104, 1)"},{offset:0,color:"rgba(255, 225, 104, 0.05)"}])}}},{name:"\u82B1\u751F",type:"bar",barWidth:12,stack:"stack",data:[0,0,200,100,300,200,0],itemStyle:{normal:{barBorderRadius:0,color:new oe(0,0,.9,0,[{offset:1,color:"rgba(4, 247, 227, 0.9)"},{offset:0,color:"rgba(4, 247, 227, 0.25)"}])}}}]};e.on("click",r=>Xe(r)),ae(e,t)}function Xe(e){console.log("item:",e),z(["huangdaoqu_town"],!0),z(["shuzisannong:huangdaoqu_town"]),Z();let t="shuzisannong:farmland",r=!1;const o=p.imageryLayers._layers;for(let n=o.length-1;n>=0;n--)o[n]&&o[n]._imageryProvider.customName&&o[n]._imageryProvider.customName===t+"gbznt"&&(r=!0);r||H(t,t+"gbznt",!0),Se.value.forEach(n=>{console.log("it.properties.name:",n.properties.name),console.log("item.name:",e.name),n.properties.name===e.name&&(console.log("dingwei"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(n.bbox[0],n.bbox[1],n.bbox[2],n.bbox[3]),duration:2}))}),ie.value=!0}function K(){const e=te(he.value);var t={grid:{bottom:"8%",left:"10%",right:"6%",top:"6%",containLabel:!0},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:G.title,inverse:!0}],series:[{type:"bar",name:"\u7389\u7C73",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"\u7389\u7C73",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(4, 247, 227, 0.8)",color:{colorStops:[{offset:0,color:"rgba(4, 247, 227, 0.9)"},{offset:1,color:"rgba(4, 247, 227, 0.25)"}]}},data:T.\u7389\u7C73},{type:"bar",name:"\u5927\u8C46",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5927\u8C46",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(143, 186, 243, 0.8)",color:{colorStops:[{offset:0,color:"rgba(143, 186, 243, 0.9)"},{offset:1,color:"rgba(143, 186, 243, 0.3)"}]}},data:T.\u5927\u8C46},{type:"bar",name:"\u82B1\u751F",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u82B1\u751F",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(4, 247, 227, 0.9)",color:{colorStops:[{offset:0,color:"rgba(4, 247, 227, 0.9)"},{offset:1,color:"rgba(4, 247, 227, 0.25)"}]}},data:T.\u82B1\u751F},{type:"bar",name:"\u5C0F\u9EA6",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5C0F\u9EA6",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(33, 187, 251, 0.8)",color:{colorStops:[{offset:0,color:"rgba(33, 187, 251, 0.9)"},{offset:1,color:"rgba(33, 187, 251, 0.25)"}]}},data:T.\u5C0F\u9EA6},{type:"bar",name:"\u84DD\u8393",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u84DD\u8393",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(14, 223, 255, 0.8)",color:{colorStops:[{offset:0,color:"rgba(14, 223, 255, 0.9)"},{offset:1,color:"rgba(14, 223, 255, 0.25)"}]}},data:T.\u84DD\u8393}]};e.on("click",r=>Ze(r)),ae(e,t)}function Ze(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const r=R("el-tooltip"),o=R("el-option"),a=R("el-select"),n=R("el-checkbox"),C=R("el-checkbox-group"),c=R("el-collapse-item"),m=R("el-collapse"),d=R("el-button");return y(),S("div",ct,[dt,l("div",ut,[l("div",ft,[l("div",pt,[mt,l("p",{onClick:t[0]||(t[0]=s=>J("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_zuoshang.xlsx"))},[N(" \u4E0B\u8F7D \xA0 "),bt])]),l("div",{ref_key:"areaDiv",ref:le,class:"areaDiv"},null,512)]),l("div",gt,[l("div",ht,[yt,l("p",{onClick:t[1]||(t[1]=s=>J("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_zouxia.xlsx"))},[N(" \u4E0B\u8F7D \xA0 "),vt])]),l("div",{ref_key:"typesofDiv",ref:be,class:"typesofDiv"},null,512)]),l("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=s=>Ae())},[W(r,{disabled:D(E),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:M(()=>[k(' <el-icon v-if="!leftWraFlag"><ArrowRightBold /></el-icon> '),D(E)?k("v-if",!0):(y(),S("img",_t))]),_:1},8,["disabled"]),W(r,{disabled:!D(E),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:M(()=>[k(' <el-icon v-if="leftWraFlag"><ArrowLeftBold /></el-icon> '),D(E)?(y(),S("img",xt)):k("v-if",!0)]),_:1},8,["disabled"])])]),l("div",wt,[l("div",St,[l("div",kt,[Ct,l("p",{onClick:t[3]||(t[3]=s=>J("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_youshang.xlsx"))},[N(" \u4E0B\u8F7D \xA0 "),Mt])]),l("div",{ref_key:"farmlandDiv",ref:ge,class:"farmlandDiv"},null,512),k(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",Dt,[l("div",It,[zt,l("p",{onClick:t[4]||(t[4]=s=>J("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_youxia.xlsx"))},[N(" \u4E0B\u8F7D \xA0 "),Lt])]),W(a,{"popper-class":"select_city",onChange:t[5]||(t[5]=s=>Z(e.item)),modelValue:I.value,"onUpdate:modelValue":t[6]||(t[6]=s=>I.value=s),clearable:"",placeholder:"\u5168\u90E8"},{default:M(()=>[(y(!0),S(fe,null,pe(D(B).arr,s=>(y(),me(o,{key:s.properties.XZDM,label:s.properties.XZMC,value:s.properties.XZDM},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:he,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=s=>qe())},[W(r,{disabled:!D(A),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:M(()=>[D(A)?(y(),S("img",Wt)):k("v-if",!0)]),_:1},8,["disabled"]),W(r,{disabled:D(A),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:M(()=>[D(A)?k("v-if",!0):(y(),S("img",Tt))]),_:1},8,["disabled"])])]),W(m,{class:"legend",accordion:""},{default:M(()=>[W(c,{name:"1"},{title:M(()=>[N("\u56FE\u4F8B")]),default:M(()=>[l("div",Rt,[W(C,{modelValue:Y.value,"onUpdate:modelValue":t[8]||(t[8]=s=>Y.value=s),onChange:Te},{default:M(()=>[(y(!0),S(fe,null,pe(D(ne),(s,u,b)=>(y(),me(n,{key:b,style:Ge({background:s.color,border:`1px solid ${s.color}`,width:"100%"}),"v-model":s.disabled,disabled:s.disabled,label:u},null,8,["style","v-model","disabled","label"]))),128)),k(` <el-checkbox style="
|
|
background: rgba(251, 171, 60, 1);
|
|
border: 1px solid rgba(251, 171, 60, 1);
|
|
width: 100%;
|
|
" v-model="checked3" label="\u5C0F\u9EA6" />
|
|
<el-checkbox style="
|
|
background: rgba(251, 219, 13, 1);
|
|
border: 1px solid rgba(251, 219, 13, 1);
|
|
width: 100%;
|
|
" v-model="checked4" label="\u7389\u7C73" />
|
|
<el-checkbox style="
|
|
background: rgba(244, 218, 136, 1);
|
|
border: 1px solid rgba(244, 218, 136, 1);
|
|
width: 100%;
|
|
" v-model="checked3" label="\u5927\u8C46" />
|
|
<el-checkbox style="
|
|
background: rgba(174, 83, 110, 1);
|
|
border: 1px solid rgba(174, 83, 110, 1);
|
|
width: 100%;
|
|
" v-model="checked4" label="\u5730\u74DC" />
|
|
<el-checkbox style="
|
|
background: rgba(242, 177, 167, 1);
|
|
border: 1px solid rgba(242, 177, 167, 1);
|
|
width: 100%;
|
|
" v-model="checked3" label="\u82B1\u751F" />
|
|
<el-checkbox style="
|
|
background: rgba(50, 211, 235, 0.8);
|
|
border: 1px solid rgba(50, 211, 235, 1);
|
|
width: 100%;
|
|
" v-model="checked4" label="\u84DD\u8393" />
|
|
<el-checkbox style="
|
|
background: rgba(91, 196, 159, 1);
|
|
border: 1px solid rgba(91, 196, 159, 1);
|
|
width: 100%;
|
|
" v-model="checked3" label="\u8336\u53F6" />
|
|
<el-checkbox style="
|
|
background: rgba(225, 153, 75, 1);
|
|
border: 1px solid rgba(225, 153, 75, 1);
|
|
width: 100%;
|
|
" v-model="checked3" label="\u9A6C\u94C3\u85AF" />
|
|
<el-checkbox style="
|
|
background: rgba(166, 209, 82, 1);
|
|
border: 1px solid rgba(166, 209, 82, 1);
|
|
width: 100%;
|
|
" v-model="checked3" label="\u767D\u83DC\u548C\u841D\u535C" />
|
|
<el-checkbox style=" `),N(' background: rgba(175, 110, 250, 0.8); border: 1px solid rgba(175, 110, 250, 0.8); width: 100%; " v-model="checked3" label="\u5176\u4ED6" /> ')]),_:1},8,["modelValue"])])]),_:1})]),_:1}),l("div",Bt,[W(nt)]),Pt,l("div",Et,[(y(!0),S(fe,null,pe(P.value.info,(s,u)=>(y(),S("div",{key:u},[l("div",At,[qt,l("span",null,V(s.crop),1)]),l("div",Nt,[Ot,l("span",null,V((s.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]),l("div",Ft,[Xt,l("span",null,V(s.town),1)]),s.village?(y(),S("div",Zt,[Vt,l("span",null,V(s.village),1)])):k("v-if",!0),s.people?(y(),S("div",$t,[Jt,l("span",null,V(s.people),1)])):k("v-if",!0)]))),128)),l("div",{class:"cancel",onClick:de},"X")]),ie.value?(y(),me(d,{key:0,class:"back_button",onClick:t[9]||(t[9]=s=>Ee())},{default:M(()=>[N("\u8FD4\u56DE")]),_:1})):k("v-if",!0)])}}},to=Ve(Qt,[["__scopeId","data-v-076bbc79"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/classify/Classify.vue"]]);export{to as default};
|