| 1 |
- import{systemApi as b}from"./index-Dhl0yoWK.js";import{_ as y,j as x,o as g,c as D,a,m as I,f as k,w as p,b as e,r as s,C,e as c,t as v}from"./index-BwYZ2HSO.js";const B={class:"app-page log-workbench"},V={class:"log-code"},L={class:"log-code"},j={style:{display:"flex","justify-content":"flex-end","margin-top":"20px"}},z={__name:"LogView",setup(A){const d=s([]),i=s(1),u=s(0),r=s(!1);x(()=>_());async function _(){r.value=!0;try{const o=await b.getLogs({page:i.value,size:20});d.value=o.records||[],u.value=o.total||0}finally{r.value=!1}}function w(o){return o?o.length>120?o.slice(0,120)+"...":o:"--"}return(o,n)=>{const t=c("el-table-column"),f=c("el-table"),h=c("el-pagination"),m=C("loading");return g(),D("div",B,[n[1]||(n[1]=a("div",{class:"page-hero"},[a("div",{class:"hero-info"},[a("h2",null,"操作日志"),a("p",null,"全操作留痕,不可删除")])],-1)),I((g(),k(f,{data:d.value,stripe:"",style:{width:"100%"},class:"data-table"},{default:p(()=>[e(t,{prop:"id",label:"ID",width:"70"}),e(t,{prop:"action",label:"操作类型","min-width":"120","show-overflow-tooltip":""}),e(t,{prop:"entityType",label:"实体类型","min-width":"120","show-overflow-tooltip":""}),e(t,{prop:"entityId",label:"实体ID",width:"80"}),e(t,{prop:"operatorId",label:"操作人",width:"90"}),e(t,{prop:"ip",label:"IP 地址","min-width":"140","show-overflow-tooltip":""}),e(t,{prop:"createdAt",label:"操作时间","min-width":"160"}),e(t,{label:"请求参数","min-width":"300","show-overflow-tooltip":""},{default:p(({row:l})=>[a("code",V,v(w(l.oldDataJson)),1)]),_:1}),e(t,{label:"响应数据","min-width":"300","show-overflow-tooltip":""},{default:p(({row:l})=>[a("code",L,v(w(l.newDataJson)),1)]),_:1})]),_:1},8,["data"])),[[m,r.value]]),a("div",j,[e(h,{"current-page":i.value,"onUpdate:currentPage":n[0]||(n[0]=l=>i.value=l),total:u.value,"page-size":20,layout:"total, prev, pager, next",onCurrentChange:_,background:""},null,8,["current-page","total"])])])}}},P=y(z,[["__scopeId","data-v-55e3d4dd"]]);export{P as default};
|