lcny-vue3-antd-admin/dist/assets/DXLX.397d5f1f.js

2 lines
2.2 KiB
JavaScript

var _=(c,a,o)=>new Promise((r,i)=>{var f=e=>{try{n(o.next(e))}catch(l){i(l)}},s=e=>{try{n(o.throw(e))}catch(l){i(l)}},n=e=>e.done?r(e.value):Promise.resolve(e.value).then(f,s);n((o=o.apply(c,a)).next())});import g from"./Box.148249ef.js";import{u as v}from"./useECharts.ce337e2d.js";import{j as w}from"./other.e182adb3.js";import{u as D}from"./visualization.56ba3c43.js";import{c as m}from"./colors.d19e85ff.js";import{u as L}from"./useVContext.8eed226c.js";import{a as b,w as B,v as C,bq as F,K as I,L as S,aG as E,o as k,j as A,z as $,i as h}from"./index.10d06543.js";const T=b({components:{Box:g},setup(){const{rootEmitter:c}=L(),a=B({x_axis:[],series:[]}),o=C(null),r=D(),{setOptions:i,getInstance:f}=v(o);function s(){return _(this,null,function*(){const t=yield w({year:r.getYear});a.x_axis=t.x_axis,a.series=t.series,n()})}const n=()=>{const t={legendData:[],series:[]};a.series.forEach(({name:u,data:p},y)=>{const d=m[y%m.length];t.legendData.push(u),t.series.push({name:u,data:p.map(x=>x&&Number((x/2e3).toFixed(2))),smooth:!1,type:"line",stack:"Total",itemStyle:{color:d.itemColor},areaStyle:{color:d.areaColor}})}),i({grid:{left:"2%",right:"2%",top:"10%",bottom:"2%",containLabel:!0},legend:{data:t.legendData,top:"0%",right:"0",textStyle:{color:"#ffffff"}},tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},xAxis:{type:"category",data:a.x_axis,boundaryGap:!1,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:t.series,animationDuration:3e3}),l()};let e=null;function l(){let t=0;e&&clearInterval(e),e=setInterval(()=>{var p;const u=t%4;(p=f())==null||p.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:u}),t++},3e3)}return F(()=>{s(),c.on("interval:auto",()=>{s()})}),I(()=>r.getYear,()=>s()),{chartRef:o}}}),X={class:"h-full flex flex-col"},j={class:"flex-1",ref:"chartRef"};function z(c,a,o,r,i,f){const s=E("Box");return k(),A(s,{title:"\u7A3B\u867E\u6D41\u5411\uFF08\u5428\uFF09"},{default:$(()=>[h("div",X,[h("div",j,null,512)])]),_:1})}var O=S(T,[["render",z],["__scopeId","data-v-27829d47"]]);export{O as default};