import{l as t,da as a,a4 as e,$ as s,a1 as l,L as i,a3 as n,x as o,b8 as r,_ as p}from"./utils-lib.js?v=20260328163632";import{B as u}from"./index118.js?v=20260328163632";import{r as d}from"./controller.js?v=20260328163632";import{k as m,r as c,O as x,o as f,V as g,W as v,Y as _,X as j,j as b,Z as h,a3 as k,N as y}from"./base-lib.js?v=20260328163632";import{ax as w}from"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index84.js?v=20260328163632";import"./index85.js?v=20260328163632";import"./index86.js?v=20260328163632";const z={class:"!mb-10px bt-tips-ul !mt-10px"},C={class:"text-14px text-[var(--text-color-2)]"},V=p(m({__name:"index",setup(p){const m=c(!1),V=c({name:"",logs:""}),S=c({columns:[{title:t("名称"),key:"name",ellipsis:{tooltip:!0},render:t=>x("div",{class:"flex items-center",title:t.name},[x("span",{class:"mr-5px font-bold !text-[12px] ".concat(t.install_status&&"-2"!==t.status?"text-primary svgtofont-el-check":"text-danger svgtofont-el-close")},null),x("span",{class:"truncate"},[t.name])])},{title:t("创建时间"),key:"addtime",width:110,render:t=>x("span",null,[t.addtime.replace(/^\d{4}-/,"")])},{title:t("任务耗时"),key:"duration",width:100,render:t=>x("span",null,[a(t.end-t.start)])},{title:t("安装详情"),key:"msg",width:100,ellipsis:{tooltip:!0},render:a=>x("span",{class:a.install_status&&"-2"!==a.status?"text-primary":"text-danger"},["-2"===a.status?t("安装失败"):a.msg||t("安装成功")])},{...e([{title:t("详情"),onClick:t=>{V.value=t,m.value=!0}}]),width:100}],data:[]}),q=c({page:1,pageSize:20,itemCount:0,pageSlot:5}),[B,H]=s(S),[I]=n(q),L=()=>{o({request:r({status:1,limit:q.value.pageSize,p:q.value.page}),success:t=>{S.value.data=t.data.data,q.value.itemCount=t.data.page.total}})};return f((()=>{L()})),(a,e)=>{const s=w;return g(),v("div",null,[x(_(B),{"max-height":360,class:"pb-10px"}),j("ul",z,[j("li",null,[b(h(_(t)("提示：若任务长时间未执行，请尝试点击"))+"【 ",1),j("span",{class:"bt-link",onClick:e[0]||(e[0]=(...t)=>_(d)&&_(d)(...t))},h(_(t)("重启服务")),1),b(" 】"+h(_(t)("来重置任务队列")),1)])]),x(s,{justify:"end"},{default:k((()=>[x(_(I),{"show-size-picker":"","page-sizes":_(l)([10,20,50,100]),onRefresh:L},{suffix:k((()=>[j("span",C,h(_(t)("共 {0} 条",[_(q).itemCount])),1)])),_:1},8,["page-sizes"])])),_:1}),x(_(i),{title:_(V).name+_(t)("日志详情"),modelValue:_(m),"onUpdate:modelValue":e[1]||(e[1]=t=>y(m)?m.value=t:null),area:[720,500]},{default:k((()=>[x(u,{class:"h-500px !rounded-[0]",content:_(V).logs},null,8,["content"])])),_:1},8,["title","modelValue"])])}}}),[["__scopeId","data-v-611bf0b2"]]);export{V as default};
