Files
aaPanel/BTPanel/static/vite/js/Backup-legacy-Do-6QziB.js
T
2026-04-24 15:32:06 +08:00

2 lines
3.8 KiB
JavaScript

System.register(["./index-legacy-dEHRWiZw.js?v=1777002971908","./index.vue_vue_type_script_setup_true_lang-legacy-DRPdmvvz.js?v=1777002971908","./useTableColumns-legacy-Dx4GAFLr.js?v=1777002971908","./naive-ui-legacy-Ba0jyboH.js?v=1777002971908","./vue-core-legacy-BYkyrx0G.js?v=1777002971908","./prismjs-legacy-BN0FEcG9.js?v=1777002971908","./data-legacy-Du8trtFL.js?v=1777002971908","./index-legacy-DlZeCFbq.js?v=1777002971908","./copy-legacy-vrA85kF3.js?v=1777002971908","./index-legacy-qwjVAv7H.js?v=1777002971908","./index.vue_vue_type_script_setup_true_lang-legacy-Cpp1h7xW.js?v=1777002971908","./index-legacy-CArHlAcn.js?v=1777002971908"],(function(e,a){"use strict";var l,t,i,n,u,s,c,o,p,d,r,m,f,k,v,h,g,b,y,_,x,w,j,M,B,C,S,N,P;return{setters:[e=>{l=e.x,t=e.h,i=e.av,n=e.n,u=e.l,s=e.y,c=e.p,o=e.S,p=e.m},e=>{d=e._},e=>{r=e.u},e=>{m=e.aw,f=e.b,k=e.B},e=>{v=e.k,h=e.R,g=e.i,b=e.r,y=e.$,_=e.Z,x=e.a0,w=e.a9,j=e._,M=e.S,B=e.j,C=e.aa,S=e.X,N=e.F,P=e.a3},null,null,null,null,null,null,null],execute:function(){const U={class:"p-20px"},F={class:"flex items-center gap-16px mb-16px"},T={class:"p-20px"},q={class:"mb-16px text-14px"},O={class:"flex items-center gap-20px"},z={class:"text-13px"};e("default",v({__name:"Backup",setup(e,{expose:v}){const{t:D}=h(),R=g("fileStore"),{backupForm:X}=R,Z=b(!1),$=b(!1),A=b([]);v({open(){X.value.path="",Z.value=!0,J()},close(){Z.value=!1,A.value=[]}});const E=b(!1),G=b([{key:"time",title:D("file.backupModal.backupTime"),width:160,render:e=>l(e.time)},{key:"path",title:D("file.backupModal.backupPath"),ellipsis:{tooltip:!0}},{key:"name",title:D("file.backupModal.backupName"),width:120,ellipsis:{tooltip:!0},render:e=>e.name||"--"},r({width:100,options:e=>[{label:D("Public.Btn.Delete"),onClick:()=>{t({title:D("file.backupModal.deleteBackup"),content:D("file.backupModal.deleteConfirm"),onConfirm:async()=>{await i.post("/files?action=del_path_premissions",{id:e.id},{requestOptions:{loading:D("file.backupModal.deletingBackup"),successMessage:!0}}),J()}})}}]})]);function H(){c({title:D("Component.SelectPath.index_7"),width:750,height:640,footer:!1,data:{path:X.value.path,callback:e=>{X.value.path=e}},component:P((()=>o((()=>a.import("./index-legacy-B8aoyZRH.js?v=1777002971908")),void 0)))})}function I(){X.value.path?E.value=!0:p.warning(D("file.backupModal.pleaseSelectPath"))}async function J(){try{$.value=!0;const{message:e}=await i.post("/files?action=get_all_back");n(e)?A.value=e.map((e=>({id:Number(e[0]),time:Number(e[2]),name:e[1],path:e[3]}))):A.value=[]}finally{$.value=!1}}async function K(){try{await i.post("/files?action=back_path_permissions",X.value,{requestOptions:{loading:D("file.backupModal.executingBackup"),successMessage:!0}}),J(),X.value.path="",X.value.remark=""}catch(e){console.warn(e)}}return(e,a)=>{const l=f,t=u,i=k,n=m,c=d,o=s;return y(),_(N,null,[x(o,{show:M(Z),"onUpdate:show":a[1]||(a[1]=e=>S(Z)?Z.value=e:null),title:M(D)("file.backupModal.title"),width:"700"},{default:w((()=>[j("div",U,[j("div",F,[x(n,null,{default:w((()=>[x(l,{value:M(X).path,"onUpdate:value":a[0]||(a[0]=e=>M(X).path=e)},null,8,["value"]),x(i,{onClick:H},{icon:w((()=>[x(t,{name:"file-dir",size:"20"})])),_:1})])),_:1}),x(i,{type:"primary",onClick:I},{default:w((()=>[B(C(M(D)("file.backupModal.backupButton")),1)])),_:1})]),x(c,{loading:M($),"max-height":370,data:M(A),columns:M(G)},null,8,["loading","data","columns"])])])),_:1},8,["show","title"]),x(o,{show:M(E),"onUpdate:show":a[3]||(a[3]=e=>S(E)?E.value=e:null),title:M(D)("file.backupModal.confirmTitle"),width:320,footer:!0,onConfirm:K},{default:w((()=>[j("div",T,[j("div",q,C(M(D)("file.backupModal.enterBackupName")),1),j("div",O,[j("div",z,C(M(D)("file.backupModal.remarks")),1),x(l,{class:"flex-1",value:M(X).remark,"onUpdate:value":a[2]||(a[2]=e=>M(X).remark=e)},null,8,["value"])])])])),_:1},8,["show","title"])],64)}}}))}}}));