import{b$ as a,c0 as e,c1 as s}from"./site.js?v=20260328163632";import{B as l}from"./index118.js?v=20260328163632";import{ai as n,l as t,x as o}from"./utils-lib.js?v=20260328163632";import{u as i}from"./store4.js?v=20260328163632";import{B as r}from"./naive-ui.js?v=20260328163632";import{k as u,r as p,O as m,o as c,U as d,V as g,W as v,Y as j,X as b,a3 as f,j as _,Z as x,l as h,F as y}from"./base-lib.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const B={class:"mb-10px"},S=u({__name:"index",setup(u,{expose:S}){const{siteInfo:k,siteType:C}=i(),H=p("runlog"),{BtTabs:O}=n({type:"line",options:[{tab:t("运行日志"),name:"runlog",render:m("span",null,null)},{tab:t("错误日志"),name:"errorlog",render:m("span",null,null)}],value:H}),T=p(!1),q=p(""),w=p({page:1,limit:1e3,log_end:!1}),F=a=>{H.value=a,w.value.page=1,q.value="",L()},I=()=>{w.value.log_end||(w.value.page+=1,L(q.value+"\n"))},L=async(l="")=>{""===l&&(w.value.page=1);const n="runlog"===H.value?"java"===C.value?a:e:s;o({request:n({id:k.value.id,p:w.value.page,limit:w.value.limit,orderby:!1}),success:a=>{q.value=l+a.data.data.join("\n"),Object.assign(w.value,{log_end:a.data.page.log_end})}})};return c((()=>L())),S({init:()=>L()}),(a,e)=>{const s=r,n=d("bt-loading");return g(),v(y,null,[m(j(O),{class:"project-log-tabs",onChange:F}),b("div",B,[m(s,{onClick:e[0]||(e[0]=a=>L())},{default:f((()=>[_(x(j(t)("刷新日志")),1)])),_:1})]),h(m(l,{content:j(q),isHtml:!0,autoScroll:!1,fullScreen:{title:j(t)("全屏查看-日志"),onRefresh:()=>{L()}},onLoad:I,style:{height:"520px",width:"99.5%"}},null,8,["content","fullScreen"]),[[n,j(T)]])],64)}}});export{S as default};
