lcny-vue3-antd-admin/dist/assets/Husbandry.4c79fae9.js

2 lines
1.8 KiB
JavaScript

var f=(o,r,s)=>new Promise((c,a)=>{var l=t=>{try{i(s.next(t))}catch(n){a(n)}},e=t=>{try{i(s.throw(t))}catch(n){a(n)}},i=t=>t.done?c(t.value):Promise.resolve(t.value).then(l,e);i((s=s.apply(o,r)).next())});import x from"./Box.ea9d0e0a.js";import{u as d}from"./useECharts.f2bf9eb6.js";import{l as h}from"./other.d43d2a78.js";import{u as m}from"./visualization.0e8abb36.js";import{c as p}from"./colors.69d1b0cd.js";import{q as y,a as g,w as v,v as B,x as E,L as b,aE as w,o as L,j as S,B as C,i as u}from"./index.203f4f59.js";const D=g({components:{Box:x},setup(){const o=v({x_axis:[],series:[]}),r=B(null),s=m(),{setOptions:c}=d(r);function a(){return f(this,null,function*(){const e=yield h({year:s.getYear});o.x_axis=e.x_axis,o.series=e.series,l()})}const l=()=>{const e={legendData:[],series:[]};o.series.forEach(({name:i,data:t},n)=>{const _=p[n%p.length];e.legendData.push(i),e.series.push({name:i,data:t,type:"line",symbol:"none",itemStyle:{color:_.itemColor}})}),c({grid:{left:"2%",right:"2%",top:"10%",bottom:"2%",containLabel:!0},legend:{data:e.legendData,top:"0%",right:"0",textStyle:{color:"#ffffff"}},tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},xAxis:{type:"category",data:o.x_axis,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"#fff"}},yAxis:[{type:"value",axisTick:{show:!1},splitLine:{lineStyle:{type:"solid",color:"#8EEEFF",opacity:.3}},axisLabel:{color:"#fff"}}],series:e.series})};return E(()=>{a()}),b(()=>s.getYear,()=>a()),{chartRef:r}}}),A={class:"h-full flex flex-col"},$={class:"flex-1",ref:"chartRef"};function k(o,r,s,c,a,l){const e=w("Box");return L(),S(e,{title:"\u7A3B\u867E\u4EA7\u4E1A"},{default:C(()=>[u("div",A,[u("div",$,null,512)])]),_:1})}var V=y(D,[["render",k],["__scopeId","data-v-3cea5c5c"]]);export{V as default};