import{u as e}from"./index-6530d0f6.js";import{a,d as t}from"./logo-4fe3e538.js";import{l,m as r}from"./largeHeader-f70d0a70.js";import{s as o}from"./statistics-65ef1749.js";import{g as n,p as s,a as i}from"./panelBox-38406f97.js";import{d,m as p,ag as c,u as m,o as u,b as f,X as g,i as h,l as y,aq as b,J as v,c as w,a as D,O as x,e as _,P as C,a4 as k,L as T,h as L,I as V,W as I,M as O}from"./@vue-37836d09.js";import{v as S}from"./request-2ce564d0.js";import"./echarts-a77f8af6.js";import{V as A}from"./zrender-ee9f2f6d.js";import{_ as z}from"./vue-next-wxlogin-91e03b70.js";import{d as j}from"./dayjs-423c4f07.js";import{E as F}from"./element-plus-842069d4.js";import"./vue-router-c7cbbcaa.js";import"./@element-plus-bb6eebe0.js";import"./pinia-0c8641d4.js";import"./vue-demi-71ba0ef2.js";import"./pinia-plugin-persistedstate-1ec13968.js";import"./destr-9c6e2924.js";import"./deep-pick-omit-418f72d7.js";import"./nprogress-85851b89.js";import"./@turf-e5dd68ad.js";import"./d3-geo-106fc929.js";import"./d3-array-d83825ab.js";import"./mapbox-gl-b315653c.js";import"./lodash-es-acda58df.js";import"./@vueuse-1ddca6f0.js";import"./@popperjs-b696b006.js";import"./@ctrl-41c0891e.js";import"./async-validator-7d693152.js";import"./memoize-one-63ab667a.js";import"./normalize-wheel-es-cf7d7ba7.js";import"./@floating-ui-f285e0b8.js";import"./login-4259abe5.js";import"./weather-6f401959.js";import"./sm-crypto-2cfdc71b.js";import"./jsbn-6a317af9.js";import"./axios-7accb92c.js";const N=d({__name:"barChart",props:{chartData:{type:Object}},setup(e){const a=e,t=p((()=>a.chartData&&a.chartData.data&&a.chartData.data[0].length>0)),l=p((()=>{const{data:e,xAxisData:t,color:l}=a.chartData||{};return{tooltip:{trigger:"axis",show:!0,axisPointer:{type:"shadow"}},grid:{left:"0%",right:"0%",bottom:"15%",top:"18%"},yAxis:{show:!1,
//是否显示x轴
type:"value"},xAxis:{type:"category",inverse:!0,
//让y轴数据逆向
axisLabel:{show:!0,textStyle:{color:"#fff",
//y轴字体颜色
fontSize:14}},splitLine:{show:!1},
//横向的线
axisTick:{show:!1},
//y轴的端点
axisLine:{show:!1},
//y轴的线
data:t},series:[{type:"bar",barWidth:24,itemStyle:{normal:{color:function(e){return l[e.dataIndex]},borderRadius:3}},label:{normal:{show:!0,position:"top",color:"#fff",fontSize:14}},colorBy:"data",data:e[0]}]}}));return(e,a)=>{const r=c("baseChart"),o=c("empty-black");return m(t)?(u(),f(r,{key:0,options:m(l),height:"195px"},null,8,["options"])):(u(),f(o,{key:1,height:"195px"}))}}}),Y="https://plant2.hbatg.com/v2",M={class:"scheme-number","element-loading-background":"rgba(0, 53, 83, 0.5)"},U={class:"tip-box"},B=d({__name:"index",props:{params:{type:Object}},setup(e,{expose:a}){const t=e,l=g({loading:!1}),r=g({total:0,unit:"",data:[[]],xAxisData:[],color:["#FFD23C","#90E12D","#2DE1AB","#34CCFB","#507FFF","#A365FF","#F06D39"]});h([t.params],((e,a)=>{n()}),{deep:!0});const o=async()=>{l.loading=!0;const e=await(a={farmType:t.params.farmType},S.request({url:Y+"/datav-api/farming-manager/plan-count",method:"get",params:a}));var a;r.total=e.totalValue,r.unit=e.unit,r.data[0]=e.allClassifyIList.map((e=>e.value)),r.xAxisData=e.allClassifyIList.map((e=>e.label)),l.loading=!1},n=()=>{o()};return y((()=>{})),a({init:n}),(e,a)=>{const t=b("loading");return v((u(),w("div",M,[D("div",U,"共执行方案："+x(m(r).total)+x(m(r).unit),1),_(N,{chartData:m(r)},null,8,["chartData"])])),[[t,m(l).loading]])}}}),P=d({__name:"pieChart",props:{chartParams:{type:Object},color:{type:Array}},setup(e){const a=e,t=p((()=>{let{value:e,name:t}=a.chartParams||{};return{title:[{text:`${e}{unit|%}`,x:"center",top:"30%",textStyle:{fontSize:20,color:a.color[0],rich:{unit:{fontSize:16}}}},{text:`${t}`,x:"center",top:"55%",textStyle:{fontSize:10,color:"#ccc"}}],polar:{radius:["80%","100%"],center:["50%","50%"]},angleAxis:{max:100,show:!1},radiusAxis:{type:"category",show:!0,axisLabel:{show:!1},axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"",type:"bar",roundCap:!0,barWidth:60,showBackground:!0,backgroundStyle:{color:"rgba(255, 255, 255, 0.2)"},data:[e],coordinateSystem:"polar",itemStyle:{normal:{color:new A(0,1,0,0,[{offset:0,color:a.color[0]},{offset:1,color:a.color[1]}])}}}]}}));return(e,a)=>{const l=c("baseChart");return u(),f(l,{options:m(t),height:"90px"},null,8,["options"])}}}),R=d({__name:"barChart",props:{chartParams:{type:Object}},setup(e){const a=e,t=p((()=>{let{value:e,name:t,color:l,offset:r=[-40,-20],nameOffset:o=[140,-20]}=a.chartParams||{};return{grid:{top:"15px",bottom:"0%",left:"5%",right:"5%"},xAxis:{show:!1,
//是否显示x轴
type:"value"},yAxis:{type:"category",inverse:!0,
//让y轴数据逆向
axisLabel:{show:!1,inside:!0,padding:[30,20,0,0],textStyle:{color:"#fff",
//y轴字体颜色
fontSize:14}},splitLine:{show:!1},
//横向的线
axisTick:{show:!1},
//y轴的端点
axisLine:{show:!1},
//y轴的线
data:[t]},series:[{type:"bar",barWidth:12,data:[e],itemStyle:{color:new A(0,0,1,0,[{offset:0,color:l[1]},{offset:1,color:l[0]}])}},{type:"bar",itemStyle:{normal:{color:"rgba(255, 255, 255, 0.1)"}},label:{normal:{show:!0,position:"right",offset:r,color:"#aaa",fontSize:14,formatter:function(a){return`{value|${e}}{unit|%}`},rich:{value:{color:"#fff",fontSize:"18"},unit:{color:"#ccc",fontSize:"14"}}}},barGap:"-100%",z:0,barWidth:12,data:[100]},{type:"bar",itemStyle:{normal:{color:"rgba(255, 255, 255, 0)"}},label:{normal:{show:!0,position:"left",offset:o,color:"#fff",fontSize:14,formatter:function(e){return`{value|${t}}`},rich:{value:{color:"#fff",fontSize:"16"}}}},barGap:"-100%",z:0,barWidth:12,data:[0]},{type:"bar",barGap:"-105%",barWidth:16,itemStyle:{normal:{color:new A(0,0,1,0,[{offset:0,color:"transparent"},{offset:.988,color:"transparent"},{offset:.988,color:l[0]},{offset:1,color:l[0]}],!1)}},z:2,data:[e]}]}}));return(e,a)=>{const l=c("baseChart");return u(),f(l,{options:m(t),height:"50px"},null,8,["options"])}}}),q={class:"progress-status"},E={class:"progress-list"},W=d({__name:"combination",props:{progressData:{type:Array}},setup(e){const a=e;return(e,t)=>(u(),w("div",q,[(u(!0),w(C,null,k(a.progressData,((e,a)=>(u(),w("div",{class:"progress-item",key:a},[_(R,{chartParams:e},null,8,["chartParams"]),D("div",E,[(u(!0),w(C,null,k(e.list,((a,t)=>(u(),f(P,{chartParams:a,color:e.color,key:t},null,8,["chartParams","color"])))),128))])])))),128))]))}}),$=z(W,[["__scopeId","data-v-86a0c754"]]),G={class:"progress-status","element-loading-background":"rgba(0, 53, 83, 0.5)"},H=z(d({__name:"index",props:{params:{type:Object}},setup(e,{expose:a}){const t=e,l=g({loading:!1,showChart:!1});let r=g([{value:60,name:"生育期/成熟总进度",color:["rgba(88, 163, 255, 1)","rgba(88, 163, 255, 0.3)"],offset:[-40,-20],nameOffset:[140,-20],list:[]},{value:60,name:"农事处理总进度",color:["rgba(18, 255, 235, 1)","rgba(18, 255, 235, 0.3)"],offset:[-40,-20],nameOffset:[140,-20],list:[]}]);h([t.params],((e,a)=>{n()}),{deep:!0});const o=async()=>{const e=await(a={farmType:t.params.farmType},S.request({url:Y+"/datav-api/farming-manager/progress-stat",method:"get",params:a}));var a;r[0].value=e.stageProgress,r[0].list=e.stageClassifyList.map((e=>({name:e.label,value:e.value}))),r[1].value=e.farmingProgress,r[1].list=e.farmingClassifyList.map((e=>({name:e.label,value:e.value}))),l.showChart=!0},n=()=>{l.loading=!0,Promise.all([o()]).then((e=>{l.loading=!1}))};return y((()=>{})),a({init:n}),(e,a)=>{const t=b("loading");return v((u(),w("div",G,[m(l).showChart?(u(),f($,{key:0,progressData:m(r)},null,8,["progressData"])):T("",!0)])),[[t,m(l).loading]])}}}),[["__scopeId","data-v-fbf6f9e1"]]),J=d({__name:"progressChart",props:{chartData:{type:Object}},setup(e){const a=e,t=p((()=>{let{data:e,longitudinalAxisDatas:t,color:l}=a.chartData,r=l.map((e=>new A(0,0,1,0,[{offset:0,color:e[0]},{offset:1,color:e[1]}]))),o=Math.max(...e[0])||1,n=100*Math.ceil(o/100);return{grid:{top:"10%",bottom:"10%",left:"30%",right:"13%"},xAxis:{show:!1,
//是否显示x轴
type:"value"},yAxis:{type:"category",inverse:!0,
//让y轴数据逆向
axisLabel:{show:!0,textStyle:{color:"#fff",
//y轴字体颜色
fontSize:14}},splitLine:{show:!1},
//横向的线
axisTick:{show:!1},
//y轴的端点
axisLine:{show:!1},
//y轴的线
data:t},series:[{type:"bar",barWidth:10,itemStyle:{normal:{color:function(e){return r[e.dataIndex]},barBorderRadius:6}},colorBy:"data",data:e[0]},{type:"bar",itemStyle:{normal:{color:"rgba(255, 255, 255, 0.1)",
//rgba设置透明度0.14
barBorderRadius:6}},label:{normal:{show:!0,position:"right",color:"#fff",fontSize:14,formatter:function(a){return`${e[0][a.dataIndex]}%`}}},barGap:"-100%",z:0,barWidth:10,data:[n,n,n,n,n,n]}]}}));return(e,a)=>{const l=c("baseChart");return u(),f(l,{options:m(t),height:"60px"},null,8,["options"])}}}),Q={class:"crop-progress scroll-black","element-loading-background":"rgba(0, 53, 83, 0.5)"},X={class:"crop-content"},K={class:"crop-header"},Z={class:"crop-name"},ee={class:"vrop-area"},ae=d({__name:"index",setup(e,{expose:a}){let t=L([]);const l=g({loading:!1}),r=async()=>{l.loading=!0;const e=await(a={},S.request({url:Y+"/datav-api/farming-manager/kind-progress-stat",method:"get",params:a}));var a;t.value=e.map((e=>({name:e.label,area:e.plantingArea,value1:e.stageProgress,value2:e.farmingProgress,progressData:{data:[[e.stageProgress,e.farmingProgress]],longitudinalAxisDatas:["生育期进度","农事进度"],color:[["rgba(27, 77, 137, 1)","rgba(49, 135, 240, 1)"],["rgba(54, 240, 151, 0.2)","rgba(54, 240, 151, 1)"]]}}))),l.loading=!1};return y((()=>{})),a({init:()=>{r()}}),(e,a)=>{const r=c("empty-black"),o=b("loading");return v((u(),w("div",Q,[(u(!0),w(C,null,k(m(t),((e,t)=>(u(),w("div",{class:"crop-item",key:t},[a[0]||(a[0]=D("div",{class:"crop-img"},null,-1)),D("div",X,[D("div",K,[D("div",Z,x(e.name),1),D("div",ee,"种植面积："+x(e.area)+"万亩",1)]),_(J,{chartData:e.progressData},null,8,["chartData"])])])))),128)),0===m(t).length?(u(),f(r,{key:0,height:"180px"})):T("",!0)])),[[o,m(l).loading]])}}}),te=z(ae,[["__scopeId","data-v-6c214a8a"]]),le=d({__name:"lineChart",props:{chartData:{type:Object}},setup(e){const a=e,t=p((()=>a.chartData&&a.chartData.data&&a.chartData.data.length>0)),l=p((()=>{const{data:e,unit:t,xAxisData:l}=a.chartData||{};return{tooltip:{trigger:"axis"},grid:{left:"6%",right:"8%",bottom:"4%",top:"20%",containLabel:!0},xAxis:{type:"category",data:l,boundaryGap:!1,axisLabel:{color:"rgba(255,255,255,0.8)",fontSize:12},axisLine:{lineStyle:{color:"#666"}},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{name:t,nameTextStyle:{align:"left",color:"rgba(255,255,255,0.8)",fontSize:12,padding:[0,0,0,-28]},type:"value",axisLabel:{color:"rgba(255,255,255,0.8)",fontSize:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{color:"rgba(255,255,255,0.1)",type:"dashed"}}},series:[{data:e,type:"line",smooth:!0,symbol:"none",areaStyle:{color:new A(0,0,0,1,[{offset:0,color:"rgba(64, 175, 239, 0.4)"},{offset:1,color:"rgba(64, 175, 239, 0)"}])},lineStyle:{color:new A(0,0,1,0,[{offset:0,color:"rgba(47, 218, 255, 0.5)"},{offset:.3,color:"rgba(47, 218, 255, 0.5)"},{offset:.5,color:"rgba(186, 230, 255, 1)"},{offset:.8,color:"rgba(47, 218, 255, 0.5)"},{offset:1,color:"rgba(47, 218, 255, 0.5)"}]),width:3},emphasis:{focus:"series"}}]}}));return(e,a)=>{const r=c("baseChart"),o=c("empty-black");return m(t)?(u(),f(r,{key:0,options:m(l),height:"180px"},null,8,["options"])):(u(),f(o,{key:1,height:"180px"}))}}}),re={class:"cs-cost","element-loading-background":"rgba(0, 53, 83, 0.5)"},oe=d({__name:"index",props:{params:{type:Object}},setup(e,{expose:a}){const t=e;let l=g({data:[],unit:"",xAxisData:[]});const r=g({loading:!1});h([t.params],((e,a)=>{n()}),{deep:!0});const o=async()=>{r.loading=!0;const e=await(a={farmType:t.params.farmType,startMonth:t.params.month[0],endMonth:t.params.month[1]},S.request({url:Y+"/datav-api/farming-manager/farming-trend",method:"get",params:a}));var a;l.xAxisData=e.xaxisData,l.data=e.yaxisData,l.unit=e.unit,r.loading=!1},n=()=>{o()};return y((()=>{})),a({init:n}),(e,a)=>{const t=b("loading");return v((u(),w("div",re,[_(le,{chartData:m(l)},null,8,["chartData"])])),[[t,m(r).loading]])}}}),ne=d({__name:"lineChart",props:{chartData:{type:Object}},setup(e){const a=e,t=p((()=>a.chartData&&a.chartData.data&&a.chartData.data.length>0)),l=p((()=>{const{data:e,unit:t,longitudinalAxisDatas:l,xAxisData:r,color:o}=a.chartData||{},n=e.map(((e,a)=>({name:l[a],type:"scatter",symbolSize:5,itemStyle:{color:o[a]},silent:!0,data:e}))),s=e.map(((e,a)=>({type:"line",symbolSize:14,symbol:"circle",lineStyle:{normal:{color:o[a],width:1}},itemStyle:{normal:{color:"rgba(0, 0, 0, 0)",borderColor:o[a],borderWidth:1,opacity:.5}},tooltip:{show:!1},data:e})));return{color:o,tooltip:{trigger:"axis",confine:!0},legend:{data:l,icon:"rect",itemWidth:10,itemHeight:10,itemStyle:{opacity:1},textStyle:{color:"rgba(255,255,255,0.8)"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:r,boundaryGap:!1,axisLabel:{color:"rgba(255,255,255,0.8)",fontSize:12},axisLine:{lineStyle:{color:"#666"}},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{name:t,nameTextStyle:{align:"left",color:"rgba(255,255,255,0.8)",fontSize:12,padding:[0,0,0,-28]},type:"value",axisLabel:{color:"rgba(255,255,255,0.8)",fontSize:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{color:"rgba(255,255,255,0.1)",type:"dashed"}}},series:[...n,...s]}}));return(e,a)=>{const r=c("baseChart"),o=c("empty-black");return m(t)?(u(),f(r,{key:0,options:m(l),height:"180px"},null,8,["options"])):(u(),f(o,{key:1,height:"180px"}))}}}),se={class:"cs-cost","element-loading-background":"rgba(0, 53, 83, 0.5)"},ie=d({__name:"index",props:{params:{type:Object}},setup(e,{expose:a}){const t=e,l=g({loading:!1});let r=g({unit:"件",data:[],longitudinalAxisDatas:[],xAxisData:[],
// longitudinalAxisDatas: ['种子', '农药', '化肥', '其他'],
// xAxisData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
color:["#00ECB3","#FFB12B","#52C3FF","#FF5A5A","#FFF623"]});h([t.params],((e,a)=>{n()}),{deep:!0});const o=async()=>{l.loading=!0;const e=await(a={farmType:t.params.farmType,startMonth:t.params.month[0],endMonth:t.params.month[1]},S.request({url:Y+"/datav-api/farming-manager/agricultural-resources-trend",method:"get",params:a}));var a;r.longitudinalAxisDatas=e.agriculturalDataList.map((e=>e.name)),r.data=e.agriculturalDataList.map((e=>e.data)),r.xAxisData=e.monthList,l.loading=!1},n=()=>{o()};return y((()=>{})),a({init:n}),(e,a)=>{const t=b("loading");return v((u(),w("div",se,[_(ne,{chartData:m(r)},null,8,["chartData"])])),[[t,m(l).loading]])}}}),de={class:"cs-cost","element-loading-background":"rgba(0, 53, 83, 0.5)"},pe={class:"tip-box"},ce={class:"tip-item"},me={class:"tip-item"},ue={class:"list-box scroll-black"},fe={class:"list-container"},ge={class:"list-header"},he={class:"header-month"},ye={class:"day-box"},be={class:"list-content"},ve={class:"name-item"},we=d({__name:"index",setup(e,{expose:a}){const t=g([]),l=g({loading:!1}),r=g({data:[],xAxisData:[]}),o=async()=>{l.loading=!0;const e=await(a={},S.request({url:Y+"/datav-api/farming-manager/weather-15days",method:"get",params:a}));var a;r.data=e.map((e=>e.suggestionList.map((e=>"适宜"===e.suggestion)))),r.xAxisData=e.map((e=>e.city)),l.loading=!1};return y((()=>{let e=0,a=0,l=0;const r=j().endOf("month").format("MM-DD");e=Number(r.split("-")[0]),l=Number(r.split("-")[1]),a=Number(j().format("DD"));const o=[];for(let t=a;t<=l;t++)o.push(t);if(t.push({month:e,day:o}),l-a<15){const r=[],o=15-l+a;for(let e=1;e<o;e++)r.push(e);t.push({month:e+1,day:r})}})),a({init:()=>{o()}}),(e,a)=>{const o=c("SuccessFilled"),n=c("el-icon"),s=c("WarningFilled"),i=c("empty-black"),d=b("loading");return v((u(),w("div",de,[D("div",pe,[D("div",ce,[_(n,{size:16,color:"#1eecff"},{default:V((()=>[_(o)])),_:1}),a[0]||(a[0]=D("span",null,"适宜",-1))]),D("div",me,[_(n,{size:16,color:"#fa5555"},{default:V((()=>[_(s)])),_:1}),a[1]||(a[1]=D("span",null,"不建议",-1))]),a[2]||(a[2]=D("div",{class:"tip-font"},"（异常天气如高温、大风、下雨等天气原因）",-1))]),D("div",ue,[D("div",fe,[D("div",ge,[a[3]||(a[3]=D("div",{class:"name-item"},"日期",-1)),(u(!0),w(C,null,k(m(t),(e=>(u(),w("div",{class:"header-item",key:e.month},[D("div",he,x(e.month)+"月",1),D("div",ye,[(u(!0),w(C,null,k(e.day,(e=>(u(),w("div",{class:"header-day",key:e},x(e),1)))),128))])])))),128))]),D("div",be,[(u(!0),w(C,null,k(m(r).data,((e,a)=>(u(),w("div",{class:"list-item",key:a},[D("div",ve,x(m(r).xAxisData[a]),1),(u(!0),w(C,null,k(e,((e,a)=>(u(),w("div",{class:"item-day",key:a},[e?(u(),f(n,{key:0,size:16,color:"#1eecff"},{default:V((()=>[_(o)])),_:1})):(u(),f(n,{key:1,size:16,color:"#fa5555"},{default:V((()=>[_(s)])),_:1}))])))),128))])))),128)),0===m(r).data.length?(u(),f(i,{key:0,height:"160px"})):T("",!0)])])])])),[[d,m(l).loading]])}}}),De=z(we,[["__scopeId","data-v-9be486cd"]]),xe={class:"pie-charts"},_e=d({__name:"pieChart",props:{chartData:{type:Object}},setup(e){const a=e,t=p((()=>a.chartData&&a.chartData.data&&a.chartData.data[0].length>0)),l=p((()=>{let{data:e,longitudinalAxisDatas:t,color:l,present:r,unit:o,total:n}=a.chartData||{};const s=t.map(((a,t)=>({name:a,value:e[0][t],present:r[t]})));return s.reduce(((e,a)=>e+a.value),0),{title:[{text:n,textAlign:"center",x:"29%",y:"40%",textStyle:{fontSize:22,color:"#fff"}},{text:o,x:"26%",y:"58%",textStyle:{fontSize:12,color:"#fff"}}],tooltip:{trigger:"item",formatter:"{b} : {d}% <br/> {c}"},legend:{icon:"rect",orient:"vertical",x:"60%",y:"center",itemWidth:10,itemHeight:10,align:"left",textStyle:{fontSize:14,color:"#fff",rich:{name:{verticalAlign:"right",align:"left"},percent:{padding:[0,0,0,40]}}},formatter:e=>{const a=s.find((a=>a.name===e));return"{name|"+e+"}{percent|"+a.present+"}"}},series:[{type:"pie",radius:["52%","76%"],center:["30%","50%"],color:l,data:s,labelLine:{normal:{show:!1}},label:{normal:{show:!1}}}]}}));return(e,a)=>{const r=c("baseChart"),o=c("empty-black");return u(),w("div",xe,[m(t)?(u(),f(r,{key:0,options:m(l),height:"200px"},null,8,["options"])):(u(),f(o,{key:1,height:"200px"}))])}}}),Ce=d({__name:"barChart",props:{chartData:{type:Object}},setup(e){const a=e,t=p((()=>a.chartData&&a.chartData.data&&a.chartData.data.length)),l=p((()=>{let{data:e,xAxisData:t,longitudinalAxisDatas:l,color:r,farmList:o,unit:n}=a.chartData||{},s=[];for(let a in e[0]){const t=e.map((e=>e[a]));s.push(t.reduce(((e,a)=>e+a),0))}let i=Math.max(...s),d=100*Math.ceil(i/100),p=[],c=[];for(let a=0;a<e[0].length;a++)c.push(d),p.push(0);let m=[0,-15];m[0]=-10*String(d).length-15;const u=e.map(((e,a)=>({type:"bar",stack:"total",barWidth:8,name:l[a],data:e,itemStyle:{color:r[a]}})));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},color:r,grid:{top:"5%",bottom:"0%",left:"2%",right:"0%"},xAxis:{show:!1,
//是否显示x轴
type:"value"},yAxis:{type:"category",inverse:!0,
//让y轴数据逆向
axisLabel:{show:!1,inside:!0,padding:[30,20,0,0],textStyle:{color:"#fff",
//y轴字体颜色
fontSize:14},formatter:function(e,a){return`${a+1}.${e}`}},splitLine:{show:!1},
//横向的线
axisTick:{show:!1},
//y轴的端点
axisLine:{show:!1},
//y轴的线
data:t},series:[...u,{tooltip:{show:!1},type:"bar",itemStyle:{normal:{color:"rgba(255, 255, 255, 0.1)"}},label:{normal:{show:!0,position:"right",offset:m,color:"rgba(255,255,255,1)",fontSize:14,formatter:function(e){if(o[e.dataIndex])return`${o[e.dataIndex].total}${o[e.dataIndex].unit||n}`}}},barGap:"-100%",z:0,barWidth:8,
// data: xAxisData.map((item) => maxValue)
data:c},{tooltip:{show:!1},type:"bar",itemStyle:{normal:{color:"rgba(255, 255, 255, 0)"}},label:{normal:{show:!0,position:"center",offset:[0,-18],color:"#fff",fontSize:14,formatter:function(e){return`${e.dataIndex+1}. ${t[e.dataIndex]}`}}},barGap:"-100%",z:0,barWidth:8,data:p}]}}));return(e,a)=>{const r=c("baseChart"),o=c("empty-black");return m(t)?(u(),f(r,{key:0,options:m(l),height:"342px"},null,8,["options"])):(u(),f(o,{key:1,height:"342px"}))}}}),ke={class:"nz-cost","element-loading-background":"rgba(0, 53, 83, 0.5)"},Te=d({__name:"index",props:{params:{type:Object}},setup(e,{expose:t}){const l=e,r=g({month:[...a],loading:!1});let o=g({total:0,unit:"",data:[[]],longitudinalAxisDatas:[],color:["#FFD23B","#A3DC05","#FF663B","#FBBC50","#23CAFF"],present:[]}),n=g({unit:"",data:[],farmList:[],color:["#FFD23B","#A3DC05","#FF663B","#FBBC50","#23CAFF","#FF663B"],longitudinalAxisDatas:[],xAxisData:[]});h((()=>[r.month,l.params]),((e,a)=>{i()}),{deep:!0});const s=async()=>{r.loading=!0;let e={farmType:l.params.farmType,startDate:r.month[0],endDate:r.month[1]};const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/farming-cost",method:"get",params:e}))(e);o.data[0]=a.allClassifyIList.map((e=>e.originalValue)),o.longitudinalAxisDatas=a.allClassifyIList.map((e=>e.label)),o.present=a.allClassifyIList.map((e=>e.present)),o.unit=a.unit,o.total=a.totalValue;let t=[],s=[];a.farmList.forEach(((e,l)=>{if(e.classfyList.length>0){let l=0;a.farmList.forEach(((e,a)=>{e.classfyList.length>l&&(l=e.classfyList.length)}));for(let a=0;a<l;a++){const l=e.classfyList[a]?.originalValue;t[a]?t[a].push(l):t[a]=[l]}}s.push(e.farmName)})),n.data=t,n.longitudinalAxisDatas=o.longitudinalAxisDatas,n.xAxisData=s,n.farmList=a.farmList,n.unit=a.unit,r.loading=!1},i=()=>{s()};return y((()=>{})),t({init:i}),(e,a)=>{const t=c("el-date-picker"),l=b("loading");return v((u(),w("div",ke,[_(t,{modelValue:m(r).month,"onUpdate:modelValue":a[0]||(a[0]=e=>m(r).month=e),class:"dv-date-picker-range",type:"monthrange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月",style:{width:"180px"}},null,8,["modelValue"]),_(_e,{chartData:m(o)},null,8,["chartData"]),_(Ce,{chartData:m(n)},null,8,["chartData"])])),[[l,m(r).loading]])}}}),Le={class:"plan"},Ve=z(d({__name:"plan",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=({row:e,column:a,rowIndex:t,columnIndex:l})=>{if(0===l){if(t>0&&e.serviceCenterName===s.tableData[t-1].serviceCenterName)return{rowspan:0,colspan:1};{let a=1;for(let l=t+1;l<s.tableData.length&&s.tableData[l].serviceCenterName===e.serviceCenterName;l++)a++;return{rowspan:a,colspan:1}}}return{rowspan:1,colspan:1}},p=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/plan-count-details",method:"get",params:e}))(e);s.tableData=a.tableData||[],s.columns=a.columns||[],s.loading=!1}catch(a){}},h=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),p()};return y((()=>{h()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/plan-count-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),g=c("el-form"),h=c("el-table-column"),y=c("el-table"),D=b("loading");return u(),w("div",Le,[_(g,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:p,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(y,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px","span-method":d},{default:V((()=>[_(h,{prop:"serviceCenterName",label:"所属服务中心/小程序",width:"157"}),_(h,{prop:"farmName",label:"所属农场",width:"157"}),_(h,{prop:"farmType",label:"农场自营/签约",width:"146"}),(u(!0),w(C,null,k(m(s).columns,(e=>(u(),f(h,{key:e.prop,prop:e.prop,width:"130",label:e.label+"（套）"},null,8,["prop","label"])))),128))])),_:1},8,["data"])),[[D,m(s).loading]])])}}}),[["__scopeId","data-v-0ac961fe"]]),Ie={class:"progress"},Oe=z(d({__name:"progress",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=({row:e,column:a,rowIndex:t,columnIndex:l})=>{if(0===l){if(t>0&&e.serviceCenterName===s.tableData[t-1].serviceCenterName)return{rowspan:0,colspan:1};{let a=1;for(let l=t+1;l<s.tableData.length&&s.tableData[l].serviceCenterName===e.serviceCenterName;l++)a++;return{rowspan:a,colspan:1}}}return{rowspan:1,colspan:1}},p=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/progress-stat-details",method:"get",params:e}))(e);s.tableData=a||[],s.loading=!1}catch(a){}},h=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),p()};return y((()=>{h()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/progress-stat-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),g=c("el-form"),h=c("el-table-column"),y=c("el-table"),T=b("loading");return u(),w("div",Ie,[_(g,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:p,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(y,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px","span-method":d},{default:V((()=>[_(h,{prop:"serviceCenterName",label:"所属服务中心/小程序",width:"157"}),_(h,{prop:"farmName",label:"所属农场",width:"157"}),_(h,{prop:"farmType",label:"农场自营/签约",width:"146"}),_(h,{prop:"stageProgress",label:"生育期进度",width:"146"},{default:V((e=>[D("span",null,x(e.row.stageProgress)+"%",1)])),_:1}),_(h,{prop:"farmingProgress",label:"农事处理进度",width:"146"},{default:V((e=>[D("span",null,x(e.row.farmingProgress)+"%",1)])),_:1})])),_:1},8,["data"])),[[T,m(s).loading]])])}}}),[["__scopeId","data-v-1d02a204"]]),Se={class:"kindProgress"},Ae=z(d({__name:"kindProgress",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=({row:e,column:a,rowIndex:t,columnIndex:l})=>{if(0===l){if(t>0&&e.serviceCenterName===s.tableData[t-1].serviceCenterName)return{rowspan:0,colspan:1};{let a=1;for(let l=t+1;l<s.tableData.length&&s.tableData[l].serviceCenterName===e.serviceCenterName;l++)a++;return{rowspan:a,colspan:1}}}return{rowspan:1,colspan:1}},p=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/kind-progress-stat-details",method:"get",params:e}))(e);s.tableData=a.tableData||[],s.columns=a.columns||[],s.loading=!1}catch(a){}},h=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),p()};return y((()=>{h()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/kind-progress-stat-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),g=c("el-form"),h=c("el-table-column"),y=c("el-table"),T=b("loading");return u(),w("div",Se,[_(g,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:p,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(y,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px","span-method":d},{default:V((()=>[_(h,{prop:"serviceCenterName",label:"所属服务中心/小程序",width:"157"}),_(h,{prop:"farmName",label:"所属农场",width:"157"}),_(h,{prop:"farmType",label:"农场自营/签约",width:"146"}),(u(!0),w(C,null,k(m(s).columns,(e=>(u(),f(h,{key:e.prop,prop:e.prop,width:"140",label:e.label},{default:V((a=>[D("span",null,x(a.row[e.prop])+"%",1)])),_:2},1032,["prop","label"])))),128))])),_:1},8,["data"])),[[T,m(s).loading]])])}}}),[["__scopeId","data-v-072b5fd5"]]),ze={class:"farmTrend"},je=z(d({__name:"farmTrend",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=({row:e,column:a,rowIndex:t,columnIndex:l})=>{if(0===l){if(t>0&&e.serviceCenterName===s.tableData[t-1].serviceCenterName)return{rowspan:0,colspan:1};{let a=1;for(let l=t+1;l<s.tableData.length&&s.tableData[l].serviceCenterName===e.serviceCenterName;l++)a++;return{rowspan:a,colspan:1}}}return{rowspan:1,colspan:1}},p=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/farming-trend-details",method:"get",params:e}))(e);s.tableData=a.tableData||[],s.columns=a.columns||[],s.loading=!1}catch(a){}},h=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),p()};return y((()=>{h()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/farming-trend-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),g=c("el-form"),h=c("el-table-column"),y=c("el-table"),D=b("loading");return u(),w("div",ze,[_(g,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:p,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(y,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px","span-method":d},{default:V((()=>[_(h,{prop:"serviceCenterName",label:"所属服务中心/小程序",width:"157"}),_(h,{prop:"farmName",label:"所属农场",width:"157"}),_(h,{prop:"farmType",label:"农场自营/签约",width:"146"}),(u(!0),w(C,null,k(m(s).columns,(e=>(u(),f(h,{key:e.prop,prop:e.prop,width:"120",label:e.label+"（项目）"},null,8,["prop","label"])))),128))])),_:1},8,["data"])),[[D,m(s).loading]])])}}}),[["__scopeId","data-v-d917e957"]]),Fe={class:"agriculturalResources"},Ne=z(d({__name:"agriculturalResources",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=({row:e,column:a,rowIndex:t,columnIndex:l})=>{if(0===l){if(t>0&&e.serviceCenterName===s.tableData[t-1].serviceCenterName)return{rowspan:0,colspan:1};{let a=1;for(let l=t+1;l<s.tableData.length&&s.tableData[l].serviceCenterName===e.serviceCenterName;l++)a++;return{rowspan:a,colspan:1}}}return{rowspan:1,colspan:1}},p=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/agricultural-resources-details",method:"get",params:e}))(e);s.tableData=a.tableData||[],s.columns=a.columns||[],s.loading=!1}catch(a){}},h=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),p()};return y((()=>{h()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/agricultural-resources-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),g=c("el-form"),h=c("el-table-column"),y=c("el-table"),D=b("loading");return u(),w("div",Fe,[_(g,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:p,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(y,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px","span-method":d},{default:V((()=>[_(h,{prop:"serviceCenterName",label:"所属服务中心/小程序",width:"157"}),_(h,{prop:"farmName",label:"所属农场",width:"157"}),_(h,{prop:"farmType",label:"农场自营/签约",width:"146"}),(u(!0),w(C,null,k(m(s).columns,(e=>(u(),f(h,{key:e.prop,prop:e.prop,width:"120",label:e.label+"（月）"},null,8,["prop","label"])))),128))])),_:1},8,["data"])),[[D,m(s).loading]])])}}}),[["__scopeId","data-v-d22e355e"]]),Ye={class:"weather15Days"},Me=z(d({__name:"weather15Days",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/weather-15days-details",method:"get",params:e}))(e);s.tableData=a.tableData||[],s.columns=a.columns||[],s.loading=!1}catch(a){}},p=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),d()};return y((()=>{p()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/weather-15days-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),p=c("el-form"),g=c("el-table-column"),h=c("el-table"),y=b("loading");return u(),w("div",Ye,[_(p,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:d,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:d},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:d},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(h,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px"},{default:V((()=>[_(g,{prop:"city",label:"城市",width:"140"}),(u(!0),w(C,null,k(m(s).columns,(e=>(u(),f(g,{key:e.prop,prop:e.prop,width:"140",label:e.label},null,8,["prop","label"])))),128))])),_:1},8,["data"])),[[y,m(s).loading]])])}}}),[["__scopeId","data-v-813d3f36"]]),Ue={class:"farmCost"},Be=z(d({__name:"farmCost",props:{farmOpts:{type:Array},downloadLoading:{type:Boolean}},emits:["update:downloadLoading"],setup(e,{expose:a,emit:l}){const r=l,o=e,s=g({loading:!1,serviceOpts:[],columns:[],tableData:[]}),i=g({date:[...t],farmType:"",serviceCenterId:""}),d=({row:e,column:a,rowIndex:t,columnIndex:l})=>{if(0===l){if(t>0&&e.serviceCenterName===s.tableData[t-1].serviceCenterName)return{rowspan:0,colspan:1};{let a=1;for(let l=t+1;l<s.tableData.length&&s.tableData[l].serviceCenterName===e.serviceCenterName;l++)a++;return{rowspan:a,colspan:1}}}return{rowspan:1,colspan:1}},p=async()=>{s.loading=!0;let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{const a=await(e=>S.request({url:Y+"/datav-api/farming-manager/farming-cost-details",method:"get",params:e}))(e);s.tableData=a.tableData||[],s.columns=a.columns||[],s.loading=!1}catch(a){}},h=async()=>{await(async()=>{try{s.loading=!0;let e={keywords:""};const a=await n(e);s.serviceOpts=a.data||[],s.loading=!1}catch(e){}})(),p()};return y((()=>{h()})),a({exportFile:async()=>{r("update:downloadLoading",!0);let e={farmType:i.farmType,serviceCenterId:i.serviceCenterId,startDate:"",endDate:""};i.date.length>0&&(e.startDate=i.date[0],e.endDate=i.date[1]);try{await((e,a)=>S.fileRequest({url:Y+"/datav-api/farming-manager/farming-cost-export",method:"get",params:e,responseType:"blob"},a))(e,{fileConfig:{filename:"明细.xlsx"}});F.success("导出成功")}catch(a){}finally{r("update:downloadLoading",!1)}}}),(e,a)=>{const t=c("el-date-picker"),l=c("el-form-item"),r=c("el-option"),n=c("el-select"),g=c("el-form"),h=c("el-table-column"),y=c("el-table"),D=b("loading");return u(),w("div",Ue,[_(g,{inline:!0,model:m(i)},{default:V((()=>[_(l,{label:""},{default:V((()=>[_(t,{class:"form-i dv-date-picker-range",modelValue:m(i).date,"onUpdate:modelValue":a[0]||(a[0]=e=>m(i).date=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月DD日",onChange:p,size:"small"},null,8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).farmType,"onUpdate:modelValue":a[1]||(a[1]=e=>m(i).farmType=e),placeholder:"全部",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(o.farmOpts,(e=>(u(),f(r,{label:e.label,value:e.value,key:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),_(l,{label:""},{default:V((()=>[_(n,{class:"form-i dv-select",modelValue:m(i).serviceCenterId,"onUpdate:modelValue":a[2]||(a[2]=e=>m(i).serviceCenterId=e),placeholder:"全部服务中心",onChange:p},{default:V((()=>[(u(!0),w(C,null,k(m(s).serviceOpts,(e=>(u(),f(r,{label:e.name,value:e.id,key:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),v((u(),f(y,{"element-loading-background":"rgba(0, 53, 83, 0.5)",class:"dv-table",data:m(s).tableData,"cell-class-name":"dv-table-cell","header-cell-class-name":"dv-table-header-cell",height:"680px","span-method":d},{default:V((()=>[_(h,{prop:"serviceCenterName",label:"所属服务中心/小程序",width:"157"}),_(h,{prop:"farmName",label:"所属农场",width:"157"}),_(h,{prop:"farmType",label:"农场自营/签约",width:"146"}),(u(!0),w(C,null,k(m(s).columns,(e=>(u(),f(h,{key:e.prop,prop:e.prop,width:"120",label:e.label+"（元）"},null,8,["prop","label"])))),128))])),_:1},8,["data"])),[[D,m(s).loading]])])}}}),[["__scopeId","data-v-d5e144e6"]]),Pe={class:"agricultural-manage"},Re={class:"main-content"},qe={class:"left-panel"},Ee={class:"center-panel"},We={class:"bottom-panel"},$e={class:"right-panel"},Ge={class:"body"},He={class:"footer"},Je=z(d({__name:"index",setup(t){e();const n=L(null),d=g({farmTypeEnum:[],dialogData:{show:!1,title:"",type:"",downloadLoading:!1}}),p=g({farmType:"",month:[...a]}),h=g({farmType:"",month:[...a]}),x=g({farmType:"",month:a}),S=g({farmType:"",month:[...a]}),A=g({farmType:"",month:[...a]}),z=L(null),j=L(null),F=L(null),N=L(null),Y=L(null),M=L(null),U=L(null),P=(e,a)=>{d.dialogData.show=!0,d.dialogData.type=e,d.dialogData.title=a};return y((async()=>{await(async()=>{try{const e=await i();let a=[];if(e.length>0)for(const t of e){let e=t;"全部"==t&&(e=""),a.push({label:t,value:e})}d.farmTypeEnum=a}catch(e){}})(),z.value.init(),j.value.init(),F.value.init(),N.value.init(),Y.value.init(),M.value.init(),U.value.init()})),I((()=>{})),(e,a)=>{const t=c("el-option"),i=c("el-select"),g=c("el-date-picker"),y=c("big-dialog"),L=b("loading");return u(),w("div",Pe,[_(l,{tabIndex:1}),_(r),D("main",Re,[D("section",qe,[_(s,{title:"执行方案数量",onViewMore:a[1]||(a[1]=e=>P("plan","执行方案数量"))},{header:V((({})=>[_(i,{class:"dv-select",size:"small",modelValue:m(p).farmType,"onUpdate:modelValue":a[0]||(a[0]=e=>m(p).farmType=e),"empty-values":[null,void 0]},{default:V((()=>[(u(!0),w(C,null,k(m(d).farmTypeEnum,(e=>(u(),f(t,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),default:V((()=>[_(B,{ref_key:"schemeNumberRef",ref:z,params:m(p)},null,8,["params"])])),_:1}),_(s,{title:"进度情况",onViewMore:a[2]||(a[2]=e=>P("progress","进度情况"))},{header:V((({})=>a[16]||(a[16]=[]))),default:V((()=>[_(H,{ref_key:"progressStatusRef",ref:j,params:m(h)},null,8,["params"])])),_:1}),_(s,{title:"作物进度",onViewMore:a[3]||(a[3]=e=>P("kindProgress","作物进度"))},{default:V((()=>[_(te,{ref_key:"cropProgressRef",ref:F},null,512)])),_:1})]),D("section",Ee,[_(o),D("footer",We,[_(s,{title:"农事处理趋势",onViewMore:a[6]||(a[6]=e=>P("farmTrend","农事处理趋势"))},{header:V((({})=>[_(g,{modelValue:m(x).month,"onUpdate:modelValue":a[4]||(a[4]=e=>m(x).month=e),class:"dv-date-picker-range",size:"small",type:"monthrange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月",style:{width:"150px"}},null,8,["modelValue"]),_(i,{class:"dv-select",size:"small",modelValue:m(x).farmType,"onUpdate:modelValue":a[5]||(a[5]=e=>m(x).farmType=e),"empty-values":[null,void 0]},{default:V((()=>[(u(!0),w(C,null,k(m(d).farmTypeEnum,(e=>(u(),f(t,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),default:V((()=>[_(oe,{ref_key:"csHandleRef",ref:N,params:m(x)},null,8,["params"])])),_:1}),_(s,{title:"农资使用趋势",onViewMore:a[9]||(a[9]=e=>P("agriculturalResources","农资使用趋势"))},{header:V((({})=>[_(g,{modelValue:m(S).month,"onUpdate:modelValue":a[7]||(a[7]=e=>m(S).month=e),class:"dv-date-picker-range",size:"small",type:"monthrange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY年MM月",style:{width:"150px"}},null,8,["modelValue"]),_(i,{class:"dv-select",size:"small",modelValue:m(S).farmType,"onUpdate:modelValue":a[8]||(a[8]=e=>m(S).farmType=e),"empty-values":[null,void 0]},{default:V((()=>[(u(!0),w(C,null,k(m(d).farmTypeEnum,(e=>(u(),f(t,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),default:V((()=>[_(ie,{ref_key:"csUseRef",ref:Y,params:m(S)},null,8,["params"])])),_:1})])]),D("section",$e,[_(s,{title:"未来15日天气农事处理建议",style:{height:"320px"},onViewMore:a[10]||(a[10]=e=>P("weather15Days","未来15日天气农事处理"))},{default:V((()=>[_(De,{ref_key:"futureSuggestionRef",ref:M},null,512)])),_:1}),_(s,{title:"农事投入情况",onViewMore:a[12]||(a[12]=e=>P("farmCost","农事投入情况"))},{header:V((({})=>[_(i,{class:"dv-select",size:"small",modelValue:m(A).farmType,"onUpdate:modelValue":a[11]||(a[11]=e=>m(A).farmType=e),"empty-values":[null,void 0]},{default:V((()=>[(u(!0),w(C,null,k(m(d).farmTypeEnum,(e=>(u(),f(t,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),default:V((()=>[_(Te,{ref_key:"investSituationRef",ref:U,params:m(A)},null,8,["params"])])),_:1})])]),m(d).dialogData.show?(u(),f(y,{key:0,width:"1620",height:"920",title:m(d).dialogData.title,onDialogBack:a[15]||(a[15]=e=>m(d).dialogData.show=!1)},{default:V((()=>[D("div",Ge,["plan"==m(d).dialogData.type?(u(),f(Ve,{key:0,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):"progress"==m(d).dialogData.type?(u(),f(Oe,{key:1,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):"kindProgress"==m(d).dialogData.type?(u(),f(Ae,{key:2,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):"farmTrend"==m(d).dialogData.type?(u(),f(je,{key:3,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):"agriculturalResources"==m(d).dialogData.type?(u(),f(Ne,{key:4,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):"weather15Days"==m(d).dialogData.type?(u(),f(Me,{key:5,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):"farmCost"==m(d).dialogData.type?(u(),f(Be,{key:6,ref_key:"currentDialogRef",ref:n,farmOpts:m(d).farmTypeEnum,downloadLoading:m(d).dialogData.downloadLoading},null,8,["farmOpts","downloadLoading"])):T("",!0)]),D("div",He,[D("div",{class:"footer-btn footer-btn-cancel",onClick:a[13]||(a[13]=e=>m(d).dialogData.show=!1)},"取消"),v((u(),w("div",{class:"footer-btn footer-btn-download","element-loading-background":"transparent",onClick:a[14]||(a[14]=e=>(async()=>{d.dialogData.downloadLoading=!0,await n.value.exportFile(),d.dialogData.downloadLoading=!1})())},a[17]||(a[17]=[O(" 下载 ")]))),[[L,m(d).dialogData.downloadLoading]])])])),_:1},8,["title"])):T("",!0)])}}}),[["__scopeId","data-v-d75158fb"]]);export{Je as default};
//# sourceMappingURL=index-285068b2.js.map
