Files
aaPanel/BTPanel/static/vite/js/Backup-legacy--OOHhVJL.js
T
2026-04-16 18:17:07 +08:00

2 lines
3.7 KiB
JavaScript

System.register(["./index-legacy-BWAC5Pxb.js?v=1776326513599","./index.vue_vue_type_script_setup_true_lang-legacy-BtUR2iKm.js?v=1776326513599","./useTableColumns-legacy-WoOHtq0b.js?v=1776326513599","./vue-core-legacy--By1RlVK.js?v=1776326513599","./naive-ui-legacy-DWYRJHUU.js?v=1776326513599","./prismjs-legacy-D2M4lU8R.js?v=1776326513599","./data-legacy-B7S28W06.js?v=1776326513599","./index-legacy-CzzJWEej.js?v=1776326513599","./copy-legacy-Y_sgd2hJ.js?v=1776326513599","./index-legacy-I6ISUuhE.js?v=1776326513599","./index.vue_vue_type_script_setup_true_lang-legacy-BXWLqGJR.js?v=1776326513599","./index-legacy-gfoB-2cK.js?v=1776326513599"],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.k,f=e.R,k=e.i,v=e.r,h=e.$,g=e.Z,b=e.a0,y=e.a8,_=e._,x=e.V,w=e.j,j=e.a9,M=e.X,B=e.F,C=e.a3},e=>{S=e.aw,N=e.b,P=e.B},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",m({__name:"Backup",setup(e,{expose:m}){const{t:D}=f(),R=k("fileStore"),{backupForm:V}=R,X=v(!1),Z=v(!1),$=v([]);m({open(){V.value.path="",X.value=!0,I()},close(){X.value=!1,$.value=[]}});const A=v(!1),E=v([{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}}),I()}})}}]})]);function G(){c({title:D("Component.SelectPath.index_7"),width:750,height:640,footer:!1,data:{path:V.value.path,callback:e=>{V.value.path=e}},component:C(()=>o(()=>a.import("./index-legacy-BkADhwYt.js?v=1776326513599"),void 0))})}function H(){V.value.path?A.value=!0:p.warning(D("file.backupModal.pleaseSelectPath"))}async function I(){try{Z.value=!0;const{message:e}=await i.post("/files?action=get_all_back");n(e)?$.value=e.map(e=>({id:Number(e[0]),time:Number(e[2]),name:e[1],path:e[3]})):$.value=[]}finally{Z.value=!1}}async function J(){try{await i.post("/files?action=back_path_permissions",V.value,{requestOptions:{loading:D("file.backupModal.executingBackup"),successMessage:!0}}),I(),V.value.path="",V.value.remark=""}catch(e){console.warn(e)}}return(e,a)=>{const l=N,t=u,i=P,n=S,c=d,o=s;return h(),g(B,null,[b(o,{show:x(X),"onUpdate:show":a[1]||(a[1]=e=>M(X)?X.value=e:null),title:x(D)("file.backupModal.title"),width:"700"},{default:y(()=>[_("div",U,[_("div",F,[b(n,null,{default:y(()=>[b(l,{value:x(V).path,"onUpdate:value":a[0]||(a[0]=e=>x(V).path=e)},null,8,["value"]),b(i,{onClick:G},{icon:y(()=>[b(t,{name:"file-dir",size:"20"})]),_:1})]),_:1}),b(i,{type:"primary",onClick:H},{default:y(()=>[w(j(x(D)("file.backupModal.backupButton")),1)]),_:1})]),b(c,{loading:x(Z),"max-height":370,data:x($),columns:x(E)},null,8,["loading","data","columns"])])]),_:1},8,["show","title"]),b(o,{show:x(A),"onUpdate:show":a[3]||(a[3]=e=>M(A)?A.value=e:null),title:x(D)("file.backupModal.confirmTitle"),width:320,footer:!0,onConfirm:J},{default:y(()=>[_("div",T,[_("div",q,j(x(D)("file.backupModal.enterBackupName")),1),_("div",O,[_("div",z,j(x(D)("file.backupModal.remarks")),1),b(l,{class:"flex-1",value:x(V).remark,"onUpdate:value":a[2]||(a[2]=e=>x(V).remark=e)},null,8,["value"])])])]),_:1},8,["show","title"])],64)}}}))}}});