import{_ as a}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import{_ as e}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import{b as t,h as s,d as i,c as n,f as o}from"./public.js?v=1753954525509";import{b1 as l,n as p,eT as d,a_ as r,eU as m,eV as _,c,w as u,x as b,b5 as f}from"./page_layout.js?v=1753954525509";import{ay as g}from"./naive.js?v=1753954525509";import{k as y,P as x,e as h,N as w,U as j,V as k,Q as v,a2 as C,j as R,a3 as D,X as z}from"./vue.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const U={class:"p-20px"},S=y({__name:"index",props:{data:{}},setup(y){const{t:S}=x(),L=y,{row:T}=L.data,B=l(),F=async()=>{await f(B.type,{id:T.id}),X(),B.setRefresh(!0)},P=h({p:1,limit:10,search:T.id}),{table:V,columns:H}=t([{key:"filename",title:S("Component.UploadFile.index_3"),ellipsis:{tooltip:{width:"trigger"}}},{key:"size",title:S("Site.TableRow.index_23"),width:90,render:a=>p(a.size)},{key:"addtime",title:S("Site.TableRow.index_25"),width:146},s({width:180,options:a=>[{label:S("Database.tools.index_3"),onClick:()=>{i({title:S("Database.tools.index_17"),content:S("Database.tools.index_18"),onConfirm:async({hide:e})=>{await d(B.type,{file:a.filename,name:T.name}),B.setRefresh(!0),e()}})}},{label:S("Ftp.Label.index_11"),onClick:()=>{r(a.filename,a.name)}},{label:S("Public.Btn.Del"),onClick:()=>{i({title:S("Site.Batch.index_18"),content:S("Database.tools.index_19"),onConfirm:async({hide:e})=>{await m({id:a.id}),X(),B.setRefresh(!0),e()}})}}]})]),{loading:N,setLoading:Q}=n(),X=async()=>{try{Q(!0);const{message:a}=await _(w(P));c(a)?(V.data=u(a.data)?a.data:[],V.total=b(a.page)):(V.data=[],V.total=0),T.backup_count=V.total}finally{Q(!1)}};return X(),(t,s)=>{const i=g,n=o,l=e,p=a;return j(),k("div",U,[v(p,null,{toolsLeft:C((()=>[v(i,{class:"backup-btn",type:"primary",onClick:F},{default:C((()=>[R(D(t.$t("Database.index_16")),1)])),_:1})])),table:C((()=>[v(n,{loading:z(N),"loading-num":6,data:z(V).data,columns:z(H)},null,8,["loading","data","columns"])])),pageRight:C((()=>[v(l,{page:z(P).p,"onUpdate:page":s[0]||(s[0]=a=>z(P).p=a),"page-size":z(P).limit,"onUpdate:pageSize":s[1]||(s[1]=a=>z(P).limit=a),"item-count":z(V).total,onRefresh:X},null,8,["page","page-size","item-count"])])),_:1})])}}});export{S as default};
