Agriculture-front-end/dist/assets/index.5bcf05c9.js
2023-07-11 08:43:34 +08:00

2 lines
15 KiB
JavaScript

import{H as W,_ as ke,r as d,A as Ce,V as Le,W as Fe,U as Y,a1 as Ee,d as w,o as p,c as L,l as i,m as G,e as A,w as x,L as J,N as O,f as v,k as I,g as M,F as ze,x as De,y as Ae,p as qe,q as je}from"./index.afd881ee.js";import Ve from"./downloads.4cdbbcc5.js";import{_ as se}from"./close1.45635d81.js";import{_ as Ne,a as Te,b as Ge,c as Ie}from"./position.a021215f.js";import{_ as Me,a as We}from"./TimeLine.vue_vue_type_style_index_0_scoped_26e8a223_lang.891b9335.js";import{_ as Be}from"./icon.d0cb5387.js";import"./index.6098b0aa.js";import"./linesGL.306b5757.js";import{T as Pe}from"./TimeLine.7d9e99e3.js";import{u as ae}from"./useEcharts.a1c5140e.js";import{i as ne,L as Re}from"./install.6cb28b74.js";function re(c){return W({url:"equipment/nonFood",method:"get",params:c})}function Ye(c){return W({url:"equipment/nonFoodChun",method:"get",params:c})}function Je(c){return W({url:"equipment/nonFoodHuoChun",method:"get",params:c})}function Oe(c){return W({url:"equipment/flYear ",method:"get",params:c})}const S=c=>(qe("data-v-8f171897"),c=c(),je(),c),Qe={class:"center"},$e=S(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),He={class:"rightWra"},Ue={class:"rightbottom"},Xe={class:"title"},Ze=S(()=>i("span",null,"\u975E\u7CAE\u5316\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),Ke=S(()=>i("img",{src:Ve,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),et={class:"rightbottom"},tt=S(()=>i("div",{class:"title"},[i("span",null,"\u975E\u7CAE\u5316\u8015\u5730\u9762\u79EF\u5360\u6BD4")],-1)),ot={key:0,src:se,alt:""},at={key:0,class:"imgrotate",src:se,alt:""},nt={class:"mt-4"},rt={class:"bottom_center"},st=Ae('<div class="tool" data-v-8f171897><span data-v-8f171897><img src="'+Ne+'" alt="" data-v-8f171897></span><span data-v-8f171897><img src="'+Te+'" alt="" data-v-8f171897></span><span data-v-8f171897><img src="'+Ge+'" alt="" data-v-8f171897></span><span data-v-8f171897><img src="'+Me+'" alt="" data-v-8f171897></span><span data-v-8f171897><img src="'+We+'" alt="" data-v-8f171897></span><span data-v-8f171897><img src="'+Ie+'" alt="" data-v-8f171897></span></div>',1),lt={id:"popup",class:"ol-popup"},it=S(()=>i("div",{class:"pophead",style:{width:"100%"}},[i("div",{id:"popup-title",style:{"font-size":"20px","font-weight":"400","letter-spacing":"1px",color:"rgba(246, 255, 255, 1)","line-height":"42px","padding-left":"45px"}}),i("a",{href:"#",id:"popup-closer",class:"ol-popup-closer"})],-1)),dt={id:"popup-content",style:{padding:"10px"}},ct={class:"perform_children"},ut=S(()=>i("img",{src:Be},null,-1)),pt=S(()=>i("span",null,"\u975E\u7CAE\u5316",-1)),ft=S(()=>i("div",{id:"popup-pagination"},null,-1)),mt={__name:"index",setup(c){d(null);const Q=d(null),$=d(null);let F=Ce({arr:[],brr:[],crr:[]}),g=d([]);const h=d("370211");d({info:[]});const le=d(!1);d(!0);let k=d(!0);const j=d([]);let H=d([]),B=d([]),P=d([]),C=d("");const ie=e=>{de(e)},de=e=>{let t=document.createElement("a");t.style.display="none",t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)};let R={\u975E\u7CAE\u5316:{color:"rgba(47, 236, 56, 0.8)",disabled:!1}},E={\u975E\u7CAE\u5316:{setOf:"2022-06-01-gengdi",name:"T2022_06_01_feilianghua"}},V=d(null);Le(()=>{ce()});function ce(){ye(),ue(),he(),ge();for(const e in R)R[e].disabled!==!0&&H.value.push(e);j.value=H.value}Fe(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"}),Y(()=>C.value,(e,t)=>{h.value="370211",ee(C.value.name)});let l=d(null);d(null),d(null);let U=d(null),N=d(null);function ue(){var e=document.querySelector(".center"),t=document.getElementById("cesiumContainer");l=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.86763411957472,35.88435182141938],zoom:11,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.Tianditu({layerType:"img",key:"1d109683f4d84198e37a38c442d68311"})})]}),pe(),fe(),l.on("moveend",function(o){var a=l.getView().getZoom();a>=13?V.setVisible(!0):V.setVisible(!1)}),l.on("singleclick",function(o){var a=o.coordinate,s=a[0],f=a[1],q=l.getView(),y=l.getView().getZoom();console.log(s,f),q.animate({center:[s,f],duration:1e3}),y>=13?X(o,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie","\u6751"):X(o,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie","\u9547")});var r=new ResizeObserver(function(o){o.forEach(function(a){var s=a.contentRect.width,f=a.contentRect.height;t.style.width=s+"px",t.style.height=f+"px",l.updateSize()})});r.observe(e)}const pe=()=>{V=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:"http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"huangdaoqu_village",projection:"EPSG:4326",zIndex:9999}),l.addLayer(V)},fe=()=>{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%40huangdaoqu_bianjie",cacheEnabled:!1}),projection:"EPSG:4326",zIndex:9999});l.addLayer(e)},me=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"});l.addLayer(t)};function X(e,t,r,o){let a=[];var s=new ol.geom.Point(e.coordinate),f=new ol.supermap.QueryByGeometryParameters({queryParams:{name:t},geometry:s});let q=document.querySelector("#popup-title"),y=d(null),z=d(null);new ol.supermap.QueryService(r).queryByGeometry(f,function(n){z=l.getLayers().getArray().find(u=>u.get("id")==="zhezhao"),l.removeLayer(z);let _="";if(o=="\u9547"&&n.result.recordsets[0].features.features[0].properties.XJQYDM){let u=n.result.recordsets[0].features.features[0].properties.XJQYDM;h.value=u;let b=[];re({divisions:"370211",yearMonth:C.value.name}).then(D=>{D.data.forEach(m=>{m.subregionCode==u&&(_=m.subregionName,b.push(m))}),T(),B.value=b})}else if(o=="\u6751"&&n.result.recordsets[0].features.features[0].properties.CJQYDM){let u=n.result.recordsets[0].features.features[0].properties.CJQYDM,b=[];Je({divisions:u,yearMonth:C.value.name}).then(D=>{D.data.forEach(m=>{m.subregionCode==u&&(_=m.subregionName,console.log(m),b.push(m))}),B.value=b,T()})}function T(){if(n.result.currentCount>0){console.log(n.result.recordsets[0].features),n.result.recordsets[0].features&&(N.setPosition(s.flatCoordinates),console.log(_),q.innerHTML=_),y=l.getLayers().getArray().find(Se=>Se.get("id")==="dianjigaoliang"),l.removeLayer(y);var u=new ol.format.GeoJSON().readFeatures(n.result.recordsets[0].features);a=n.result.recordsets[0].features.features[0].geometry.coordinates,Z(n.result.recordsets[0].features.features[0].geometry.coordinates);var b=new ol.source.Vector;b.addFeatures(u);const m=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var D=new ol.layer.Vector({id:"dianjigaoliang",source:b,zIndex:9999});D.setStyle(m),l.addLayer(D)}}}),U.addEventListener("click",function(){z=l.getLayers().getArray().find(n=>n.get("id")==="zhezhao"),l.removeLayer(z),K(a),h.value="370211",y=l.getLayers().getArray().find(n=>n.get("id")==="dianjigaoliang"),l.removeLayer(y),N.setPosition(void 0)})}const ge=()=>{document.getElementById("popup"),document.getElementById("popup-content"),U=document.getElementById("popup-closer"),N=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),l.addOverlay(N)};function he(){Ee.get("/json/huangdao.json").then(({data:e})=>{const r=new ol.format.GeoJSON().readFeatures(e)[0];Z(r.getGeometry().getCoordinates(),"huandao")})}function Z(e,t){let r=new ol.source.Vector;var o=new ol.layer.Vector({id:t||"zhezhao",source:r,style:new ol.style.Style({fill:new ol.style.Fill({color:"rgba( 105, 105, 105, 0.9)"})})});const a=K(e),s=new ol.Feature({geometry:a});o.getSource().addFeature(s),l.addLayer(o)}function K(e){console.log(e);const t=[-180,-90,180,90],r=ol.geom.Polygon.fromExtent(t),o=e;return console.log(o),o.forEach(a=>{const s=new ol.geom.LinearRing(a[0]);r.appendLinearRing(s)}),r}Y(()=>h.value,()=>{be()}),Y(()=>j.value,(e,t)=>{e.length>t.length?e.filter(o=>{if(t.findIndex(s=>s===o)<0)return o}).forEach(o=>{E[o]&&(console.log(E[o]),me(E[o]))}):e.length<t.length&&t.filter(o=>{if(e.findIndex(s=>s===o)<0)return o}).forEach(o=>{E[o]&&(l.getLayers().getArray().indexOf(E[o].name),console.log(l.getLayers().getArray()),l.getLayers().getArray().forEach((a,s)=>{a.A.name&&a.A.name==E[o].name&&l.getLayers().removeAt(s)}))})});function ve(){if(k.value=!k.value,k.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 ye=()=>{Oe().then(e=>{C.value={name:e.data[0]},e.data.forEach(t=>{P.value.push({name:t})})})},ee=e=>{F.arr=[],g.value=[],re({yearMonth:e}).then(t=>{console.log(t.data),t.data.forEach(a=>{a.nonFarm>0&&(F.arr.push(a),g.value.push(a))}),F.arr.unshift({subregionCode:"370211",subregionName:"\u5168\u90E8"}),console.log(F.arr);let r=[...t.data],o=[];r.splice(0,1),r.forEach(a=>{o.push(a.subregionCode)}),[...Object.values(o)],te(F.arr),oe()})},_e=(e,t)=>{g.value=[],Ye({divisions:e,yearMonth:t}).then(r=>{r.data.forEach(o=>{o.nonFarm>0&&g.value.push(o)}),te(),oe()})},be=()=>{h.value=="370211"?ee():h.value&&_e(h.value,C.value.name)},we=e=>{C.value=e};function te(){const e=ne(Q.value);console.log(g.value),g.value.sort((s,f)=>f.nonFarm-s.nonFarm);var t=[],r=[];g.value.forEach(s=>{t.push(s.subregionName),r.push(Number(s.nonFarm).toFixed(2))}),console.log(r);let o=3/g.value.length*100;var a={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:o,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:"rgba(21, 222, 255, 0.8)"}}},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:"rgba(24, 255, 255, 0.8)",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 Re(0,0,0,1,[{offset:0,color:"rgba(47, 236, 56, 1)"},{offset:1,color:"rgba(47, 236, 56, 0.8)"}])}},label:{show:!0,position:"top",textStyle:{color:"#ffffff"}},data:r,z:0}]};e.on("click",s=>xe(s)),ae(e,a)}function oe(){const e=ne($.value);let t=g.value,r=0;t.forEach(a=>{a.name=a.subregionName,a.value=Number(a.nonFarm).toFixed(2),r+=a.nonFarm});let o={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\u7CAE\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\u7CAE\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"}}}]}]};ae(e,o)}function xe(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const r=w("el-option"),o=w("el-select"),a=w("el-tooltip"),s=w("el-checkbox"),f=w("el-checkbox-group"),q=w("el-collapse-item"),y=w("el-collapse"),z=w("el-button");return p(),L("div",Qe,[$e,i("div",He,[i("div",Ue,[i("div",Xe,[Ze,i("p",{onClick:t[0]||(t[0]=n=>ie("https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx"))},[G(" \u4E0B\u8F7D \xA0 "),Ke])]),A(o,{"popper-class":"select_city",modelValue:h.value,"onUpdate:modelValue":t[1]||(t[1]=n=>h.value=n),clearable:"",placeholder:"\u5168\u90E8"},{default:x(()=>[(p(!0),L(J,null,O(v(F).arr,n=>(p(),I(r,{key:n.subregionCode,label:n.subregionName,value:n.subregionCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i("div",{ref_key:"ASdivisionDiv",ref:Q,class:"ASdivision"},null,512)]),i("div",et,[tt,i("div",{ref_key:"typesofDiv",ref:$,class:"typesofDiv"},null,512)]),i("div",{class:"rightFoldDiv",onClick:t[2]||(t[2]=n=>ve())},[A(a,{disabled:!v(k),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:x(()=>[v(k)?(p(),L("img",ot)):M("v-if",!0)]),_:1},8,["disabled"]),A(a,{disabled:v(k),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:x(()=>[v(k)?M("v-if",!0):(p(),L("img",at))]),_:1},8,["disabled"])])]),A(y,{class:"legend",accordion:""},{default:x(()=>[A(q,{name:"1"},{title:x(()=>[G("\u56FE\u4F8B")]),default:x(()=>[i("div",nt,[A(f,{modelValue:j.value,"onUpdate:modelValue":t[4]||(t[4]=n=>j.value=n),onChange:e.change},{default:x(()=>[(p(!0),L(J,null,O(v(R),(n,_,T)=>(p(),I(s,{key:T,style:ze({background:n.color,border:`1px solid ${n.color}`,width:"100%"}),modelValue:e.checked3,"onUpdate:modelValue":t[3]||(t[3]=u=>e.checked3=u),disabled:n.disabled,label:_},null,8,["style","modelValue","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),i("div",rt,[v(P).length>0?(p(),I(Pe,{key:0,dataSource:v(P),onDataHandle:we},null,8,["dataSource"])):M("v-if",!0)]),st,i("div",lt,[it,i("div",dt,[(p(!0),L(J,null,O(v(B),(n,_)=>(p(),L("div",{class:"perform",key:_},[i("div",ct,[ut,pt,G(" : "),i("span",null,De(Number(n.nonFarm).toFixed(2))+"(\u4EA9)",1)])]))),128))]),ft]),le.value?(p(),I(z,{key:0,class:"back_button",onClick:t[5]||(t[5]=n=>e.back())},{default:x(()=>[G("\u8FD4\u56DE")]),_:1})):M("v-if",!0)])}}},Lt=ke(mt,[["__scopeId","data-v-8f171897"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/plough/Degrain/index.vue"]]);export{Lt as default};