import{B as e}from"./index146.js?v=20260328163632";import{B as a}from"./index89.js?v=20260328163632";import{l as t,$ as l,x as s,u as o,q as n,a2 as i}from"./utils-lib.js?v=20260328163632";import{B as u}from"./index147.js?v=20260328163632";import{u as p}from"./index92.js?v=20260328163632";import{c as r}from"./logs.js?v=20260328163632";import{r as d,O as m,j as c,k as g,o as v,J as f,V as x,W as h,Y as _,_ as b,a3 as j,N as y}from"./base-lib.js?v=20260328163632";import{au as w}from"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const k=d(""),V=d(!1),L=d("ALL"),P=[{label:t("全部"),value:"ALL"},{label:t("登录成功"),value:"Accepted"},{label:t("登录失败"),value:"Failed"}],U=d({columns:[{title:t("IP地址:端口"),key:"ip",render:e=>m("span",null,[e.address||"--",c(":"),"0"!==e.port&&"-"!==e.port?e.port:"--"])},{title:t("用户"),key:"user"},{title:t("状态"),key:"status",render:e=>m("span",{class:e.status?"text-primary":"text-danger"},[e.status?t("登录成功"):t("登录失败")])},{title:t("操作时间"),key:"time"}],data:[]}),A=d({count:0,limit:20,log_end:!0,maxPage:200,page:1}),[O,B]=l(U),{BtOperation:C}=p({options:[{active:!0,label:t("刷新列表"),onClick:()=>I()}]}),I=(e={search:k.value,p:A.value.page,limit:A.value.limit})=>{let a=[];const t="ALL"===L.value;(t||"Accepted"===L.value)&&a.push(4624),(t||"Failed"===L.value)&&a.push(4625),s({request:r({...e,eventids:JSON.stringify(a)}),success:e=>{var a;if(null==(a=e.data)?void 0:a.data){U.value.data=e.data.data;const{count:a,log_end:t,maxPage:l}=e.data.page;Object.assign(A.value,{count:a,log_end:t,maxPage:l})}}})},S=e=>{L.value=e,A.value.page=1,I()},q=()=>{E(),I()},E=()=>{k.value="",V.value=!1,Object.assign(A.value,{page:1,itemCount:0})},F=g({__name:"index",setup(l){const{payment:s}=o(),p=d({title:t("远程桌面登录日志-功能介绍"),desc:[t("记录和查看当前远程桌面登录日志")],source:54,tabImgs:[{title:t("远程桌面登录日志"),imgSrc:"https://www.bt.cn/Public/new/plugin/introduce/firewall/ssh_login_log.png"}],ps:t("远程桌面登录日志")});return v(q),f(E),(l,o)=>{const r=w;return x(),h("div",null,["ltd"===_(s).authType?(x(),b(_(i),{key:0},{"header-left":j((()=>[m(_(C),{class:"gap-10px"})])),"header-right":j((()=>[m(r,{class:"!gap-10px items-center"},{default:j((()=>[m(_(a),{type:"button",modelValue:_(L),"onUpdate:modelValue":o[0]||(o[0]=e=>y(L)?L.value=e:null),options:_(P),"onUpdate:value":_(S)},null,8,["modelValue","options","onUpdate:value"]),m(_(n),{modelValue:_(k),"onUpdate:modelValue":o[1]||(o[1]=e=>y(k)?k.value=e:null),placeholder:_(t)("请输入登录IP/用户名"),class:"!w-[220px]",onSearch:o[2]||(o[2]=()=>_(I)({p:1,limit:_(A).limit,search:_(k)}))},null,8,["modelValue","placeholder"])])),_:1})])),content:j((()=>[m(_(O))])),"footer-left":j((()=>o[6]||(o[6]=[]))),"footer-right":j((()=>[m(_(e),{type:"unknown",total:_(A).count,page:_(A).page,"onUpdate:page":o[3]||(o[3]=e=>_(A).page=e),row:_(A).limit,"onUpdate:row":o[4]||(o[4]=e=>_(A).limit=e),isEnd:_(A).log_end,onChange:o[5]||(o[5]=()=>_(I)())},null,8,["total","page","row","isEnd"])])),_:1})):(x(),b(u,{key:1,data:_(p),class:"w-[80%] mx-auto pt-[80px]"},null,8,["data"]))])}}});export{F as default};
