import{_ as e}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1764830988434";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1764830988434";import{c as s,f as t,d as i,h as l}from"./public.js?v=1764830988434";import{n,d as o,aI as p,y as d}from"./page_layout.js?v=1764830988434";import{p as m,q as c}from"./planned.js?v=1764830988434";import{a as r}from"./soft.js?v=1764830988434";import{k as _,P as u,e as f,R as g,V as w,W as k,a3 as y,U as h,ak as j,N as x}from"./vue.js?v=1764830988434";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1764830988434";import"./naive.js?v=1764830988434";import"./common.js?v=1764830988434";import"./__commonjsHelpers__.js?v=1764830988434";import"./site.js?v=1764830988434";const b={class:"p-20px"},v=_({__name:"index",props:{data:{}},setup(_){const{t:v}=u(),R=_,{row:z}=R.data,{keys:C,table:S,columns:T}=s([{type:"selection",width:40},{key:"name",title:v("Site.TableRow.index_22"),ellipsis:{tooltip:!0}},{key:"class",title:v("Ftp.Table.index_3"),width:80},{key:"addtime",title:v("Site.TableRow.index_25"),width:150},{key:"filename",title:v("Crontab.Planned.index_11"),width:200,ellipsis:{tooltip:!0}},{key:"size",title:v("Site.TableRow.index_23"),width:80,render:e=>n(e.size)},t({width:70,options:e=>[{label:v("Public.Btn.Click"),show:"local disk"!==e.class,onClick:()=>{r({title:e.class,name:e.class,admin:!0})}},{label:v("Site.TableOP.index_5"),show:"local disk"===e.class,onClick:async()=>{const{message:a}=await m({cron_id:z.id,filename:e.filename});o(a)&&p(encodeURIComponent(a.path),e.name)}}]})]),U=f({p:1,rows:10,cron_id:z.id}),{loading:P,setLoading:I}=i(),q=async()=>{try{I(!0);const{message:e}=await c(x(U));o(e)?(S.data=e.data.map(e=>({...e,filename:e.filename.includes("|")?"/"+e.filename.split("|").slice(1).join("|"):e.filename,class:e.filename.includes("|")?e.filename.split("|").length>2?e.filename.split("|")[1]:e.filename.split("|")[0]:"local disk"})),S.total=d(e.page)):(S.data=[],S.total=0)}finally{C.value=[],I(!1)}};return q(),(s,t)=>{const i=l,n=a,o=e;return w(),g("div",b,[k(o,null,{table:y(()=>[k(i,{"checked-row-keys":h(C),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>j(C)?C.value=e:null),loading:h(P),"loading-num":1,"max-height":340,data:h(S).data,columns:h(T)},null,8,["checked-row-keys","loading","data","columns"])]),pageRight:y(()=>[k(n,{page:h(U).p,"onUpdate:page":t[1]||(t[1]=e=>h(U).p=e),"page-size":h(U).rows,"onUpdate:pageSize":t[2]||(t[2]=e=>h(U).rows=e),"item-count":h(S).total,onRefresh:q},null,8,["page","page-size","item-count"])]),_:1})])}}});export{v as default};
