You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.8 KiB
1 lines
3.8 KiB
import{e as S}from"./logApi-Bj7_8BoJ.js";import{g as x,j as N,H as V,r as n,k as u,l as c,o as g,c as v,d as a,w as r,h as T,e as _,t as U}from"./index-CL0IOL6c.js";const z={class:"app-container"},O=Object.assign({name:"logOperateIndex"},{__name:"logOperateIndex",setup(k){const e=x({loading:!1,queryParams:{requestUrl:"",controllerName:"",actionName:"",startTime:null,endTime:null},pageParams:{Page:1,PageSize:10,Total:0},tableData:[],timeSpan:[]});N(()=>{let i=V(new Date,"YYYY-mm-dd");e.timeSpan.push(i+" 00:00:00"),e.timeSpan.push(i+" 23:59:59"),s()});function s(){e.loading=!0,e.timeSpan&&e.timeSpan.length>1?(e.queryParams.startTime=e.timeSpan[0],e.queryParams.endTime=e.timeSpan[1]):(e.queryParams.startTime=null,e.queryParams.endTime=null),S(Object.assign({},e.queryParams,e.pageParams)).then(i=>{e.tableData=i.data.data,e.pageParams.Total=i.data.total}).finally(()=>e.loading=!1)}return(i,l)=>{const d=n("el-input"),p=n("el-form-item"),f=n("el-date-picker"),b=n("el-button"),P=n("el-form"),m=n("el-card"),t=n("el-table-column"),h=n("el-table"),w=n("el-pagination"),y=u("auth"),q=u("loading");return c((g(),v("div",z,[a(m,{class:"search-container"},{default:r(()=>[a(P,{inline:!0},{default:r(()=>[a(p,{label:"url"},{default:r(()=>[a(d,{modelValue:e.queryParams.requestUrl,"onUpdate:modelValue":l[0]||(l[0]=o=>e.queryParams.requestUrl=o),placeholder:"url",clearable:""},null,8,["modelValue"])]),_:1}),a(p,{label:"controller"},{default:r(()=>[a(d,{modelValue:e.queryParams.controllerName,"onUpdate:modelValue":l[1]||(l[1]=o=>e.queryParams.controllerName=o),placeholder:"controller",clearable:""},null,8,["modelValue"])]),_:1}),a(p,{label:"action"},{default:r(()=>[a(d,{modelValue:e.queryParams.actionName,"onUpdate:modelValue":l[2]||(l[2]=o=>e.queryParams.actionName=o),placeholder:"action",clearable:""},null,8,["modelValue"])]),_:1}),a(p,null,{default:r(()=>[a(f,{modelValue:e.timeSpan,"onUpdate:modelValue":l[3]||(l[3]=o=>e.timeSpan=o),type:"datetimerange","start-placeholder":"开始","end-placeholder":"结束","range-separator":"至",clearable:""},null,8,["modelValue"])]),_:1}),a(p,null,{default:r(()=>[c((g(),T(b,{onClick:s,icon:"Search"},{default:r(()=>l[6]||(l[6]=[_("查询")])),_:1})),[[y,"logOperateIndex:page"]])]),_:1})]),_:1})]),_:1}),a(m,{class:"paged-table-container"},{default:r(()=>[a(h,{ref:"tableRef","row-key":"id",data:e.tableData,border:""},{default:r(()=>[a(t,{type:"index",width:"50",fixed:"left"},{default:r(o=>[_(U(o.$index+1+(e.pageParams.Page-1)*e.pageParams.PageSize),1)]),_:1}),a(t,{prop:"id",label:"Id",width:"210",fixed:"left"}),a(t,{prop:"controllerName",label:"controller",width:"210",fixed:"left"}),a(t,{prop:"actionName",label:"action",width:"210",fixed:"left"}),a(t,{prop:"httpMethod",label:"方法",width:"100"}),a(t,{prop:"methodName",label:"methodName",width:"210"}),a(t,{prop:"requestUrl",label:"请求Url",width:"210","show-overflow-tooltip":""}),a(t,{prop:"requestParam",label:"请求参数",width:"210","show-overflow-tooltip":""}),a(t,{prop:"returnResult",label:"返回内容",width:"210","show-overflow-tooltip":""}),a(t,{prop:"elapsed",label:"耗时",width:"100"}),a(t,{prop:"message",label:"消息",width:"210","show-overflow-tooltip":""}),a(t,{prop:"browser",label:"browser",width:"210"}),a(t,{prop:"os",label:"os",width:"210"}),a(t,{prop:"ipAddress",label:"Ip",width:"210"}),a(t,{prop:"userName",label:"userName",width:"210"}),a(t,{prop:"createTime",label:"记录时间",width:"210"})]),_:1},8,["data"]),a(w,{style:{"margin-top":"15px",float:"right"},currentPage:e.pageParams.Page,"onUpdate:currentPage":l[4]||(l[4]=o=>e.pageParams.Page=o),"page-size":e.pageParams.PageSize,"onUpdate:pageSize":l[5]||(l[5]=o=>e.pageParams.PageSize=o),total:e.pageParams.Total,background:"",layout:"total, sizes,prev, pager, next",onSizeChange:s,onCurrentChange:s,"page-sizes":[10,20,50,100]},null,8,["currentPage","page-size","total"])]),_:1})])),[[q,e.loading]])}}});export{O as default};
|
|
|