2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
import Qe from"./downloads.4cdbbcc5.js";import{_ as he}from"./linesGL.99030c5a.js";import{_ as Ve,a as Ie,b as Me,c as Ne}from"./position.a021215f.js";import{_ as Te,a as We}from"./face.2eec3bdc.js";import{_ as Je}from"./icon.d0cb5387.js";import"./index.e2d056fa.js";import{T as Pe}from"./TimeLine.5d80dd5c.js";import{u as de}from"./useEcharts.7cdde45a.js";import{d as ue}from"./download.67ee05d3.js";import{K as M,_ as Ye,r as d,D as Be,t as $e,X as Oe,x as Z,v as Xe,M as ce,d as q,o as b,c as E,k as i,m as G,f as S,j as Q,w as L,P as H,Q as U,l as V,e as I,I as Re,y as pe,B as Ze,p as He,q as Ue}from"./index.db81687b.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 K(f){return M({url:"equipment/abandon",method:"get",params:f})}function me(f){return M({url:"equipment/abandonChun",method:"get",params:f})}function et(f){return M({url:"equipment/abandonHuoChun",method:"get",params:f})}function tt(f){return M({url:"equipment/cityAndCountZb",method:"get",params:f})}function at(f){return M({url:"equipment/lhdyear",method:"get",params:f})}const j=f=>(He("data-v-121b42f0"),f=f(),Ue(),f),ot={class:"center"},rt=j(()=>i("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),nt={class:"rightWra"},st={class:"rightbottom"},lt={class:"title"},it=j(()=>i("span",null,"\u6482\u8352\u8015\u5730\u9762\u79EF\u7EDF\u8BA1",-1)),dt=j(()=>i("img",{src:Qe,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),ut={class:"rightbottom"},ct=j(()=>i("div",{class:"title"},[i("span",null,"\u6482\u8352\u8015\u5730\u9762\u79EF\u5360\u6BD4")],-1)),pt={key:0,src:he,alt:""},gt={key:0,class:"imgrotate",src:he,alt:""},ft={class:"mt-4"},mt={class:"bottom_center"},ht=Ze('<div class="tool" data-v-121b42f0><span data-v-121b42f0><img src="'+Ve+'" alt="" data-v-121b42f0></span><span data-v-121b42f0><img src="'+Ie+'" alt="" data-v-121b42f0></span><span data-v-121b42f0><img src="'+Me+'" alt="" data-v-121b42f0></span><span data-v-121b42f0><img src="'+Te+'" alt="" data-v-121b42f0></span><span data-v-121b42f0><img src="'+We+'" alt="" data-v-121b42f0></span><span data-v-121b42f0><img src="'+Ne+'" alt="" data-v-121b42f0></span></div>',1),vt={id:"popup",class:"ol-popup"},yt=j(()=>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)),bt={id:"popup-content",style:{padding:"10px"}},_t={class:"perform_children"},wt=j(()=>i("img",{src:Je},null,-1)),St=j(()=>i("span",null,"\u6482\u8352\u5730",-1)),xt=j(()=>i("div",{id:"popup-pagination"},null,-1)),Ct={__name:"index",setup(f){d(null);const J=d(null),P=d(null);let A=Be({arr:[],brr:[],crr:[]}),k=d([]);const m=d("370211"),ve=d(!1);let z=d(!0);const F=d([]);let ee=d([]),Y=d([]),B=d([]),y=d(""),$=!(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 ye=e=>{m.value=="370211"?K({yearMonth:y.value.name,whetherToDownload:!0}).then(t=>{ue(t.data[t.data.length-1].downloadPath)}):me({divisions:m.value,yearMonth:y.value.name,whetherToDownload:!0}).then(t=>{ue(t.data[t.data.length-1].downloadPath)})};let O={\u6482\u8352\u5730:{color:"rgba(175, 110, 250, 0.8)",disabled:!1}},D={\u6482\u8352\u5730:{setOf:"2022-12-31-liaohuang",name:"T2022_12_31_liaohuang"}},N=d(null);$e(()=>{be()});function be(){je(),_e(),ke(),Le(),se();for(const e in O)O[e].disabled!==!0&&ee.value.push(e);F.value=ee.value,console.log(F.value)}Oe(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"}),Z(()=>y.value,(e,t)=>{m.value=window.localStorage.getItem("divisions"),se(m.value,y.value.name),$?re(y.value.name):ne(m.value,y.value.name)});let n=d(null);d(null),d(null);let ae=d(null),T=d(null);function _e(){var e=document.querySelector(".center"),t=document.getElementById("cesiumContainer");n=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"})})]}),Se(),xe(),n.on("moveend",function(a){var o=n.getView().getZoom();o>=13?N.setVisible(!0):N.setVisible(!1)}),n.on("singleclick",function(a){var o=a.coordinate;if($){var l=o[0],u=o[1],h=n.getView(),_=n.getView().getZoom();h.animate({center:[l,u],duration:1e3}),_>=13?W(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie","\u6751"):W(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie","\u9547")}else{let w="http://36.134.44.75:8090/iserver/services/data-huangdaoqu_bianjie/rest/data",r=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:"XJQY3702112019WGS84@huangdaoqu_bianjie",attributeFilter:`XJQYMC = '${te}'`},datasetNames:["huangdaoqu_bianjie:XJQY3702112019WGS84"]});new ol.supermap.FeatureService(w).getFeaturesBySQL(r,function(c){let x=new ol.format.GeoJSON().readFeatures(c.result.features),p=new ol.source.Vector;p.addFeatures(x);let C=new ol.layer.Vector({source:p}).getSource().getFeatures();for(var g=0;g<C.length;g++)if(C[g].getGeometry().intersectsCoordinate(o)){var R=o[0],De=o[1],Fe=n.getView(),Ge=n.getView().getZoom();Fe.animate({center:[R,De],duration:1e3}),Ge>=13?W(a,"CJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie","\u6751"):W(a,"XJQY3702112019WGS84@huangdaoqu_bianjie","http://36.134.44.75:8090/iserver/services/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie","\u9547")}})}});var s=new ResizeObserver(function(a){a.forEach(function(o){var l=o.contentRect.width,u=o.contentRect.height;t.style.width=l+"px",t.style.height=u+"px",n.updateSize()})});s.observe(e),we(te)}function we(e){let t="",s="",a="",o="",l="";s="http://36.134.44.75:8090/iserver/services/data-huangdaoqu_bianjie/rest/data",t=e,a="XJQY3702112019WGS84",o="huangdaoqu_bianjie",l="XJQYMC";var u=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:`${a}@${o}`,attributeFilter:`${l} like '%${t}%'`},datasetNames:[`${o}:${a}`]});new ol.supermap.FeatureService(s).getFeaturesBySQL(u,function(h){if(h.result.featureCount!=0){var _=n.getLayers().getArray().find(v=>v.get("id")==="zhezhao");n.removeLayer(_);var w=n.getLayers().getArray().find(v=>v.get("id")==="dianjigaoliang");n.removeLayer(w);var r=new ol.format.GeoJSON().readFeatures(h.result.features);X(h.result.features.features[0].geometry.coordinates,"qu","rgba( 105, 105, 105, 1)",9999);var c=new ol.source.Vector;c.addFeatures(r);const p=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var x=new ol.layer.Vector({id:"dianjigaoliang",source:c});x.setStyle(p),n.addLayer(x),n.getView().fit(c.getExtent())}})}const Se=()=>{N=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}),n.addLayer(N)},xe=()=>{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});n.addLayer(e)},Ce=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"});n.addLayer(t)};function W(e,t,s,a){let o=[];var l=new ol.geom.Point(e.coordinate),u=new ol.supermap.QueryByGeometryParameters({queryParams:{name:t},geometry:l});let h=document.querySelector("#popup-title"),_=d(null),w=d(null);new ol.supermap.QueryService(s).queryByGeometry(u,function(r){w=n.getLayers().getArray().find(p=>p.get("id")==="zhezhao"),n.removeLayer(w);let c="";if(a=="\u9547"&&r.result.recordsets[0].features.features[0].properties.XJQYDM){let p=r.result.recordsets[0].features.features[0].properties.XJQYDM;m.value=p;let v=[];K({yearMonth:y.value.name}).then(C=>{C.data.forEach(g=>{console.log(g.subregionCode,p),g.subregionCode==p&&(c=g.subregionName,v.push(g))}),x(),Y.value=v})}else if(a=="\u6751"&&r.result.recordsets[0].features.features[0].properties.CJQYDM){let p=r.result.recordsets[0].features.features[0].properties.CJQYDM,v=[];et({divisions:p,yearMonth:y.value.name}).then(C=>{C.data.forEach(g=>{g.subregionCode==p&&(c=g.subregionName,console.log(g),v.push(g))}),Y.value=v,x()})}function x(){if(r.result.currentCount>0){console.log(r.result.recordsets[0].features),r.result.recordsets[0].features&&(T.setPosition(l.flatCoordinates),console.log(c),h.innerHTML=c),_=n.getLayers().getArray().find(R=>R.get("id")==="dianjigaoliang"),n.removeLayer(_);var p=new ol.format.GeoJSON().readFeatures(r.result.recordsets[0].features);o=r.result.recordsets[0].features.features[0].geometry.coordinates,X(r.result.recordsets[0].features.features[0].geometry.coordinates);var v=new ol.source.Vector;v.addFeatures(p);const g=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var C=new ol.layer.Vector({id:"dianjigaoliang",source:v,zIndex:9999});C.setStyle(g),n.addLayer(C)}}}),ae.addEventListener("click",function(){w=n.getLayers().getArray().find(r=>r.get("id")==="zhezhao"),n.removeLayer(w),oe(o),m.value=window.localStorage.getItem("divisions"),_=n.getLayers().getArray().find(r=>r.get("id")==="dianjigaoliang"),n.removeLayer(_),T.setPosition(void 0)})}const Le=()=>{document.getElementById("popup"),document.getElementById("popup-content"),ae=document.getElementById("popup-closer"),T=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),n.addOverlay(T)};function ke(){Xe.get("/json/huangdao.json").then(({data:e})=>{const s=new ol.format.GeoJSON().readFeatures(e)[0];X(s.getGeometry().getCoordinates(),"huandao")})}function X(e,t,s,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:s||"rgba( 105, 105, 105, 0.9)"})})});const u=oe(e),h=new ol.Feature({geometry:u});l.getSource().addFeature(h),n.addLayer(l)}function oe(e){console.log(e);const t=[-180,-90,180,90],s=ol.geom.Polygon.fromExtent(t),a=e;return console.log(a),a.forEach(o=>{const l=new ol.geom.LinearRing(o[0]);s.appendLinearRing(l)}),s}Z(()=>m.value,()=>{ze()}),Z(()=>F.value,(e,t)=>{e.length>t.length?e.filter(a=>{if(t.findIndex(l=>l===a)<0)return a}).forEach(a=>{D[a]&&(console.log(D[a]),Ce(D[a]))}):e.length<t.length&&t.filter(a=>{if(e.findIndex(l=>l===a)<0)return a}).forEach(a=>{D[a]&&(n.getLayers().getArray().indexOf(D[a].name),console.log(n.getLayers().getArray()),n.getLayers().getArray().forEach((o,l)=>{o.A.name&&o.A.name==D[a].name&&n.getLayers().removeAt(l)}))})});function qe(){if(z.value=!z.value,z.value){let e=document.querySelector(".rightWra");e.style.transform="translate(0,0)"}else{let e=document.querySelector(".rightWra");e.style.transform="translate(107%,0)"}}const je=()=>{at().then(e=>{y.value={name:e.data[0]},e.data.forEach(t=>{B.value.push({name:t})})})},re=e=>{K({yearMonth:e}).then(t=>{A.arr=[],k.value=[],t.data.forEach(o=>{o.wasteland>0&&(A.arr.push(o),k.value.push(o))}),A.arr.unshift({subregionCode:"370211",subregionName:"\u5168\u90E8"}),console.log(A.arr);let s=[...t.data],a=[];s.splice(0,1),s.forEach(o=>{a.push(o.subregionCode)}),[...Object.values(a)],le(A.arr),ie()})},ne=(e,t)=>{me({divisions:e,yearMonth:t}).then(s=>{k.value=[],s.data.forEach(a=>{a.wasteland>0&&k.value.push(a)}),le(),ie()})},se=(e,t)=>{tt({divisions:e,yearMonth:t}).then(s=>{console.log(s.data)})},ze=()=>{m.value=="370211"?re(y.value.name):m.value&&ne(m.value,y.value.name)},Ee=e=>{y.value=e};function le(){const e=fe(J.value);k.value.sort((u,h)=>h.wasteland-u.wasteland);var t=[],s=[];k.value.forEach(u=>{t.push(u.subregionName),s.push(Number(u.wasteland).toFixed(2))});let a=3/k.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(175, 110, 250, 1)"},{offset:1,color:"rgba(175, 110, 250, 0.8)"}])}},label:{show:!0,position:"top",textStyle:{color:"#ffffff"}},data:s,z:0}]};e.on("click",u=>Ae(u)),de(e,o),ge().listenTo(J.value,()=>{ce(()=>{e.resize()})})}function ie(){const e=fe(P.value);let t=k.value,s=0;t.forEach(l=>{l.name=l.subregionName,l.value=Number(l.wasteland).toFixed(2),s+=l.wasteland});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:"\u6482\u8352\u8015\u5730\u603B\u9762\u79EF",subtext:`${s.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:"\u6482\u8352\u8015\u5730\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"}}}]}]};de(e,a),ge().listenTo(P.value,()=>{ce(()=>{e.resize()})})}function Ae(e){console.log("\u53F3\u4E0B\u70B9\u51FB",e)}return(e,t)=>{const s=q("el-option"),a=q("el-select"),o=q("el-tooltip"),l=q("el-checkbox"),u=q("el-checkbox-group"),h=q("el-collapse-item"),_=q("el-collapse"),w=q("el-button");return b(),E("div",ot,[rt,i("div",nt,[i("div",st,[i("div",lt,[it,i("p",{onClick:t[0]||(t[0]=r=>ye())},[G(" \u4E0B\u8F7D \xA0 "),dt])]),S($)?(b(),Q(a,{key:0,"popper-class":"select_city",modelValue:m.value,"onUpdate:modelValue":t[1]||(t[1]=r=>m.value=r),clearable:"",placeholder:"\u5168\u90E8"},{default:L(()=>[(b(!0),E(H,null,U(S(A).arr,r=>(b(),Q(s,{key:r.subregionCode,label:r.subregionName,value:r.subregionCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):V("",!0),i("div",{ref_key:"ASdivisionDiv",ref:J,class:"ASdivision"},null,512)]),i("div",ut,[ct,i("div",{ref_key:"typesofDiv",ref:P,class:"typesofDiv"},null,512)]),i("div",{class:"rightFoldDiv",onClick:t[2]||(t[2]=r=>qe())},[I(o,{disabled:!S(z),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:L(()=>[S(z)?(b(),E("img",pt)):V("",!0)]),_:1},8,["disabled"]),I(o,{disabled:S(z),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:L(()=>[S(z)?V("",!0):(b(),E("img",gt))]),_:1},8,["disabled"])])]),I(_,{class:"legend",accordion:""},{default:L(()=>[I(h,{name:"1"},{title:L(()=>[G("\u56FE\u4F8B")]),default:L(()=>[i("div",ft,[I(u,{modelValue:F.value,"onUpdate:modelValue":t[3]||(t[3]=r=>F.value=r),onChange:e.change},{default:L(()=>[(b(!0),E(H,null,U(S(O),(r,c,x)=>(b(),Q(l,{key:x,"v-model":r.disabled,disabled:r.disabled,label:c},{default:L(()=>[i("span",{style:Re({background:r.color,border:`1px solid ${r.color}`,width:"10px",height:"10px",display:"flex","margin-right":"5px"})},null,4),G(" "+pe(c),1)]),_:2},1032,["v-model","disabled","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1})]),_:1}),i("div",mt,[S(B).length>0?(b(),Q(Pe,{key:0,dataSource:S(B),onDataHandle:Ee},null,8,["dataSource"])):V("",!0)]),ht,i("div",vt,[yt,i("div",bt,[(b(!0),E(H,null,U(S(Y),(r,c)=>(b(),E("div",{class:"perform",key:c},[i("div",_t,[wt,St,G(" : "),i("span",null,pe(Number(r.wasteland).toFixed(2))+"(\u4EA9)",1)])]))),128))]),xt]),ve.value?(b(),Q(w,{key:0,class:"back_button",onClick:t[4]||(t[4]=r=>e.back())},{default:L(()=>[G("\u8FD4\u56DE")]),_:1})):V("",!0)])}}},Nt=Ye(Ct,[["__scopeId","data-v-121b42f0"]]);export{Nt as default};
|