import{G as e,C as a,D as l,y as o,S as t,Q as i,R as r,p as s,v as p}from"./element-plus-DSMJnpwa.js";import{t as n}from"./index-mv7arXuk.js";import{_ as d}from"./index-CY3mI-ZB.js";/* empty css                    *//* empty css                        */import{_ as m}from"./index-ppR_FSA-.js";/* empty css               *//* empty css                *//* empty css                     */import{B as u,g as c,a4 as f,m as g,ah as w,H as v,L as h,P as _,M as b,O as y,u as N,ao as j,Y as x,V as k,I as S,Z as V,_ as z,d as C}from"./vue-vendor-DZekML78.js";import{l as I,f as R}from"./index-B23hltyD.js";import"./utils-cPVb2Haz.js";/* empty css                  */const T={class:"p-2"},U={class:"mb-[10px]"},D=u({name:"Online"}),K=u({...D,setup(u){const{proxy:D}=c(),{sys_device_type:K}=f(D?.useDict("sys_device_type")),L=C([]),P=C(!0),$=C(0),B=C(),F=C({pageNum:1,pageSize:10,ipaddr:"",userName:""}),O=async()=>{P.value=!0;const e=await I(F.value);L.value=e.rows,$.value=e.total,P.value=!1},Q=()=>{F.value.pageNum=1,O()},q=()=>{B.value?.resetFields(),Q()};return g(()=>{O()}),(u,c)=>{const f=l,g=a,C=o,I=e,G=t,H=r,J=m,M=s,W=i,Y=d,Z=w("hasPermi"),A=p;return v(),h("div",T,[_("div",U,[b(G,{shadow:"hover"},{default:y(()=>[b(I,{ref_key:"queryFormRef",ref:B,model:N(F),inline:!0},{default:y(()=>[b(g,{label:"登录地址",prop:"ipaddr"},{default:y(()=>[b(f,{modelValue:N(F).ipaddr,"onUpdate:modelValue":c[0]||(c[0]=e=>N(F).ipaddr=e),placeholder:"请输入登录地址",clearable:"",onKeyup:j(Q,["enter"])},null,8,["modelValue"])]),_:1}),b(g,{label:"用户名称",prop:"userName"},{default:y(()=>[b(f,{modelValue:N(F).userName,"onUpdate:modelValue":c[1]||(c[1]=e=>N(F).userName=e),placeholder:"请输入用户名称",clearable:"",onKeyup:j(Q,["enter"])},null,8,["modelValue"])]),_:1}),b(g,null,{default:y(()=>[b(C,{type:"primary",icon:"Search",onClick:Q},{default:y(()=>[...c[4]||(c[4]=[x("搜索",-1)])]),_:1}),b(C,{icon:"Refresh",onClick:q},{default:y(()=>[...c[5]||(c[5]=[x("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),b(G,{shadow:"hover"},{default:y(()=>[k((v(),S(W,{border:"",data:N(L).slice((N(F).pageNum-1)*N(F).pageSize,N(F).pageNum*N(F).pageSize),style:{width:"100%"}},{default:y(()=>[b(H,{label:"序号",width:"50",type:"index",align:"center"},{default:y(e=>[_("span",null,V((N(F).pageNum-1)*N(F).pageSize+e.$index+1),1)]),_:1}),b(H,{label:"会话编号",align:"center",prop:"tokenId","show-overflow-tooltip":!0}),b(H,{label:"登录名称",align:"center",prop:"userName","show-overflow-tooltip":!0}),b(H,{label:"客户端",align:"center",prop:"clientKey","show-overflow-tooltip":!0}),b(H,{label:"设备类型",align:"center"},{default:y(e=>[b(J,{options:N(K),value:e.row.deviceType},null,8,["options","value"])]),_:1}),b(H,{label:"所属部门",align:"center",prop:"deptName","show-overflow-tooltip":!0}),b(H,{label:"主机",align:"center",prop:"ipaddr","show-overflow-tooltip":!0}),b(H,{label:"登录地点",align:"center",prop:"loginLocation","show-overflow-tooltip":!0}),b(H,{label:"操作系统",align:"center",prop:"os","show-overflow-tooltip":!0}),b(H,{label:"浏览器",align:"center",prop:"browser","show-overflow-tooltip":!0}),b(H,{label:"登录时间",align:"center",prop:"loginTime",width:"180"},{default:y(e=>[_("span",null,V(N(D).parseTime(e.row.loginTime)),1)]),_:1}),b(H,{label:"操作",align:"center","class-name":"small-padding fixed-width"},{default:y(e=>[b(M,{content:"强退",placement:"top"},{default:y(()=>[k(b(C,{link:"",type:"primary",icon:"Delete",onClick:a=>(async e=>{const[a]=await n(D?.$modal.confirm('是否确认强退名称为"'+e.userName+'"的用户?'));a||(await R(e.tokenId),await O(),D?.$modal.msgSuccess("删除成功"))})(e.row)},null,8,["onClick"]),[[Z,["monitor:online:forceLogout"]]])]),_:2},1024)]),_:1})]),_:1},8,["data"])),[[A,N(P)]]),k(b(Y,{page:N(F).pageNum,"onUpdate:page":c[2]||(c[2]=e=>N(F).pageNum=e),limit:N(F).pageSize,"onUpdate:limit":c[3]||(c[3]=e=>N(F).pageSize=e),total:N($)},null,8,["page","limit","total"]),[[z,N($)>0]])]),_:1})])}}});export{K as default};
