import{aC as a,b as l}from"./utils-lib.js?v=1761009159";import{c as e,aA as n,r as t,g as s,w as u,q as r,v as i,x as o,z as d,e as m,B as v,C as c,A as p,y as g,I as _,J as f,F as b,b0 as j,Q as x,bO as y,bN as h,G as C,N as w,aC as k}from"./base-lib.js?v=1761009159";import{_ as N}from"./index119.js?v=1761009159";import{getProjectLogs as S}from"./site.js?v=1761009159";import{j as V}from"./group-detail.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index105.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";const A={class:"p-[2rem]"},H={class:"text-medium text-secondary mb-[2rem] mt-[1.6rem] font-bold flex justify-between"},J={class:"mt-[2rem]"},O=e({__name:"group-logs",props:{compData:{default:{}}},setup(e){const O=l(),q=n("popupClose",()=>{}),z=t(""),B=s(()=>{var a;return(null==(a=V.value.running_step)?void 0:a.names)||[]}),D=t(!1),F=t(""),G=s(()=>!B.value.length);let I=s(()=>!V.value.running);u(()=>V.value.running_step,a=>{a&&(z.value=B.value[0],R(z.value))},{immediate:!0}),u(I,a=>{a&&(O.success("项目组已经执行完毕"),q())});const Q=s(()=>{var a,l;return(null==(a=V.value.running_step)?void 0:a.msg)||(null==(l=V.value.running_data)?void 0:l.msg)||V.value.msg||"--"}),R=async a=>{D.value=!0;try{const l=await S({data:JSON.stringify({project_name:a})},"java");l.status?F.value=l.data.data:O.error(l.msg)}catch(l){}finally{D.value=!1}};return r(()=>{}),(l,e)=>{const n=y,t=h,s=C,u=N,r=k,S=a;return i(),o("div",A,[d("div",null,[m(t,{title:"项目组信息",border:"",column:3,class:"table-descriptions"},{default:v(()=>[m(n,{label:"总项目数"},{default:v(()=>{var a,l,e,n;return[c(p((null==(l=null==(a=g(V))?void 0:a.running_data)?void 0:l.length)>-1?null==(n=null==(e=g(V))?void 0:e.running_data)?void 0:n.length:"--"),1)]}),_:1}),m(n,{label:"未执行的项目数"},{default:v(()=>{var a,l,e,n;return[c(p((null==(l=null==(a=g(V))?void 0:a.running_data)?void 0:l.remaining)>-1?null==(n=null==(e=g(V))?void 0:e.running_data)?void 0:n.remaining:"--"),1)]}),_:1}),m(n,{label:"正在执行中的项目数"},{default:v(()=>{var a,l,e,n;return[c(p((null==(l=null==(a=g(V))?void 0:a.running_data)?void 0:l.executing)>-1?null==(n=null==(e=g(V))?void 0:e.running_data)?void 0:n.executing:"--"),1)]}),_:1}),m(n,{label:"当前执行步骤"},{default:v(()=>[c(p(g(Q)),1)]),_:1})]),_:1})]),d("div",H,[e[4]||(e[4]=c(" 项目日志 ",-1)),_(m(s,{type:"default",onClick:e[0]||(e[0]=a=>R(g(z)))},{default:v(()=>e[3]||(e[3]=[c("刷新",-1)])),_:1,__:[3]},512),[[f,!g(I)&&!g(G)]])]),_(m(S,{class:"h-[30rem]",type:"card",modelValue:g(z),"onUpdate:modelValue":e[1]||(e[1]=a=>x(z)?z.value=a:null),onTabClick:e[2]||(e[2]=a=>R(g(z)))},{default:v(()=>[(i(!0),o(b,null,j(g(B),a=>(i(),w(r,{key:a,label:a,name:a},{default:v(()=>[m(u,{content:g(F),isHtml:!0,class:"mt-16x",fullScreen:{title:"全屏查看【项目】日志",onRefresh:()=>R(g(z))},style:{height:"48rem",width:"99.5%"}},null,8,["content","fullScreen"])]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"]),[[f,!g(G)]]),_(d("span",J,"暂无日志",512),[[f,g(G)]])])}}});export{O as default};
