import{c as g}from"./setting.644fa418.js";import{i as y}from"./installLabelLayout.33ea9c61.js";import{d as k,b as B,o as D,y as E,cZ as I,c_ as S,c$ as A,d0 as L,d1 as $,d2 as F,_ as z,c as i,e as w,f as O,k as x,i as l,A as P,h as e,g as t,w as m,v as _,R as N,S as V}from"./index.0308b213.js";const W=k({setup(){const o=B({server:[],env:[],auth:[],freeCpuDiskInfo:null}),f=()=>{g().then(u=>{console.log("res",u),o.server=u.server,o.env=u.env,o.auth=u.auth,o.freeCpuDiskInfo=u.freeCpuDiskInfo,u.freeCpuDiskInfo&&E(()=>{v(u.freeCpuDiskInfo)})})};D(()=>{f()});const v=u=>{let h=u.free,b=u.cpu,r=u.disk;I([S,A,L,$,y]);var a=document.getElementById("free"),n=F(a),s;s={tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},legend:{top:"5%",left:"center"},series:[{name:"\u5185\u5B58\u4F7F\u7528\u7387",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:"{b}: {c} ({d}%)"},emphasis:{label:{show:!0,fontSize:40,fontWeight:"bold"}},labelLine:{show:!1},data:[{value:h.percent,name:"\u5DF2\u4F7F\u7528"},{value:h.remain,name:"\u5269\u4F59"}]}]},s&&n.setOption(s);var a=document.getElementById("cpu"),n=F(a),s;s={tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},legend:{top:"5%",left:"center"},series:[{name:"CPU\u4F7F\u7528\u7387",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:"{b}: {c} ({d}%)"},emphasis:{label:{show:!0,fontSize:40,fontWeight:"bold"}},labelLine:{show:!1},data:[{value:b.percent,name:"\u5DF2\u4F7F\u7528"},{value:b.remain,name:"\u5269\u4F59"}]}]},s&&n.setOption(s);var a=document.getElementById("disk"),n=F(a),s;s={tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},legend:{top:"5%",left:"center"},series:[{name:"\u78C1\u76D8\u4F7F\u7528\u7387",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:"{b}: {c} ({d}%)"},emphasis:{label:{show:!0,fontSize:40,fontWeight:"bold"}},labelLine:{show:!1},data:[{value:r.percent,name:"\u5DF2\u4F7F\u7528"},{value:r.remain,name:"\u5269\u4F59"}]}]},s&&n.setOption(s)};return{info:o,getSystemInfo:f,initCharts:v}}});const d=o=>(N("data-v-6e6a6314"),o=o(),V(),o),q={class:"system-environment"},U=d(()=>t("div",null,"\u72B6\u6001",-1)),H=d(()=>t("div",{class:"chart-container"},[t("div",{class:"chart"},[t("text",null,"\u5185\u5B58\u4F7F\u7528\u7387"),t("div",{id:"free",class:"chart"})]),t("div",{class:"chart"},[t("text",null,"CPU\u4F7F\u7528\u7387"),t("div",{id:"cpu",class:"chart"})]),t("div",{class:"chart"},[t("text",null,"\u78C1\u76D8\u4F7F\u7528\u7387"),t("div",{id:"disk",class:"chart"})])],-1)),M=d(()=>t("div",null,"\u670D\u52A1\u5668\u4FE1\u606F",-1)),R={class:"m-t-15"},T=d(()=>t("div",null,"PHP\u73AF\u5883\u8981\u6C42",-1)),Z={class:"m-t-15"},j=d(()=>t("div",null,"\u76EE\u5F55\u6743\u9650",-1)),G={class:"m-t-15"};function J(o,f,v,u,h,b){const r=i("el-card"),a=i("el-table-column"),n=i("el-table"),s=i("Select"),p=i("el-icon"),C=i("close-bold");return w(),O("div",q,[o.info.freeCpuDiskInfo?(w(),x(r,{key:0,shadow:"never"},{default:l(()=>[U,H]),_:1})):P("",!0),e(r,{shadow:"never",class:"m-t-15"},{default:l(()=>[M,t("div",R,[e(n,{data:o.info.server,size:"medium"},{default:l(()=>[e(a,{prop:"param",label:"\u53C2\u6570"}),e(a,{prop:"value",label:"\u503C"})]),_:1},8,["data"])])]),_:1}),e(r,{shadow:"never",class:"m-t-15"},{default:l(()=>[T,t("div",Z,[e(n,{data:o.info.env,size:"medium"},{default:l(()=>[e(a,{prop:"option",label:"\u9009\u9879"}),e(a,{prop:"require",label:"\u8981\u6C42"}),e(a,{prop:"status",label:"\u72B6\u6001"},{default:l(c=>[m(e(p,{color:"#67C23A"},{default:l(()=>[e(s)]),_:2},1536),[[_,c.row.status]]),m(e(p,{color:"#DB2828"},{default:l(()=>[e(C)]),_:2},1536),[[_,!c.row.status]])]),_:1}),e(a,{prop:"remark",label:"\u8BF4\u660E\u53CA\u5E2E\u52A9"})]),_:1},8,["data"])])]),_:1}),e(r,{shadow:"never",class:"m-t-15"},{default:l(()=>[j,t("div",G,[e(n,{data:o.info.auth,size:"medium"},{default:l(()=>[e(a,{prop:"dir",label:"\u9009\u9879"}),e(a,{prop:"require",label:"\u8981\u6C42"}),e(a,{prop:"status",label:"\u72B6\u6001"},{default:l(c=>[m(e(p,{color:"#67C23A"},{default:l(()=>[e(s)]),_:2},1536),[[_,c.row.status]]),m(e(p,{color:"#DB2828"},{default:l(()=>[e(C)]),_:2},1536),[[_,!c.row.status]])]),_:1}),e(a,{prop:"remark",label:"\u8BF4\u660E\u53CA\u5E2E\u52A9"})]),_:1},8,["data"])])]),_:1})])}const Y=z(W,[["render",J],["__scopeId","data-v-6e6a6314"]]);export{Y as default};
