2 lines
30 KiB
JavaScript
2 lines
30 KiB
JavaScript
import{_ as lt,r as y,A as Pe,C as nt,B as ct,D as dt,d as E,o as v,c as S,l,m as J,I as oe,J as re,x as N,Q as ge,f as L,e as R,w as z,g as T,k as ye,y as ut,p as ft,q as pt}from"./index.b3a66a9e.js";import ne from"./downloads.e955445d.js";import{_ as mt}from"./crops.d314ada0.js";import{_ as ce}from"./close1.45635d81.js";import{_ as ht,a as gt,b as yt,c as bt,d as vt,e as _t}from"./linesGL.90f708a5.js";import{d as Z}from"./download.a6a18203.js";import{i as se,L as ie}from"./index.c9f5bd8b.js";import{T as xt}from"./TimeLine.6cac5abc.js";import{u as le}from"./useEcharts.83442be8.js";import{b as wt,g as Be,a as St,d as Re,e as Ee,f as Ne,c as Ae}from"./classify.ee69cc46.js";const _=Y=>(ft("data-v-076bbc79"),Y=Y(),pt(),Y),Ct={class:"center"},kt=_(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),Dt={class:"leftWra"},Mt={class:"leftTop"},Lt={class:"title"},It=_(()=>l("span",null,"\u4F5C\u7269\u5206\u7C7B\u9762\u79EF\u7EDF\u8BA1",-1)),Wt=_(()=>l("img",{src:ne,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),zt={class:"leftbottom"},Tt={class:"title"},Pt=_(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1",-1)),Bt=_(()=>l("img",{src:ne,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Rt={class:"tableDiv"},Et=_(()=>l("img",{src:mt,alt:""},null,-1)),Nt={key:0,src:ce,alt:""},At={key:0,class:"imgrotate",src:ce,alt:""},Ft={class:"rightWra"},Ot={class:"rightTop"},qt={class:"title"},$t=_(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Jt=_(()=>l("img",{src:ne,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Qt={class:"rightbottom"},Vt={class:"title"},Gt=_(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Xt=_(()=>l("img",{src:ne,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Zt={key:0,src:ce,alt:""},Yt={key:0,class:"imgrotate",src:ce,alt:""},jt={class:"mt-4"},Ht={class:"bottom_center"},Ut=ut('<div class="tool" data-v-076bbc79><span data-v-076bbc79><img src="'+ht+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+gt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+yt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+bt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+vt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+_t+'" alt="" data-v-076bbc79></span></div><div id="pop" data-v-076bbc79></div>',2),Kt={id:"popup1"},ea={class:"rowWra"},ta=_(()=>l("span",null,"\u4F5C\u7269\uFF1A",-1)),aa={class:"rowWra"},oa=_(()=>l("span",null,"\u9762\u79EF\uFF1A",-1)),ra={class:"rowWra"},sa=_(()=>l("span",null,"\u9547\u540D\uFF1A",-1)),ia={key:0,class:"rowWra"},la=_(()=>l("span",null,"\u6751\u540D\uFF1A",-1)),na={key:1,class:"rowWra"},ca=_(()=>l("span",null,"\u571F\u5730\u6240\u6709\u4EBA\uFF1A",-1)),da={__name:"Classify",setup(Y){let p=y(null);const de=y(null),be=y(null),ve=y(null);y(null);const _e=y(null);let I=Pe({arr:[],brr:[],crr:[]});const x=y("370211"),A=y({info:[]});let xe=y([]);const ue=y(!1);let F=y(!1),O=y(!1),we=y([]),Se=["\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A1.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A2.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A3.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A4.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A5.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A6.0","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A7.0"],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:[]};const Fe=e=>{Re({divisions:x.value,whetherToDownload:!0}).then(t=>{Z(t.data[t.data.length-1].downloadPath)})},Oe=e=>{Ee({divisions:x.value,whetherToDownload:!0}).then(t=>{Z(t.data[t.data.length-1].downloadPath)})},qe=e=>{Ne({divisions:x.value,whetherToDownload:!0}).then(t=>{Z(t.data[t.data.length-1].downloadPath)})},$e=e=>{x.value==="370211"?Be({divisions:x.value,whetherToDownload:!0}).then(t=>{Z(t.data[t.data.length-1].downloadPath)}):Ae({divisions:x.value,whetherToDownload:!0}).then(t=>{console.log(t),Z(t.data[t.data.length-1].downloadPath)})};let C={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]},V={\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}},j={\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"},G=[{name:"\u5C0F\u9EA6",value:0,itemStyle:{opacity:.8,color:"rgba(110, 209, 84, 0.9)"},area:""},{name:"\u82B1\u751F",area:"",value:0,itemStyle:{opacity:.8,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",area:"",value:156,itemStyle:{opacity:.8,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",area:"",value:156,itemStyle:{opacity:.8,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u84DD\u8393",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}},{name:"\u8336\u53F6",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}},{name:"\u5176\u4ED6",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}}],X=Pe({arr:[]});var H={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"]};let U=y([]),fe=y([]);nt(()=>{Je()});function Je(){Ie("370211"),ae("370211"),ot(),tt("370211"),Ve(),me(),ze(),Te(),he(),et(),je(),rt();for(const r in V)V[r].disabled!==!0&&(console.log(r),we.value.push(r));K.value=we.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 Qe={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 Ve(){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({...Qe})}),p.cesiumWidget.creditContainer.style.display="none",p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),Ze(),ee("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town");let e=Cesium.GeoJsonDataSource.load("http://121.36.229.60:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson",{fill:Cesium.Color.YELLOW.withAlpha(.01),strokeWidth:3,markerSymbol:"?",clampToGround:!0,outline:!0,outlineColor:Cesium.Color.BLACK});p.dataSources.add(e)}const K=y(["false"]);function Ge(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 Xe(e,t){}ct(()=>K.value,(e,t)=>{e.length>t.length?e.filter(a=>{if(t.findIndex(n=>n===a)<0)return a}).forEach(a=>{j[a]&&ee(j[a],a+"zuowu")}):e.length<t.length&&t.filter(a=>{if(e.findIndex(n=>n===a)<0)return a}).forEach(a=>{j[a]&&M([a+"zuowu"])})});function ee(e,t,r){let a=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:e,parameters:{service:"WMS",format:"image/png",transparent:!0}});a.customName=t;let o=p.imageryLayers.addImageryProvider(a);r&&(p.imageryLayers.lowerToBottom(o),p.imageryLayers.raise(o))}let te="";function Ze(){var e=new Cesium.ScreenSpaceEventHandler(p.canvas);e.setInputAction(async function(t){var r=p.camera.getPickRay(t.position),a=p.scene.globe.pick(r,p.scene);if(a){let o=Cesium.Cartographic.fromCartesian(a);if(o){let n=new Cesium.Cartesian2,m=p.camera.positionCartographic.height,d=Ge(m);const h=p.imageryLayers._layers,c=h.findIndex(s=>s._imageryProvider._layers&&s._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(c>-1){const s=h[c];let u=s._imageryProvider;if(u&&u.ready&&u._layers&&s.show===!0){n=u.tilingScheme.positionToTileXY(o,d,n);let g=u.pickFeatures(n.x,n.y,d,o.longitude,o.latitude);g&&g.then(async w=>{if(w.length>0){let b=w[0];if(b.properties&&b.properties.XZDM)if(te!==b.properties.XZDM){te=b.properties.XZDM,x.value=te,We();let k=b.data;p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(k.bbox[0],k.bbox[1],k.bbox[2],k.bbox[3]),duration:2}),$("townLine"),ke(k.geometry.coordinates,"townLine","red"),M(["village_CQL"]),De(`XZDM=${b.properties.XZDM}`,"village_CQL"),pe()}else Ce(h,o,d,n,t);else M(["village_CQL"])}})}}else Ce(h,o,d,n,t)}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}async function Ce(e,t,r,a,o){let n=[],m=e.map(async c=>{if(c._imageryProvider._layers&&Object.values(j).findIndex(s=>s===c._imageryProvider._layers)>-1){const s=c;let u=s._imageryProvider;if(u&&u.ready&&u._layers&&s.show===!0){a=u.tilingScheme.positionToTileXY(t,r,a);let g=u.pickFeatures(a.x,a.y,r,t.longitude,t.latitude);g&&await g.then(w=>{if(w.length>0){$("landtype"),ke(w[0].data.geometry.coordinates,"landtype","red");let b=w[0].properties;n.findIndex(f=>f&&f.crop===b.crop)<0&&n.push(b)}})}}});if(await Promise.all(m),n.length>0){const c=o.position;var d=p.scene.globe.ellipsoid,h=p.camera.pickEllipsoid(c,d);if(h){let s=d.cartesianToCartographic(h),u=Cesium.Math.toDegrees(s.longitude).toFixed(6),g=Cesium.Math.toDegrees(s.latitude).toFixed(6);A.value={info:n,lon:u,lat:g}}Ye(c),p.scene.postRender.addEventListener(Me)}else pe()}function ke(e,t,r){e.forEach(a=>{let o=[];a[0].forEach(n=>{o.push(n[0]),o.push(n[1])}),p.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(o),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:r?Cesium.Color.fromCssColorString(r):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function De(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 M(e,t){if(p){const r=p.imageryLayers._layers;for(let a=r.length-1;a>=0;a--)e.forEach(o=>{r[a]&&r[a]._imageryProvider&&r[a]._imageryProvider.customName&&(t?r[a]._imageryProvider.customName.indexOf(o)>-1&&p.imageryLayers.remove(r[a]):r[a]._imageryProvider.customName===o&&p.imageryLayers.remove(r[a]))})}}function $(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 Me(){if(A.value&&A.value.lon&&A.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(A.value.lon),Number(A.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 pe(){const e=document.getElementById("popup1");e.style.display="none",p.scene.postRender.removeEventListener(Me),$("landtype")}function Ye(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 Le=y([]);function je(){dt({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),Le.value=e.data.features}).catch(e=>{})}function He(){x.value="370211",$("townLine"),M(["village_CQL"]),ae("370211"),M(["huangdaoqu_town"],!0),M(["shuzisannong:farmlandgbzn"],!0),ee("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),ue.value=!1}function Ue(){if(F.value=!F.value,F.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 Ke(){if(O.value=!O.value,O.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 et=(e,t)=>wt({time:"2023-04-19",subregion:t,parent:e}).then(r=>r.data),tt=e=>{Be({divisions:e}).then(t=>{I.brr=t.data,I.arr=t.data.sort((m,d)=>m.streetName.length-d.streetName.length),I.arr.unshift({streetCode:"370211",streetName:"\u5168\u90E8"});let r=[],a=[];I.arr.forEach(m=>{r.indexOf(m.streetName)==-1&&(r.push(m.streetName),a.push({streetName:m.streetName,streetCode:m.streetCode,area:m.area,type:m.type}))}),I.arr=a;let o=[...t.data],n=[];o.splice(0,1),o.forEach(m=>{n.indexOf(m.streetName)==-1&&n.push(m.streetName)}),H.title=[...Object.values(n)],H.title.forEach((m,d)=>{let h=t.data.map(c=>{if(m===c.streetName)return c});Object.keys(C).forEach(c=>{h.findIndex(u=>u&&u.type===c)>-1?C[c].push(1):C[c].push(null)})}),he()})},at=e=>{Ae({divisions:e}).then(t=>{I.brr=t.features})},ot=()=>{St().then(e=>{console.log("res:",e),I.crr=e.features,H.title.forEach((t,r)=>{let a=e.features.map(o=>{if(t===o.properties.town)return o.properties});Object.keys(C).forEach(o=>{a.findIndex(m=>m&&m.crop===o)>-1?C[o].push(1):C[o].push(null)})}),he()})},Ie=e=>{Re({divisions:e}).then(t=>{t.data.forEach(r=>{U.value.unshift((r.area/666.67).toFixed(2)),fe.value.unshift(r.type)}),me()})},ae=e=>{X.arr=y([]),Ee({divisions:e}).then(t=>{let r=[];t.data.forEach(a=>{for(let o=0;o<G.length;o++)if(a.type==G[o].name){G[o].area=a.area,G[o].value=1;for(const n in V)n==a.type&&r.push({type:a.type,content:{value:(a.area/666.67).toFixed(2),percent:(a.percentage*100).toFixed(2)+"%",color:V[n].color}});X.arr.push(G[o])}xe.value=r}),ze()})},rt=()=>{Ne().then(e=>{console.log(e),Se.forEach((t,r)=>{let a=e.data.map(o=>{if(t===o.region)return o});Object.keys(q).forEach(o=>{a.findIndex(m=>m&&m.type===o)>-1?q[o].push(200):q[o].push(0)})}),Te()})},We=()=>{Ie("370211"),ae("370211"),U=y([]),fe=y([]),x.value=="370211"&&(te=null,$("townLine"),M(["village_CQL"])),at(x.value),me(),[...I.arr],M(["village_CQL"]),$("townLine"),De(`XZDM=${x.value}`,"village_CQL")};function me(){if(de.value){const e=se(de.value);let t={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:fe.value,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:U.value,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:!1,position:"top",distance:10,color:"#fff"}},{data:[1,1,1,1,1],type:"pictorialBar",barMaxWidth:"20",symbol:"diamond",symbolOffset:[0,"50%"],symbolSize:[30,15],tooltip:{show:!1}},{data:U.value,type:"pictorialBar",barMaxWidth:"20",symbolPosition:"end",symbol:"diamond",symbolOffset:[0,"-50%"],symbolSize:[30,12],zlevel:2}],tooltip:{show:!0,formatter:"\u9762\u79EF:{c0}"}};le(e,t)}}function ze(){const e=se(be.value);let t="",r="",a="";console.log(X.arr);let o=m(X.arr,0);function n(d,h,c,s,u,g){const w=(d+h)/2,b=d*Math.PI*2,k=h*Math.PI*2,f=w*Math.PI*2;d===0&&h===1&&(c=!1),u=typeof u<"u"?u:1/3;const P=c?Math.cos(f)*.1:0,W=c?Math.sin(f)*.1:0,Q=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(D,B){return D<b?P+Math.cos(b)*(1+Math.cos(B)*u)*Q:D>k?P+Math.cos(k)*(1+Math.cos(B)*u)*Q:P+Math.cos(D)*(1+Math.cos(B)*u)*Q},y(D,B){return D<b?W+Math.sin(b)*(1+Math.cos(B)*u)*Q:D>k?W+Math.sin(k)*(1+Math.cos(B)*u)*Q:W+Math.sin(D)*(1+Math.cos(B)*u)*Q},z(D,B){return D<-Math.PI*.5?Math.sin(D):D>Math.PI*2.5?Math.sin(D)*g*.1:Math.sin(B)>0?1*g*.1:-1}}}function m(d,h){const c=[];let s=0,u=0,g=0;const w=[],b=typeof h<"u"?(1-h)/(1+h):1/3;for(let f=0;f<d.length;f+=1){s+=d[f].value;const P={name:typeof d[f].name>"u"?`series${f}`:d[f].name,type:"surface",parametric:!0,wireframe:{show:!1},pieData:d[f],pieStatus:{selected:!1,hovered:!1,k:b}};if(typeof d[f].itemStyle<"u"){const{itemStyle:W}=d[f];typeof d[f].itemStyle.color<"u"&&(W.color=d[f].itemStyle.color),typeof d[f].itemStyle.opacity<"u"&&(W.opacity=d[f].itemStyle.opacity),P.itemStyle=W}c.push(P)}for(let f=0;f<c.length;f+=1)g=u+c[f].pieData.value,c[f].pieData.startRatio=u/s,c[f].pieData.endRatio=g/s,c[f].parametricEquation=n(c[f].pieData.startRatio,c[f].pieData.endRatio,!1,!1,b,c[f].pieData.value===c[0].pieData.value?35:10),u=g,w.push(c[f].name);return{legend:{show:!0,bottom:0,textStyle:{color:"rgba(255,255,255,.9)"}},tooltip:{formatter:f=>{if(f.seriesName!=="mouseoutSeries"){let P="";return X.arr.forEach(W=>{W.name==f.seriesName&&(P=W.area)}),`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${f.color};"></span>${f.seriesName}:${(Number(P)/666.67).toFixed(2)}\u4EA9`}return""}},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:c}}e.on("mouseover",function(d){let h,c,s,u,g,w;a!==d.seriesIndex&&(a!==""&&(h=o.series[a].pieStatus.selected,c=!1,s=o.series[a].pieData.startRatio,u=o.series[a].pieData.endRatio,g=o.series[a].pieStatus.k,w=o.series[a].pieData.value===o.series[0].pieData.value?35:10,o.series[a].parametricEquation=n(s,u,h,c,g,w),o.series[a].pieStatus.hovered=c,a=""),d.seriesName!=="mouseoutSeries"&&(h=o.series[d.seriesIndex].pieStatus.selected,c=!0,s=o.series[d.seriesIndex].pieData.startRatio,u=o.series[d.seriesIndex].pieData.endRatio,g=o.series[d.seriesIndex].pieStatus.k,o.series[d.seriesIndex].parametricEquation=n(s,u,h,c,g,o.series[d.seriesIndex].pieData.value+5),o.series[d.seriesIndex].pieStatus.hovered=c,a=d.seriesIndex),e.setOption(o))}),e.on("globalout",function(){if(a!==""){t=o.series[a].pieStatus.selected,r=!1;let d=o.series[a].pieStatus.k;startRatio=o.series[a].pieData.startRatio,endRatio=o.series[a].pieData.endRatio,i=o.series[a].pieData.value===o.series[0].pieData.value?35:10,o.series[a].parametricEquation=n(startRatio,endRatio,t,r,d,i),o.series[a].pieStatus.hovered=r,a=""}e.setOption(o)}),le(e,o)}function Te(){const e=se(ve.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:Se},series:[{name:"\u5C0F\u9EA6",type:"bar",barWidth:12,stack:"stack",data:q.\u5C0F\u9EA6,itemStyle:{normal:{barBorderRadius:0,color:new ie(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:q.\u5927\u8C46,itemStyle:{normal:{barBorderRadius:0,color:new ie(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:q.\u5730\u74DC,itemStyle:{normal:{barBorderRadius:0,color:new ie(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:q.\u82B1\u751F,itemStyle:{normal:{barBorderRadius:0,color:new ie(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=>st(r)),le(e,t)}function st(e){console.log("item:",e),M(["huangdaoqu_town"],!0),M(["shuzisannong:huangdaoqu_town"]),$("townLine"),M(["village_CQL"]),ae("370211");let t="shuzisannong:farmland",r=!1;const a=p.imageryLayers._layers;for(let n=a.length-1;n>=0;n--)a[n]&&a[n]._imageryProvider.customName&&a[n]._imageryProvider.customName===t+"gbznt"&&(r=!0);r||ee(t,t+"gbznt",!0),Le.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}))}),ue.value=!0}function he(){const e=se(_e.value);console.log(C);var t={grid:{bottom:"8%",left:"10%",right:"6%",top:"6%",containLabel:!0},tooltip:{formatter:function(r){let a=0;return I.crr.forEach(o=>{o.properties.crop==r.seriesName&&o.properties.town==r.name&&(a=o.properties.Shape_Area)}),r.seriesName+'<span style="font-size: 14px; color: #f00;">'+(a/666.67).toFixed(2)+"</span>\u4EA9"}},dataZoom:[{type:"slider",show:!1,zoomLock:!0,width:8,yAxisIndex:[0],bottom:30,top:20,right:10,startValue:0,endValue:4,handleIcon:"M-292,322.2c-3.2,0-6.4-0.6-9.3-1.9c-2.9-1.2-5.4-2.9-7.6-5.1s-3.9-4.8-5.1-7.6c-1.3-3-1.9-6.1-1.9-9.3c0-3.2,0.6-6.4,1.9-9.3c1.2-2.9,2.9-5.4,5.1-7.6s4.8-3.9,7.6-5.1c3-1.3,6.1-1.9,9.3-1.9c3.2,0,6.4,0.6,9.3,1.9c2.9,1.2,5.4,2.9,7.6,5.1s3.9,4.8,5.1,7.6c1.3,3,1.9,6.1,1.9,9.3c0,3.2-0.6,6.4-1.9,9.3c-1.2,2.9-2.9,5.4-5.1,7.6s-4.8,3.9-7.6,5.1C-285.6,321.5-288.8,322.2-292,322.2z",handleSize:"100%",handleStyle:{color:"#DBDBDB",height:"100%"},backgroundColor:"transparent",fillerColor:"#DBDBDB",textStyle:{color:"transparent"},dataBackground:{lineStyle:{color:"transparent"},areaStyle:{color:"transparent"}},borderColor:"transparent"},{type:"inside",id:"insideY",yAxisIndex:0,start:0,end:50,zoomOnMouseWheel:!1,moveOnMouseMove:!0,moveOnMouseWheel:!0}],xAxis:{type:"value",axisTick:{show:!1},axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:[{type:"category",axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#cdd3ee"}},splitLine:{show:!1},axisLabel:{show:!0,fontSize:12,color:"rgba(255, 255, 255, 1)",formatter:"{value}"},data:H.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:C.\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:C.\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:C.\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:C.\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:C.\u84DD\u8393}]};e.on("click",r=>it(r)),le(e,t)}function it(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const r=E("el-tooltip"),a=E("el-option"),o=E("el-select"),n=E("el-checkbox"),m=E("el-checkbox-group"),d=E("el-collapse-item"),h=E("el-collapse"),c=E("el-button");return v(),S("div",Ct,[kt,l("div",Dt,[l("div",Mt,[l("div",Lt,[It,l("p",{onClick:t[0]||(t[0]=s=>Fe())},[J(" \u4E0B\u8F7D \xA0 "),Wt])]),l("div",{ref_key:"areaDiv",ref:de,class:"areaDiv"},null,512)]),l("div",zt,[l("div",Tt,[Pt,l("p",{onClick:t[1]||(t[1]=s=>Oe())},[J(" \u4E0B\u8F7D \xA0 "),Bt])]),l("div",{ref_key:"typesofDiv",ref:be,class:"typesofDiv"},null,512)]),l("div",Rt,[l("div",null,[(v(!0),S(oe,null,re(L(xe),(s,u)=>(v(),S("div",{key:u,class:"Crops"},[l("div",null,[Et,J(" "+N(s.type),1)]),l("div",{style:ge({color:s.content.color})},N(s.content.value)+"\u4EA9",5),l("div",{style:ge({color:s.content.color})},N(s.content.percent),5)]))),128))])]),l("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=s=>Ue())},[R(r,{disabled:L(F),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:z(()=>[T(' <el-icon v-if="!leftWraFlag"><ArrowRightBold /></el-icon> '),L(F)?T("v-if",!0):(v(),S("img",Nt))]),_:1},8,["disabled"]),R(r,{disabled:!L(F),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:z(()=>[T(' <el-icon v-if="leftWraFlag"><ArrowLeftBold /></el-icon> '),L(F)?(v(),S("img",At)):T("v-if",!0)]),_:1},8,["disabled"])])]),l("div",Ft,[l("div",Ot,[l("div",qt,[$t,l("p",{onClick:t[3]||(t[3]=s=>qe())},[J(" \u4E0B\u8F7D \xA0 "),Jt])]),l("div",{ref_key:"farmlandDiv",ref:ve,class:"farmlandDiv"},null,512),T(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",Qt,[l("div",Vt,[Gt,l("p",{onClick:t[4]||(t[4]=s=>$e())},[J(" \u4E0B\u8F7D \xA0 "),Xt])]),R(o,{"popper-class":"select_city",onChange:t[5]||(t[5]=s=>We(e.item)),modelValue:x.value,"onUpdate:modelValue":t[6]||(t[6]=s=>x.value=s),clearable:"",placeholder:"\u5168\u90E8"},{default:z(()=>[(v(!0),S(oe,null,re(L(I).arr,s=>(v(),ye(a,{key:s.streetCode,label:s.streetName,value:s.streetCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:_e,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=s=>Ke())},[R(r,{disabled:!L(O),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:z(()=>[L(O)?(v(),S("img",Zt)):T("v-if",!0)]),_:1},8,["disabled"]),R(r,{disabled:L(O),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:z(()=>[L(O)?T("v-if",!0):(v(),S("img",Yt))]),_:1},8,["disabled"])])]),R(h,{class:"legend",accordion:""},{default:z(()=>[R(d,{name:"1"},{title:z(()=>[J("\u56FE\u4F8B")]),default:z(()=>[l("div",jt,[R(m,{modelValue:K.value,"onUpdate:modelValue":t[8]||(t[8]=s=>K.value=s),onChange:Xe},{default:z(()=>[(v(!0),S(oe,null,re(L(V),(s,u,g)=>(v(),ye(n,{key:g,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))]),_:1},8,["modelValue"])])]),_:1})]),_:1}),l("div",Ht,[R(xt)]),Ut,l("div",Kt,[(v(!0),S(oe,null,re(A.value.info,(s,u)=>(v(),S("div",{key:u},[l("div",ea,[ta,l("span",null,N(s.crop),1)]),l("div",aa,[oa,l("span",null,N((s.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]),l("div",ra,[sa,l("span",null,N(s.town),1)]),s.village?(v(),S("div",ia,[la,l("span",null,N(s.village),1)])):T("v-if",!0),s.people?(v(),S("div",na,[ca,l("span",null,N(s.people),1)])):T("v-if",!0)]))),128)),l("div",{class:"cancel",onClick:pe},"X")]),ue.value?(v(),ye(c,{key:0,class:"back_button",onClick:t[9]||(t[9]=s=>He())},{default:z(()=>[J("\u8FD4\u56DE")]),_:1})):T("v-if",!0)])}}},xa=lt(da,[["__scopeId","data-v-076bbc79"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/classify/Classify.vue"]]);export{xa as default};
|