Agriculture-front-end/dist/assets/index.70d3de0a.js
2023-06-06 10:46:36 +08:00

2 lines
31 KiB
JavaScript

import{z as Q,_ as ut,r as d,A as ue,B as ft,C as pt,D as fe,d as k,o as y,c as C,l,m as I,e as _,w,f as b,g as B,J as pe,K as ge,k as me,x as O,I as gt,Q as mt,y as bt,p as vt,q as ht}from"./index.68b143c5.js";import te from"./downloads.e955445d.js";import{_ as ae}from"./close1.45635d81.js";import{_ as yt,a as _t,b as xt,c as wt,d as St,e as kt}from"./linesGL.90f708a5.js";import{i as ee,L as $}from"./index.c9f5bd8b.js";import{T as Ct}from"./TimeLine.1547a2ac.js";import{u as q,w as Ne}from"./xlsx.86b9426e.js";import{u as be}from"./useEcharts.758855d9.js";function Pe(v){return Q({url:"crops/farmland",method:"get",params:v})}function Dt(v){return Q({url:"crops/statistics",method:"get",params:v})}function Ee(v){return Q({url:"crops/highStandards",method:"get",params:v})}function Fe(v){return Q({url:"crops/gradeStatistics",method:"get",params:v})}function Be(v){return Q({url:"crops/administrativeDivisions",method:"get",params:v})}function Lt(){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=>(vt("data-v-6a6af1d2"),v=v(),ht(),v),Mt={class:"center"},Tt=D(()=>l("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),It={class:"leftWra"},Wt={class:"leftTop"},zt={class:"title"},Nt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1",-1)),Pt=D(()=>l("img",{src:te,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Et={class:"leftbottom"},Ft={class:"title"},Bt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4",-1)),At=D(()=>l("img",{src:te,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Rt={class:"tableDiv"},Zt={key:0,src:ae,alt:""},Xt={key:0,class:"imgrotate",src:ae,alt:""},Ot={class:"rightWra"},$t={class:"rightTop"},qt={class:"title"},Qt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530",-1)),Jt=D(()=>l("img",{src:te,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),jt={class:"rightbottom"},Gt={class:"title"},Vt=D(()=>l("span",null,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212",-1)),Ut=D(()=>l("img",{src:te,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Yt={key:0,src:ae,alt:""},Ht={key:0,class:"imgrotate",src:ae,alt:""},Kt={class:"bottom_center"},ea=bt('<div class="tool" data-v-6a6af1d2><span data-v-6a6af1d2><img src="'+yt+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+_t+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+xt+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+wt+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+St+'" alt="" data-v-6a6af1d2></span><span data-v-6a6af1d2><img src="'+kt+'" alt="" data-v-6a6af1d2></span></div>',1),ta={id:"popup"},aa={id:"pop"},oa={key:0},ra=D(()=>l("div",null,"\u6751\u540D\uFF1A",-1)),sa={class:"mt-4"},la={__name:"index",setup(v){let n=d(null);const ve=d(null),he=d(null),ye=d(null);d(null);const _e=d(null),g=d("370211"),Ae=d(null);let S=ue({arr:[],brr:[],crr:[]});ue({arr:[]});const L=d({}),Re=d([]),xe=d([]),j=d(!1);let W=d(!0),P=d(!0);d("{x:765,y:191}");let we=d([]),oe=d([]),re=d(0);d([]);let A=d(["false"]),Se=d([]),ke=["\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"],E={good:[],better:[],moderate:[],poor:[],difference:[]};ue({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 G=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}};ft(()=>A.value,(a,e)=>{a.length>e.length?(a.filter(o=>{if(e.findIndex(s=>s===o)<0)return o}).forEach(o=>{switch(o){case"\u597D":J(5,o);break;case"\u8F83\u597D":J(4,o);break;case"\u9002\u4E2D":J(3,o);break;case"\u8F83\u5DEE":J(2,o);break;case"\u5DEE":J(1,o);break}}),Ie("shuzisannong:huangdaoqu_town","tl")):a.length<e.length&&e.filter(o=>{if(a.findIndex(s=>s===o)<0)return o}).forEach(o=>{console.log(o),M([o])})});var R={title:[]};let p=d({good:[],better:[],difference:[],moderate:[],poor:[]});const Ze=()=>{console.log(Re.value)};let z=d([]);pt(()=>{De("370211"),Le("370211"),Ue(),Me("370211"),Oe(),qe();for(const a in se)se[a].disabled!==!0&&(console.log(a),Se.value.push(a));A.value=Se.value});const Xe={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 Oe(){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({...Xe})}),n.cesiumWidget.creditContainer.style.display="none",n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:0}),Qe(),dt()}function le(a,e,t){a.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:t?Cesium.Color.fromCssColorString(t):Cesium.Color.fromBytes(250,128,114)}),clampToGround:!0}})})}function $e(a){return a>48e6?0:a>24e6?1:a>12e6?2:a>6e6?3:a>3e6?4:a>15e5?5:a>75e4?6:a>375e3?7:a>187500?8:a>93750?9:a>46875?10:a>23437.5?11:a>11718.75?12:a>5859.38?13:a>2929.69?14:a>1464.84?15:a>732.42?16:a>366.21?17:18}function qe(){fe({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afarmland&maxFeatures=50&outputFormat=application%2Fjson",method:"get"}).then(a=>{console.log("\u519C\u7530\uFF1A",a),xe.value=a.data.features}).catch(a=>{})}let Z=d({label:[]}),V="";function Qe(){var a=new Cesium.ScreenSpaceEventHandler(n.canvas);a.setInputAction(function(e){var t=n.camera.getPickRay(e.position),o=n.scene.globe.pick(t,n.scene);if(o){let r=Cesium.Cartographic.fromCartesian(o);if(r){let s=new Cesium.Cartesian2,i=n.camera.positionCartographic.height,c=$e(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 T=N[0];if(T.properties&&T.properties.XZDM)if(console.log("XZDM:",V),console.log("newData.properties.XZDM:",T.properties.XZDM),V!==T.properties.XZDM){j.value=!0,V=T.properties.XZDM,g.value=V,ie&&ie();let X=T.data;n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(X.bbox[0],X.bbox[1],X.bbox[2],X.bbox[3]),duration:2}),U("townLine"),le(X.geometry&&X.geometry.coordinates,"townLine","yellow"),M(["village_CQL"]),console.log(T.properties.XZDM),Ce(`XZDM=${T.properties.XZDM}`,"village_CQL");let K=n.entities._entities._array;for(var F=K.length-1;F>=0;F--)if(K[F]._name&&K[F]._name==="point"+T.properties.XZDM){let ct=K[F]._info;Z.value=ct,ce(e.position),n.scene.postRender.addEventListener(de)}U("villageLine"),ne=""}else Je(h,s,c,r,e);else M(["village_CQL"]),H()}})}}}}},Cesium.ScreenSpaceEventType.LEFT_CLICK)}let ne="";function Je(a,e,t,o,r){const s=a.findIndex(i=>i._imageryProvider._layers&&i._imageryProvider._layers==="shuzisannong:huangdaoqu_village");if(s>-1){const i=a[s];let c=i._imageryProvider;if(c&&c.ready&&c._layers&&i.show===!0){e=c.tilingScheme.positionToTileXY(o,t,e);let h=c.pickFeatures(e.x,e.y,t,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(ne!==f.properties.XZQDM){ne=f.properties.XZQDM;let m=f.data;U("villageLine"),le(m.geometry&&m.geometry.coordinates,"villageLine","yellow")}else je(a,e,t,o,r)}})}}}function je(a,e,t,o,r){console.log(a);const s=a.findIndex(i=>i._imageryProvider._layers&&i._imageryProvider._layers==="shuzisannong:growth");if(s>-1){const i=a[s];let c=i._imageryProvider;if(c&&c.ready&&c._layers&&i.show===!0){e=c.tilingScheme.positionToTileXY(o,t,e);let h=c.pickFeatures(e.x,e.y,t,o.longitude,o.latitude);h&&h.then(x=>{if(x.length>0){let f=x[0],m="";switch(f.properties.value){case 1:m="\u597D";break;case 2:m="\u8F83\u597D";break;case 3:m="\u9002\u4E2D";break;case 4:m="\u8F83\u5DEE";break;case 5:m="\u5DEE";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),ce(r.position),n.scene.postRender.addEventListener(de)}})}}}function J(a,e){let t=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:growth",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:`value in (${a})`}});t.customName=e,n.imageryLayers.addImageryProvider(t)}function Ce(a,e){let t=new Cesium.WebMapServiceImageryProvider({url:`${serverAPI.geoserverUrl}/shuzisannong/wms`,layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:a}});t.customName=e,n.imageryLayers.addImageryProvider(t)}function M(a,e){if(n){const t=n.imageryLayers._layers;for(let o=t.length-1;o>=0;o--)a.forEach(r=>{t[o]._imageryProvider&&t[o]._imageryProvider.customName&&(e?t[o]._imageryProvider.customName.indexOf(r)>-1&&n.imageryLayers.remove(t[o]):t[o]._imageryProvider.customName===r&&n.imageryLayers.remove(t[o]))})}}function U(a){if(n){let t=n.entities._entities._array;for(var e=t.length-1;e>=0;e--)t[e]._name&&t[e]._name===a&&n.entities.remove(t[e])}}function Ge(){if(W.value=!W.value,W.value){let a=document.querySelector(".leftWra");a&&(a.style.transform="translate(0,0)")}else{let a=document.querySelector(".leftWra");a&&(a.style.transform="translate(-107%,0)")}console.log(W.value)}function Ve(){if(P.value=!P.value,P.value){let a=document.querySelector(".rightWra");a.style.transform="translate(0,0)"}else{let a=document.querySelector(".rightWra");a.style.transform="translate(107%,0)"}}const De=a=>{we=d([]),oe=d([]),Pe({divisions:a}).then(e=>{for(const t in e.data[0])e.data[0][t]&&(we.value.push(t),oe.value.push(e.data[0][t]));ot()})},Le=a=>{G=d([]),z.value=[],re=d(0),Dt({divisions:a}).then(e=>{console.log(e.data),e.data.forEach(t=>{re.value=Number(t.sum),console.log(t);for(const o in t){o!=="sum"&&Number.isFinite(t[o])&&(G.value.push({name:o,value:t[o]}),z.value.push({date:o,name:t[o]})),z.value.forEach(s=>{t[`${s.date}Zb`]!==void 0&&(s.address=(t[`${s.date}Zb`]*100).toFixed(2)+"%")});let r=JSON.parse(JSON.stringify(z.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}}),z.value=r}}),rt()})},Ue=()=>{d([]),Ee().then(a=>{ke.forEach((e,t)=>{a.data.map(o=>{if(e===o.region)for(const r in o)E[r]&&E[r].push(o[r])})}),st()})},Me=a=>{p.value.better=[],p.value.difference=[],p.value.good=[],p.value.moderate=[],p.value.poor=[],Fe({divisions:a,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 t=[...e.data],o=[];t.splice(0,1),t.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),We()})},Ye=a=>{let e={good:[],better:[],difference:[],moderate:[],poor:[]};Be({divisions:a}).then(t=>{console.log(t.data),S.brr=t.data;let o=[...t.data],r=[];o.forEach(s=>{r.indexOf(s.subregionName)==-1&&r.push(s.subregionName)}),R.title=[...Object.values(r)],R.title.forEach((s,i)=>{t.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,We()})},ie=()=>{Lt().then(e=>{console.log(e),e.features.forEach(t=>{t.properties.XZDM==g.value&&(U("townLine"),le(t.geometry.coordinates,"townLine","yellow"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(t.bbox[0],t.bbox[1],t.bbox[2],t.bbox[3]),duration:0}))})}),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),De(g.value),Le(g.value),g.value!=="370211"&&Ye(g.value),g.value=="370211"&&(M(["village_CQL"]),M(["aaa"]),Me(),H());let a=[...S.arr];console.log("arr:",a),[...S.arr],M(["aaa"]),Ce(`XZDM=${g.value}`,"aaa")},He=a=>{let e="";S.arr.forEach(t=>{t.subregion==g.value&&(e=t.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":t.subregionName)}),Pe({divisions:g.value}).then(t=>{let o=[{region:e=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":e,good:t.data[0].good,better:t.data[0].better,moderate:t.data[0].moderate,poor:t.data[0].poor,difference:t.data[0].difference}];Y(o,`${o[0].region}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u7EDF\u8BA1`,"Sheet1")})},Ke=a=>{let e="";S.arr.forEach(t=>{t.subregion==g.value&&(e=t.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":t.subregionName)}),console.log(z),at(z.value,`${e}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u9762\u79EF\u5360\u6BD4`,"Sheet1")},et=a=>{let e=[];Ee().then(t=>{console.log(t.data),t.data.forEach(o=>{e.push({region:o.region,good:o.good,better:o.better,moderate:o.moderate,poor:o.poor,difference:o.difference})}),Y(e,"\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530\u5217\u8868","Sheet1")})},tt=a=>{let e="",t=[];S.arr.forEach(o=>{o.subregion==g.value&&(e=o.subregionName=="\u5168\u90E8"?"\u9EC4\u5C9B\u533A":o.subregionName)}),g.value==="370211"?Fe({divisions:g.value,whetherToDownload:!1}).then(o=>{o.data.forEach(r=>{console.log(r),t.push({region:r.subregionName,good:r.good,better:r.better,moderate:r.moderate,poor:r.poor,difference:r.difference})}),Y(t,`${e}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212`,"Sheet1")}):Be({divisions:g.value,whetherToDownload:!1}).then(o=>{o.data.forEach(r=>{t.push({region:r.subregionName,good:r.good,better:r.better,moderate:r.moderate,poor:r.poor,difference:r.difference})}),Y(t,`${e}\u4F5C\u7269\u957F\u52BF\u7B49\u7EA7\u7EDF\u8BA1-\u884C\u653F\u533A\u5212`,"Sheet1")})},Te=(a,e)=>a.map(o=>{const r={};for(const s in o)e[s]&&(r[e[s]]=o[s]);return r}),Y=(a,e="\u7528\u6237\u5217\u8868",t="Sheet1")=>{const r=Te(a,{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=q.json_to_sheet(r),i=q.book_new();q.book_append_sheet(i,s,t),Ne(i,`${e}.xlsx`)},at=(a,e="\u7528\u6237\u5217\u8868",t="Sheet1")=>{const r=Te(a,{date:"\u7C7B\u578B",name:"\u9762\u79EF(\u4EA9)",address:"\u5360\u6BD4"}),s=q.json_to_sheet(r),i=q.book_new();q.book_append_sheet(i,s,t),Ne(i,`${e}.xlsx`)};function ot(){const a=ee(ve.value);let e=["\u597D","\u8F83\u597D","\u9002\u4E2D","\u8F83\u5DEE","\u5DEE"],t=oe.value,o=!1;t.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:t,barWidth:"15",itemStyle:{normal:{color:new $(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&&a.setOption(r),window.addEventListener("resize",function(){a.resize()})}function rt(){const a=ee(he.value);G.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=G.value;let t={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} <br/>{b} : {c}\u4EA9 <br/>\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"}}}]}]};be(a,t)}function st(){const a=ee(ye.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:ke,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:E.good,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(50, 148, 1, 1)",color:new $(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:E.better,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(154, 208, 0, 1)",color:new $(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:E.moderate,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(234, 219, 0, 1)",color:new $(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:E.poor,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(239, 152, 0, 1)",color:new $(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:E.difference,itemStyle:{normal:{borderWidth:1,borderColor:"rgba(247, 85, 0, 1)",color:new $(0,0,0,1,[{offset:0,color:"rgba(247, 85, 0, 1)"},{offset:1,color:"rgba(247, 85, 0, 1)"}])}}}]};a.on("click",function(t){console.log(t.name)}),a.on("click",t=>nt(t)),e&&a.setOption(e,{notMerge:!0,grid:{bottom:20}}),be(a,e)}function Ie(a,e){let t=new Cesium.WebMapServiceImageryProvider({url:serverAPI.geoserverUrl+"/shuzisannong/wms?",layers:a,parameters:{service:"WMS",format:"image/png",transparent:!0}});t.customName=e;let o=n.imageryLayers.addImageryProvider(t);e.indexOf("gbznt")>-1&&(n.imageryLayers.lowerToBottom(o),n.imageryLayers.raise(o))}function lt(){M(["gbznt"],!0),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),j.value=!1}function nt(a){console.log("item:",a),M(["huangdaoqu_town"],!0),M(["tl"],!0);let e="shuzisannong:farmland",t=!1;const o=n.imageryLayers._layers;for(let s=o.length-1;s>=0;s--)o[s]&&o[s]._imageryProvider.customName&&o[s]._imageryProvider.customName===e+"gbznt"&&(t=!0);t||Ie(e,e+"gbznt"),xe.value.forEach(s=>{console.log("it.properties.name:",s.properties.name),console.log("item.name:",a.name),s.properties.name===a.name&&(console.log("dingwei"),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(s.bbox[0],s.bbox[1],s.bbox[2],s.bbox[3]),duration:2}))}),j.value=!0,Z.value={label:[{crop:"\u5C0F\u9EA6",Shape_Area:"53000"},{crop:"\u5730\u74DC",Shape_Area:"50000"}]},console.log(Z.label),ce({x:642,y:312})}function We(){const a=ee(_e.value);console.log(p),console.log(R);var e={grid:{bottom:"8%",left:"10%",right:"6%",top:"12%",containLabel:!0},tooltip:{formatter:function(t){return t.seriesName+'<span style="font-size: 14px; color: #f00;">'+t.value.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: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}]};be(a,e)}function it(){let a=ze.value;console.log("fl:",a),fe({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=a[o.properties.XZMC];c&&c.map((h,x)=>h.properties)})}).catch(e=>{})}let ze=d({});function dt(){fe({url:serverAPI.geoserverUrl+"/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Afenlei&maxFeatures=137&outputFormat=application%2Fjson"}).then(a=>{let e=a.data.features,t={};e.forEach(o=>{let r=o.properties.town;t[r]?t[r].push(o):t[r]=[o]}),ze.value=t,it()}).catch(a=>{})}function de(){if(L.value.lon&&L.value.lat){const e=Cesium.Cartesian3.fromDegrees(Number(L.value.lon),Number(L.value.lat),0);var a=Cesium.SceneTransforms.wgs84ToWindowCoordinates(n.scene,e);if(Cesium.defined(a)){const t=document.getElementById("popup");t&&(t.style.top=a.y-10+"px",t.style.left=a.x+10+"px")}}}function H(){const a=document.getElementById("popup");a&&(a.style.display="none"),n.scene.postRender.removeEventListener(de)}function ce(a){const e=document.getElementById("popup");e&&(e.style.display="block",e.style.position="absolute",e.style.top=a.y-10+"px",e.style.left=a.x+10+"px",e.style.zIndex=99)}return(a,e)=>{const t=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",Mt,[Tt,l("div",It,[l("div",Wt,[l("div",zt,[Nt,l("p",{onClick:e[0]||(e[0]=u=>He())},[I(" \u4E0B\u8F7D \xA0 "),Pt])]),l("div",{ref_key:"areaDiv",ref:ve,class:"areaDiv"},null,512),l("div",{ref_key:"leftProgressBarDiv",ref:Ae,class:"ProgressBar"},null,512)]),l("div",Et,[l("div",Ft,[Bt,l("p",{onClick:e[1]||(e[1]=u=>Ke())},[I(" \u4E0B\u8F7D \xA0 "),At])]),l("div",{ref_key:"typesofDiv",ref:he,class:"typesofDiv"},null,512),l("div",Rt,[_(o,{data:b(z),style:{width:"100%"}},{default:w(()=>[_(t,{prop:"date",label:"\u7C7B\u578B"}),_(t,{prop:"name",label:"\u9762\u79EF(\u4EA9)"}),_(t,{prop:"address",label:"\u5360\u6BD4"})]),_:1},8,["data"])])]),l("div",{class:"leftFoldDiv",onClick:e[2]||(e[2]=u=>Ge())},[_(r,{class:"box-item","show-arrow":!1,disabled:b(W),"hide-after":"0","show-after":"200",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:w(()=>[b(W)?B("v-if",!0):(y(),C("img",Zt))]),_:1},8,["disabled"]),_(r,{disabled:!b(W),"show-arrow":!1,class:"box-item","show-after":"200","hide-after":"0",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:w(()=>[b(W)?(y(),C("img",Xt)):B("v-if",!0)]),_:1},8,["disabled"])])]),l("div",Ot,[l("div",$t,[l("div",qt,[Qt,l("p",{onClick:e[3]||(e[3]=u=>et())},[I(" \u4E0B\u8F7D \xA0 "),Jt])]),l("div",{ref_key:"farmlandDiv",ref:ye,class:"farmlandDiv"},null,512),B(' <div ref="ProgressBarDiv" class="ProgressBar"></div> ')]),l("div",jt,[l("div",Gt,[Vt,l("p",{onClick:e[4]||(e[4]=u=>tt())},[I(" \u4E0B\u8F7D \xA0 "),Ut])]),_(i,{"popper-class":"select_city",onChange:e[5]||(e[5]=u=>ie(a.item)),modelValue:g.value,"onUpdate:modelValue":e[6]||(e[6]=u=>g.value=u),clearable:"",placeholder:"\u5168\u90E8"},{default:w(()=>[(y(!0),C(pe,null,ge(b(S).arr,u=>(y(),me(s,{key:u.subregion,label:u.subregionName,value:u.subregion},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",{ref_key:"ASdivisionDiv",ref:_e,class:"ASdivision"},null,512)]),l("div",{class:"rightFoldDiv",onClick:e[7]||(e[7]=u=>Ve())},[_(r,{disabled:!b(P),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:w(()=>[b(P)?(y(),C("img",Yt)):B("v-if",!0)]),_:1},8,["disabled"]),_(r,{disabled:b(P),"show-arrow":!1,"hide-after":"0","show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:w(()=>[b(P)?B("v-if",!0):(y(),C("img",Ht))]),_:1},8,["disabled"])])]),l("div",Kt,[_(Ct)]),ea,l("div",ta,[l("div",null,[I(" \u7B49\u7EA7\uFF1A "),l("p",null,O(L.value.grade),1)]),l("div",null,[I(" \u7ECF\u5EA6\uFF1A "),l("p",null,O(L.value.lon),1)]),l("div",null,[I(" \u7EAC\u5EA6\uFF1A "),l("p",null,O(L.value.lat),1)]),l("div",{class:"cancel",onClick:H},"X")]),l("div",aa,[(y(!0),C(pe,null,ge(b(Z).label,(u,N)=>(y(),C("div",{key:N},[l("div",null,O(u.crop)+"\uFF1A",1),l("div",null,O(u.Shape_Area.toFixed(2))+" \u4EA9",1)]))),128)),b(Z).XZQMC?(y(),C("div",oa,[ra,l("div",null,O(b(Z).XZQMC),1)])):B("v-if",!0),l("div",{class:"cancel",onClick:H},"X")]),_(f,{class:"legend",accordion:""},{default:w(()=>[_(x,{name:"1"},{title:w(()=>[I("\u56FE\u4F8B")]),default:w(()=>[l("div",sa,[_(h,{modelValue:b(A),"onUpdate:modelValue":e[8]||(e[8]=u=>gt(A)?A.value=u:A=u),onChange:Ze},{default:w(()=>[(y(!0),C(pe,null,ge(b(se),(u,N,F)=>(y(),me(c,{key:F,style:mt({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}),j.value?(y(),me(m,{key:0,class:"back_button",onClick:e[9]||(e[9]=u=>lt())},{default:w(()=>[I("\u8FD4\u56DE")]),_:1})):B("v-if",!0)])}}},ma=ut(la,[["__scopeId","data-v-6a6af1d2"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/site/index.vue"]]);export{ma as default};