import{a as q,E as K}from"./el-form-item-BvJauXBe.js";import{d as C,h as R,a$ as U,b as P,b0 as Q,o as N,c as A,q as g,m as e,p as n,e as o,t as J,x as E,A as M,y as k,w,a0 as O,z as x,aJ as j,v as G,aF as H,r as s,C as W}from"./index-XuO881sr.js";import{E as X}from"./el-card-BkEyhI_t.js";import{E as Y,a as Z}from"./el-table-column-5BM1zXQ-.js";import{_ as ee}from"./index-CcdWvSxw.js";import"./el-checkbox-Cxc7yQYm.js";import{_ as oe}from"./index-DFHXdJnc.js";/* empty css               */import{l as te,f as le}from"./index-CsWgMqY0.js";import"./cloneDeep-CQdyn166.js";import"./_baseClone-CIlxLVYA.js";import"./_baseIteratee-CskuuWpP.js";import"./el-select-BHeVexdj.js";import"./strings-giQSq8zG.js";import"./index-B7j6XCDK.js";import"./omit-nuy_stBf.js";const ae={class:"p-2"},ne={class:"mb-[10px]"},re=C({name:"Online"}),xe=C({...re,setup(ie){const{proxy:p}=R(),{sys_device_type:S}=U(p?.useDict("sys_device_type")),v=s([]),u=s(!0),d=s(0),b=s(),t=s({pageNum:1,pageSize:10,ipaddr:"",userName:""}),c=async()=>{u.value=!0;const i=await te(t.value);v.value=i.rows,d.value=i.total,u.value=!1},m=()=>{t.value.pageNum=1,c()},V=()=>{b.value?.resetFields(),m()},T=async i=>{const[a]=await W(p?.$modal.confirm('是否确认强退名称为"'+i.userName+'"的用户?'));a||(await le(i.tokenId),await c(),p?.$modal.msgSuccess("删除成功"))};return P(()=>{c()}),(i,a)=>{const y=J,_=K,f=M,z=q,h=X,r=Z,F=oe,L=j,B=Y,D=ee,I=Q("hasPermi"),$=G;return N(),A("div",ae,[g("div",ne,[e(h,{shadow:"hover"},{default:n(()=>[e(z,{ref_key:"queryFormRef",ref:b,model:o(t),inline:!0},{default:n(()=>[e(_,{label:"登录地址",prop:"ipaddr"},{default:n(()=>[e(y,{modelValue:o(t).ipaddr,"onUpdate:modelValue":a[0]||(a[0]=l=>o(t).ipaddr=l),placeholder:"请输入登录地址",clearable:"",onKeyup:E(m,["enter"])},null,8,["modelValue"])]),_:1}),e(_,{label:"用户名称",prop:"userName"},{default:n(()=>[e(y,{modelValue:o(t).userName,"onUpdate:modelValue":a[1]||(a[1]=l=>o(t).userName=l),placeholder:"请输入用户名称",clearable:"",onKeyup:E(m,["enter"])},null,8,["modelValue"])]),_:1}),e(_,null,{default:n(()=>[e(f,{type:"primary",icon:"Search",onClick:m},{default:n(()=>[...a[4]||(a[4]=[k("搜索",-1)])]),_:1}),e(f,{icon:"Refresh",onClick:V},{default:n(()=>[...a[5]||(a[5]=[k("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),e(h,{shadow:"hover"},{default:n(()=>[w((N(),O(B,{border:"",data:o(v).slice((o(t).pageNum-1)*o(t).pageSize,o(t).pageNum*o(t).pageSize),style:{width:"100%"}},{default:n(()=>[e(r,{label:"序号",width:"50",type:"index",align:"center"},{default:n(l=>[g("span",null,x((o(t).pageNum-1)*o(t).pageSize+l.$index+1),1)]),_:1}),e(r,{label:"会话编号",align:"center",prop:"tokenId","show-overflow-tooltip":!0}),e(r,{label:"登录名称",align:"center",prop:"userName","show-overflow-tooltip":!0}),e(r,{label:"客户端",align:"center",prop:"clientKey","show-overflow-tooltip":!0}),e(r,{label:"设备类型",align:"center"},{default:n(l=>[e(F,{options:o(S),value:l.row.deviceType},null,8,["options","value"])]),_:1}),e(r,{label:"所属部门",align:"center",prop:"deptName","show-overflow-tooltip":!0}),e(r,{label:"主机",align:"center",prop:"ipaddr","show-overflow-tooltip":!0}),e(r,{label:"登录地点",align:"center",prop:"loginLocation","show-overflow-tooltip":!0}),e(r,{label:"操作系统",align:"center",prop:"os","show-overflow-tooltip":!0}),e(r,{label:"浏览器",align:"center",prop:"browser","show-overflow-tooltip":!0}),e(r,{label:"登录时间",align:"center",prop:"loginTime",width:"180"},{default:n(l=>[g("span",null,x(o(p).parseTime(l.row.loginTime)),1)]),_:1}),e(r,{label:"操作",align:"center","class-name":"small-padding fixed-width"},{default:n(l=>[e(L,{content:"强退",placement:"top"},{default:n(()=>[w(e(f,{link:"",type:"primary",icon:"Delete",onClick:se=>T(l.row)},null,8,["onClick"]),[[I,["monitor:online:forceLogout"]]])]),_:2},1024)]),_:1})]),_:1},8,["data"])),[[$,o(u)]]),w(e(D,{page:o(t).pageNum,"onUpdate:page":a[2]||(a[2]=l=>o(t).pageNum=l),limit:o(t).pageSize,"onUpdate:limit":a[3]||(a[3]=l=>o(t).pageSize=l),total:o(d)},null,8,["page","limit","total"]),[[H,o(d)>0]])]),_:1})])}}});export{xe as default};
