info-pKQul2DW.js 3.4 KB

1
  1. import{d as N,az as O,a2 as S,K as c,aq as m,e as d,y as _,L as a,u as e,t as r,m as s,f as j,am as u,j as l,i as y,G as A,N as V,C as E,as as F}from"./vue-A59npLRR.js";import{c as h,a5 as M,_ as P}from"./index-EwE51S_X.js";const x="/admin/security.DataRecycleLog/";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"},G={class:"table-header-operate-text"},H=N({__name:"info",setup(f){const t=O("baTable"),{t:o}=S(),v=b=>{F.confirm(o("security.dataRecycleLog.Are you sure to restore the selected records?"),"",{confirmButtonText:o("security.dataRecycleLog.restore"),cancelButtonText:o("Cancel")}).then(()=>{$([b]).then(()=>{t.toggleForm(),t.onTableHeaderAction("refresh",{})})}).catch(()=>{})};return(b,p)=>{const n=c("el-descriptions-item"),R=c("el-tree"),L=c("el-descriptions"),C=c("el-scrollbar"),I=c("Icon"),k=c("el-button"),D=c("el-dialog"),T=m("drag"),B=m("zoom"),w=m("loading"),z=m("blur");return d(),_(D,{class:"ba-operate-dialog","model-value":!!e(t).form.operate,onClose:e(t).toggleForm},{header:a(()=>[u((d(),j("div",q,[s(r(e(o)("Info")),1)])),[[T,[".ba-operate-dialog",".el-dialog__header"]],[B,".ba-operate-dialog"]])]),footer:a(()=>[u((d(),_(k,{onClick:p[0]||(p[0]=i=>v(e(t).form.extend.info.id)),type:"success"},{default:a(()=>[l(I,{color:"#ffffff",name:"el-icon-RefreshRight"}),y("span",G,r(e(o)("security.dataRecycleLog.restore")),1)]),_:1})),[[z]])]),default:a(()=>[u((d(),_(C,{class:"ba-table-form-scrollbar"},{default:a(()=>[y("div",{class:A(["ba-operate-form","ba-"+e(t).form.operate+"-form"])},[e(V)(e(t).form.extend.info)?E("",!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(M)(e(t).form.extend.info.create_time)),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"])}}}),K=P(H,[["__scopeId","data-v-c084e7c1"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"}));export{K as I,W as a,Q as i,$ as r,x as u};