Agriculture-front-end/dist/assets/Classify.c75ce280.js
2023-05-22 18:07:32 +08:00

2 lines
30 KiB
JavaScript

import{_ as et,r as h,B as Be,D as tt,C as ot,F as at,d as P,o as b,c as w,l,m as O,J as ie,K as le,x as A,Q as he,f as M,e as B,w as L,g as z,k as ye,y as rt,p as st,q as it}from"./index.5f349928.js";import ue from"./downloads.e955445d.js";import{_ as lt}from"./crops.d314ada0.js";import{_ as fe}from"./close1.45635d81.js";import{h as nt,g as ct,i as dt,a as ut,j as be,k as ft,l as pt,_ as mt,b as gt,c as ht,d as yt,e as bt,f as vt}from"./linesGL.badda9a7.js";import{i as ne,L as ce}from"./index.c9f5bd8b.js";import{T as _t}from"./TimeLine.ca858622.js";import{u as de}from"./useEcharts.f096c4b4.js";const v=H=>(st("data-v-076bbc79"),H=H(),it(),H),xt={class:"center"},wt=v(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),St={class:"leftWra"},Ct={class:"leftTop"},kt={class:"title"},Mt=v(()=>l("span",null,"\u4F5C\u7269\u5206\u7C7B\u9762\u79EF\u7EDF\u8BA1",-1)),Dt=v(()=>l("img",{src:ue,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Lt={class:"leftbottom"},zt={class:"title"},It=v(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1",-1)),Wt=v(()=>l("img",{src:ue,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Tt={class:"tableDiv"},Et=v(()=>l("img",{src:lt,alt:""},null,-1)),Rt={key:0,src:fe,alt:""},Bt={key:0,class:"imgrotate",src:fe,alt:""},Pt={class:"rightWra"},At={class:"rightTop"},Ft={class:"title"},Nt=v(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Xt=v(()=>l("img",{src:ue,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Zt={class:"rightbottom"},qt={class:"title"},Ot=v(()=>l("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),$t=v(()=>l("img",{src:ue,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Qt={key:0,src:fe,alt:""},Jt={key:0,class:"imgrotate",src:fe,alt:""},Vt={class:"mt-4"},jt={class:"bottom_center"},Gt=rt('<div class="tool" data-v-076bbc79><span data-v-076bbc79><img src="'+mt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+gt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+ht+'" 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></div><div id="pop" data-v-076bbc79></div>',2),Yt={id:"popup1"},Ut={class:"rowWra"},Ht=v(()=>l("span",null,"\u4F5C\u7269\uFF1A",-1)),Kt={class:"rowWra"},eo=v(()=>l("span",null,"\u9762\u79EF\uFF1A",-1)),to={class:"rowWra"},oo=v(()=>l("span",null,"\u9547\u540D\uFF1A",-1)),ao={key:0,class:"rowWra"},ro=v(()=>l("span",null,"\u6751\u540D\uFF1A",-1)),so={key:1,class:"rowWra"},io=v(()=>l("span",null,"\u571F\u5730\u6240\u6709\u4EBA\uFF1A",-1)),lo={__name:"Classify",setup(H){let p=h(null);const pe=h(null),ve=h(null),_e=h(null);h(null);const xe=h(null);let I=Be({arr:[],brr:[],crr:[]});const W=h("370211"),F=h({info:[]});let we=h([]);const me=h(!1);let N=h(!1),X=h(!1),Se=h([]),Ce=["\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A1","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A2","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A3","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A4","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A5","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A6","\u9AD8\u6807\u51C6\u519C\u7530\u7247\u533A7"],Z={\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 K=e=>{Pe(e)},Pe=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:[]},J={\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}},ee={\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"},V=[{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}}],j=Be({arr:[]});var te={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 $=h([]),G=h([]);tt(()=>{Ae()});function Ae(){Ye(),Y("\u9EC4\u5C9B\u533A"),Ge(),We(),je(),Ne(),U(),Ee(),Re(),se(),Ie(),$e(),Ue();for(const r in J)J[r].disabled!==!0&&(console.log(r),Se.value.push(r));oe.value=Se.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 Fe={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 Ne(){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({...Fe})}),p.cesiumWidget.creditContainer.style.display="none",p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),qe(),ae("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 oe=h(["false"]);function Xe(e){return e>48e6?0:e>24e6?1:e>12e6?2:e>6e6?3:e>3e6?4:e>15e5?5:e>75e4?6:e>375e3?7:e>187500?8:e>93750?9:e>46875?10:e>23437.5?11:e>11718.75?12:e>5859.38?13:e>2929.69?14:e>1464.84?15:e>732.42?16:e>366.21?17:18}function Ze(e,t){}ot(()=>oe.value,(e,t)=>{e.length>t.length?e.filter(o=>{if(t.findIndex(n=>n===o)<0)return o}).forEach(o=>{ee[o]&&ae(ee[o],o+"zuowu")}):e.length<t.length&&t.filter(o=>{if(e.findIndex(n=>n===o)<0)return o}).forEach(o=>{ee[o]&&k([o+"zuowu"])})});function ae(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 re="";function qe(){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,_=p.camera.positionCartographic.height,c=Xe(_);const m=p.imageryLayers._layers,u=m.findIndex(s=>s._imageryProvider._layers&&s._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(u>-1){const s=m[u];let d=s._imageryProvider;if(d&&d.ready&&d._layers&&s.show===!0){n=d.tilingScheme.positionToTileXY(a,c,n);let g=d.pickFeatures(n.x,n.y,c,a.longitude,a.latitude);g&&g.then(async x=>{if(x.length>0){let y=x[0];if(y.properties&&y.properties.XZDM)if(re!==y.properties.XZDM){re=y.properties.XZDM,W.value=re,Te();let S=y.data;p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(S.bbox[0],S.bbox[1],S.bbox[2],S.bbox[3]),duration:2}),q("townLine"),Me(S.geometry.coordinates,"townLine","red"),k(["village_CQL"]),De(`XZDM=${y.properties.XZDM}`,"village_CQL"),ge()}else ke(m,a,c,n,t);else k(["village_CQL"])}})}}else ke(m,a,c,n,t)}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}async function ke(e,t,r,o,a){let n=[],_=e.map(async u=>{if(u._imageryProvider._layers&&Object.values(ee).findIndex(s=>s===u._imageryProvider._layers)>-1){const s=u;let d=s._imageryProvider;if(d&&d.ready&&d._layers&&s.show===!0){o=d.tilingScheme.positionToTileXY(t,r,o);let g=d.pickFeatures(o.x,o.y,r,t.longitude,t.latitude);g&&await g.then(x=>{if(x.length>0){q("landtype"),Me(x[0].data.geometry.coordinates,"landtype","red");let y=x[0].properties;n.findIndex(f=>f&&f.crop===y.crop)<0&&n.push(y)}})}}});if(await Promise.all(_),n.length>0){const u=a.position;var c=p.scene.globe.ellipsoid,m=p.camera.pickEllipsoid(u,c);if(m){let s=c.cartesianToCartographic(m),d=Cesium.Math.toDegrees(s.longitude).toFixed(6),g=Cesium.Math.toDegrees(s.latitude).toFixed(6);F.value={info:n,lon:d,lat:g}}Oe(u),p.scene.postRender.addEventListener(Le)}else ge()}function Me(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 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 k(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 q(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 Le(){if(F.value&&F.value.lon&&F.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(F.value.lon),Number(F.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 ge(){const e=document.getElementById("popup1");e.style.display="none",p.scene.postRender.removeEventListener(Le),q("landtype")}function Oe(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 ze=h([]);function $e(){at({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),ze.value=e.data.features}).catch(e=>{})}function Qe(){W.value="370211",q("townLine"),k(["village_CQL"]),Y({divisions:"\u9EC4\u5C9B\u533A"}),k(["huangdaoqu_town"],!0),k(["shuzisannong:farmlandgbzn"],!0),ae("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town"),p.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),me.value=!1}function Je(){if(N.value=!N.value,N.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 Ve(){if(X.value=!X.value,X.value){let e=document.querySelector(".rightWra");e.style.transform="translate(0,0)"}else{let e=document.querySelector(".rightWra");e.style.transform="translate(107%,0)"}}const Ie=(e,t)=>nt({time:"2023-04-19",subregion:t,parent:e}).then(r=>r.data),We=()=>{ct().then(e=>{I.arr=e.features.sort((o,a)=>o.properties.XZMC.length-a.properties.XZMC.length),I.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)}),te.title=[...Object.values(r)],se()})},je=()=>{dt().then(e=>{I.brr=e.features})},Ge=()=>{ut().then(e=>{console.log("res:",e),I.crr=e.features,te.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(_=>_&&_.crop===a)>-1?T[a].push(1):T[a].push(null)})}),se()})},Ye=()=>{be().then(e=>{e.data.forEach(t=>{$.value.unshift((t.area/666.67).toFixed(2)),G.value.unshift(t.type)}),U()})},Y=e=>{j.arr=h([]),ft({divisions:e}).then(t=>{let r=[];t.data.forEach(o=>{for(let a=0;a<V.length;a++)if(o.type==V[a].name){V[a].area=o.area,V[a].value=1,console.log(o);for(const n in J)n==o.type&&r.push({type:o.type,content:{value:(o.area/666.67).toFixed(2),percent:(o.percentage*100).toFixed(2)+"%",color:J[n].color}});j.arr.push(V[a])}we.value=r}),Ee()})},Ue=()=>{pt().then(e=>{Ce.forEach((t,r)=>{let o=e.data.map(a=>{if(t===a.region)return a});Object.keys(Z).forEach(a=>{o.findIndex(_=>_&&_.type===a)>-1?Z[a].push(200):Z[a].push(0)})}),Re()})},Te=()=>{$=h([]),G=h([]),I.arr.forEach(t=>{t.properties.XZDM==W.value&&(Y(t.properties.XZMC),be({divisions:t.properties.XZMC}).then(r=>{r.data.forEach(o=>{$.value.unshift((o.area/666.67).toFixed(2)),G.value.unshift(o.type)}),U()}))}),W.value=="370211"&&(re=null,We(),be({divisions:"\u9EC4\u5C9B\u533A"}).then(t=>{t.data.forEach(r=>{$.value.unshift((r.area/666.67).toFixed(2)),G.value.unshift(r.type)}),U()}),q("townLine"),k(["village_CQL"]),Y({divisions:"\u9EC4\u5C9B\u533A"})),U(),[...I.arr].forEach(t=>{t.properties.XZDM==W.value&&(Ie(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=[...I.brr],o=[];r.forEach(a=>{a.properties.XZDM==W.value&&o.push(a.properties.XZQMC)}),te.title=[...Object.values(o)],se()}),k(["village_CQL"]),q("townLine"),De(`XZDM=${W.value}`,"village_CQL")};function U(){if(pe.value){const e=ne(pe.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:G.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:$.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:$.value,type:"pictorialBar",barMaxWidth:"20",symbolPosition:"end",symbol:"diamond",symbolOffset:[0,"-50%"],symbolSize:[30,12],zlevel:2}],tooltip:{show:!0,formatter:"\u9762\u79EF:{c0}"}};de(e,t)}}function Ee(){const e=ne(ve.value);let t="",r="",o="";console.log(j.arr);let a=_(j.arr,0);function n(c,m,u,s,d,g){const x=(c+m)/2,y=c*Math.PI*2,S=m*Math.PI*2,f=x*Math.PI*2;c===0&&m===1&&(u=!1),d=typeof d<"u"?d:1/3;const E=u?Math.cos(f)*.1:0,D=u?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(C,R){return C<y?E+Math.cos(y)*(1+Math.cos(R)*d)*Q:C>S?E+Math.cos(S)*(1+Math.cos(R)*d)*Q:E+Math.cos(C)*(1+Math.cos(R)*d)*Q},y(C,R){return C<y?D+Math.sin(y)*(1+Math.cos(R)*d)*Q:C>S?D+Math.sin(S)*(1+Math.cos(R)*d)*Q:D+Math.sin(C)*(1+Math.cos(R)*d)*Q},z(C,R){return C<-Math.PI*.5?Math.sin(C):C>Math.PI*2.5?Math.sin(C)*g*.1:Math.sin(R)>0?1*g*.1:-1}}}function _(c,m){const u=[];let s=0,d=0,g=0;const x=[],y=typeof m<"u"?(1-m)/(1+m):1/3;for(let f=0;f<c.length;f+=1){s+=c[f].value;const E={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:y}};if(typeof c[f].itemStyle<"u"){const{itemStyle:D}=c[f];typeof c[f].itemStyle.color<"u"&&(D.color=c[f].itemStyle.color),typeof c[f].itemStyle.opacity<"u"&&(D.opacity=c[f].itemStyle.opacity),E.itemStyle=D}u.push(E)}for(let f=0;f<u.length;f+=1)g=d+u[f].pieData.value,u[f].pieData.startRatio=d/s,u[f].pieData.endRatio=g/s,u[f].parametricEquation=n(u[f].pieData.startRatio,u[f].pieData.endRatio,!1,!1,y,u[f].pieData.value===u[0].pieData.value?35:10),d=g,x.push(u[f].name);return{legend:{show:!0,bottom:0,textStyle:{color:"rgba(255,255,255,.9)"}},tooltip:{formatter:f=>{if(f.seriesName!=="mouseoutSeries"){let E="";return j.arr.forEach(D=>{D.name==f.seriesName&&(E=D.area)}),`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${f.color};"></span>${f.seriesName}:${(Number(E)/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:u}}e.on("mouseover",function(c){let m,u,s,d,g,x;o!==c.seriesIndex&&(o!==""&&(m=a.series[o].pieStatus.selected,u=!1,s=a.series[o].pieData.startRatio,d=a.series[o].pieData.endRatio,g=a.series[o].pieStatus.k,x=a.series[o].pieData.value===a.series[0].pieData.value?35:10,a.series[o].parametricEquation=n(s,d,m,u,g,x),a.series[o].pieStatus.hovered=u,o=""),c.seriesName!=="mouseoutSeries"&&(m=a.series[c.seriesIndex].pieStatus.selected,u=!0,s=a.series[c.seriesIndex].pieData.startRatio,d=a.series[c.seriesIndex].pieData.endRatio,g=a.series[c.seriesIndex].pieStatus.k,a.series[c.seriesIndex].parametricEquation=n(s,d,m,u,g,a.series[c.seriesIndex].pieData.value+5),a.series[c.seriesIndex].pieStatus.hovered=u,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)}),de(e,a)}function Re(){const e=ne(_e.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:Ce},series:[{name:"\u5C0F\u9EA6",type:"bar",barWidth:12,stack:"stack",data:Z.\u5C0F\u9EA6,itemStyle:{normal:{barBorderRadius:0,color:new ce(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:Z.\u5927\u8C46,itemStyle:{normal:{barBorderRadius:0,color:new ce(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:Z.\u5730\u74DC,itemStyle:{normal:{barBorderRadius:0,color:new ce(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:Z.\u82B1\u751F,itemStyle:{normal:{barBorderRadius:0,color:new ce(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=>He(r)),de(e,t)}function He(e){console.log("item:",e),k(["huangdaoqu_town"],!0),k(["shuzisannong:huangdaoqu_town"]),q("townLine"),k(["village_CQL"]),Y({divisions:"\u9EC4\u5C9B\u533A"});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||ae(t,t+"gbznt",!0),ze.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}))}),me.value=!0}function se(){const e=ne(xe.value);console.log(T);var t={grid:{bottom:"8%",left:"10%",right:"6%",top:"6%",containLabel:!0},tooltip:{formatter:function(r){let o=0;return I.crr.forEach(a=>{a.properties.crop==r.seriesName&&a.properties.town==r.name&&(o=a.properties.Shape_Area)}),r.seriesName+'<span style="font-size: 14px; color: #f00;">'+(o/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:te.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=>Ke(r)),de(e,t)}function Ke(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const r=P("el-tooltip"),o=P("el-option"),a=P("el-select"),n=P("el-checkbox"),_=P("el-checkbox-group"),c=P("el-collapse-item"),m=P("el-collapse"),u=P("el-button");return b(),w("div",xt,[wt,l("div",St,[l("div",Ct,[l("div",kt,[Mt,l("p",{onClick:t[0]||(t[0]=s=>K("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_zuoshang.xlsx"))},[O(" \u4E0B\u8F7D \xA0 "),Dt])]),l("div",{ref_key:"areaDiv",ref:pe,class:"areaDiv"},null,512)]),l("div",Lt,[l("div",zt,[It,l("p",{onClick:t[1]||(t[1]=s=>K("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_zouxia.xlsx"))},[O(" \u4E0B\u8F7D \xA0 "),Wt])]),l("div",{ref_key:"typesofDiv",ref:ve,class:"typesofDiv"},null,512)]),l("div",Tt,[l("div",null,[(b(!0),w(ie,null,le(M(we),(s,d)=>(b(),w("div",{key:d,class:"Crops"},[l("div",null,[Et,O(" "+A(s.type),1)]),l("div",{style:he({color:s.content.color})},A(s.content.value)+"\u4EA9",5),l("div",{style:he({color:s.content.color})},A(s.content.percent),5)]))),128))])]),l("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=s=>Je())},[B(r,{disabled:M(N),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:L(()=>[z(' <el-icon v-if="!leftWraFlag"><ArrowRightBold /></el-icon> '),M(N)?z("v-if",!0):(b(),w("img",Rt))]),_:1},8,["disabled"]),B(r,{disabled:!M(N),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:L(()=>[z(' <el-icon v-if="leftWraFlag"><ArrowLeftBold /></el-icon> '),M(N)?(b(),w("img",Bt)):z("v-if",!0)]),_:1},8,["disabled"])])]),l("div",Pt,[l("div",At,[l("div",Ft,[Nt,l("p",{onClick:t[3]||(t[3]=s=>K("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_youshang.xlsx"))},[O(" \u4E0B\u8F7D \xA0 "),Xt])]),l("div",{ref_key:"farmlandDiv",ref:_e,class:"farmlandDiv"},null,512),z(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",Zt,[l("div",qt,[Ot,l("p",{onClick:t[4]||(t[4]=s=>K("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhifenlei_youxia.xlsx"))},[O(" \u4E0B\u8F7D \xA0 "),$t])]),B(a,{"popper-class":"select_city",onChange:t[5]||(t[5]=s=>Te(e.item)),modelValue:W.value,"onUpdate:modelValue":t[6]||(t[6]=s=>W.value=s),clearable:"",placeholder:"\u5168\u90E8"},{default:L(()=>[(b(!0),w(ie,null,le(M(I).arr,s=>(b(),ye(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:xe,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=s=>Ve())},[B(r,{disabled:!M(X),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:L(()=>[M(X)?(b(),w("img",Qt)):z("v-if",!0)]),_:1},8,["disabled"]),B(r,{disabled:M(X),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:L(()=>[M(X)?z("v-if",!0):(b(),w("img",Jt))]),_:1},8,["disabled"])])]),B(m,{class:"legend",accordion:""},{default:L(()=>[B(c,{name:"1"},{title:L(()=>[O("\u56FE\u4F8B")]),default:L(()=>[l("div",Vt,[B(_,{modelValue:oe.value,"onUpdate:modelValue":t[8]||(t[8]=s=>oe.value=s),onChange:Ze},{default:L(()=>[(b(!0),w(ie,null,le(M(J),(s,d,g)=>(b(),ye(n,{key:g,style:he({background:s.color,border:`1px solid ${s.color}`,width:"100%"}),"v-model":s.disabled,disabled:s.disabled,label:d},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),_:1}),l("div",jt,[B(_t)]),Gt,l("div",Yt,[(b(!0),w(ie,null,le(F.value.info,(s,d)=>(b(),w("div",{key:d},[l("div",Ut,[Ht,l("span",null,A(s.crop),1)]),l("div",Kt,[eo,l("span",null,A((s.Shape_Area/666.67).toFixed(2))+" \u4EA9",1)]),l("div",to,[oo,l("span",null,A(s.town),1)]),s.village?(b(),w("div",ao,[ro,l("span",null,A(s.village),1)])):z("v-if",!0),s.people?(b(),w("div",so,[io,l("span",null,A(s.people),1)])):z("v-if",!0)]))),128)),l("div",{class:"cancel",onClick:ge},"X")]),me.value?(b(),ye(u,{key:0,class:"back_button",onClick:t[9]||(t[9]=s=>Qe())},{default:L(()=>[O("\u8FD4\u56DE")]),_:1})):z("v-if",!0)])}}},yo=et(lo,[["__scopeId","data-v-076bbc79"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/classify/Classify.vue"]]);export{yo as default};