info-f06a1ff4.js 3.4 KB

1
  1. import{i as h,f as O,a1 as S,_ as V}from"./index-ba596ae9.js";import{e as x}from"./controllerUrls-941681c3.js";import{h as z,p as d,M as _,N as a,a6 as u,l as A,W as s,V as r,k as e,q as l,o as y,i as M,a4 as j,a2 as E,an as F,ah as P,t as c,a7 as m}from"./vue-a39e6937.js";function $(f){return h({url:x+"restore",method:"POST",data:{ids:f}},{showSuccessMessage:!0})}function Q(f){return h({url:x+"info",method:"get",params:{id:f}})}const q={class:"title"},H={class:"table-header-operate-text"},U=z({__name:"info",setup(f){const t=F("baTable"),{t:o}=O(),v=p=>{P.confirm(o("security.dataRecycleLog.Are you sure to restore the selected records?"),"",{confirmButtonText:o("security.dataRecycleLog.restore"),cancelButtonText:o("Cancel")}).then(()=>{$([p]).then(()=>{t.toggleForm(),t.onTableHeaderAction("refresh",{})})}).catch(()=>{})};return(p,b)=>{const n=c("el-descriptions-item"),R=c("el-tree"),L=c("el-descriptions"),k=c("el-scrollbar"),C=c("Icon"),D=c("el-button"),T=c("el-dialog"),B=m("drag"),I=m("zoom"),w=m("loading"),N=m("blur");return d(),_(T,{class:"ba-operate-dialog","model-value":!!e(t).form.operate,onClose:e(t).toggleForm},{header:a(()=>[u((d(),A("div",q,[s(r(e(o)("info")),1)])),[[B,[".ba-operate-dialog",".el-dialog__header"]],[I,".ba-operate-dialog"]])]),footer:a(()=>[u((d(),_(D,{onClick:b[0]||(b[0]=i=>v(e(t).form.extend.info.id)),type:"success"},{default:a(()=>[l(C,{color:"#ffffff",name:"el-icon-RefreshRight"}),y("span",H,r(e(o)("security.dataRecycleLog.restore")),1)]),_:1})),[[N]])]),default:a(()=>[u((d(),_(k,{class:"ba-table-form-scrollbar"},{default:a(()=>[y("div",{class:E(["ba-operate-form","ba-"+e(t).form.operate+"-form"])},[e(M)(e(t).form.extend.info)?j("",!0):(d(),_(L,{key:0,column:2,border:""},{default:a(()=>[l(n,{label:e(o)("id")},{default:a(()=>[s(r(e(t).form.extend.info.id),1)]),_:1},8,["label"]),l(n,{label:e(o)("security.dataRecycleLog.Operation administrator")},{default:a(()=>{var i,g;return[s(r(((i=e(t).form.extend.info.admin)==null?void 0:i.nickname)+"("+((g=e(t).form.extend.info.admin)==null?void 0:g.username)+")"),1)]}),_:1},8,["label"]),l(n,{label:e(o)("security.dataRecycleLog.Recycling rule name")},{default:a(()=>{var i;return[s(r((i=e(t).form.extend.info.recycle)==null?void 0:i.name),1)]}),_:1},8,["label"]),l(n,{label:e(o)("security.dataRecycleLog.data sheet")},{default:a(()=>[s(r(e(t).form.extend.info.data_table),1)]),_:1},8,["label"]),l(n,{label:e(o)("security.dataRecycleLog.Data table primary key")},{default:a(()=>[s(r(e(t).form.extend.info.primary_key),1)]),_:1},8,["label"]),l(n,{label:e(o)("security.dataRecycleLog.Operator IP")},{default:a(()=>[s(r(e(t).form.extend.info.ip),1)]),_:1},8,["label"]),l(n,{width:120,span:2,label:e(o)("security.dataRecycleLog.Delete time")},{default:a(()=>[s(r(e(S)(e(t).form.extend.info.createtime)),1)]),_:1},8,["label"]),l(n,{width:120,span:2,label:"User Agent"},{default:a(()=>[s(r(e(t).form.extend.info.useragent),1)]),_:1}),l(n,{width:120,span:2,label:e(o)("security.dataRecycleLog.Deleted data"),"label-class-name":"color-red"},{default:a(()=>[l(R,{class:"table-el-tree",data:e(t).form.extend.info.data,props:{label:"label",children:"children"}},null,8,["data"])]),_:1},8,["label"])]),_:1}))],2)]),_:1})),[[w,e(t).form.loading]])]),_:1},8,["model-value","onClose"])}}});const W=V(U,[["__scopeId","data-v-a92e05f3"]]),X=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));export{W as I,X as a,Q as i,$ as r};