314507
|
1 |
import{aV as h,d,r,A as p,b as v,o as F,g as w,B as o,k as s,a as x,am as P,ap as y,b3 as S}from"./index-CHTXMeh8.js";import{E as _}from"./el-card-Bdk9qx7q.js";import{_ as b}from"./Echart.vue_vue_type_script_setup_true_lang-krq-cCBm.js";const n=()=>h.get({url:"/infra/actuator/disk/info"}),D=d({__name:"index_rec",setup(T){const l=r(),e=r(),a=p({title:{text:"\u78C1\u76D8\u4F7F\u7528\u60C5\u51B5",left:"center",show:!0,offsetCenter:[0,"20%"],color:"yellow",fontSize:20},toolbox:{show:!1,feature:{restore:{show:!0},saveAsImage:{show:!0}}},series:[{name:"\u5CF0\u503C",type:"gauge",min:0,max:500,splitNumber:10,color:"#F5C74E",radius:"85%",center:["50%","50%"],startAngle:225,endAngle:-45,axisLine:{lineStyle:{color:[[.2,"#7FFF00"],[.8,"#00FFFF"],[1,"#FF0000"]],width:10}},axisTick:{length:5,lineStyle:{color:"#76D9D7"}},splitLine:{length:20,lineStyle:{color:"#76D9D7"}},axisLabel:{color:"#76D9D7",distance:15,fontSize:15},pointer:{width:7,show:!0},detail:{textStyle:{fontWeight:"normal",fontSize:15,color:"#FFFFFF"},valueAnimation:!0},progress:{show:!0}}]}),i=async()=>{try{const t=await n();l.value=t,e.value=t[0],console.log(e.value),console.log(e.value.name),console.log(e.value.restPPT),a.series[0].detail={show:!0,offsetCenter:[0,"50%"],color:"auto",fontSize:30,formatter:e.value.restPPT},console.log(e.value.restPPT),a.series[0].data[0]={value:e.value.restPPT,name:"\u78C1\u76D8\u6D88\u8017"},console.log(e.value),a.tooltip={formatter:"{b} <br/>{a} : "+e.value.restPPT}}catch{}};return v(()=>{(async()=>{const t=await n();l.value=t,e.value=t[0]})(),i()}),(t,A)=>{const c=b,u=_,f=P,m=y,g=S;return F(),w(g,{height:"calc(100vh - 88px - 40px - 50px)"},{default:o(()=>[s(m,null,{default:o(()=>[s(f,{span:12,class:"mt-3"},{default:o(()=>[s(u,{class:"ml-3",gutter:12,shadow:"hover"},{default:o(()=>[s(c,{options:x(a),height:420},null,8,["options"])]),_:1})]),_:1})]),_:1})]),_:1})}}});export{D as default}; |