Agriculture-front-end/dist/assets/index.009e2932.js
2023-04-23 09:41:12 +08:00

11 lines
16 KiB
JavaScript

import{_ as j,r as c,H as Y,z as q,d as x,o as k,c as T,l as o,e as s,w as I,F,A as $,f as H,k as K,g as ee,y as ae,p as te,q as oe,m as z}from"./index.b3c890dc.js";import B from"./downloads.e955445d.js";import{g as re,a as le,b as se,c as ie,_ as ne,d as de,e as ce,f as ue,h as me,i as pe}from"./classify.0fc28e56.js";import{i as g,L as b}from"./index.b2678f26.js";import{u as f,T as ge}from"./useEcharts.5be8131e.js";const p=h=>(te("data-v-85d900c0"),h=h(),oe(),h),be={class:"center"},fe=p(()=>o("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),he={class:"leftWra"},ve={class:"leftTop"},ye=p(()=>o("div",{class:"title"},[o("span",null,"\u4F5C\u7269\u5206\u7C7B\u9762\u79EF\u7EDF\u8BA1")],-1)),xe={class:"leftbottom"},we=p(()=>o("div",{class:"title"},[o("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1")],-1)),ke={class:"rightWra"},Se={class:"rightTop"},_e=p(()=>o("div",{class:"title"},[o("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u9AD8\u6807\u51C6\u519C\u7530"),o("p",null,[z(" \u4E0B\u8F7D \xA0 "),o("img",{src:B,style:{width:"14px",height:"14px",cursor:"pointer"}})])],-1)),Le={class:"rightbottom"},Ce=p(()=>o("div",{class:"title"},[o("span",null,"\u4F5C\u7269\u7C7B\u578B\u7EDF\u8BA1-\u884C\u653F\u533A\u5212"),o("p",null,[z(" \u4E0B\u8F7D \xA0 "),o("img",{src:B,style:{width:"14px",height:"14px",cursor:"pointer"}})])],-1)),Ve={class:"legend"},Me=p(()=>o("p",null,"\u56FE\u4F8B",-1)),De={class:"mt-4"},Te={class:"bottom_center"},Ie=ae('<div class="tool" data-v-85d900c0><span data-v-85d900c0><img src="'+ne+'" alt="" data-v-85d900c0></span><span data-v-85d900c0><img src="'+de+'" alt="" data-v-85d900c0></span><span data-v-85d900c0><img src="'+ce+'" alt="" data-v-85d900c0></span><span data-v-85d900c0><img src="'+ue+'" alt="" data-v-85d900c0></span><span data-v-85d900c0><img src="'+me+'" alt="" data-v-85d900c0></span><span data-v-85d900c0><img src="'+pe+'" alt="" data-v-85d900c0></span></div>',1),ze={__name:"index",setup(h){let n=c(null);const S=c(null),_=c(null),L=c(null),C=c(null),V=c(null);let u=Y({arr:[],brr:[],crr:[]});const m=c("");let W={\u5C0F\u9EA6:"rgba(102, 142, 214, 0.8)",\u7389\u7C73:"rgba(255, 225, 104, 0.8)",\u5927\u8C46:"rgba(156, 220, 130, 0.8)",\u5730\u74DC:"rgba(156, 220, 130, 0.8)",\u82B1\u751F:"rgba(212, 236, 89, 0.8)",\u84DD\u8393:"rgba(50, 211, 235, 0.8)",\u8336\u53F6:"rgba(91, 196, 159, 0.8)",\u9A6C\u94C3\u85AF:"rgba(254, 182, 77, 0.8)",\u767D\u83DC\u548C\u841D\u535C:"rgba(250, 129, 109, 0.8)",\u5176\u4ED6:"rgba(250, 129, 109, 0.8)"};var d={title:["\u533A\u57DF\u4E00","\u533A\u57DF\u4E8C","\u533A\u57DF\u4E09","\u533A\u57DF\u56DB","\u533A\u57DF\u4E94","\u533A\u57DF\u516D","\u533A\u57DF\u4E03","\u533A\u57DF\u516B"],corn:[333.3,null,500,500,333.3,null,333.3,500],soybean:[333.3,null,null,null,333.3,null,333.3,null],peanut:[333.3,500,500,null,333.3,500,333.3,null],wheat:[null,500,null,500,null,500,null,null],Blueberries:[null,null,null,null,null,null,null,500]};q(()=>{J(),D(),E(),P(),R(),X(),G(),Q(),w(),U()});const A={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 P(){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({...A})});let a=new Cesium.WebMapServiceImageryProvider({url:"http://121.36.229.60:9080/geoserver/shuzisannong/wms",layers:"shuzisannong:huangdaoqu_town",parameters:{service:"WMS",format:"image/png",transparent:!0}});n.imageryLayers.addImageryProvider(a),n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(119.5091,35.5671,120.3285,36.1455),duration:2}),M()}const v=c(Object.keys(W));function Z(a){console.log("e:",a),console.log("checkList:",v.value),O("crop"),M()}function O(a){const e=n.imageryLayers._layers;for(let l=e.length-1;l>=0;l--)e[l]._imageryProvider.customName===a&&n.imageryLayers.remove(e[l])}function M(){const a="'"+v.value.join("','")+"'";console.log("name:",a);let e=new Cesium.WebMapServiceImageryProvider({url:"http://121.36.229.60:9080/geoserver/shuzisannong/wms?",layers:"shuzisannong:fenlei",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:`crop in (${a})`}});e.customName="crop",n.imageryLayers.addImageryProvider(e)}const U=()=>{re({time:"2023-04-19",subregion:"0",parent:"\u9EC4\u5C9B\u533A"}).then(a=>{console.log(a)})},D=()=>{le().then(a=>{u.arr=a.features,u.arr.unshift({bbox:[119.5091,35.5671,120.3285,36.1455],properties:{XZDM:"370211",XZMC:"\u5168\u90E8"}});let e=[...a.features],l=[];e.splice(0,1),e.forEach(r=>{l.push(r.properties.XZMC)}),d.title=[...Object.values(l)],w()})},E=()=>{se().then(a=>{u.brr=a.features})},J=()=>{ie().then(a=>{u.crr=a.features})},N=()=>{console.log(m.value),m.value=="370211"&&D(),[...u.arr].forEach(r=>{r.properties.XZDM==m.value&&n.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(r.bbox[0],r.bbox[1],r.bbox[2],r.bbox[3]),duration:2});let i=[...u.brr],y=[];i.forEach(t=>{t.properties.XZDM==m.value&&y.push(t.properties.XZQMC)}),d.title=[...Object.values(y)],w()});const e=n.imageryLayers._layers;for(let r=e.length-1;r>=0;r--)e[r]._imageryProvider.aaa==="aaa"&&n.imageryLayers.remove(e[r]);let l=new Cesium.WebMapServiceImageryProvider({url:"http://121.36.229.60:9080/geoserver/shuzisannong/wms",layers:"shuzisannong:huangdaoqu_village",parameters:{service:"WMS",format:"image/png",transparent:!0,CQL_FILTER:`XZDM=${m.value}`}});l.aaa="aaa",n.imageryLayers.addImageryProvider(l)};function R(){const a=g(S.value);var e={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"15%",right:"3%",left:"16%",bottom:"12%"},xAxis:[{type:"category",data:["\u5C0F\u9EA6","\u7389\u7C73","\u5927\u8C46","\u82B1\u751F","\u84DD\u8393"],axisLine:{lineStyle:{color:"#C0C4CC",width:1}},axisTick:{show:!1},axisLabel:{margin:10,color:"rgba(255, 255, 255, 0.7)",textStyle:{fontSize:14}}}],yAxis:[{type:"value",name:"\u9762\u79EF(\u4EA9)",nameTextStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:14},axisLabel:{formatter:"{value}",color:"rgba(255, 255, 255, 0.7)"},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(192,196,204,1)",type:"dashed"}}}],series:[{name:"\u9762\u79EF",type:"bar",data:[3598,1235,2354,3251,1652],barWidth:"14px",itemStyle:{normal:{color:new b(0,0,0,1,[{offset:0,color:"rgba(71,179,161,0.8)"},{offset:1,color:"rgba(212,236,89,1) "}],!1),barBorderRadius:[30,30,30,30],label:{show:!0,position:"top",formatter:"{c}",textStyle:{color:"rgba(255, 255, 255, 0.8)",fontSize:"14"}}}}}],legend:{right:0,top:14,data:["\u9762\u79EF"],textStyle:{color:" rgba(255,255,255,0.7)",fontSize:"14"}}};f(a,e)}function X(){const a=g(_.value);var e={tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},color:["rgba(212,236,89,0.8)","rgba(102,142,214,0.8)","rgba(156,220,130,0.8)","rgba(255,225,104,0.8)"],legend:{orient:"vertical",icon:"rect",x:"center",bottom:"bottom",data:["\u82B1\u751F","\u5C0F\u9EA6","\u5927\u8C46","\u7389\u7C73"],textStyle:{color:" rgba(255,255,255,0.7)",fontSize:"14"}},series:[{name:"\u5360\u6BD4",type:"pie",radius:["50%","70%"],avoidLabelOverlap:!0,label:{normal:{show:!0,position:"left",textStyle:{color:"rgba(41,255,219,1)"}},emphasis:{show:!0,textStyle:{fontSize:"30",fontWeight:"bold"}}},labelLine:{show:!0,normal:{show:!0}},data:[{value:25,name:"\u82B1\u751F"},{value:25,name:"\u5C0F\u9EA6"},{value:25,name:"\u5927\u8C46"},{value:25,name:"\u7389\u7C73"}]}]};f(a,e)}function G(){const a=g(L.value);var e={title:{text:"",subtext:""},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"15%",left:"16%",bottom:"19%"},xAxis:{type:"category",data:["\u533A\u57DF\u4E00","\u533A\u57DF\u4E8C","\u533A\u57DF\u4E09","\u533A\u57DF\u56DB","\u533A\u57DF\u4E94"],axisLine:{lineStyle:{color:"#C0C4CC",width:1}},axisTick:{show:!1},axisLabel:{margin:10,color:"rgba(255, 255, 255, 0.7)",textStyle:{fontSize:14}}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(192,196,204,1)",type:"dashed"}},axisLabel:{margin:10,color:"rgba(255, 255, 255, 0.7)",textStyle:{fontSize:14}}},series:[{name:"\u5C0F\u9EA6",type:"bar",barWidth:14,stack:"\u6570\u91CF",data:[1666,1666,1666,1666,1666],itemStyle:{normal:{color:new b(0,0,0,1,[{offset:0,color:"rgba(102, 142, 214, 0.8)"},{offset:1,color:"rgba(102, 142, 214, 0.8)"}])}}},{name:"\u7389\u7C73",type:"bar",barWidth:30,stack:"\u6570\u91CF",data:[1666,1666,1666,1666,1666],itemStyle:{normal:{color:new b(0,0,0,1,[{offset:0,color:"rgba(255, 225, 104, 0.8)"},{offset:1,color:"rgba(255, 225, 104, 0.8)"}])}}},{name:"\u5730\u74DC",type:"bar",barWidth:30,stack:"\u6570\u91CF",data:[1666,1666,1666,1666,1666],itemStyle:{normal:{color:new b(0,0,0,1,[{offset:0,color:"rgba(209, 91, 127, 0.8)"},{offset:1,color:"rgba(209, 91, 127, 0.8)"}])}}}]};e&&a.setOption(e,{notMerge:!0,grid:{bottom:20}}),f(a,e)}function Q(){const a=g(C.value);var e={grid:{top:0,bottom:"10%",left:"10%",right:"10%"},xAxis:{show:!1,type:"value",boundaryGap:[0,0]},yAxis:[{type:"category",data:[""],axisLine:{show:!1},axisTick:[{show:!1}]}],series:[{name:"\u91D1\u989D",type:"bar",zlevel:1,itemStyle:{normal:{barBorderRadius:30,color:new b(1,0,0,1,[{offset:1,color:"rgba(7,99,84,0.95) "},{offset:0,color:"rgba(71,179,161,0.95)"}])}},barWidth:20,data:[10]},{name:"\u80CC\u666F",type:"bar",barWidth:20,barGap:"-100%",data:[20],itemStyle:{normal:{color:"rgba(255, 255, 255, 0.2)",barBorderRadius:50}}}]};e&&a.setOption(e),f(a,e)}function w(){const a=g(V.value);var e={grid:{bottom:"8%",left:"10%",right:"6%",top:"6%",containLabel:!0},dataZoom:[{type:"inside",show:!0,zoomLock:!0,width:8,yAxisIndex:[0],bottom:30,top:20,right:80,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"}],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:d.title,inverse:!0}],series:[{type:"bar",name:"\u7389\u7C73",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u7389\u7C73",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{color:"#fdad3c"},data:d.corn},{type:"bar",name:"\u5927\u8C46",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5927\u8C46",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{color:"rgba(156, 220, 130, 0.8)"},data:d.soybean},{type:"bar",name:"\u82B1\u751F",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u82B1\u751F",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{color:"rgba(212, 236, 89, 0.8)"},data:d.peanut},{type:"bar",name:"\u5C0F\u9EA6",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u5C0F\u9EA6",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{color:"rgba(102, 142, 214, 0.8)"},data:d.wheat},{type:"bar",name:"\u84DD\u8393",stack:"\u603B\u91CF",barMaxWidth:30,label:{show:!0,position:"inside",formatter:"\u84DD\u8393",textStyle:{fontSize:12,fontWeight:"bolder",color:"rgba(255,255,255,1)"}},itemStyle:{color:"rgba(50, 211, 235, 0.8)"},data:d.Blueberries}]};f(a,e)}return(a,e)=>{const l=x("el-option"),r=x("el-select"),i=x("el-checkbox"),y=x("el-checkbox-group");return k(),T("div",be,[fe,o("div",he,[o("div",ve,[ye,o("div",{ref_key:"areaDiv",ref:S,class:"areaDiv"},null,512)]),o("div",xe,[we,o("div",{ref_key:"typesofDiv",ref:_,class:"typesofDiv"},null,512)])]),o("div",ke,[o("div",Se,[_e,o("div",{ref_key:"farmlandDiv",ref:L,class:"farmlandDiv"},null,512),o("div",{ref_key:"ProgressBarDiv",ref:C,class:"ProgressBar"},null,512)]),o("div",Le,[Ce,s(r,{onChange:e[0]||(e[0]=t=>N(a.item)),modelValue:m.value,"onUpdate:modelValue":e[1]||(e[1]=t=>m.value=t),clearable:"",placeholder:"\u5168\u90E8"},{default:I(()=>[(k(!0),T(F,null,$(H(u).arr,t=>(k(),K(l,{key:t.properties.XZDM,label:t.properties.XZMC,value:t.properties.XZDM},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o("div",{ref_key:"ASdivisionDiv",ref:V,class:"ASdivision"},null,512)])]),o("div",Ve,[Me,o("div",De,[s(y,{modelValue:v.value,"onUpdate:modelValue":e[11]||(e[11]=t=>v.value=t),onChange:Z},{default:I(()=>[ee(` <el-checkbox
v-for="(value, item) in dic"
:key="value"
:label="item"
style="
background: \`\${}\`;
border: 1px solid rgba(102, 142, 214, 1);
width: 100%;
"
></el-checkbox> `),s(i,{style:{background:"rgba(102, 142, 214, 0.8)",border:"1px solid rgba(102, 142, 214, 1)",width:"100%"},modelValue:a.checked3,"onUpdate:modelValue":e[2]||(e[2]=t=>a.checked3=t),label:"\u5C0F\u9EA6"},null,8,["modelValue"]),s(i,{style:{background:"rgba(255, 225, 104, 0.8)",border:"1px solid rgba(255, 225, 104, 1)",width:"100%"},modelValue:a.checked4,"onUpdate:modelValue":e[3]||(e[3]=t=>a.checked4=t),label:"\u7389\u7C73"},null,8,["modelValue"]),s(i,{style:{background:"rgba(156, 220, 130, 0.8)",border:"1px solid rgba(156, 220, 130, 1)",width:"100%"},modelValue:a.checked3,"onUpdate:modelValue":e[4]||(e[4]=t=>a.checked3=t),label:"\u5927\u8C46"},null,8,["modelValue"]),s(i,{style:{background:"rgba(209, 91, 127, 0.8)",border:"1px solid rgba(209, 91, 127, 1)",width:"100%"},modelValue:a.checked4,"onUpdate:modelValue":e[5]||(e[5]=t=>a.checked4=t),label:"\u5730\u74DC"},null,8,["modelValue"]),s(i,{style:{background:"rgba(212, 236, 89, 0.8)",border:"1px solid rgba(212, 236, 89, 1)",width:"100%"},modelValue:a.checked3,"onUpdate:modelValue":e[6]||(e[6]=t=>a.checked3=t),label:"\u82B1\u751F"},null,8,["modelValue"]),s(i,{style:{background:"rgba(50, 211, 235, 0.8)",border:"1px solid rgba(50, 211, 235, 1)",width:"100%"},modelValue:a.checked4,"onUpdate:modelValue":e[7]||(e[7]=t=>a.checked4=t),label:"\u84DD\u8393"},null,8,["modelValue"]),s(i,{style:{background:"rgba(91, 196, 159, 0.8)",border:"1px solid rgba(91, 196, 159, 1)",width:"100%"},modelValue:a.checked3,"onUpdate:modelValue":e[8]||(e[8]=t=>a.checked3=t),label:"\u8336\u53F6"},null,8,["modelValue"]),s(i,{style:{background:"rgba(254, 182, 77, 0.8)",border:"1px solid rgba(254, 182, 77, 1)",width:"100%"},modelValue:a.checked4,"onUpdate:modelValue":e[9]||(e[9]=t=>a.checked4=t),label:"\u9A6C\u94C3\u85AF"},null,8,["modelValue"]),s(i,{style:{background:"rgba(250, 129, 109, 0.8)",border:"1px solid rgba(250, 129, 109, 1)",width:"100%"},modelValue:a.checked3,"onUpdate:modelValue":e[10]||(e[10]=t=>a.checked3=t),label:"\u767D\u83DC\u548C\u841D\u535C"},null,8,["modelValue"])]),_:1},8,["modelValue"])])]),o("div",Te,[s(ge)]),Ie])}}},Oe=j(ze,[["__scopeId","data-v-85d900c0"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/crops/classify/index.vue"]]);export{Oe as default};