2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
var h=(x,n,e)=>new Promise((p,l)=>{var f=o=>{try{r(e.next(o))}catch(i){l(i)}},c=o=>{try{r(e.throw(o))}catch(i){l(i)}},r=o=>o.done?p(o.value):Promise.resolve(o.value).then(f,c);r((e=e.apply(x,n)).next())});import{u as b,e as E}from"./useECharts.ce337e2d.js";import{m as _}from"./other.e182adb3.js";import{u as w}from"./visualization.56ba3c43.js";import{u as v}from"./useVContext.8eed226c.js";import{a as F,v as A,w as I,K as C,J as k,o as L,h as S,i as y}from"./index.10d06543.js";const B={class:"w-314px"},D=y("div",{class:"font-bold text-18px bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-center mt-10px font-pmzd"}," \u5386\u5E74\u4EA7\u503C\u8D8B\u52BF\uFF08\u4E07\u5143\uFF09 ",-1),P=F({__name:"NCZQS",setup(x){const n=A(null),e=I({list:[]}),{rootEmitter:p}=v(),{setOptions:l,getInstance:f}=b(n),c=w();let r=[];function o(){var t,s,a,m;r=e.list,l({grid:{left:"2%",right:"2%",top:"10%",bottom:"2%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},xAxis:{type:"category",data:(s=(t=e.list)==null?void 0:t.map(d=>d.x))!=null?s:[],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:[{data:(m=(a=e.list)==null?void 0:a.map(d=>d.y))!=null?m:[],type:"bar",barMaxWidth:30,label:{show:!1,position:"top",color:"#fff"},itemStyle:{color:new E.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#76E9F0"},{offset:1,color:"#1A3537"}])}}]}),g()}let i=null;function g(){let t=0;i&&clearInterval(i),i=setInterval(()=>{var a;const s=t%r.length;(a=f())==null||a.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:s}),t++},3e3)}function u(){return h(this,null,function*(){const{list:t}=yield _({base_id:c.getAddresId}),s=[];for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&s.push({y:Number((Number(t[a])/1e4).toFixed(2)),x:a});e.list=s,o()})}return C(()=>c.getAddresId,()=>{u()}),k(()=>{u(),p.on("interval:auto",()=>{u()})}),(t,s)=>(L(),S("div",B,[D,y("div",{class:"h-220px mt-10px",ref_key:"chartRef",ref:n},null,512)]))}});export{P as default};
|