import{_ as e}from"./index106.js?v=1761009159";import{c as a,i as t,e as s,y as o,aV as l,I as r,r as i,h as n,k as p,l as u,x as c,q as m,p as f,C as d,A as _,b5 as b,D as k}from"./base-lib.js?v=1761009159";import{a9 as h,M as x}from"./utils-lib.js?v=1761009159";import{u as w}from"./column.js?v=1761009159";import{c as j,e as g,f as v}from"./useMethod10.js?v=1761009159";import{a as z}from"./useMethod2.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index107.js?v=1761009159";import"./config.js?v=1761009159";const y={class:"p-2rem"},q={class:"flex items-center"},C=a({__name:"input-back",setup(a){const{BtTable:C}=h({request:j,columns:t((()=>[{label:"备份名称(文件名)",prop:"name"},{label:"大小",prop:"size"},{label:"状态",prop:"status",render:e=>e.status?"正常":s(r,null,[o("不可用"),s(l,{content:"不兼容非宝塔面板的备份还原",placement:"right"},{default:()=>[s("i",{class:"svgtofont-el-warning-filled text-[#ef0808] text-[1.2rem] mt-2px ml-4px"},null)]})])},{label:"上传时间",prop:"time"},w([{title:"导入",onClick:g,isHide:e=>!e.status},{title:"删除",onClick:v}])]))}),M={"x-http-token":window.vite_public_request_token},H=i(!1),A=i(null),B=i(null),D=window.location.protocol+"//"+window.location.host+"/mod/docker/com/upload_backup",I=n({id:z.value.id,restore_backup:!1,backup:!1,f_size:0,f_path:"/www/dk_project/backup/apps",f_name:"",f_start:0}),T=()=>{B.value.$el.click()},V=()=>{x.error("导入失败"),I.f_name=""},$=e=>{x.request(e),H.value=!1,I.f_name=""},E=e=>{I.f_size=e.size,I.f_name=e.name};return(a,t)=>{const l=_,r=b,i=e;return p(),u("div",y,[s(i,null,{"header-left":c((()=>[m("div",q,[s(r,{class:"upload-demo h-[0] w-[0]",ref_key:"upload",ref:A,name:"blob",data:f(I),action:D,headers:M,accept:".tar,.gz","show-file-list":!1,"on-error":V,multiple:!1,"auto-upload":!1,"on-success":$,"on-change":E},{default:c((()=>[d(s(l,{ref_key:"open",ref:B,size:"default",type:"default"},{default:c((()=>t[0]||(t[0]=[o(" 选择文件 ")]))),_:1},512),[[k,!1]])])),_:1},8,["data"]),s(l,{type:"primary",onClick:T},{default:c((()=>t[1]||(t[1]=[o("上传文件")]))),_:1}),t[2]||(t[2]=m("span",{class:"text-[#999] ml-4px"},"上传格式为.tar,.gz文件",-1))])])),content:c((()=>[s(f(C),{"max-height":500})])),"footer-left":c((()=>t[3]||(t[3]=[]))),"footer-right":c((()=>t[4]||(t[4]=[]))),_:1})])}}});export{C as default};
