Agriculture-front-end/dist/assets/index.ad7fc4a9.js
2023-07-26 17:29:34 +08:00

2 lines
18 KiB
JavaScript

import Qe from"./downloads.4cdbbcc5.js";import{_ as ve}from"./linesGL.99030c5a.js";import{_ as Te,a as Ve,b as Ie,c as We}from"./position.a021215f.js";import{_ as Je,a as Me}from"./face.2eec3bdc.js";import{K as $,_ as $e,r as u,D as Pe,t as Ye,X as Be,x as Z,v as Oe,M as de,d as q,o as b,c as j,k as i,m as Q,f as x,j as T,w as C,P as U,Q as K,l as V,e as I,I as Xe,y as ce,B as Re,p as He,q as Ze}from"./index.1974707a.js";import"./index.e2d056fa.js";import{T as Ue}from"./TimeLine.50b18dc6.js";import{u as pe}from"./useEcharts.2e9d7b11.js";import{d as me}from"./download.b14e0d1d.js";import{e as ge}from"./element-resize-detector.d8720798.js";import{i as fe,L as Ke}from"./install.49294472.js";/* empty css */function ee(v){return $({url:"equipment/nonFood",method:"get",params:v})}function he(v){return $({url:"equipment/nonFoodChun",method:"get",params:v})}function et(v){return $({url:"equipment/nonFoodHuoChun",method:"get",params:v})}function tt(v){return $({url:"equipment/fnYear ",method:"get",params:v})}const z=v=>(He("data-v-e328b2a4"),v=v(),Ze(),v),at={class:"center"},ot=z(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),rt={class:"rightWra"},nt={class:"rightbottom"},st={class:"title"},lt=z(()=>i("span",null,"\u975E\u519C\u5316\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),it=z(()=>i("img",{src:Qe,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ut={class:"rightbottom"},dt=z(()=>i("div",{class:"title"},[i("span",null,"\u975E\u519C\u5316\u8015\u5730\u9762\u79EF\u5360\u6BD4")],-1)),ct={key:0,src:ve,alt:""},pt={key:0,class:"imgrotate",src:ve,alt:""},mt={class:"mt-4"},gt={class:"bottom_center"},ft=Re('<div class="tool" data-v-e328b2a4><span data-v-e328b2a4><img src="'+Te+'" alt="" data-v-e328b2a4></span><span data-v-e328b2a4><img src="'+Ve+'" alt="" data-v-e328b2a4></span><span data-v-e328b2a4><img src="'+Ie+'" alt="" data-v-e328b2a4></span><span data-v-e328b2a4><img src="'+Je+'" alt="" data-v-e328b2a4></span><span data-v-e328b2a4><img src="'+Me+'" alt="" data-v-e328b2a4></span><span data-v-e328b2a4><img src="'+We+'" alt="" data-v-e328b2a4></span></div>',1),ht={id:"popup",class:"ol-popup"},vt=z(()=>i("div",{class:"pophead",style:{width:"100%",height:"20px"}},[i("div",{id:"popup-title",style:{font:"bold 15px sans-serif",align:"left",position:"absolute",left:"17px",color:"#fff"}}),i("a",{href:"#",id:"popup-closer",class:"ol-popup-closer",style:{color:"#8e908c"}})],-1)),yt={id:"popup-content",style:{padding:"10px"}},bt=z(()=>i("span",null,"\u975E\u519C\u5316",-1)),_t=z(()=>i("div",{id:"popup-pagination"},null,-1)),wt={__name:"index",setup(v){u(null);const P=u(null),Y=u(null);let D=Pe({arr:[],brr:[],crr:[]}),F=u([]);const y=u("370211");u({info:[]});const ye=u(!1);u(!0);let E=u(!0);const G=u([]);let A=u([]),B=u([]),O=u([]),c=u(""),X=!(window.localStorage.getItem("divisions").length>6),te=window.localStorage.getItem("deptName")=="\u9752\u5C9B\u897F\u6D77\u5CB8\u65B0\u533A"?"\u9EC4\u5C9B\u533A":window.localStorage.getItem("deptName");const be=e=>{y.value=="370211"?ee({yearMonth:c.value.name,whetherToDownload:!0}).then(t=>{me(t.data[t.data.length-1].downloadPath)}):he({divisions:y.value,yearMonth:c.value.name,whetherToDownload:!0}).then(t=>{me(t.data[t.data.length-1].downloadPath)})};let N={\u975E\u519C\u5316:{color:"rgba(255, 255, 0, 1)",disabled:!1}},_={},W=u(null);Ye(()=>{Ee(),_e()});function _e(){we(),Ce(),ke();for(const e in N)N[e].disabled!==!0&&A.value.push(e);G.value=A.value}Be(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"}),Z(()=>c.value,(e,t)=>{y.value=window.localStorage.getItem("divisions"),X?se(c.value.name):le(y.value,c.value.name);let a=c.value.name.replace(/-/g,"_");_={\u975E\u519C\u5316:{setOf:`${c.value.name}-gengdi`,name:`T${a}_feinonghua`}}});let s=u(null);u(null),u(null);let ae=u(null),J=u(null);function we(){var e=document.querySelector(".center"),t=document.getElementById("cesiumContainer");s=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,maxZoom:16.5,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.Tianditu({layerType:"img",key:"1d109683f4d84198e37a38c442d68311"})})]}),xe(),Le(),s.on("moveend",function(a){var o=s.getView().getZoom();o>=13?W.setVisible(!0):W.setVisible(!1)}),s.on("singleclick",function(a){var o=a.coordinate;if(X){var l=o[0],d=o[1],g=s.getView(),w=s.getView().getZoom();g.animate({center:[l,d],duration:1e3}),w>=13?M(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84@huangdaoqu_bianjie","\u6751"):M(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84@huangdaoqu_bianjie","\u9547")}else{let S="http://36.134.44.75:8090/iserver/services/data-huangdaoqu_bianjie/rest/data",n=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:"XJQY3702112019WGS84@huangdaoqu_bianjie",attributeFilter:`XJQYMC = '${te}'`},datasetNames:["huangdaoqu_bianjie:XJQY3702112019WGS84"]});new ol.supermap.FeatureService(S).getFeaturesBySQL(n,function(p){let L=new ol.format.GeoJSON().readFeatures(p.result.features),m=new ol.source.Vector;m.addFeatures(L);let k=new ol.layer.Vector({source:m}).getSource().getFeatures();for(var h=0;h<k.length;h++)if(k[h].getGeometry().intersectsCoordinate(o)){var H=o[0],De=o[1],Ae=s.getView(),Ne=s.getView().getZoom();Ae.animate({center:[H,De],duration:1e3}),Ne>=13?M(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84@huangdaoqu_bianjie","\u6751"):M(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84@huangdaoqu_bianjie","\u9547")}})}});var r=new ResizeObserver(function(a){a.forEach(function(o){var l=o.contentRect.width,d=o.contentRect.height;t.style.width=l+"px",t.style.height=d+"px",s.updateSize()})});r.observe(e),Se(te)}function Se(e){let t="",r="",a="",o="",l="";r="http://36.134.44.75:8090/iserver/services/data-huangdaoqu_bianjie/rest/data",t=e,a="XJQY3702112019WGS84",o="huangdaoqu_bianjie",l="XJQYMC";var d=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:`${a}@${o}`,attributeFilter:`${l} like '%${t}%'`},datasetNames:[`${o}:${a}`]});new ol.supermap.FeatureService(r).getFeaturesBySQL(d,function(g){if(g.result.featureCount!=0){var w=s.getLayers().getArray().find(f=>f.get("id")==="zhezhao");s.removeLayer(w);var S=s.getLayers().getArray().find(f=>f.get("id")==="dianjigaoliang");s.removeLayer(S);var n=new ol.format.GeoJSON().readFeatures(g.result.features);re(g.result.features.features[0].geometry.coordinates,"qu","rgba( 105, 105, 105, 1)",9999);var p=new ol.source.Vector;p.addFeatures(n);const m=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var L=new ol.layer.Vector({id:"dianjigaoliang",source:p});L.setStyle(m),s.addLayer(L),s.getView().fit(p.getExtent())}})}const xe=()=>{W=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84@huangdaoqu_bianjie",cacheEnabled:!1}),name:"huangdaoqu_village",projection:"EPSG:4326",zIndex:9999}),s.addLayer(W)},Le=()=>{var e=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84@huangdaoqu_bianjie",cacheEnabled:!1}),projection:"EPSG:4326",zIndex:9999});s.addLayer(e)},oe=e=>{let t=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl+`/map-${e.setOf}/rest/maps/${e.name}@${e.setOf}`,cacheEnabled:!1}),name:e.name,projection:"EPSG:4326"});s.addLayer(t)};function M(e,t,r,a){let o=[];var l=new ol.geom.Point(e.coordinate),d=new ol.supermap.QueryByGeometryParameters({queryParams:{name:t},geometry:l});let g=document.querySelector("#popup-title"),w=u(null),S=u(null);new ol.supermap.QueryService(r).queryByGeometry(d,function(n){S=s.getLayers().getArray().find(m=>m.get("id")==="zhezhao"),s.removeLayer(S);let p="";if(a=="\u9547"&&n.result.recordsets[0].features.features[0].properties.XJQYDM){let m=n.result.recordsets[0].features.features[0].properties.XJQYDM;y.value=m;let f=[];ee({divisions:"370211",yearMonth:c.value.name}).then(k=>{k.data.forEach(h=>{h.subregionCode==m&&(p=h.subregionName,f.push(h))}),L(),B.value=f})}else if(a=="\u6751"&&n.result.recordsets[0].features.features[0].properties.CJQYDM){let m=n.result.recordsets[0].features.features[0].properties.CJQYDM,f=[];et({divisions:m,yearMonth:c.value.name}).then(k=>{k.data.forEach(h=>{h.subregionCode==m&&(p=h.subregionName,f.push(h))}),B.value=f,L()})}function L(){if(n.result.currentCount>0){n.result.recordsets[0].features&&(J.setPosition(l.flatCoordinates),g.innerHTML=p),w=s.getLayers().getArray().find(H=>H.get("id")==="dianjigaoliang"),s.removeLayer(w);var m=new ol.format.GeoJSON().readFeatures(n.result.recordsets[0].features);o=n.result.recordsets[0].features.features[0].geometry.coordinates,re(n.result.recordsets[0].features.features[0].geometry.coordinates);var f=new ol.source.Vector;f.addFeatures(m);const h=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var k=new ol.layer.Vector({id:"dianjigaoliang",source:f,zIndex:9999});k.setStyle(h),s.addLayer(k)}}}),ae.addEventListener("click",function(){S=s.getLayers().getArray().find(n=>n.get("id")==="zhezhao"),s.removeLayer(S),ne(o),y.value=window.localStorage.getItem("divisions"),w=s.getLayers().getArray().find(n=>n.get("id")==="dianjigaoliang"),s.removeLayer(w),J.setPosition(void 0)})}const ke=()=>{document.getElementById("popup"),document.getElementById("popup-content"),ae=document.getElementById("popup-closer"),J=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),s.addOverlay(J)};function Ce(){Oe.get("/json/huangdao.json").then(({data:e})=>{new ol.format.GeoJSON().readFeatures(e)[0]})}function re(e,t,r,a){let o=new ol.source.Vector;var l=new ol.layer.Vector({id:t||"zhezhao",source:o,zIndex:a||50,style:new ol.style.Style({fill:new ol.style.Fill({color:r||"rgba( 105, 105, 105, 0.9)"})})});const d=ne(e),g=new ol.Feature({geometry:d});l.getSource().addFeature(g),s.addLayer(l)}function ne(e){const t=[-180,-90,180,90],r=ol.geom.Polygon.fromExtent(t);return e.forEach(o=>{const l=new ol.geom.LinearRing(o[0]);r.appendLinearRing(l)}),r}Z(()=>y.value,()=>{je()});let R=u(0);const Fe=()=>{R.value=0};Z(()=>G.value,(e,t)=>{e.length>t.length&&R.value<1?e.filter(a=>{if(t.findIndex(l=>l===a)<0)return a}).forEach(a=>{_[a]&&oe(_[a])}):e.length<t.length&&t.filter(a=>{if(e.findIndex(l=>l===a)<0)return a}).forEach(a=>{_[a]&&(s.getLayers().getArray().indexOf(_[a].name),s.getLayers().getArray().forEach((o,l)=>{o.A.name&&o.A.name==_[a].name&&s.getLayers().removeAt(l)}))})});function qe(){if(E.value=!E.value,E.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 Ee=()=>{tt().then(e=>{c.value={name:e.data[e.data.length-1]},e.data.forEach(a=>{O.value.push({name:a})});let r=c.value.name.replace(/-/g,"_");_={\u975E\u519C\u5316:{setOf:`${c.value.name}-gengdi`,name:`T${r}_feinonghua`}}})},se=e=>{ee({yearMonth:e}).then(t=>{D.arr=[],F.value=[],t.data.forEach(o=>{o.nonFarm>0&&(D.arr.push(o),F.value.push(o))}),D.arr.unshift({subregionCode:"370211",subregionName:"\u5168\u90E8"});let r=[...t.data],a=[];r.splice(0,1),r.forEach(o=>{a.push(o.subregionCode)}),[...Object.values(a)],ie(D.arr),ue()})},le=(e,t)=>{he({divisions:e,yearMonth:t}).then(r=>{F.value=[],r.data.forEach(a=>{a.nonFarm>0&&F.value.push(a)}),ie(),ue()})},je=()=>{y.value=="370211"?se(c.value.name):y.value&&le(y.value,c.value.name)},ze=e=>{R.value+=1,A.value=[];for(const r in N)N[r].disabled!==!0&&A.value.push(r);G.value=A.value;for(const r in _)s.getLayers().getArray().forEach((a,o)=>{a.A.name==_[r].name&&s.getLayers().removeAt(o)});c.value=e;let t=e.name.replace(/-/g,"_");_={\u975E\u519C\u5316:{setOf:`${e.name}-gengdi`,name:`T${t}_feinonghua`}},G.value.forEach(r=>{oe(_[r])})};function ie(){const e=fe(P.value);F.value.sort((d,g)=>g.nonFarm-d.nonFarm);var t=[],r=[];F.value.forEach(d=>{t.push(d.subregionName),r.push(Number(d.nonFarm).toFixed(2))});let a=3/F.value.length*100;var o={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!0,top:"10",right:"5%",textStyle:{color:"rgba(255,255,255,.9)"},itemWidth:20,itemHeight:12.5,icon:"rect",backgroundColor:"transparent"},dataZoom:[{type:"slider",width:"40%",zoomLock:!0,top:"90%",start:0,end:a,show:!1,showDataShadow:!1,showDetail:!1,fillerColor:"rgba(64, 158, 255)",borderRadius:"50%",moveHandleSize:0,moveHandleStyle:{},left:"35%",height:12,handleSize:"80%",handleIcon:"path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z",handleStyle:{borderWidth:0,color:"rgba(64, 158, 255)"}},{type:"inside"}],grid:{left:"5%",right:"5%",bottom:"9%",top:"10%",containLabel:!0},xAxis:{data:t,triggerEvent:!0,axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#70F5FE"}},axisLabel:{show:!0,rotate:0,interval:0,textStyle:{padding:[8,0,0,0],fontSize:14,color:"#fff"}}},yAxis:{name:"",triggerEvent:!0,nameTextStyle:{color:"rgba(255,255,255,1)",fontSize:16,padding:[0,0,10,-20]},splitLine:{show:!0,lineStyle:{color:"#A6D9F6",type:"dashed"}},axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,textStyle:{color:"#fff",fontSize:14}}},series:[{name:"\u9762\u79EF(\u4EA9)",barMinHeight:10,type:"pictorialBar",barCategoryGap:"60%",symbolOffset:[1,-5],symbol:"path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z",itemStyle:{normal:{color:new Ke(0,0,0,1,[{offset:0,color:"rgba(255, 255, 0, 1)"},{offset:1,color:"rgba(255, 255, 0, 1)"}])}},label:{show:!0,position:"top",textStyle:{color:"#ffffff"}},data:r,z:0}]};e.on("click",d=>Ge(d)),pe(e,o),ge().listenTo(P.value,()=>{de(()=>{e.resize()})})}function ue(){const e=fe(Y.value);let t=F.value,r=0;t.forEach(l=>{l.name=l.subregionName,l.value=Number(l.nonFarm).toFixed(2),r+=l.nonFarm});let a={color:["rgba(49, 235, 7, 1)","rgba(84, 170, 255, 1)","rgba(255, 251, 0, 1)","rgba(255, 168, 8, 1)","rgba(255, 0, 255, 1)"],title:{text:"\u975E\u519C\u5316\u603B\u9762\u79EF",subtext:`${r.toFixed(2)}\u4EA9`,textStyle:{color:"#f2f2f2",fontSize:14},subtextStyle:{fontSize:14,color:["#ff9d19"]},x:"center",y:"center"},grid:{top:0},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:"\u975E\u519C\u5316\u9762\u79EF\u5360\u6BD4",data:t},{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"}}}]}]};pe(e,a),ge().listenTo(Y.value,()=>{de(()=>{e.resize()})})}function Ge(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const r=q("el-option"),a=q("el-select"),o=q("el-tooltip"),l=q("el-checkbox"),d=q("el-checkbox-group"),g=q("el-collapse-item"),w=q("el-collapse"),S=q("el-button");return b(),j("div",at,[ot,i("div",rt,[i("div",nt,[i("div",st,[lt,i("p",{onClick:t[0]||(t[0]=n=>be())},[Q(" \u4E0B\u8F7D \xA0 "),it])]),x(X)?(b(),T(a,{key:0,"popper-class":"select_city",modelValue:y.value,"onUpdate:modelValue":t[1]||(t[1]=n=>y.value=n),clearable:"",placeholder:"\u5168\u90E8"},{default:C(()=>[(b(!0),j(U,null,K(x(D).arr,n=>(b(),T(r,{key:n.subregionCode,label:n.subregionName,value:n.subregionCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):V("",!0),i("div",{ref_key:"ASdivisionDiv",ref:P,class:"ASdivision"},null,512)]),i("div",ut,[dt,i("div",{ref_key:"typesofDiv",ref:Y,class:"typesofDiv"},null,512)]),i("div",{class:"rightFoldDiv",onClick:t[2]||(t[2]=n=>qe())},[I(o,{disabled:!x(E),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:C(()=>[x(E)?(b(),j("img",ct)):V("",!0)]),_:1},8,["disabled"]),I(o,{disabled:x(E),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:C(()=>[x(E)?V("",!0):(b(),j("img",pt))]),_:1},8,["disabled"])])]),I(w,{class:"legend",accordion:""},{default:C(()=>[I(g,{name:"1"},{title:C(()=>[Q("\u56FE\u4F8B")]),default:C(()=>[i("div",mt,[I(d,{modelValue:G.value,"onUpdate:modelValue":t[3]||(t[3]=n=>G.value=n),onChange:Fe},{default:C(()=>[(b(!0),j(U,null,K(x(N),(n,p,L)=>(b(),T(l,{key:L,"v-model":n.disabled,disabled:n.disabled,label:p},{default:C(()=>[i("span",{style:Xe({background:n.color,border:`1px solid ${n.color}`,width:"10px",height:"10px",display:"flex","margin-right":"5px"})},null,4),Q(" "+ce(p),1)]),_:2},1032,["v-model","disabled","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),_:1}),i("div",gt,[x(O).length>0?(b(),T(Ue,{key:0,dataSource:x(O),onDataHandle:ze},null,8,["dataSource"])):V("",!0)]),ft,i("div",ht,[vt,i("div",yt,[(b(!0),j(U,null,K(x(B),(n,p)=>(b(),j("div",{key:p},[i("p",null,[bt,Q(" : "),i("span",null,ce(Number(n.nonFarm).toFixed(2))+"(\u4EA9)",1)])]))),128))]),_t]),ye.value?(b(),T(S,{key:0,class:"back_button",onClick:t[4]||(t[4]=n=>e.back())},{default:C(()=>[Q("\u8FD4\u56DE")]),_:1})):V("",!0)])}}},Nt=$e(wt,[["__scopeId","data-v-e328b2a4"]]);export{Nt as default};