import{_ as T}from"./index.vue_vue_type_script_setup_true_lang-C2H7PsW9.js";import{x as D,s as Y,k as h,r as i,l as H,y as x,O as e,G as Q,F as n,u as a,E,ae as k,M as j,a4 as z,j as C,K as F,C as G,z as m}from"./vue-vendor-vBC20LeU.js";import{r as O,_ as S}from"./index-D7dBOFlH.js";import{F as J,J as $,G as A,H as W,i as X,N as Z,R as ee,k as le,K as ae,M as te,Q as oe}from"./element-plus-DckSU5ni.js";import"./axios-CG2WSiiR.js";const ne=f=>O.get({url:"/setting.system.log/lists",params:f}),se={class:"system-log"},re={class:"flex mt-4 justify-end"},pe=D({name:"SystemLog"}),de=D({...pe,setup(f){const b=Y(),t=h({page:1,limit:10,admin_name:"",type:"",ip:""}),r=i(null),v=i(0),d=i(!1),y=i([]),I=h([{label:"全部",value:""},{label:"get",value:"get"},{label:"post",value:"post"},{label:"put",value:"put"},{label:"delete",value:"delete"},{label:"option",value:"option"}]),_=async()=>{d.value=!0,ne({...t,start_time:r.value?.[0]||"",end_time:r.value?.[1]||""}).then(c=>{y.value=c.data||[],v.value=c.total||0,d.value=!1}).catch(()=>{d.value=!1})},u=()=>{t.page=1,_()},L=()=>{b.value?.resetFields(),r.value=null,u()};return H(()=>{_()}),(c,l)=>{const g=X,p=W,R=oe,B=Z,K=ee,w=le,M=A,V=J,s=ae,P=te,U=T,q=$;return m(),x("div",se,[e(V,{class:"!border-none",shadow:"never"},{default:n(()=>[e(M,{class:"mb-[-16px]",ref_key:"queryFormRef",ref:b,model:a(t),inline:""},{default:n(()=>[e(p,{class:"w-[280px]",label:"管理员",prop:"admin_name"},{default:n(()=>[e(g,{placeholder:"请输入",modelValue:a(t).admin_name,"onUpdate:modelValue":l[0]||(l[0]=o=>a(t).admin_name=o),clearable:"",onKeyup:k(u,["enter"])},null,8,["modelValue"])]),_:1}),e(p,{class:"w-[280px]",label:"访问方式",prop:"type"},{default:n(()=>[e(B,{modelValue:a(t).type,"onUpdate:modelValue":l[1]||(l[1]=o=>a(t).type=o),placeholder:"请选择",clearable:""},{default:n(()=>[(m(!0),x(j,null,z(a(I),(o,N)=>(m(),E(R,{key:N,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,{class:"w-[280px]",label:"来源IP",prop:"ip"},{default:n(()=>[e(g,{placeholder:"请输入",modelValue:a(t).ip,"onUpdate:modelValue":l[2]||(l[2]=o=>a(t).ip=o),clearable:"",onKeyup:k(u,["enter"])},null,8,["modelValue"])]),_:1}),e(p,{label:"访问时间"},{default:n(()=>[e(K,{modelValue:a(r),"onUpdate:modelValue":l[3]||(l[3]=o=>C(r)?r.value=o:null),type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss",clearable:""},null,8,["modelValue"])]),_:1}),e(p,null,{default:n(()=>[e(w,{type:"primary",onClick:u},{default:n(()=>[...l[5]||(l[5]=[F("搜索",-1)])]),_:1}),e(w,{onClick:L},{default:n(()=>[...l[6]||(l[6]=[F("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),Q((m(),E(V,{class:"!border-none mt-4",shadow:"never"},{default:n(()=>[e(P,{data:a(y),size:"large"},{default:n(()=>[e(s,{label:"ID",prop:"id",width:"80",align:"center"}),e(s,{label:"操作",prop:"action","min-width":"120"}),e(s,{label:"管理员",prop:"admin_name","min-width":"120"}),e(s,{label:"访问链接",prop:"url","min-width":"160"}),e(s,{label:"访问方式",prop:"type","min-width":"90",align:"center"}),e(s,{label:"访问参数",prop:"params","min-width":"160"}),e(s,{label:"来源IP",prop:"ip","min-width":"150"}),e(s,{label:"操作地址",prop:"location","min-width":"120"}),e(s,{label:"日志时间",prop:"create_time","min-width":"168"})]),_:1},8,["data"]),G("div",re,[e(U,{modelValue:a(t),"onUpdate:modelValue":l[4]||(l[4]=o=>C(t)?t.value=o:null),total:a(v),onChange:_},null,8,["modelValue","total"])])]),_:1})),[[q,a(d)]])])}}}),fe=S(de,[["__scopeId","data-v-9aacb97c"]]);export{fe as default};
