import{H as q,_ as ct,r as d,A as ce,U as ut,V as ft,W as ue,d as k,o as y,c as C,l,m as W,e as _,w,f as b,g as B,L as fe,N as pe,k as ge,x as X,B as pt,F as gt,y as mt,p as bt,q as vt}from"./index.9ec53a6c.js";import ee from"./downloads.e955445d.js";import{_ as te}from"./close1.45635d81.js";import{_ as ht,a as yt,b as _t,c as xt,d as wt,e as St}from"./linesGL.90f708a5.js";import{i as K,L as O}from"./index.c9f5bd8b.js";import{T as kt}from"./TimeLine.25f0d6b1.js";import{u as $,w as Ie}from"./xlsx.86b9426e.js";import{u as me}from"./useEcharts.ff70d170.js";function Ne(v){return q({url:"crops/farmland",method:"get",params:v})}function Ct(v){return q({url:"crops/statistics",method:"get",params:v})}function ze(v){return q({url:"crops/highStandards",method:"get",params:v})}function Pe(v){return q({url:"crops/gradeStatistics",method:"get",params:v})}function Ee(v){return q({url:"crops/administrativeDivisions",method:"get",params:v})}function Dt(){return q({url:"http://139.199.98.175:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson",method:"get"})}const D=v=>(bt("data-v-1e2a71d9"),v=v(),vt(),v),Lt={class:"center"},Mt=D(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),Wt={class:"leftWra"},Tt={class:"leftTop"},It={class:"title"},Nt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1",-1)),zt=D(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Pt={class:"leftbottom"},Et={class:"title"},Ft=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",-1)),Bt=D(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),At={class:"tableDiv"},Rt={key:0,src:te,alt:""},Zt={key:0,class:"imgrotate",src:te,alt:""},Xt={class:"rightWra"},Ot={class:"rightTop"},$t={class:"title"},qt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Qt=D(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),jt={class:"rightbottom"},Jt={class:"title"},Vt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Gt=D(()=>l("img",{src:ee,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Ut={key:0,src:te,alt:""},Yt={key:0,class:"imgrotate",src:te,alt:""},Ht={class:"bottom_center"},Kt=mt('
',1),ea={id:"popup"},ta={id:"pop"},aa={key:0},oa=D(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),ra={class:"mt-4"},sa={__name:"Site",setup(v){let n=d(null);const be=d(null),ve=d(null),he=d(null);d(null);const ye=d(null),g=d("370211"),Fe=d(null);let S=ce({arr:[],brr:[],crr:[]});ce({arr:[]});const L=d({}),Be=d([]),Ae=d([]),ae=d(!1);let T=d(!0),z=d(!0);d("{x:765,y:191}");let _e=d([]),oe=d([]),re=d(0);d([]);let A=d(["false"]),xe=d([]),we=["\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"],P={good:[],better:[],moderate:[],poor:[],difference:[]};ce({arr:[{name:"\u5C0F\u9EA6",value:101,itemStyle:{opacity:.5,color:"rgba(110, 209, 84, 0.9)"}},{name:"\u82B1\u751F",value:156,itemStyle:{opacity:.5,color:"rgba(251, 201, 3, 1)"},label:{show:!0}},{name:"\u5927\u8C46",value:156,itemStyle:{opacity:.5,color:"rgba(240, 129, 31, 0.9)"},label:{show:!0}},{name:"\u5730\u74DC",value:156,itemStyle:{opacity:.5,color:"rgba(27, 85, 222, 1)"},label:{show:!0}},{name:"\u84DD\u8393",value:56,itemStyle:{opacity:.5,color:"rgba(72, 102, 211, 0.9)"},label:{show:!0}},{name:"\u8336\u53F6",value:56,itemStyle:{opacity:.5,color:"rgba(26, 255, 140, 1)"},label:{show:!0}}]});let j=d([]),se={\u597D:{color:"rgba(50, 148, 1, 1)",disabled:!1},\u8F83\u597D:{color:"rgba(154, 208, 0, 1)",disabled:!1},\u9002\u4E2D:{color:"rgba(234, 219, 0, 1)",disabled:!1},\u8F83\u5DEE:{color:"rgba(239, 152, 0, 1)",disabled:!1},\u5DEE:{color:"rgba(247, 85, 0, 1)",disabled:!1}};ut(()=>A.value,(t,e)=>{t.length>e.length?(t.filter(o=>{if(e.findIndex(s=>s===o)<0)return o}).forEach(o=>{switch(o){case"\u597D":Q(5,o);break;case"\u8F83\u597D":Q(4,o);break;case"\u9002\u4E2D":Q(3,o);break;case"\u8F83\u5DEE":Q(2,o);break;case"\u5DEE":Q(1,o);break}}),st("shuzisannong:huangdaoqu_town","tl")):t.length{if(t.findIndex(s=>s===o)<0)return o}).forEach(o=>{console.log(o),E([o])})});var R={title:[]};let p=d({good:[],better:[],difference:[],moderate:[],poor:[]});const Re=()=>{console.log(Be.value)};let I=d([]);ft(()=>{ke("370211"),Ce("370211"),Ge(),De("370211"),Xe(),$e();for(const t in se)se[t].disabled!==!0&&(console.log(t),xe.value.push(t));A.value=xe.value});const Ze={url:"http://{s}.tianditu.gov.cn/img_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=31091965e263284a501a723b8909f405",layer:"tdtCva",style:"default",format:"tiles",tileMatrixSetID:"c",subdomains:["t0","t1","t2","t3","t4","t5","t6","t7"],tilingScheme:new Cesium.GeographicTilingScheme,tileMatrixLabels:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],maximumLevel:18};Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYzcwZmJmNi02MzQ5LTQ1MGEtODgzMy0yZTZiZGExY2MzMGMiLCJpZCI6MTAxOTgsInNjb3BlcyI6WyJhc2wiLCJhc3IiLCJnYyJdLCJpYXQiOjE1ODEzMDgxNTR9.NeJU4yfUi-SnLrNDOBYsQgmiSh3B4axCTi1m84Qw99c";function Xe(){n=new Cesium.Viewer("cesiumContainer",{baseLayerPicker:!1,shouldAnimate:!0,infoBox:!1,animation:!1,timeline:!1,geocoder:!1,homeButton:!1,navigationHelpButton:!1,selectionIndicator:!1,fullscreenButton:!1,terrainProvider:new Cesium.EllipsoidTerrainProvider({}),sceneModePicker:!1,contextOptions:{webgl:{alpha:!0}},imageryProvider:new Cesium.WebMapTileServiceImageryProvider({...Ze})}),n.cesiumWidget.creditContainer.style.display="none",n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),qe(),nt()}function le(t,e,a){t.forEach(o=>{let r=[];o[0].forEach(s=>{r.push(s[0]),r.push(s[1])}),n.entities.add({name:e,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(r),width:6,material:new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:a?Cesium.Color.fromCssColorString(a):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function Oe(t){return t>48e6?0:t>24e6?1:t>12e6?2:t>6e6?3:t>3e6?4:t>15e5?5:t>75e4?6:t>375e3?7:t>187500?8:t>93750?9:t>46875?10:t>23437.5?11:t>11718.75?12:t>5859.38?13:t>2929.69?14:t>1464.84?15:t>732.42?16:t>366.21?17:18}function $e(){ue({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afarmland&maxFeatures=50&outputFormat=application%2Fjson",method:"get"}).then(t=>{console.log("\u519C\u7530\uFF1A",t),Ae.value=t.data.features}).catch(t=>{})}let J=d({label:[]}),V="";function qe(){var t=new Cesium.ScreenSpaceEventHandler(n.canvas);t.setInputAction(function(e){var a=n.camera.getPickRay(e.position),o=n.scene.globe.pick(a,n.scene);if(o){let r=Cesium.Cartographic.fromCartesian(o);if(r){let s=new Cesium.Cartesian2,i=n.camera.positionCartographic.height,c=Oe(i);const h=n.imageryLayers._layers,x=h.findIndex(f=>f._imageryProvider._layers&&f._imageryProvider._layers==="shuzisannong:huangdaoqu_town");if(x>-1){const f=h[x];let m=f._imageryProvider;if(m&&m.ready&&m._layers&&f.show===!0){s=m.tilingScheme.positionToTileXY(r,c,s);let u=m.pickFeatures(s.x,s.y,c,r.longitude,r.latitude);u&&u.then(N=>{if(N.length>0){let M=N[0];if(M.properties&&M.properties.XZDM)if(console.log("XZDM:",V),console.log("newData.properties.XZDM:",M.properties.XZDM),V!==M.properties.XZDM){ae.value=!0,V=M.properties.XZDM,g.value=V,ne&&ne();let Z=M.data;n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(Z.bbox[0],Z.bbox[1],Z.bbox[2],Z.bbox[3]),duration:2}),G("townLine"),le(Z.geometry&&Z.geometry.coordinates,"townLine","yellow"),E(["village_CQL"]),console.log(M.properties.XZDM),Se(`XZDM=${M.properties.XZDM}`,"village_CQL");let H=n.entities._entities._array;for(var F=H.length-1;F>=0;F--)if(H[F]._name&&H[F]._name==="point"+M.properties.XZDM){let dt=H[F]._info;J.value=dt,Te(e.position),n.scene.postRender.addEventListener(de)}G("villageLine"),ie=""}else Qe(h,s,c,r,e);else E(["village_CQL"]),Y()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let ie="";function Qe(t,e,a,o,r){const s=t.findIndex(i=>i._imageryProvider._layers&&i._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(s>-1){const i=t[s];let c=i._imageryProvider;if(c&&c.ready&&c._layers&&i.show===!0){e=c.tilingScheme.positionToTileXY(o,a,e);let h=c.pickFeatures(e.x,e.y,a,o.longitude,o.latitude);h&&h.then(x=>{if(x.length>0){let f=x[0];if(console.log(f),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(f.data.bbox[0],f.data.bbox[1],f.data.bbox[2],f.data.bbox[3]),duration:2}),f.properties&&f.properties.XZQDM)if(ie!==f.properties.XZQDM){ie=f.properties.XZQDM;let m=f.data;G("villageLine"),le(m.geometry&&m.geometry.coordinates,"villageLine","yellow")}else je(t,e,a,o,r)}})}}}function je(t,e,a,o,r){console.log(t);const s=t.findIndex(i=>i._imageryProvider._layers&&i._imageryProvider._layers==="shuzisannong:growth");if(s>-1){const i=t[s];let c=i._imageryProvider;if(c&&c.ready&&c._layers&&i.show===!0){e=c.tilingScheme.positionToTileXY(o,a,e);let h=c.pickFeatures(e.x,e.y,a,o.longitude,o.latitude);h&&h.then(x=>{if(x.length>0){let f=x[0],m="";switch(f.properties.value){case 1:m="\u5DEE";break;case 2:m="\u8F83\u5DEE";break;case 3:m="\u9002\u4E2D";break;case 4:m="\u8F83\u597D";break;case 5:m="\u597D";break}let u=Cesium.Math.toDegrees(o.longitude).toFixed(6),N=Cesium.Math.toDegrees(o.latitude).toFixed(6);L.value={lon:u,lat:N,grade:m},console.log(L.value),Te(r.position),n.scene.postRender.addEventListener(de)}})}}}function Q(t,e){let a=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:growth",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:`value in (${t})`}});a.customName=e,n.imageryLayers.addImageryProvider(a)}function Se(t,e){let a=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:t}});a.customName=e,n.imageryLayers.addImageryProvider(a)}function E(t,e){if(n){const a=n.imageryLayers._layers;for(let o=a.length-1;o>=0;o--)t.forEach(r=>{a[o]._imageryProvider&&a[o]._imageryProvider.customName&&(e?a[o]._imageryProvider.customName.indexOf(r)>-1&&n.imageryLayers.remove(a[o]):a[o]._imageryProvider.customName===r&&n.imageryLayers.remove(a[o]))})}}function G(t){if(n){let a=n.entities._entities._array;for(var e=a.length-1;e>=0;e--)a[e]._name&&a[e]._name===t&&n.entities.remove(a[e])}}function Je(){if(T.value=!T.value,T.value){let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(0,0)")}else{let t=document.querySelector(".leftWra");t&&(t.style.transform="translate(-107%,0)")}console.log(T.value)}function Ve(){if(z.value=!z.value,z.value){let t=document.querySelector(".rightWra");t.style.transform="translate(0,0)"}else{let t=document.querySelector(".rightWra");t.style.transform="translate(107%,0)"}}const ke=t=>{_e=d([]),oe=d([]),Ne({divisions:t}).then(e=>{for(const a in e.data[0])e.data[0][a]&&(_e.value.push(a),oe.value.push(e.data[0][a]));at()})},Ce=t=>{j=d([]),I.value=[],re=d(0),Ct({divisions:t}).then(e=>{console.log(e.data),e.data.forEach(a=>{re.value=Number(a.sum),console.log(a);for(const o in a){o!=="sum"&&Number.isFinite(a[o])&&(j.value.push({name:o,value:a[o]}),I.value.push({date:o,name:a[o]})),I.value.forEach(s=>{a[`${s.date}Zb`]!==void 0&&(s.address=(a[`${s.date}Zb`]*100).toFixed(2)+"%")});let r=JSON.parse(JSON.stringify(I.value));r.forEach(s=>{switch(s.date){case"good":s.date="\u597D";break;case"better":s.date="\u8F83\u597D";break;case"moderate":s.date="\u9002\u4E2D";break;case"poor":s.date="\u8F83\u5DEE";break;case"difference":s.date="\u5DEE";break}}),I.value=r}}),ot()})},Ge=()=>{d([]),ze().then(t=>{we.forEach((e,a)=>{t.data.map(o=>{if(e===o.region)for(const r in o)P[r]&&P[r].push(o[r])})}),rt()})},De=t=>{p.value.better=[],p.value.difference=[],p.value.good=[],p.value.moderate=[],p.value.poor=[],Pe({divisions:t,yearMonth:"2023-05"}).then(e=>{console.log(e.data),S.brr=e.data,S.arr=e.data.sort((r,s)=>r.subregionName.length-s.subregionName.length),S.arr.unshift({subregion:"370211",subregionName:"\u5168\u90E8"});let a=[...e.data],o=[];a.splice(0,1),a.forEach(r=>{o.indexOf(r.subregionName)==-1&&o.push(r.subregionName)}),R.title=[...Object.values(o)],R.title.forEach((r,s)=>{e.data.map(i=>{if(r===i.subregionName)return p.value.better.push(i.better),p.value.difference.push(i.difference),p.value.good.push(i.good),p.value.moderate.push(i.moderate),p.value.poor.push(i.poor),i})}),console.log(p),Me()})},Ue=t=>{let e={good:[],better:[],difference:[],moderate:[],poor:[]};Ee({divisions:t}).then(a=>{console.log(a.data),S.brr=a.data;let o=[...a.data],r=[];o.forEach(s=>{r.indexOf(s.subregionName)==-1&&r.push(s.subregionName)}),R.title=[...Object.values(r)],R.title.forEach((s,i)=>{a.data.map(c=>{if(s===c.subregionName)return e.better.push(c.better),e.difference.push(c.difference),e.good.push(c.good),e.moderate.push(c.moderate),e.poor.push(c.poor),c})}),p.value=e,Me()})},ne=()=>{Dt().then(e=>{console.log(e),e.features.forEach(a=>{a.properties.XZDM==g.value&&(G("townLine"),le(a.geometry.coordinates,"townLine","yellow"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(a.bbox[0],a.bbox[1],a.bbox[2],a.bbox[3]),duration:0}))})}),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),ke(g.value),Ce(g.value),g.value!=="370211"&&Ue(g.value),g.value=="370211"&&(E(["village_CQL"]),E(["aaa"]),De(),Y());let t=[...S.arr];console.log("arr:",t),[...S.arr],E(["aaa"]),Se(`XZDM=${g.value}`,"aaa")},Ye=t=>{let e="";S.arr.forEach(a=>{a.subregion==g.value&&(e=a.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":a.subregionName)}),Ne({divisions:g.value}).then(a=>{let o=[{region:e=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":e,good:a.data[0].good,better:a.data[0].better,moderate:a.data[0].moderate,poor:a.data[0].poor,difference:a.data[0].difference}];U(o,`${o[0].region}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1`,"Sheet1")})},He=t=>{let e="";S.arr.forEach(a=>{a.subregion==g.value&&(e=a.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":a.subregionName)}),console.log(I),tt(I.value,`${e}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4`,"Sheet1")},Ke=t=>{let e=[];ze().then(a=>{console.log(a.data),a.data.forEach(o=>{e.push({region:o.region,good:o.good,better:o.better,moderate:o.moderate,poor:o.poor,difference:o.difference})}),U(e,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530\u5217\u8868","Sheet1")})},et=t=>{let e="",a=[];S.arr.forEach(o=>{o.subregion==g.value&&(e=o.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":o.subregionName)}),g.value==="370211"?Pe({divisions:g.value,whetherToDownload:!1}).then(o=>{o.data.forEach(r=>{console.log(r),a.push({region:r.subregionName,good:r.good,better:r.better,moderate:r.moderate,poor:r.poor,difference:r.difference})}),U(a,`${e}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212`,"Sheet1")}):Ee({divisions:g.value,whetherToDownload:!1}).then(o=>{o.data.forEach(r=>{a.push({region:r.subregionName,good:r.good,better:r.better,moderate:r.moderate,poor:r.poor,difference:r.difference})}),U(a,`${e}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212`,"Sheet1")})},Le=(t,e)=>t.map(o=>{const r={};for(const s in o)e[s]&&(r[e[s]]=o[s]);return r}),U=(t,e="\u7528\u6237\u5217\u8868",a="Sheet1")=>{const r=Le(t,{region:"\u533A\u57DF\u540D\u79F0",good:"\u597D(\u4EA9)",better:"\u8F83\u597D(\u4EA9)",moderate:"\u9002\u4E2D(\u4EA9)",poor:"\u5DEE(\u4EA9)",difference:"\u8F83\u5DEE(\u4EA9)",area:"\u9762\u79EF(\u4EA9)"}),s=$.json_to_sheet(r),i=$.book_new();$.book_append_sheet(i,s,a),Ie(i,`${e}.xlsx`)},tt=(t,e="\u7528\u6237\u5217\u8868",a="Sheet1")=>{const r=Le(t,{date:"\u7C7B\u578B",name:"\u9762\u79EF(\u4EA9)",address:"\u5360\u6BD4"}),s=$.json_to_sheet(r),i=$.book_new();$.book_append_sheet(i,s,a),Ie(i,`${e}.xlsx`)};function at(){const t=K(be.value);let e=["\u597D","\u8F83\u597D","\u9002\u4E2D","\u8F83\u5DEE","\u5DEE"],a=oe.value,o=!1;a.length>14?o=!0:o=!1;var r={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"10%",right:"5%",left:"18%",bottom:"10%"},xAxis:[{type:"category",data:e,axisLine:{lineStyle:{color:"rgba(66, 192, 255, .3)"}},axisLabel:{interval:0,margin:10,color:"rgba(255, 255, 255, 0.7)",textStyle:{fontSize:14},rotate:"0"},axisTick:{show:!1}}],yAxis:{name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},type:"value",axisLabel:{color:"rgba(255,255,255,0.7)"},splitLine:{show:!1},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},dataZoom:[{show:o,type:"slider",realtime:!0,startValue:0,endValue:14,xAxisIndex:[0],bottom:"10",left:"30",height:10,borderColor:"rgba(0,0,0,0)",textStyle:{color:"#05D5FF"}}],series:[{type:"bar",data:a,barWidth:"15",itemStyle:{normal:{color:new O(0,0,0,1,[{offset:0,color:"rgba(45, 204, 177, 1)"},{offset:.98,color:"rgba(71, 179, 161, 0)"}],!1),shadowColor:"rgba(5, 213, 255, 1)",shadowBlur:4}},label:{normal:{show:!0,lineHeight:10,formatter:"{c}",position:"top",textStyle:{color:"#fff",fontSize:10}}}}]};r&&t.setOption(r),window.addEventListener("resize",function(){t.resize()})}function ot(){const t=K(ve.value);j.value.forEach(o=>{switch(o.name){case"good":o.name="\u597D";break;case"better":o.name="\u8F83\u597D";break;case"moderate":o.name="\u9002\u4E2D";break;case"poor":o.name="\u8F83\u5DEE";break;case"difference":o.name="\u5DEE";break}});var e=j.value;let a={color:["rgba(50, 148, 1, 1)","rgba(154, 208, 0, 1)","rgba(234, 219, 0, 1)","rgba(239, 152, 0, 1)","rgba(247, 85, 0, 1)"],title:{text:"\u603B\u9762\u79EF",subtext:`${re.value}\u4EA9`,textStyle:{color:"#f2f2f2",fontSize:14},subtextStyle:{fontSize:14,color:["#ff9d19"]},x:"center",y:"center"},grid:{top:0},legend:{orient:"vertical",top:"middle",right:"2%",textStyle:{color:"#f2f2f2",fontSize:14},icon:"roundRect",data:e},tooltip:{trigger:"item",axisPointer:{type:"shadow"},formatter:"{a}
{b} : {c}\u4EA9
\u767E\u5206\u6BD4 : {d}%"},series:[{radius:["50%","71%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1}},labelLine:{normal:{show:!1}},name:"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",data:e},{radius:["50%","54%"],center:["50%","50%"],type:"pie",label:{normal:{show:!1},emphasis:{show:!1}},labelLine:{normal:{show:!1},emphasis:{show:!1}},animation:!1,tooltip:{show:!1},data:[{value:1,itemStyle:{color:"rgba(250,250,250,0.3)"}}]},{name:"\u5916\u8FB9\u6846",type:"pie",clockWise:!1,hoverAnimation:!1,center:["50%","50%"],radius:["85%","85%"],tooltip:{show:!1},label:{normal:{show:!1}},data:[{value:9,name:"",itemStyle:{normal:{borderWidth:2,borderColor:"#0b5263"}}}]}]};me(t,a)}function rt(){const t=K(he.value);let e={title:{text:"",subtext:""},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"15%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:{type:"category",data:we,axisLine:{lineStyle:{color:"rgba(255, 255, 255, 0.7)",width:1,type:"solid"},axisLabel:{color:"rgba(255, 255, 255, 0.7)",fontWeight:400,fontFamily:"SourceHanSansCN-Regular, SourceHanSansCN",fontSize:14}}},yAxis:{name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.7)"},splitLine:{lineStyle:{type:"solid",color:"rgba(255, 255, 255, 0.3)"}},minInterval:1,axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"\u597D",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:P.good,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(50, 148, 1, 1)",color:new O(0,0,0,1,[{offset:0,color:"rgba(50, 148, 1, 1)"},{offset:1,color:"rgba(50, 148, 1, 1)"}])}}},{name:"\u8F83\u597D",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:P.better,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(154, 208, 0, 1)",color:new O(0,0,0,1,[{offset:0,color:"rgba(154, 208, 0, 1)"},{offset:1,color:"rgba(154, 208, 0, 1)"}])}}},{name:"\u9002\u4E2D",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:P.moderate,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(234, 219, 0, 1)",color:new O(0,0,0,1,[{offset:0,color:"rgba(234, 219, 0, 1)"},{offset:1,color:"rgba(234, 219, 0, 1)"}])}}},{name:"\u8F83\u5DEE",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:P.poor,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(239, 152, 0, 1)",color:new O(0,0,0,1,[{offset:0,color:"rgba(239, 152, 0, 1)"},{offset:1,color:"rgba(239, 152, 0, 1)"}])}}},{name:"\u5DEE",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:P.difference,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(247, 85, 0, 1)",color:new O(0,0,0,1,[{offset:0,color:"rgba(247, 85, 0, 1)"},{offset:1,color:"rgba(247, 85, 0, 1)"}])}}}]};e&&t.setOption(e,{notMerge:!0,grid:{bottom:20}}),me(t,e)}function st(t,e){let a=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:t,parameters:{service:"WMS",format:"image/png",transparent:!0}});a.customName=e;let o=n.imageryLayers.addImageryProvider(a);e.indexOf("gbznt")>-1&&(n.imageryLayers.lowerToBottom(o),n.imageryLayers.raise(o))}function lt(){E(["gbznt"],!0),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),ae.value=!1}function Me(){const t=K(ye.value);console.log(p),console.log(R);var e={grid:{bottom:"8%",left:"10%",right:"6%",top:"12%",containLabel:!0},tooltip:{formatter:function(a){return a.seriesName+''+a.value.toFixed(2)+"\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:R.title,inverse:!0}],series:[{type:"bar",name:"\u597D",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"\u597D",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(50, 148, 1, 1)"},{offset:1,color:"rgba(50, 148, 1, 1)"}]}},data:p.value.good},{type:"bar",name:"\u8F83\u597D",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u8F83\u597D",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(154, 208, 0, 1)"},{offset:1,color:"rgba(154, 208, 0, 1)"}]}},data:p.value.better},{type:"bar",name:"\u9002\u4E2D",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u9002\u4E2D",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(234, 219, 0, 1)"},{offset:1,color:"rgba(234, 219, 0, 1)"}]}},data:p.value.moderate},{type:"bar",name:"\u8F83\u5DEE",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u8F83\u5DEE",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(239, 152, 0, 1)"},{offset:1,color:"rgba(239, 152, 0, 1)"}]}},data:p.value.difference},{type:"bar",name:"\u5DEE",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!1,position:"inside",formatter:"\u5DEE",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{barBorderRadius:[0,0,0,0],barBorderRadius:[0,0,0,0],color:{colorStops:[{offset:0,color:"rgba(247, 85, 0, 1)"},{offset:1,color:"rgba(247, 85, 0, 1)"}]}},data:p.value.poor}]};me(t,e)}function it(){let t=We.value;console.log("fl:",t),ue({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson"}).then(e=>{console.log("res1111:",e),e.data.features.forEach((o,r)=>{const s=Cesium.Rectangle.fromDegrees(o.bbox[0],o.bbox[1],o.bbox[2],o.bbox[3]),i=Cesium.Rectangle.center(s);Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude),o.properties.XZDM==="370211011"||o.properties.XZDM;const c=t[o.properties.XZMC];c&&c.map((h,x)=>h.properties)})}).catch(e=>{})}let We=d({});function nt(){ue({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(t=>{let e=t.data.features,a={};e.forEach(o=>{let r=o.properties.town;a[r]?a[r].push(o):a[r]=[o]}),We.value=a,it()}).catch(t=>{})}function de(){if(L.value.lon&&L.value.lat){const e=Cesium.Cartesian3.fromDegrees(Number(L.value.lon),Number(L.value.lat),0);var t=Cesium.SceneTransforms.wgs84ToWindowCoordinates(n.scene,e);if(Cesium.defined(t)){const a=document.getElementById("popup");a&&(a.style.top=t.y-10+"px",a.style.left=t.x+10+"px")}}}function Y(){const t=document.getElementById("popup");t&&(t.style.display="none"),n.scene.postRender.removeEventListener(de)}function Te(t){const e=document.getElementById("popup");e&&(e.style.display="block",e.style.position="absolute",e.style.top=t.y-10+"px",e.style.left=t.x+10+"px",e.style.zIndex=99)}return(t,e)=>{const a=k("el-table-column"),o=k("el-table"),r=k("el-tooltip"),s=k("el-option"),i=k("el-select"),c=k("el-checkbox"),h=k("el-checkbox-group"),x=k("el-collapse-item"),f=k("el-collapse"),m=k("el-button");return y(),C("div",Lt,[Mt,l("div",Wt,[l("div",Tt,[l("div",It,[Nt,l("p",{onClick:e[0]||(e[0]=u=>Ye())},[W(" \u4E0B\u8F7D \xA0 "),zt])]),l("div",{ref_key:"areaDiv",ref:be,class:"areaDiv"},null,512),l("div",{ref_key:"leftProgressBarDiv",ref:Fe,class:"ProgressBar"},null,512)]),l("div",Pt,[l("div",Et,[Ft,l("p",{onClick:e[1]||(e[1]=u=>He())},[W(" \u4E0B\u8F7D \xA0 "),Bt])]),l("div",{ref_key:"typesofDiv",ref:ve,class:"typesofDiv"},null,512),l("div",At,[_(o,{data:b(I),style:{width:"100%"}},{default:w(()=>[_(a,{prop:"date",label:"\u7C7B\u578B"}),_(a,{prop:"name",label:"\u9762\u79EF(\u4EA9)"}),_(a,{prop:"address",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),l("div",{class:"leftFoldDiv",onClick:e[2]||(e[2]=u=>Je())},[_(r,{class:"box-item","show-arrow":!1,disabled:b(T),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:w(()=>[b(T)?B("v-if",!0):(y(),C("img",Rt))]),_:1},8,["disabled"]),_(r,{disabled:!b(T),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:w(()=>[b(T)?(y(),C("img",Zt)):B("v-if",!0)]),_:1},8,["disabled"])])]),l("div",Xt,[l("div",Ot,[l("div",$t,[qt,l("p",{onClick:e[3]||(e[3]=u=>Ke())},[W(" \u4E0B\u8F7D \xA0 "),Qt])]),l("div",{ref_key:"farmlandDiv",ref:he,class:"farmlandDiv"},null,512),B('
')]),l("div",jt,[l("div",Jt,[Vt,l("p",{onClick:e[4]||(e[4]=u=>et())},[W(" \u4E0B\u8F7D \xA0 "),Gt])]),_(i,{"popper-class":"select_city",onChange:e[5]||(e[5]=u=>ne(t.item)),modelValue:g.value,"onUpdate:modelValue":e[6]||(e[6]=u=>g.value=u),placeholder:"\u5168\u90E8"},{default:w(()=>[(y(!0),C(fe,null,pe(b(S).arr,u=>(y(),ge(s,{key:u.subregion,label:u.subregionName,value:u.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:ye,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:e[7]||(e[7]=u=>Ve())},[_(r,{disabled:!b(z),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:w(()=>[b(z)?(y(),C("img",Ut)):B("v-if",!0)]),_:1},8,["disabled"]),_(r,{disabled:b(z),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:w(()=>[b(z)?B("v-if",!0):(y(),C("img",Yt))]),_:1},8,["disabled"])])]),l("div",Ht,[_(kt)]),Kt,l("div",ea,[l("div",null,[W(" \u7B49\u7EA7\uFF1A "),l("p",null,X(L.value.grade),1)]),l("div",null,[W(" \u7ECF\u5EA6\uFF1A "),l("p",null,X(L.value.lon),1)]),l("div",null,[W(" \u7EAC\u5EA6\uFF1A "),l("p",null,X(L.value.lat),1)]),l("div",{class:"cancel",onClick:Y},"X")]),l("div",ta,[(y(!0),C(fe,null,pe(b(J).label,(u,N)=>(y(),C("div",{key:N},[l("div",null,X(u.crop)+"\uFF1A",1),l("div",null,X(u.Shape_Area.toFixed(2))+" \u4EA9",1)]))),128)),b(J).XZQMC?(y(),C("div",aa,[oa,l("div",null,X(b(J).XZQMC),1)])):B("v-if",!0),l("div",{class:"cancel",onClick:Y},"X")]),_(f,{class:"legend",accordion:""},{default:w(()=>[_(x,{name:"1"},{title:w(()=>[W("\u56FE\u4F8B")]),default:w(()=>[l("div",ra,[_(h,{modelValue:b(A),"onUpdate:modelValue":e[8]||(e[8]=u=>pt(A)?A.value=u:A=u),onChange:Re},{default:w(()=>[(y(!0),C(fe,null,pe(b(se),(u,N,F)=>(y(),ge(c,{key:F,style:gt({backgroundColor:u.color,border:"1px solid value.color",width:"100%"}),"v-model":u.disabled,disabled:u.disabled,label:N},null,8,["style","v-model","disabled","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),_:1}),ae.value?(y(),ge(m,{key:0,class:"back_button",onClick:e[9]||(e[9]=u=>lt())},{default:w(()=>[W("\u8FD4\u56DE")]),_:1})):B("v-if",!0)])}}},ga=ct(sa,[["__scopeId","data-v-1e2a71d9"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/site/Site.vue"]]);export{ga as default};