lcny-vue3-antd-admin/dist/assets/DXJGWEEK.b8d55b1e.js

2 lines
2.3 KiB
JavaScript

var g=(a,o,s)=>new Promise((n,i)=>{var c=t=>{try{r(s.next(t))}catch(e){i(e)}},l=t=>{try{r(s.throw(t))}catch(e){i(e)}},r=t=>t.done?n(t.value):Promise.resolve(t.value).then(c,l);r((s=s.apply(a,o)).next())});import v from"./Box.af385381.js";import{u as y}from"./useECharts.3db5b6c0.js";import{z as S}from"./other.dd4f0c11.js";import{c as x}from"./colors.69d1b0cd.js";import{a as C,c_ as E,r as f,s as D,bp as b,J as B,aA as _,o as z,j as F,x as w,i as p,p as P}from"./index.c1c766ec.js";const L=C({components:{Box:v,Pagination:E},setup(){const a=f(1),o=f(10),s=D({x_axis:[],series:[]}),n=f(null),{setOptions:i}=y(n);function c(e){a.value=e,r()}function l(){const e={legendData:[],series:[]};return s.series.forEach(({name:u,data:h},m)=>{const d=x[m%x.length];e.legendData.push(u+""),e.series.push({name:u,data:h.slice((a.value-1)*o.value,a.value*o.value),type:"line",smooth:!1,itemStyle:{color:d.itemColor},areaStyle:{color:d.areaColor}})}),e}const r=()=>{const e=l();i({grid:{left:"2%",right:"20px",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:s.x_axis.slice((a.value-1)*o.value,a.value*o.value),boundaryGap:!1,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"#fff"}},yAxis:[{type:"value",axisTick:{show:!1},nameTextStyle:{color:"#fff"},splitLine:{lineStyle:{type:"solid",color:"#8EEEFF",opacity:.3}},axisLabel:{color:"#fff",formatter:u=>u}}],series:e.series,animationDuration:2e3})};function t(){return g(this,null,function*(){const e=yield S();s.x_axis=e.x_axis,s.series=e.series,r()})}return b(()=>{t()}),{changePage:c,chartRef:n,current:a,pageSize:o}}}),k={class:"h-full flex flex-col"},A={class:"flex-1",ref:"chartRef"},$={class:"text-right"};function j(a,o,s,n,i,c){const l=_("Pagination"),r=_("Box");return z(),F(r,{title:"\u7A3B\u867E\u6BCF\u5468\u4EF7\u683C\uFF08\u5143/\u65A4\uFF09"},{default:w(()=>[p("div",k,[p("div",A,null,512),p("div",$,[P(l,{current:a.current,"onUpdate:current":o[0]||(o[0]=t=>a.current=t),pageSize:a.pageSize,"onUpdate:pageSize":o[1]||(o[1]=t=>a.pageSize=t),total:52,showSizeChanger:!1,onChange:a.changePage},null,8,["current","pageSize","onChange"])])])]),_:1})}var K=B(L,[["render",j],["__scopeId","data-v-0c0fa4b6"]]);export{K as default};