var G=Object.defineProperty,O=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var x=(l,e,t)=>e in l?G(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,k=(l,e)=>{for(var t in e||(e={}))W.call(e,t)&&x(l,t,e[t]);if(N)for(var t of N(e))j.call(e,t)&&x(l,t,e[t]);return l},D=(l,e)=>O(l,R(e));var Y=(l,e,t)=>new Promise((m,p)=>{var h=i=>{try{r(t.next(i))}catch(u){p(u)}},c=i=>{try{r(t.throw(i))}catch(u){p(u)}},r=i=>i.done?m(i.value):Promise.resolve(i.value).then(h,c);r((t=t.apply(l,e)).next())});import{D as C,d as z,G as I,r as v,P as E,a as $,j as n,o as A,c as H,e as a,w as o,k as M,W as J,b as _,t as g,F as K}from"./index-90c78f99.js";const Q=[l=>C.post("/optLog/page",l),l=>C.get("/api/v1/reportDownLog/page",l)],X={class:"px-50 text-info"},te=z({__name:"index",setup(l){const e=I({userName:void 0,times:void 0,finishTime:void 0,startTime:void 0}),t=v(0),m=v(),p=v(0),h=I([{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:f=>E("span",`${f.consumingTime}ms`),width:"100"},{label:"操作时间",key:"startTime",prop:"startTime",width:"180"}]),c=v([]),r=(...d)=>Y(this,[...d],function*(f=m.value.pageParams){const b=yield Q[t.value](D(k(k({},f),e),{startTime:e.times&&e.times.length?e.times[0]:void 0,finishTime:e.times&&e.times.length?e.times[1]:void 0}));p.value=b.data.total,c.value=b.data.records}),i=()=>{m.value.pageNumber=1,r()},u=()=>{e.userName=void 0,e.times=void 0,r({pageNumber:1,pageSize:10})};return $(()=>{r()}),(f,d)=>{const b=n("page-title"),B=n("el-input"),w=n("el-form-item"),y=n("el-col"),L=n("el-date-picker"),T=n("el-button"),P=n("el-row"),U=n("el-form"),V=n("el-tab-pane"),q=n("el-tabs"),F=n("table-list"),S=n("el-card");return A(),H(K,null,[a(b),a(U,{class:"search mb-16","label-suffix":":",model:e},{default:o(()=>[a(P,{gutter:16},{default:o(()=>[a(y,{span:8},{default:o(()=>[a(w,{label:"用户姓名"},{default:o(()=>[a(B,{modelValue:e.userName,"onUpdate:modelValue":d[0]||(d[0]=s=>e.userName=s),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),a(y,{span:8},{default:o(()=>[a(w,{label:"操作时间"},{default:o(()=>[a(L,{modelValue:e.times,"onUpdate:modelValue":d[1]||(d[1]=s=>e.times=s),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}),a(y,{span:8},{default:o(()=>[a(w,{class:"search_btn"},{default:o(()=>[a(T,{type:"primary",onClick:i},{default:o(()=>[M("查询")]),_:1}),a(T,{onClick:u},{default:o(()=>[M("重置")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),a(S,{class:"my-card",shadow:"never"},{header:o(()=>[a(q,{modelValue:t.value,"onUpdate:modelValue":d[2]||(d[2]=s=>t.value=s),onTabChange:r},{default:o(()=>[a(V,{label:"操作日志",name:0}),a(V,{label:"下载报告日志",name:1})]),_:1},8,["modelValue"])]),default:o(()=>[a(F,{ref_key:"tableListRef",ref:m,column:h,data:c.value,total:p.value,onGetTableData:r},J({_:2},[t.value===0?{name:"expand",fn:o(({scope:s})=>[_("div",X,[_("div",null,"请求地址："+g(s.row.requestUri),1),_("div",null,"请求方法："+g(s.row.httpMethod),1),_("div",null,"请求参数："+g(s.row.params||"-"),1),_("div",null,"请求结果："+g(s.row.result||"-"),1)])]),key:"0"}:void 0]),1032,["column","data","total"])]),_:1})],64)}}});export{te as default};
