lcny-vue3-antd-admin/dist/assets/NCZQS.5d4a9052.js

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 E,e as b}from"./useECharts.d100ee71.js";import{l as _}from"./other.ed2ccd93.js";import{u as w}from"./visualization.dd6465e6.js";import{u as F}from"./useVContext.fe0bcac3.js";import{d as v,r as A,q as I,E as C,D as k,o as L,f as S,h as y}from"./index.7edff3d4.js";import"ant-design-vue";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),R=v({__name:"NCZQS",setup(x){const n=A(null),e=I({list:[]}),{rootEmitter:p}=F(),{setOptions:l,getInstance:f}=E(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(u=>u.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(u=>u.y))!=null?m:[],type:"bar",barMaxWidth:30,label:{show:!1,position:"top",color:"#fff"},itemStyle:{color:new b.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 d(){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,()=>{d()}),k(()=>{d(),p.on("interval:auto",()=>{d()})}),(t,s)=>(L(),S("div",B,[D,y("div",{class:"h-220px mt-10px",ref_key:"chartRef",ref:n},null,512)]))}});export{R as default};