← Back
Editing: index255.js
import{_ as a}from"./index103.js?v=VERSION_NUMBER";import{p as e,K as s,l as t,a0 as i,b as r}from"./utils-lib.js?v=VERSION_NUMBER";import{$ as l,ap as n,aq as o}from"./files.js?v=VERSION_NUMBER";import{c,r as p,aB as m,p as u,q as d,v as f,e as b,A as h,x as y}from"./base-lib.js?v=VERSION_NUMBER";import{a as _,u as j,c as w}from"./column.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./index104.js?v=VERSION_NUMBER";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]})},A=[{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(A)},null,8,["table-ref","options"])])),_:1})])}}});export{v as default};
Save File
Cancel