import{an as e,aC as a}from"./utils-lib.js?v=1761009159";import{_ as l}from"./index105.js?v=1761009159";import{s as t,j as r,r as o,c as s,v as n,N as p,B as u,e as i,y as m,Q as d,ak as c,al as b,x as h}from"./base-lib.js?v=1761009159";import{u as g,n as _,p as v}from"./useStore8.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./validator.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const f=r("FTP-LOG-STORE",()=>({tabActive:o("loginLog"),actionType:o("all")})),x=()=>t(f()),w=s({__name:"action-log",setup(a){const{actionType:t}=x(),{rowData:r}=g(),{BtSearch:o,BtRefresh:s,BtTable:h,BtPage:v,refresh:f}=e({request:e=>_({...e,user_name:r.value.name,type:t.value}),columns:[{width:110,label:"用户名",render:()=>r.value.name},{label:"操作IP",prop:"ip"},{width:220,label:"文件",prop:"file"},{width:80,label:"操作类型",prop:"type"},{label:"操作时间",prop:"time"}]});return(e,a)=>{const r=c,g=b,_=l;return n(),p(_,null,{"header-right":u(()=>[i(g,{modelValue:m(t),"onUpdate:modelValue":a[0]||(a[0]=e=>d(t)?t.value=e:null),class:"!w-[12rem] mr-[1rem]",onChange:m(f)},{default:u(()=>[i(r,{label:"全部",value:"all"}),i(r,{label:"上传",value:"upload"}),i(r,{label:"下载",value:"download"}),i(r,{label:"删除",value:"delete"}),i(r,{label:"重命名",value:"rename"})]),_:1},8,["modelValue","onChange"]),i(m(o),{type:"ftps",placeholder:"请输入操作IP/文件/类型/时间",class:"!w-[220px] mr-[10px]"}),i(m(s))]),content:u(()=>[i(m(h),{"max-height":400})]),"footer-right":u(()=>[i(m(v))]),_:1})}}}),y=s({__name:"login-log",setup(a){const{rowData:t}=g(),{BtSearch:r,BtRefresh:o,BtTable:s,BtPage:d}=e({request:e=>v({...e,user_name:t.value.name}),columns:[{width:120,label:"用户名",prop:"user"},{label:"登录IP",prop:"ip"},{label:"登录状态",render:(e,a)=>i("span",{class:"登录成功"===e.status?"text-primary":"text-danger"},[e.status])},{label:"登录时间",prop:"in_time"},{label:"登出时间",prop:"out_time"}]});return(e,a)=>{const t=l;return n(),p(t,null,{"header-right":u(()=>[i(m(r),{type:"ftps",placeholder:"请输入登录IP/状态/时间",class:"!w-[200px] mr-[10px]"}),i(m(o))]),content:u(()=>[i(m(s),{"max-height":400})]),"footer-right":u(()=>[i(m(d))]),_:1})}}}),j=[{label:"登录日志",name:"loginLog",render:()=>i(y,null,null)},{label:"操作日志",name:"actionLog",lazy:!0,render:()=>i(w,null,null)}],B={class:"p-8 overflow-y-hidden"},P=s({__name:"index",setup(e){const{tabActive:l}=x();return(e,t)=>{const r=a;return n(),h("div",B,[i(r,{type:"card",modelValue:m(l),"onUpdate:modelValue":t[0]||(t[0]=e=>d(l)?l.value=e:null),options:m(j)},null,8,["modelValue","options"])])}}});export{P as default};
