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