Agriculture-front-end/dist/assets/Classify.08dd5195.js
2023-06-08 09:27:01 +08:00

2 lines
44 KiB
JavaScript

import{_ as Bt,r as y,A as Ye,U as Ke,V as Pt,W as Ot,d as P,o as w,c as E,l as n,m as R,L as j,N as J,x as V,F as Ie,f as b,e as C,w as k,g as T,k as A,G as et,C as tt,D as at,y as Rt,$ as At,p as Ft,q as Vt}from"./index.9ec53a6c.js";import ge from"./downloads.e955445d.js";import{_ as qt}from"./crops.d314ada0.js";import{_ as ve}from"./close1.45635d81.js";import{_ as $t,a as jt,b as Jt,c as Ht,d as Zt,e as Xt}from"./linesGL.90f708a5.js";import{_ as Qt}from"./dow.f37c8d82.js";import{d as Le}from"./download.77748578.js";import{i as K,L as be}from"./index.c9f5bd8b.js";import{T as Ut}from"./TimeLine.25f0d6b1.js";import{u as re}from"./useEcharts.ff70d170.js";import{a as ot,c as Gt,d as Ee,e as lt,f as rt,h as Yt,i as Kt,j as ea,b as it}from"./classify.266268d4.js";import{u as ze,w as ta}from"./xlsx.86b9426e.js";const z=ie=>(Ft("data-v-076bbc79"),ie=ie(),Vt(),ie),aa={class:"fatherDiv"},oa={class:"centerBox"},la=z(()=>n("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),ra={class:"leftWra"},ia={class:"leftTop"},sa={class:"title"},na=z(()=>n("span",null,"\u4F5C\u7269\u5206\u7C7B\u9762\u79EF\u7EDF\u8BA1",-1)),da=z(()=>n("img",{src:ge,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ca={class:"leftbottom"},ua={class:"title"},fa=z(()=>n("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1",-1)),pa=z(()=>n("img",{src:ge,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ha={class:"tableDiv"},ma=z(()=>n("img",{src:qt,alt:""},null,-1)),ba={key:0,src:ve,alt:""},ga={key:0,class:"imgrotate",src:ve,alt:""},va={class:"rightWra"},ya={class:"rightTop"},_a={class:"title"},xa=z(()=>n("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),wa=z(()=>n("img",{src:ge,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Sa={class:"rightbottom"},Ca={class:"title"},ka=z(()=>n("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Ma=z(()=>n("img",{src:ge,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Da={key:0,src:ve,alt:""},Na={key:0,class:"imgrotate",src:ve,alt:""},Wa={class:"mt-4"},Ia={class:"bottom_center"},La=Rt('<div class="tool" data-v-076bbc79><span data-v-076bbc79><img src="'+$t+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+jt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+Jt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+Ht+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+Zt+'" alt="" data-v-076bbc79></span><span data-v-076bbc79><img src="'+Xt+'" alt="" data-v-076bbc79></span></div><div id="pop" data-v-076bbc79></div>',2),Ea={id:"popup1"},za={class:"rowWra"},Ta=z(()=>n("span",null,"\u4F5C\u7269\uFF1A",-1)),Ba={class:"rowWra"},Pa=z(()=>n("span",null,"\u9762\u79EF\uFF1A",-1)),Oa={class:"rowWra"},Ra=z(()=>n("span",null,"\u9547\u540D\uFF1A",-1)),Aa={key:0,class:"rowWra"},Fa=z(()=>n("span",null,"\u6751\u540D\uFF1A",-1)),Va={key:1,class:"rowWra"},qa=z(()=>n("span",null,"\u571F\u5730\u6240\u6709\u4EBA\uFF1A",-1)),$a={class:"tabulation"},ja={class:"searchDiv"},Ja=z(()=>n("img",{src:Qt,alt:""},null,-1)),Ha={class:"tableBox"},Za={class:"tableBorder"},Xa=["onClick"],Qa=["onClick"],Ua={class:"example-pagination-block"},Ga={class:"chartMode"},Ya={__name:"Classify",setup(ie){let _=y(null);const ye=y(null),Te=y(null),Be=y(null),se=y(null),Pe=y(null);let B=Ye({arr:[],brr:[],crr:[]}),_e=y([]);const W=y("370211"),H=y({info:[]});let Oe=y([]);const Re=y(!1);let Z=y(!1),X=y(!1),F=y(!0),Q=y(1),q=y(14);const U=y([]);let Ae=y([]),xe=y([]),G=y(!0),Fe=["\u9AD8\u6807\u51C6\u519C\u75301.0","\u9AD8\u6807\u51C6\u519C\u75302.0","\u9AD8\u6807\u51C6\u519C\u75303.0","\u9AD8\u6807\u51C6\u519C\u75304.0","\u9AD8\u6807\u51C6\u519C\u75305.0","\u9AD8\u6807\u51C6\u519C\u75306.0","\u9AD8\u6807\u51C6\u519C\u75307.0"],ee={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]},S=y({yearMonth:"",flag:"2",divisions:""}),ne=y([]);Ke(()=>F.value,(e,t)=>{e?window.document.querySelector(".tableBox").style.height="90%":window.document.querySelector(".tableBox").style.height="83%"});const we=()=>{if(!S.value.yearMonth){At.error("\u8BF7\u9009\u62E9\u65F6\u95F4");return}let e=[],t=[];ea({yearMonth:S.value.yearMonth,flag:S.value.flag===""?0:S.value.flag,divisions:S.value.divisions}).then(l=>{if(ne.value=[{region:"\u9AD8\u6807\u51C6\u519C\u7530",\u5176\u4ED6:l.data[l.data.length-1].otherSum,\u5730\u74DC:l.data[l.data.length-1].sweetPotatoSum,\u5927\u8C46:l.data[l.data.length-1].soyBeanSum,\u5C0F\u9EA6:l.data[l.data.length-1].wheatSum,\u82B1\u751F:l.data[l.data.length-1].peanutSum,\u8336\u53F6:l.data[l.data.length-1].teaSum,\u84DD\u8393:l.data[l.data.length-1].blueberrySum,\u5408\u8BA1:"\u5408\u8BA1"}],S.value.flag=="1")S.value.divisions="",ae.value=[{lable:"\u533A\u57DF\u540D\u79F0",value:"region"},{lable:"\u5C0F\u9EA6",value:"\u5C0F\u9EA6"},{lable:"\u7389\u7C73",value:"\u7389\u7C73"},{lable:"\u5927\u8C46",value:"\u5927\u8C46"},{lable:"\u5730\u74DC",value:"\u5730\u74DC"},{lable:"\u82B1\u751F",value:"\u82B1\u751F"},{lable:"\u84DD\u8393",value:"\u84DD\u8393"},{lable:"\u8336\u53F6",value:"\u8336\u53F6"},{lable:"\u9A6C\u94C3\u85AF",value:"\u9A6C\u94C3\u85AF"},{lable:"\u767D\u83DC\u548C\u841D\u535C",value:"\u767D\u83DC\u548C\u841D\u535C"},{lable:"\u5176\u4ED6",value:"\u5176\u4ED6"}],l.data.forEach(r=>{e.indexOf(r.region)==-1&&e.push(r.region)}),e.forEach(r=>{t.push(Object.create(null,{regio:{value:r}}))}),t.forEach(r=>{l.data.map(c=>{r.regio===c.region&&(r.region=c.region,r[c.name]=c.area)})}),F.value=!1;else if(S.value.flag=="2"){let r=[],c=[];Ee({divisions:S.value.divisions?S.value.divisions:"370211"}).then(d=>{d.data.forEach(h=>{r.indexOf(h.tomeName)==-1&&r.push(h.tomeName)}),r.forEach(h=>{c.push(Object.create(null,{regio:{value:h}}))}),c.forEach(h=>{d.data.map(u=>{h.regio===u.tomeName&&(h.region=u.tomeName,h[u.name]=u.area)})}),B.arr.forEach(h=>{if(S.value.divisions==h.tomeCode){c[0].region=h.tomeName,c[0].\u5408\u8BA1="\u5408\u8BA1";return}else h.tomeCode=="370211"&&(c[0].region="\u9EC4\u5C9B\u533A",c[0].\u5408\u8BA1="\u5408\u8BA1")}),ne.value=c}),ae.value=[{lable:"\u533A\u57DF\u540D\u79F0",value:"region"},{lable:"\u5C0F\u9EA6",value:"\u5C0F\u9EA6"},{lable:"\u7389\u7C73",value:"\u7389\u7C73"},{lable:"\u5927\u8C46",value:"\u5927\u8C46"},{lable:"\u5730\u74DC",value:"\u5730\u74DC"},{lable:"\u82B1\u751F",value:"\u82B1\u751F"},{lable:"\u84DD\u8393",value:"\u84DD\u8393"},{lable:"\u8336\u53F6",value:"\u8336\u53F6"},{lable:"\u9A6C\u94C3\u85AF",value:"\u9A6C\u94C3\u85AF"},{lable:"\u767D\u83DC\u548C\u841D\u535C",value:"\u767D\u83DC\u548C\u841D\u535C"},{lable:"\u5176\u4ED6",value:"\u5176\u4ED6"}],l.data.forEach(d=>{e.indexOf(d.tomeName)==-1&&e.push(d.tomeName)}),e.forEach(d=>{t.push(Object.create(null,{regio:{value:d}}))}),t.forEach(d=>{l.data.map(h=>{d.regio===h.tomeName&&(d.region=h.tomeName,d[h.name]=h.area)})}),F.value=!1}else S.value.flag==0&&(F.value=!0,t=l.data,ae=y([{lable:"\u65F6\u95F4",value:"dateTime"},{lable:"\u6570\u636E\u540D\u79F0",value:"excelName"}]));U.value=t,Se.value=t.slice((Q.value-1)*q.value,(Q.value-1)*q.value+q.value);const o=se.value;o.style.width=window.innerWidth-100+"px",o.style.height=window.innerHeight-100+"px";const a=K(o);window.addEventListener("resize",()=>{o.style.width=window.innerWidth-200+"px",o.style.height=window.innerHeight-200+"px",a.resize()}),Ge()})},st=()=>{S.yearMonth=xe.value[0],S.flag=2,S.divisions="",F.value=!0,we()};let ae=y([{lable:"\u65F6\u95F4",value:"dateTime"},{lable:"\u6570\u636E\u540D\u79F0",value:"excelName"}]),Se=y([]);const nt=e=>{Ee({divisions:W.value,whetherToDownload:!0}).then(t=>{Le(t.data[t.data.length-1].downloadPath)})},dt=e=>{lt({divisions:W.value,whetherToDownload:!0}).then(t=>{Le(t.data[t.data.length-1].downloadPath)})},ct=e=>{rt({divisions:W.value,whetherToDownload:!1}).then(t=>{let l=[],o=[];t.data.forEach(a=>{l.indexOf(a.region)==-1&&l.push(a.region)}),l.forEach(a=>{o.push(Object.create(null,{regio:{value:a}}))}),o.forEach(a=>{t.data.map(r=>{a.regio===r.region&&(a.region=r.region,a[r.name]=r.area)})}),de(o,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530","Sheet1")})},ut=e=>{let t="";B.arr.forEach(l=>{l.subregion==W.value&&(t=l.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":l.subregionName)}),W.value==="370211"?ot({divisions:W.value,whetherToDownload:!1}).then(l=>{let o=[],a=[];l.data.forEach(r=>{o.indexOf(r.tomeName)==-1&&o.push(r.tomeName)}),o.forEach(r=>{a.push(Object.create(null,{regio:{value:r}}))}),a.forEach(r=>{l.data.map(c=>{r.regio===c.tomeName&&(r.region=c.tomeName,r[c.name]=c.area)})}),de(a,`${t}\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212`,"Sheet1")}):it({divisions:W.value,whetherToDownload:!1}).then(l=>{let o=[],a=[];l.data.forEach(r=>{o.indexOf(r.tomeName)==-1&&o.push(r.tomeName)}),o.forEach(r=>{a.push(Object.create(null,{regio:{value:r}}))}),a.forEach(r=>{l.data.map(c=>{r.regio===c.tomeName&&(r.region=c.tomeName,r[c.name]=c.area)})}),de(a,`${t}\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212`,"Sheet1")})},Ve=e=>{Le(e.download)},ft=()=>{let e=JSON.parse(JSON.stringify(ne.value[0]));e.region="\u5408\u8BA1",U.value.push(e),de(U.value,"\u519C\u4F5C\u7269\u79CD\u690D\u9762\u79EF\u7EDF\u8BA1\u8868","Sheet1")},pt=(e,t)=>e.map(o=>{const a={};for(const r in o)t[r]&&(a[t[r]]=o[r]);return a}),de=(e,t="\u7528\u6237\u5217\u8868",l="Sheet1")=>{const a=pt(e,{region:"\u533A\u57DF\u540D\u79F0",\u5C0F\u9EA6:"\u5C0F\u9EA6(\u4EA9)",\u7389\u7C73:"\u7389\u7C73(\u4EA9)",\u5927\u8C46:"\u5927\u8C46(\u4EA9)",\u5730\u74DC:"\u5730\u74DC(\u4EA9)",\u82B1\u751F:"\u82B1\u751F(\u4EA9)",\u84DD\u8393:"\u84DD\u8393(\u4EA9)",\u8336\u53F6:"\u8336\u53F6(\u4EA9)",\u9A6C\u94C3\u85AF:"\u9A6C\u94C3\u85AF(\u4EA9)",\u767D\u83DC\u548C\u841D\u535C:"\u767D\u83DC\u548C\u841D\u535C(\u4EA9)",\u5176\u4ED6:"\u5176\u4ED6(\u4EA9)"}),r=ze.json_to_sheet(a),c=ze.book_new();ze.book_append_sheet(c,r,l),ta(c,`${t}.xlsx`)};let I={\u5C0F\u9EA6:[],\u7389\u7C73:[],\u5927\u8C46:[],\u5730\u74DC:[],\u82B1\u751F:[],\u84DD\u8393:[],\u8336\u53F6:[],\u9A6C\u94C3\u85AF:[],\u767D\u83DC\u548C\u841D\u535C:[],\u5176\u4ED6:[]},oe={\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}},ce={\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"},le=[{name:"\u5C0F\u9EA6",value:0,itemStyle:{opacity:.8,color:"rgba(255, 141, 26, 1)"},area:""},{name:"\u7389\u7C73",value:0,itemStyle:{opacity:.8,color:"rgba(255, 255, 26, 1)"},area:""},{name:"\u82B1\u751F",area:"",value:0,itemStyle:{opacity:.8,color:"rgba(255, 140, 255, 1)"},label:{show:!0}},{name:"\u5927\u8C46",area:"",value:156,itemStyle:{opacity:.8,color:"rgba(255, 201, 148, 1)"},label:{show:!0}},{name:"\u5730\u74DC",area:"",value:156,itemStyle:{opacity:.8,color:"rgba(255, 84, 84, 1)"},label:{show:!0}},{name:"\u84DD\u8393",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(26, 255, 255, 1)"},label:{show:!0}},{name:"\u8336\u53F6",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(26, 255, 140, 1)"},label:{show:!0}},{name:"\u9A6C\u94C3\u85AF",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(255, 171, 87, 1)"},label:{show:!0}},{name:"\u767D\u83DC\u548C\u841D\u535C",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(140, 255, 26, 1)"},label:{show:!0}},{name:"\u5176\u4ED6",area:"",value:56,itemStyle:{opacity:.8,color:"rgba(140, 26, 255, 1)"},label:{show:!0}}],ue=Ye({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 fe=y([]),Ce=y([]);Pt(()=>{ht()});function ht(){He("370211"),Ne("370211"),Lt(),Je("370211"),bt(),We(),Qe(),Ue(),me(),Ct(),Et(),zt();for(const l in oe)oe[l].disabled!==!0&&Ae.value.push(l);pe.value=Ae.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 mt={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 bt(){_=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({...mt})}),_.cesiumWidget.creditContainer.style.display="none",_.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),_t(),yt(_)}const pe=y(["false"]);function gt(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 vt(e,t){}function yt(e){e.screenSpaceEventHandler.setInputAction(t=>{const l=e.scene.camera.positionCartographic.height,o=Cesium.Math.sign(t)*l/Math.log(l);isNaN(o)||e.scene.camera.zoomIn(o)},Cesium.ScreenSpaceEventType.WHEEL)}Ke(()=>pe.value,(e,t)=>{e.length>t.length?(e.filter(o=>{if(t.findIndex(r=>r===o)<0)return o}).forEach(o=>{ce[o]&&ke(ce[o],o+"zuowu")}),ke("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town")):e.length<t.length&&t.filter(o=>{if(e.findIndex(r=>r===o)<0)return o}).forEach(o=>{ce[o]&&$([o+"zuowu"])})});function ke(e,t,l){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=_.imageryLayers.addImageryProvider(o);l&&(_.imageryLayers.lowerToBottom(a),_.imageryLayers.raise(a))}let he="";function _t(){new Cesium.ScreenSpaceEventHandler(_.canvas).setInputAction(async function(t){var l=_.camera.getPickRay(t.position),o=_.scene.globe.pick(l,_.scene);if(o){let a=Cesium.Cartographic.fromCartesian(o);if(a){let r=new Cesium.Cartesian2,c=_.camera.positionCartographic.height,d=gt(c);const h=_.imageryLayers._layers,u=h.findIndex(v=>v._imageryProvider._layers&&v._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(u>-1){const v=h[u];let m=v._imageryProvider;if(m&&m.ready&&m._layers&&v.show===!0){r=m.tilingScheme.positionToTileXY(a,d,r);let x=m.pickFeatures(r.x,r.y,d,a.longitude,a.latitude);x&&x.then(async M=>{if(M.length>0){let D=M[0];if(D.properties&&D.properties.XZDM)if(he!==D.properties.XZDM){he=D.properties.XZDM,W.value=he,Xe();let s=D.data;_.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(s.bbox[0],s.bbox[1],s.bbox[2],s.bbox[3]),duration:2}),Y("townLine"),Me(s.geometry.coordinates,"townLine","red"),$(["village_CQL"]),$e(`XZDM=${D.properties.XZDM}`,"village_CQL"),De()}else qe(h,a,d,r,t);else $(["village_CQL"])}})}}else qe(h,a,d,r,t)}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}async function qe(e,t,l,o,a){let r=[],c=e.map(async u=>{if(u._imageryProvider._layers&&Object.values(ce).findIndex(v=>v===u._imageryProvider._layers)>-1){const v=u;let m=v._imageryProvider;if(m&&m.ready&&m._layers&&v.show===!0){o=m.tilingScheme.positionToTileXY(t,l,o);let x=m.pickFeatures(o.x,o.y,l,t.longitude,t.latitude);x&&await x.then(M=>{if(M.length>0){Y("landtype"),Me(M[0].data.geometry.coordinates,"landtype","red");let D=M[0].properties;r.findIndex(f=>f&&f.crop===D.crop)<0&&r.push(D)}})}}});if(await Promise.all(c),r.length>0){const u=a.position;var d=_.scene.globe.ellipsoid,h=_.camera.pickEllipsoid(u,d);if(h){let v=d.cartesianToCartographic(h),m=Cesium.Math.toDegrees(v.longitude).toFixed(6),x=Cesium.Math.toDegrees(v.latitude).toFixed(6);H.value={info:r,lon:m,lat:x}}xt(u),_.scene.postRender.addEventListener(je)}else De()}function Me(e,t,l){e.forEach(o=>{let a=[];o[0].forEach(r=>{a.push(r[0]),a.push(r[1])}),_.entities.add({name:t,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(a),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:l?Cesium.Color.fromCssColorString(l):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function $e(e,t){let l=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:e}});l.customName=t,_.imageryLayers.addImageryProvider(l)}function $(e,t){if(_){const l=_.imageryLayers._layers;for(let o=l.length-1;o>=0;o--)e.forEach(a=>{l[o]&&l[o]._imageryProvider&&l[o]._imageryProvider.customName&&(t?l[o]._imageryProvider.customName.indexOf(a)>-1&&_.imageryLayers.remove(l[o]):l[o]._imageryProvider.customName===a&&_.imageryLayers.remove(l[o]))})}}function Y(e){if(_){let l=_.entities._entities._array;for(var t=l.length-1;t>=0;t--)l[t]._name&&l[t]._name===e&&_.entities.remove(l[t])}}function je(){if(H.value&&H.value.lon&&H.value.lat){const t=Cesium.Cartesian3.fromDegrees(Number(H.value.lon),Number(H.value.lat),0);var e=Cesium.SceneTransforms.wgs84ToWindowCoordinates(_.scene,t);if(Cesium.defined(e)){const l=document.getElementById("popup1");l.style.top=e.y-10+"px",l.style.left=e.x+10+"px"}}}function De(){const e=document.getElementById("popup1");e.style.display="none",_.scene.postRender.removeEventListener(je),Y("landtype")}function xt(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}function wt(){G.value=!G.value;const e=se.value;e.style.width=window.innerWidth-100+"px",e.style.height=window.innerHeight-100+"px";const t=K(e);window.addEventListener("resize",()=>{e.style.width=window.innerWidth-200+"px",e.style.height=window.innerHeight-200+"px",t.resize()}),Ge()}const St=y([]);function Ct(){Ot({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=>{St.value=e.data.features}).catch(e=>{})}const kt=e=>{Q.value=e,Se.value=U.value.slice((Q.value-1)*q.value,(Q.value-1)*q.value+q.value)},Mt=e=>{const t=Q.value,l=q.value;return e+1+(t-1)*l};function Dt(){W.value="370211",Y("townLine"),$(["village_CQL"]),Ne("370211"),$(["huangdaoqu_town"],!0),$(["shuzisannong:farmlandgbzn"],!0),ke("shuzisannong:huangdaoqu_town","shuzisannong:huangdaoqu_town"),_.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),Re.value=!1}function Nt(){if(Z.value=!Z.value,Z.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 Wt(){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 Je=e=>{ot({divisions:e}).then(t=>{t.data.forEach((c,d)=>{for(let h=0;h<Object.values(c).length;h++)Object.values(c)[h]=="0.0"&&t.data.splice(d,1)}),B.brr=t.data,B.arr=t.data.sort((c,d)=>c.tomeName.length-d.tomeName.length),B.arr.unshift({tomeCode:"370211",tomeName:"\u5168\u90E8"});let l=[],o=[];B.arr.forEach(c=>{l.indexOf(c.tomeName)==-1&&(l.push(c.tomeName),o.push({tomeName:c.tomeName,tomeCode:c.tomeCode,area:c.area,type:c.type}))}),B.arr=o,_e.value=JSON.parse(JSON.stringify(B.arr)),_e.value[0].tomeCode="";let a=[...t.data],r=[];a.splice(0,1),a.forEach(c=>{r.indexOf(c.tomeName)==-1&&r.push(c.tomeName)}),te.title=[...Object.values(r)],te.title.forEach((c,d)=>{let h=t.data.map(u=>{if(c===u.tomeName)return u});Object.keys(I).forEach(u=>{h.findIndex(m=>m&&m.name===u)>-1?I[u].push(10):I[u].push(null)})}),me()})},It=e=>{it({divisions:e}).then(t=>{B.brr=t.data;let l=[...t.data],o=[];l.splice(0,1),l.forEach(a=>{o.indexOf(a.tomeName)==-1&&o.push(a.tomeName)}),te.title=[...Object.values(o)],te.title.forEach((a,r)=>{let c=t.data.map(d=>{if(a===d.tomeName)return d});Object.keys(I).forEach(d=>{c.findIndex(u=>u&&u.type===d)>-1?I[d].push(1):I[d].push(null)})}),me()})},Lt=()=>{Gt().then(e=>{e.features&&(B.crr=e.features,te.title.forEach((t,l)=>{let o=e.features.map(a=>{if(t===a.properties.town)return a.properties});Object.keys(I).forEach(a=>{o.findIndex(c=>c&&c.crop===a)>-1?I[a].push(1):I[a].push(null)})})),me()})},He=e=>{Ee({divisions:e}).then(t=>{t.data.forEach(l=>{fe.value.unshift(l.area),Ce.value.unshift(l.name)}),We()})},Ne=e=>{ue.arr=y([]),lt({divisions:e}).then(t=>{let l=[];t.data.forEach(o=>{for(let a=0;a<le.length;a++)if(o.name==le[a].name){le[a].area=o.area,le[a].value=1;for(const r in oe)r==o.name&&l.push({type:o.name,content:{value:o.area,percent:(o.areaB*100).toFixed(2)+"%",color:oe[r].color}});ue.arr.push(le[a])}Oe.value=l}),Qe()})};let Ze=y([]);const Et=()=>{rt().then(e=>{Ze.value=e.data,console.log(e.data),Fe.forEach((t,l)=>{let o=e.data.map(a=>{if(t===a.region)return a});Object.keys(I).forEach(a=>{o.findIndex(c=>c&&c.name===a&&Number(c.area)>0)>-1?ee[a].push(100):ee[a].push(null)})}),Ue()})},Xe=()=>{if(He(W.value),Ne(W.value),fe=y([]),Ce=y([]),W.value=="370211"){Je("370211"),he=null,Y("townLine"),$(["village_CQL"]),_.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2});return}It(W.value),We(),[...B.arr],Yt().then(e=>{e.features.forEach(t=>{t.properties.XZDM==W.value&&(Y("townLine"),Me(t.geometry.coordinates,"townLine","yellow"),_.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(t.bbox[0],t.bbox[1],t.bbox[2],t.bbox[3]),duration:0}))})}),$(["village_CQL"]),Y("townLine"),$e(`XZDM=${W.value}`,"village_CQL")},zt=()=>{Kt().then(e=>{xe.value=e.data,S.value.yearMonth=e.data[0],Tt(e.data[0])})},Tt=e=>{we()};function We(){if(ye.value){const e=K(ye.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:Ce.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:fe.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:fe.value,type:"pictorialBar",barMaxWidth:"20",symbolPosition:"end",symbol:"diamond",symbolOffset:[0,"-50%"],symbolSize:[30,12],zlevel:2}],tooltip:{show:!0,formatter:"\u9762\u79EF:{c0}"}};re(e,t)}}function Qe(){const e=K(Te.value);let t="",l="",o="",a=c(ue.arr,0);function r(d,h,u,v,m,x){const M=(d+h)/2,D=d*Math.PI*2,s=h*Math.PI*2,f=M*Math.PI*2;d===0&&h===1&&(u=!1),m=typeof m<"u"?m:1/3;const p=u?Math.cos(f)*.1:0,N=u?Math.sin(f)*.1:0,L=v?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(g,O){return g<D?p+Math.cos(D)*(1+Math.cos(O)*m)*L:g>s?p+Math.cos(s)*(1+Math.cos(O)*m)*L:p+Math.cos(g)*(1+Math.cos(O)*m)*L},y(g,O){return g<D?N+Math.sin(D)*(1+Math.cos(O)*m)*L:g>s?N+Math.sin(s)*(1+Math.cos(O)*m)*L:N+Math.sin(g)*(1+Math.cos(O)*m)*L},z(g,O){return g<-Math.PI*.5?Math.sin(g):g>Math.PI*2.5?Math.sin(g)*x*.1:Math.sin(O)>0?1*x*.1:-1}}}function c(d,h){const u=[];let v=0,m=0,x=0;const M=[],D=typeof h<"u"?(1-h)/(1+h):1/3;for(let f=0;f<d.length;f+=1){v+=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:D}};if(typeof d[f].itemStyle<"u"){const{itemStyle:N}=d[f];typeof d[f].itemStyle.color<"u"&&(N.color=d[f].itemStyle.color),typeof d[f].itemStyle.opacity<"u"&&(N.opacity=d[f].itemStyle.opacity),p.itemStyle=N}u.push(p)}for(let f=0;f<u.length;f+=1)x=m+u[f].pieData.value,u[f].pieData.startRatio=m/v,u[f].pieData.endRatio=x/v,u[f].parametricEquation=r(u[f].pieData.startRatio,u[f].pieData.endRatio,!1,!1,D,u[f].pieData.value===u[0].pieData.value?35:10),m=x,M.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 p="";return ue.arr.forEach(N=>{N.name==f.seriesName&&(p=N.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)}\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(d){let h,u,v,m,x,M;o!==d.seriesIndex&&(o!==""&&(h=a.series[o].pieStatus.selected,u=!1,v=a.series[o].pieData.startRatio,m=a.series[o].pieData.endRatio,x=a.series[o].pieStatus.k,M=a.series[o].pieData.value===a.series[0].pieData.value?35:10,a.series[o].parametricEquation=r(v,m,h,u,x,M),a.series[o].pieStatus.hovered=u,o=""),d.seriesName!=="mouseoutSeries"&&(h=a.series[d.seriesIndex].pieStatus.selected,u=!0,v=a.series[d.seriesIndex].pieData.startRatio,m=a.series[d.seriesIndex].pieData.endRatio,x=a.series[d.seriesIndex].pieStatus.k,a.series[d.seriesIndex].parametricEquation=r(v,m,h,u,x,a.series[d.seriesIndex].pieData.value+5),a.series[d.seriesIndex].pieStatus.hovered=u,o=d.seriesIndex),e.setOption(a))}),e.on("globalout",function(){if(o!==""){t=a.series[o].pieStatus.selected,l=!1;let d=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=r(startRatio,endRatio,t,l,d,i),a.series[o].pieStatus.hovered=l,o=""}e.setOption(a)}),re(e,a)}function Ue(){const e=K(Be.value);let t={grid:{left:"3%",right:"4%",bottom:"3%",top:"10%",containLabel:!0},tooltip:{formatter:function(l){console.log(l);let o=0;return Ze.value.forEach(a=>{console.log(a),a.name==l.seriesName&&a.region==l.name&&(o=a.area)}),l.seriesName+'<span style="font-size: 14px; color: #f00;">'+o+"</span>\u4EA9"}},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:Fe},series:[{name:"\u5C0F\u9EA6",type:"bar",barWidth:12,stack:"stack",data:ee.\u5C0F\u9EA6,itemStyle:{normal:{barBorderRadius:0,color:new be(0,0,.9,0,[{offset:1,color:"rgba(255, 141, 26, 1)"},{offset:0,color:"rgba(255, 141, 26, 1)"}])}}},{name:"\u5927\u8C46",type:"bar",barWidth:12,stack:"stack",data:ee.\u5927\u8C46,itemStyle:{normal:{barBorderRadius:0,color:new be(0,0,.9,0,[{offset:1,color:"rgba(255, 201, 148, 1)"},{offset:0,color:"rgba(255, 201, 148, 1)"}])}}},{name:"\u8336\u53F6",type:"bar",barWidth:12,stack:"stack",data:ee.\u8336\u53F6,itemStyle:{normal:{barBorderRadius:0,color:new be(0,0,.9,0,[{offset:1,color:"rgba(26, 255, 140, 1)"},{offset:0,color:"rgba(26, 255, 140, 1)"}])}}},{name:"\u82B1\u751F",type:"bar",barWidth:12,stack:"stack",data:ee.\u82B1\u751F,itemStyle:{normal:{barBorderRadius:0,color:new be(0,0,.9,0,[{offset:1,color:"rgba(255, 140, 255, 1)"},{offset:0,color:"rgba(255, 140, 255, 1)"}])}}}]};re(e,t)}function me(){const e=K(Pe.value);var t={grid:{bottom:"8%",left:"10%",right:"6%",top:"6%",containLabel:!0},tooltip:{formatter:function(l){let o=0;return B.brr.forEach(a=>{a.name==l.seriesName&&a.tomeName==l.name&&(o=a.area)}),l.seriesName+'<span style="font-size: 14px; color: #f00;">'+o+"</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:"\u8336\u53F6",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u8336\u53F6",textStyle:{fontSize:12,fontWeight:"bolder",color:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(26, 255, 140, 1)",color:{colorStops:[{offset:0,color:"rgba(26, 255, 140, 1)"},{offset:1,color:"rgba(26, 255, 140, 1)"}]}},data:I.\u8336\u53F6},{type:"bar",name:"\u5730\u74DC",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5730\u74DC",textStyle:{fontSize:12,fontWeight:"bolder",color:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(255, 84, 84, 1)",color:{colorStops:[{offset:0,color:"rgba(255, 84, 84, 1)"},{offset:1,color:"rgba(255, 84, 84, 1)"}]}},data:I.\u5730\u74DC},{type:"bar",name:"\u5927\u8C46",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5927\u8C46",textStyle:{fontSize:12,fontWeight:"bolder",color:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(255, 201, 148, 1)",color:{colorStops:[{offset:0,color:"rgba(255, 201, 148, 1)"},{offset:1,color:"rgba(255, 201, 148, 1)"}]}},data:I.\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:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(255, 140, 255, 1)",color:{colorStops:[{offset:0,color:"rgba(255, 140, 255, 1)"},{offset:1,color:"rgba(255, 140, 255, 1)"}]}},data:I.\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:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(255, 141, 26, 1)",color:{colorStops:[{offset:0,color:"rgba(255, 141, 26, 1)"},{offset:1,color:"rgba(255, 141, 26, 1)"}]}},data:I.\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:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(26, 255, 255, 1)",color:{colorStops:[{offset:0,color:"rgba(26, 255, 255, 1)"},{offset:1,color:"rgba(26, 255, 255, 1)"}]}},data:I.\u84DD\u8393},{type:"bar",name:"\u5176\u4ED6",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5176\u4ED6",textStyle:{fontSize:12,fontWeight:"bolder",color:"black"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],borderWidth:1,borderColor:"rgba(140, 26, 255, 1)",color:{colorStops:[{offset:0,color:"rgba(140, 26, 255, 1)"},{offset:1,color:"rgba(140, 26, 255, 1)"}]}},data:I.\u5176\u4ED6}]};re(e,t)}function Ge(){const e=K(se.value);let t=[],l=[],o=[],a=[],r=[],c=[],d=[],h=[],u=[],v=[],m=[];U.value.forEach(p=>{t.push(p.region),p.\u5C0F\u9EA6!==void 0&&l.push(p.\u5C0F\u9EA6),p.\u7389\u7C73!==void 0&&o.push(p.\u7389\u7C73),p.\u5927\u8C46!==void 0&&a.push(p.\u5927\u8C46),p.\u5730\u74DC!==void 0&&r.push(p.\u5730\u74DC),p.\u82B1\u751F!==void 0&&c.push(p.\u82B1\u751F),p.\u84DD\u8393!==void 0&&d.push(p.\u84DD\u8393),p.\u8336\u53F6!==void 0&&h.push(p.\u8336\u53F6),p.\u9A6C\u94C3\u85AF!==void 0&&u.push(p.\u9A6C\u94C3\u85AF),p.\u767D\u83DC\u548C\u841D\u535C!==void 0&&v.push(p.\u767D\u83DC\u548C\u841D\u535C),p.\u5176\u4ED6!==void 0&&m.push(p.\u5176\u4ED6)});let x={tooltip:{trigger:"axis",formatter:function(p){let N=p[0].axisValueLabel+"</br>",L=0;for(let g=0;g<p.length;g++)L+=p[g].value,p[g].seriesName!=="\u5408\u8BA1"&&(N+=p[g].seriesName+"\uFF1A"+p[g].value+"</br>");for(let g=0;g<p.length;g++)L+=Number(p[g].value),p[g].seriesName==="\u5408\u8BA1"&&(N+="\u5408\u8BA1\uFF1A"+L);return N},axisPointer:{type:"shadow"}},legend:{top:10,left:10,icon:"rect",itemWidth:4,itemHeight:12,data:["\u9910\u8D39","\u6253\u8F66\u8D39","\u96F6\u98DF","\u65E5\u7528\u54C1"]},grid:{left:"3%",right:"13%",bottom:"8%",top:"15%",containLabel:!0},xAxis:{type:"category",name:"\u533A\u57DF",axisLabel:{fontSize:12,interval:0,rotate:40},axisLine:{lineStyle:{}},data:t},yAxis:[{type:"value",name:"\u9762\u79EF\uFF08\u4EA9\uFF09",axisLabel:{},axisLine:{lineStyle:{}},splitLine:{lineStyle:{},show:!0}}],series:[{name:"\u5C0F\u9EA6",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(255, 141, 26, 1)"},data:l},{name:"\u7389\u7C73",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(255, 255, 26, 1)"},data:o},{name:"\u5927\u8C46",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(255, 201, 148, 1)"},data:a},{name:"\u5730\u74DC",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(255, 84, 84, 1)"},data:r},{name:"\u82B1\u751F",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(255, 140, 255, 1)"},data:c},{name:"\u84DD\u8393",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(26, 255, 255, 1)"},data:d},{name:"\u8336\u53F6",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(26, 255, 140, 1)"},data:h},{name:"\u9A6C\u94C3\u85AF",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(255, 171, 87, 1)"},data:u},{name:"\u767D\u83DC\u548C\u841D\u535C",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(140, 255, 26, 1)"},data:v},{name:"\u5176\u4ED6",type:"bar",barWidth:13,stack:"\u5206\u7C7B",itemStyle:{color:"rgba(140, 26, 255, 1)"},data:m},{name:"\u5408\u8BA1",type:"bar",stack:"\u5206\u7C7B",label:{normal:{show:!0,position:"top",textStyle:{color:"#ffffff"},formatter:""}},data:[]}]};var M=x.series,D=x.tooltip;function s(p){let N=p[0].axisValueLabel+"</br>",L=0;for(let g=0;g<p.length;g++)if(p[g].seriesName!=="\u5408\u8BA1"){const O=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${p[g].color}"></span>`;L+=p[g].value,N+=O+p[g].seriesName+"\uFF1A"+p[g].value+"</br>"}for(let g=0;g<p.length;g++)p[g].seriesName==="\u5408\u8BA1"&&(N+="\u5408\u8BA1\uFF1A"+L);return N}D.formatter=s;function f(p){for(var N=0,L=0;L<M.length;L++)N+=M[L].data[p.dataIndex];return N}M[M.length-1].label.normal.formatter=f,re(e,x)}return(e,t)=>{const l=P("el-tooltip"),o=P("el-option"),a=P("el-select"),r=P("el-checkbox"),c=P("el-checkbox-group"),d=P("el-collapse-item"),h=P("el-collapse"),u=P("el-button"),v=P("el-form-item"),m=P("el-form"),x=P("el-table-column"),M=P("el-table"),D=P("el-pagination");return w(),E("div",aa,[n("div",oa,[la,n("div",ra,[n("div",ia,[n("div",sa,[na,n("p",{onClick:t[0]||(t[0]=s=>nt())},[R(" \u4E0B\u8F7D \xA0 "),da])]),n("div",{ref_key:"areaDiv",ref:ye,class:"areaDiv"},null,512)]),n("div",ca,[n("div",ua,[fa,n("p",{onClick:t[1]||(t[1]=s=>dt())},[R(" \u4E0B\u8F7D \xA0 "),pa])]),n("div",{ref_key:"typesofDiv",ref:Te,class:"typesofDiv"},null,512)]),n("div",ha,[n("div",null,[(w(!0),E(j,null,J(b(Oe),(s,f)=>(w(),E("div",{key:f,class:"Crops"},[n("div",null,[ma,R(" "+V(s.type),1)]),n("div",{style:Ie({color:s.content.color})},V(s.content.value)+"\u4EA9 ",5),n("div",{style:Ie({color:s.content.color})},V(s.content.percent),5)]))),128))])]),n("div",{class:"leftFoldDiv",onClick:t[2]||(t[2]=s=>Nt())},[C(l,{disabled:b(Z),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:k(()=>[T(' <el-icon v-if="!leftWraFlag"><ArrowRightBold /></el-icon> '),b(Z)?T("v-if",!0):(w(),E("img",ba))]),_:1},8,["disabled"]),C(l,{disabled:!b(Z),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:k(()=>[T(' <el-icon v-if="leftWraFlag"><ArrowLeftBold /></el-icon> '),b(Z)?(w(),E("img",ga)):T("v-if",!0)]),_:1},8,["disabled"])])]),n("div",va,[n("div",ya,[n("div",_a,[xa,n("p",{onClick:t[3]||(t[3]=s=>ct())},[R(" \u4E0B\u8F7D \xA0 "),wa])]),n("div",{ref_key:"farmlandDiv",ref:Be,class:"farmlandDiv"},null,512),T(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),n("div",Sa,[n("div",Ca,[ka,n("p",{onClick:t[4]||(t[4]=s=>ut())},[R(" \u4E0B\u8F7D \xA0 "),Ma])]),C(a,{"popper-class":"select_city",onChange:t[5]||(t[5]=s=>Xe(e.item)),modelValue:W.value,"onUpdate:modelValue":t[6]||(t[6]=s=>W.value=s),placeholder:"\u5168\u90E8"},{default:k(()=>[(w(!0),E(j,null,J(b(B).arr,s=>(w(),A(o,{key:s.tomeCode,label:s.tomeName,value:s.tomeCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),n("div",{ref_key:"ASdivisionDiv",ref:Pe,class:"ASdivision"},null,512)]),n("div",{class:"rightFoldDiv",onClick:t[7]||(t[7]=s=>Wt())},[C(l,{disabled:!b(X),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:k(()=>[b(X)?(w(),E("img",Da)):T("v-if",!0)]),_:1},8,["disabled"]),C(l,{disabled:b(X),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:k(()=>[b(X)?T("v-if",!0):(w(),E("img",Na))]),_:1},8,["disabled"])])]),C(h,{class:"legend",accordion:""},{default:k(()=>[C(d,{name:"1"},{title:k(()=>[R("\u56FE\u4F8B")]),default:k(()=>[n("div",Wa,[C(c,{modelValue:pe.value,"onUpdate:modelValue":t[8]||(t[8]=s=>pe.value=s),onChange:vt},{default:k(()=>[(w(!0),E(j,null,J(b(oe),(s,f,p)=>(w(),A(r,{key:p,style:Ie({background:s.color,border:`1px solid ${s.color}`,width:"100%"}),"v-model":s.disabled,disabled:s.disabled,label:f},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),_:1}),n("div",Ia,[C(Ut)]),La,n("div",Ea,[(w(!0),E(j,null,J(H.value.info,(s,f)=>(w(),E("div",{key:f},[n("div",za,[Ta,n("span",null,V(s.crop),1)]),n("div",Ba,[Pa,n("span",null,V(s.Shape_Area)+" \u4EA9",1)]),n("div",Oa,[Ra,n("span",null,V(s.town),1)]),s.village?(w(),E("div",Aa,[Fa,n("span",null,V(s.village),1)])):T("v-if",!0),s.people?(w(),E("div",Va,[qa,n("span",null,V(s.people),1)])):T("v-if",!0)]))),128)),n("div",{class:"cancel",onClick:De},"X")]),Re.value?(w(),A(u,{key:0,class:"back_button",onClick:t[9]||(t[9]=s=>Dt())},{default:k(()=>[R("\u8FD4\u56DE")]),_:1})):T("v-if",!0)]),n("div",$a,[n("div",ja,[C(m,{inline:!0,model:b(S),class:"demo-form-inline"},{default:k(()=>[C(v,{label:"\u65F6\u95F4:"},{default:k(()=>[C(a,{"popper-class":"selectCity",modelValue:b(S).yearMonth,"onUpdate:modelValue":t[10]||(t[10]=s=>b(S).yearMonth=s),placeholder:"\u8BF7\u9009\u62E9"},{default:k(()=>[(w(!0),E(j,null,J(b(xe),(s,f)=>(w(),A(o,{key:f,label:e.Zitem,value:s},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),C(v,{label:"\u7EDF\u8BA1\u65B9\u5F0F:"},{default:k(()=>[C(a,{"popper-class":"selectCity",modelValue:b(S).flag,"onUpdate:modelValue":t[11]||(t[11]=s=>b(S).flag=s),placeholder:"\u8BF7\u9009\u62E9"},{default:k(()=>[C(o,{label:"\u884C\u653F\u533A\u5212",value:"2"}),C(o,{label:"\u9AD8\u6807\u51C6\u519C\u7530",value:"1"})]),_:1},8,["modelValue"])]),_:1}),C(v,{label:"\u9547:"},{default:k(()=>[C(a,{modelValue:b(S).divisions,"onUpdate:modelValue":t[12]||(t[12]=s=>b(S).divisions=s),disabled:b(S).flag!="2",placeholder:b(S).flag=="2"?"\u5168\u90E8":"\u8BF7\u9009\u62E9","popper-class":"selectCity"},{default:k(()=>[(w(!0),E(j,null,J(b(_e),(s,f)=>(w(),A(o,{key:f,label:s.tomeName,value:s.tomeCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","placeholder"])]),_:1}),C(v,null,{default:k(()=>[C(u,{type:"primary",onClick:we},{default:k(()=>[R("\u67E5\u8BE2")]),_:1}),C(u,{plain:"",onClick:st,disabled:!b(G)},{default:k(()=>[R(" \u91CD\u7F6E ")]),_:1},8,["disabled"]),b(F)?T("v-if",!0):(w(),A(u,{key:0,type:"primary",text:"",onClick:ft},{default:k(()=>[Ja,R(" \u4E0B\u8F7D ")]),_:1}))]),_:1})]),_:1},8,["model"]),n("div",{class:"modeDiv",onClick:wt},[n("div",{class:et(b(G)?"Selected":"")},"\u8868\u683C\u6A21\u5F0F",2),n("div",{class:et(b(G)?"":"Selecteds")},"\u56FE\u8868\u6A21\u5F0F",2)])]),tt(n("div",Ha,[n("div",Za,[b(F)?T("v-if",!0):(w(),A(M,{key:0,data:b(ne),"header-cell-style":{"text-align":"center"},style:{width:"100%"},"highlight-current-row":"","header-row-class-name":"tabth"},{default:k(()=>[C(x,{align:"center",prop:"\u5408\u8BA1",width:"80"}),(w(!0),E(j,null,J(b(ae),(s,f)=>(w(),A(x,{key:f,prop:s.value,label:f==0?s.lable:s.lable+"(\u4EA9)",align:"center"},null,8,["prop","label"]))),128)),b(F)?(w(),A(x,{key:0,prop:"address",align:"center",label:"\u64CD\u4F5C"},{default:k(s=>[n("span",{style:{color:"rgba(67, 181, 143, 1)",cursor:"pointer"},onClick:f=>Ve(s.row)}," \u4E0B\u8F7D ",8,Xa)]),_:1})):T("v-if",!0)]),_:1},8,["data"]))]),C(M,{data:b(Se),"header-cell-style":{"text-align":"center"},height:"90%","highlight-current-row":"","header-row-class-name":"tabth"},{default:k(()=>[C(x,{type:"index",width:"80",align:"center",label:"\u5E8F\u53F7",index:Mt}),(w(!0),E(j,null,J(b(ae),(s,f)=>(w(),A(x,{key:f,prop:s.value,label:f==0?s.lable:s.lable+"(\u4EA9)",align:"center"},null,8,["prop","label"]))),128)),b(F)?(w(),A(x,{key:0,prop:"address",align:"center",label:"\u64CD\u4F5C"},{default:k(s=>[n("span",{style:{color:"rgba(67, 181, 143, 1)",cursor:"pointer"},onClick:f=>Ve(s.row)}," \u4E0B\u8F7D ",8,Qa)]),_:1})):T("v-if",!0)]),_:1},8,["data"]),n("div",Ua,[R(" \u5171"+V(U.value.length)+"\u6761 ",1),C(D,{background:"",layout:"prev, pager, next",total:U.value.length,"current-page":b(Q),"page-size":b(q),onCurrentChange:kt},null,8,["total","current-page","page-size"])])],512),[[at,b(G)]]),tt(n("div",Ga,[n("div",{ref_key:"chartModeDiv",ref:se,class:"chartModeDiv"},null,512)],512),[[at,!b(G)]])])])}}},fo=Bt(Ya,[["__scopeId","data-v-076bbc79"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/classify/Classify.vue"]]);export{fo as default};