|
- import{z as I,a as v,r as p,$ as M,o as z,b as o,c as B,d as C,f as e,h as a,i as f,e as s,t as d,F as L,k as q}from"./index-dd5fae99.js";const F=_=>I.post("/optLog/page",_),O={class:"px-50 text-info"},P=q({name:"systemLog"}),R=Object.assign(P,{setup(_){const t=v({userName:void 0,times:void 0,finishTime:void 0,startTime:void 0}),c=p(),b=p(0),y=v([{type:"expand"},{label:"用户姓名",key:"userName",prop:"userName",width:"180"},{label:"IP",key:"requestIp",prop:"requestIp",width:"180"},{label:"IP来源",key:"regionByIp",prop:"regionByIp",width:"150",showOverflowTooltip:!0},{label:"描述",key:"description",prop:"description",minWidth:"200",showOverflowTooltip:!0},{label:"请求耗时",key:"consumingTime",render:i=>M("span",`${i.consumingTime}ms`),width:"100"},{label:"操作时间",key:"startTime",prop:"startTime",width:"180"}]),g=p([]),r=async(i=c.value.pageParams)=>{const l=await F({...i,...t,startTime:t.times&&t.times.length?t.times[0]:void 0,finishTime:t.times&&t.times.length?t.times[1]:void 0});b.value=l.data.total,g.value=l.data.records},k=()=>{r()},T=()=>{t.userName=void 0,t.times=void 0,r({pageNumber:1,pageSize:10})};return z(()=>{r()}),(i,l)=>{const N=o("el-input"),m=o("el-form-item"),u=o("el-col"),x=o("el-date-picker"),h=o("el-button"),V=o("el-row"),Y=o("el-form"),w=o("el-card"),D=o("table-list");return B(),C(L,null,[e(w,{shadow:"never",class:"search mb-16"},{default:a(()=>[e(Y,{"label-suffix":":",model:t,size:"small"},{default:a(()=>[e(V,{gutter:16},{default:a(()=>[e(u,{span:8},{default:a(()=>[e(m,{label:"用户姓名"},{default:a(()=>[e(N,{modelValue:t.userName,"onUpdate:modelValue":l[0]||(l[0]=n=>t.userName=n),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:8},{default:a(()=>[e(m,{label:"操作时间"},{default:a(()=>[e(x,{modelValue:t.times,"onUpdate:modelValue":l[1]||(l[1]=n=>t.times=n),editable:!1,format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",type:"daterange","unlink-panels":"","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:8},{default:a(()=>[e(m,{class:"btn"},{default:a(()=>[e(h,{type:"primary",size:"small",onClick:k},{default:a(()=>l[2]||(l[2]=[f("查询")])),_:1}),e(h,{size:"small",onClick:T},{default:a(()=>l[3]||(l[3]=[f("重置")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(w,{shadow:"never"},{header:a(()=>l[4]||(l[4]=[f("日志列表")])),default:a(()=>[e(D,{ref_key:"tableListRef",ref:c,column:y,data:g.value,total:b.value,onGetTableData:r},{expand:a(({scope:n})=>[s("div",O,[s("div",null,"请求地址:"+d(n.row.requestUri),1),s("div",null,"请求方法:"+d(n.row.httpMethod),1),s("div",null,"请求参数:"+d(n.row.params||"-"),1),s("div",null,"请求结果:"+d(n.row.result||"-"),1)])]),_:1},8,["column","data","total"])]),_:1})],64)}}});export{R as default};
|