import{_ as P}from"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import{_ as v}from"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import{_ as L}from"./index.vue_vue_type_script_setup_true_lang-HxsqzSKU.js?v=1773287522785";import{_ as U}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{C as z,w as O,aq as D,h as u,i as N,n as W,ap as j}from"./index-BTglIPU2.js?v=1773287522785";import{u as A}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{u as I}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{u as K}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{$ as f,a0 as V,b as q,a1 as E}from"./index-oaByoBTF.js?v=1773287522785";import{k as F,B as X}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as Z,R as G,e as H,N as J,$ as M,Z as Q,a0 as l,a9 as c,S as i,X as k,j as Y,aa as ee}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index-DIKmrNCq.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";const te={class:"p-20px"},Se=Z({__name:"index",props:{data:{}},setup(b){const{t}=G(),g=b,{row:d}=g.data,y=async()=>{await q({s_id:d.id,bak_type:3}),m(),d.backup_count++},x=e=>{u({title:t("Site.Config.index_28"),content:t("Site.Config.index_29"),onConfirm:async({hide:a})=>{a(),await E({bak_id:e.id})}})},{keys:n,table:o,columns:_}=K([{type:"selection",width:40},{key:"filename",title:t("Site.TableRow.index_22"),ellipsis:{tooltip:!0}},{key:"size",title:t("Site.TableRow.index_23"),width:80,render:e=>z(e.size)},{key:"addtime",title:t("Site.TableRow.index_25"),width:150,render:e=>O(e.bak_time)},{key:"bak_type",title:t("Site.TableRow.index_24"),width:100,render:e=>e.bak_type==1?"".concat(t("WP.index_24")):e.bak_type==2?"".concat(t("WP.index_25")):"".concat(t("WP.index_26"))},I({width:190,options:e=>[{label:t("Site.TableOP.index_4"),onClick:()=>{x(e)}},{label:t("Site.TableOP.index_5"),onClick:()=>{D(encodeURIComponent(e.bak_file),e.filename)}},{label:t("Public.Btn.Del"),onClick:()=>{u({title:t("Site.Batch.index_18"),content:"".concat(t("Site.Batch.index_19")," [").concat(e.filename,"]}"),onConfirm:async({hide:a})=>{await f({bak_id:e.id}),m(),d.backup_count--,a()}})}}]})]),S=[{key:"del",type:"confirm",label:t("Site.Batch.index_20"),confirm:{title:t("Site.Batch.index_21"),desc:t("Site.Batch.index_11"),columns:[_.value[1]],api:e=>f({bak_id:e.id},!1),done:e=>{m(),d.backup_count-=e.length}}}],p=H({p:1,limit:10,s_id:d.id}),{loading:h,setLoading:r}=A(),m=async()=>{try{r(!0);const{message:e}=await V(J(p));N(e)?(o.data=W(e.data)?e.data:[],o.total=j(e.page)):(o.data=[],o.total=0)}finally{n.value=[],r(!1)}};return m(),(e,a)=>{const w=X,B=F,C=U,R=L,$=v,T=P;return M(),Q("div",te,[l(T,null,{toolsLeft:c(()=>[l(B,{class:"flex-nowrap!"},{default:c(()=>[l(w,{type:"primary",onClick:y},{default:c(()=>[Y(ee(e.$t("Site.Config.index_27")),1)]),_:1})]),_:1})]),table:c(()=>[l(C,{"checked-row-keys":i(n),"onUpdate:checkedRowKeys":a[0]||(a[0]=s=>k(n)?n.value=s:null),loading:i(h),"loading-num":1,"max-height":340,data:i(o).data,columns:i(_)},null,8,["checked-row-keys","loading","data","columns"])]),pageLeft:c(()=>[l(R,{"checked-row-keys":i(n),"onUpdate:checkedRowKeys":a[1]||(a[1]=s=>k(n)?n.value=s:null),data:i(o).data,options:S},null,8,["checked-row-keys","data"])]),pageRight:c(()=>[l($,{page:i(p).p,"onUpdate:page":a[2]||(a[2]=s=>i(p).p=s),"page-size":i(p).limit,"onUpdate:pageSize":a[3]||(a[3]=s=>i(p).limit=s),"item-count":i(o).total,onRefresh:m},null,8,["page","page-size","item-count"])]),_:1})])}}});export{Se as default};
