import{_ as a}from"./index105.js?v=1761009159";import{p as e,P as s,l as t,ah as i,b as r}from"./utils-lib.js?v=1761009159";import{$ as l,ap as n,aq as o}from"./files.js?v=1761009159";import{c,r as p,aD as m,q as u,v as d,x as f,e as b,B as h,y}from"./base-lib.js?v=1761009159";import{a as _,u as j,c as w}from"./column.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const x={class:"pb-[1rem] px-16px"},v=c({__name:"index",setup(c){const v=r(),g=p(),q=p([]),k=[_(),{label:"操作时间",prop:"time",width:180,render:a=>m("span",{},a.time)},{label:"文件路径",prop:"filepath",render:a=>m("span",{},a.filepath)},j([{title:"恢复",isHide:a=>{var e;return 0===(null==(e=a.historys)?void 0:e.length)},onClick:async a=>{await e({title:"恢复历史文件",content:"是否恢复历史文件 ".concat(a.time,"?恢复历史文件后，当前文件内容将会被替换！")}),s({loading:"正在恢复历史文件，请稍后...",request:l({filename:a.filepath,history:a.historys[0]}),success:a=>{a.status?(v.success("恢复成功"),C()):v.error("恢复失败")}})}},{title:"删除",onClick:async a=>{await s({loading:"正在删除历史文件，请稍后...",request:n({id:a.id}),message:!0,success:C})}}])],C=async()=>{await s({request:o(),data:[Array,q]})},H=[{label:"删除",value:"delete",event:async(a,e,s,t,i)=>{const r=async a=>await n({id:a.id});await a({title:"批量删除",content:"批量删除选中，是否继续操作？",column:[{prop:"filepath",label:"文件路径"},w()],onConfirm:async()=>(await e(r),C(),!1)})}}];return u(()=>{C()}),(e,s)=>{const r=t,l=i,n=a;return d(),f("div",x,[b(n,null,{content:h(()=>[b(r,{ref_key:"fileTableRef",ref:g,height:"40rem",column:k,description:"列表为空",data:y(q)},null,8,["data"])]),"footer-left":h(()=>[b(l,{"table-ref":y(g),options:y(H)},null,8,["table-ref","options"])]),_:1})])}}});export{v as default};
