Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / facility_storage_capacity_p.a2c8e1b6.js
import{ao as h,ap as f,al as y,C as g,o as i,c,h as n,v as m,_ as v,l as S,n as u,s as b,t as w,m as l,p as C}from"./index.82404a61.js";const x=["id"],A={__name:"pieChart",props:{refresh:{type:[String,Number],default:1},echartData:{type:Array,default:[]},radius:{type:[Array,String],default:["40%","70%"]},legend:{type:Object,default:{top:"5%",orient:"vertical",left:"right"}},colorList:{type:Array,default:[]}},setup(e){const t=e,{proxy:o}=m(),s=h(),a=f("");y(()=>t.refresh,r=>{a.value&&a.value.dispose(),d()});function p(){a.value&&a.value.resize()}function d(){const r=document.getElementById(s);!r||r.clientWidth===0||r.clientHeight===0||(a.value=o.echarts.init(r),a.value.setOption({tooltip:{trigger:"item"},legend:t.legend,grid:{bottom:0},series:[{name:"",type:"pie",radius:t.radius,data:t.echartData,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},itemStyle:{},labelLine:{length:20,length2:15,maxSurfaceAngle:80},label:{show:!0,formatter:`{d|{b}}
{d|{d}%}`,position:"outside",lineHeight:18,rich:{d:{fontSize:16,color:"#000000",align:"left",fontFamily:"SourceHanSansCN"},d:{fontSize:14,color:"#000000",align:"left",fontFamily:"SourceHanSansCN"}}}}]}))}return g(()=>{d(),window.addEventListener("resize",p)}),(r,H)=>(i(),c("div",{id:n(s),style:{width:"100%",height:"100%"}},null,8,x))}};const _=e=>(b("data-v-02b793ac"),e=e(),w(),e),B={class:"facility_storage_capacity_p"},I={key:1,class:"total"},N=_(()=>l("div",{class:"total_txt"},"\u8BBE\u65BD\u8C03\u84C4\u91CF",-1)),k=_(()=>l("div",{class:"total_val"},[l("span",{class:"val"},"120"),C("m\xB3")],-1)),z=[N,k],D={__name:"facility_storage_capacity_p",props:{radius:{type:[Array,String],default:["40%","70%"]},data:{type:Array,default:()=>[]}},setup(e){const t=e,o=t.data.map(s=>({name:s.name,value:s.value*1}));return(s,a)=>(i(),c("div",B,[n(o).length?(i(),S(A,{key:0,echartData:n(o),ref:"barChartRef",legend:{show:!1},radius:t.radius},null,8,["echartData","radius"])):u("",!0),n(o).length?(i(),c("div",I,z)):u("",!0)]))}},L=v(D,[["__scopeId","data-v-02b793ac"]]);export{L as default};