import{e as x,r,d as i,l as S,P as y,a3 as b,a4 as c,a7 as u,ab as C,A as w,f,B as P,I as D}from"./vue-bf422dc1.js";import{l as T}from"./user-2cd65a42.js";import{p as k}from"./global-0d825ba6.js";import{u as z}from"./index-8db2df2c.js";import{_ as B}from"./search.vue_vue_type_script_setup_true_lang-32b0418b.js";import{j as K,b as j}from"./ui-ba7aaa7e.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";import"./icons-a8498fb6.js";const I=[{colKey:"id",title:"ID"},{colKey:"username",title:"账号"},{colKey:"ip",title:"登录IP"},{colKey:"create_at",title:"登录时间"}],$={class:"category-header c-flex"},M=x({__name:"index",setup(A){const t=r(!1),p=i(()=>t.value?"收起搜索":"展开搜索"),e=r({defaultPageSize:20,total:0,defaultCurrent:1}),l=S({}),d=a=>{Object.assign(l,a),e.value.defaultCurrent=1,s()},o=r([]),s=async()=>{const{data:a}=await T({page:e.value.defaultCurrent,limit:e.value.defaultPageSize,...l});o.value=a.list,e.value={...e.value,total:a.total}};s();const m=a=>{e.value.defaultCurrent=a.current,e.value.defaultPageSize=a.pageSize,s()},v=z(),h=i(()=>({offsetTop:v.isUseTabsRouter?48:0,container:`.${k}-layout`}));return(a,n)=>{const _=K,g=j;return y(),b(g,{title:"登录日志",class:"basic-container",bordered:!1},{actions:c(()=>[u("a",{href:"javascript:void(0)",onClick:n[0]||(n[0]=F=>t.value=!t.value)},C(p.value),1)]),default:c(()=>[u("div",$,[w(f(B,{ref:"searchFormRef",onSuccess:d},null,512),[[P,t.value]])]),f(_,{data:o.value,columns:D(I),"row-key":"id",hover:o.value.length>0,pagination:e.value,"header-affixed-top":h.value,"table-layout":"auto","max-height":"100%",onPageChange:m},null,8,["data","columns","hover","pagination","header-affixed-top"])]),_:1})}}});export{M as default};
