2 lines
3.2 KiB
JavaScript
2 lines
3.2 KiB
JavaScript
import{Q as e,G as l,r as a,d as o,T as t,o as n,c as r,e as i,w as p,f as d,j as s,n as u,K as c,k as m,l as f,A as w,M as h,J as g,v}from"./index.e5c8b0d6.js";const b={class:"app-container"},y=l({name:"Online"}),_=Object.assign(y,{setup(l){const{proxy:y}=v(),_=a([]),k=a(!0),x=a(0),N=a(1),V=a(10),K=a({ipaddr:void 0,userName:void 0});function C(){var l;k.value=!0,(l=K.value,e({url:"/monitor/online/list",method:"get",params:l})).then((e=>{_.value=e.rows,x.value=e.total,k.value=!1}))}function T(){N.value=1,C()}function U(){y.resetForm("queryRef"),T()}function j(l){y.$modal.confirm('是否确认强退名称为"'+l.userName+'"的用户?').then((function(){return a=l.tokenId,e({url:"/monitor/online/"+a,method:"delete"});var a})).then((()=>{C(),y.$modal.msgSuccess("删除成功")})).catch((()=>{}))}return C(),(e,l)=>{const a=o("el-input"),v=o("el-form-item"),y=o("el-button"),C=o("el-form"),R=o("el-table-column"),$=o("el-table"),q=o("pagination"),I=t("hasPermi"),L=t("loading");return n(),r("div",b,[i(C,{model:d(K),ref:"queryRef",inline:!0},{default:p((()=>[i(v,{label:"登录地址",prop:"ipaddr"},{default:p((()=>[i(a,{modelValue:d(K).ipaddr,"onUpdate:modelValue":l[0]||(l[0]=e=>d(K).ipaddr=e),placeholder:"请输入登录地址",clearable:"",style:{width:"200px"},onKeyup:s(T,["enter"])},null,8,["modelValue","onKeyup"])])),_:1}),i(v,{label:"用户名称",prop:"userName"},{default:p((()=>[i(a,{modelValue:d(K).userName,"onUpdate:modelValue":l[1]||(l[1]=e=>d(K).userName=e),placeholder:"请输入用户名称",clearable:"",style:{width:"200px"},onKeyup:s(T,["enter"])},null,8,["modelValue","onKeyup"])])),_:1}),i(v,null,{default:p((()=>[i(y,{type:"primary",icon:"Search",onClick:T},{default:p((()=>[u("搜索")])),_:1}),i(y,{icon:"Refresh",onClick:U},{default:p((()=>[u("重置")])),_:1})])),_:1})])),_:1},8,["model"]),c((n(),m($,{data:d(_).slice((d(N)-1)*d(V),d(N)*d(V)),style:{width:"100%"}},{default:p((()=>[i(R,{label:"序号",width:"50",type:"index",align:"center"},{default:p((e=>[f("span",null,w((d(N)-1)*d(V)+e.$index+1),1)])),_:1}),i(R,{label:"会话编号",align:"center",prop:"tokenId","show-overflow-tooltip":!0}),i(R,{label:"登录名称",align:"center",prop:"userName","show-overflow-tooltip":!0}),i(R,{label:"所属部门",align:"center",prop:"deptName","show-overflow-tooltip":!0}),i(R,{label:"主机",align:"center",prop:"ipaddr","show-overflow-tooltip":!0}),i(R,{label:"登录地点",align:"center",prop:"loginLocation","show-overflow-tooltip":!0}),i(R,{label:"操作系统",align:"center",prop:"os","show-overflow-tooltip":!0}),i(R,{label:"浏览器",align:"center",prop:"browser","show-overflow-tooltip":!0}),i(R,{label:"登录时间",align:"center",prop:"loginTime",width:"180"},{default:p((l=>[f("span",null,w(e.parseTime(l.row.loginTime)),1)])),_:1}),i(R,{label:"操作",align:"center","class-name":"small-padding fixed-width"},{default:p((e=>[c((n(),m(y,{link:"",type:"primary",icon:"Delete",onClick:l=>j(e.row)},{default:p((()=>[u("强退")])),_:2},1032,["onClick"])),[[I,["monitor:online:forceLogout"]]])])),_:1})])),_:1},8,["data"])),[[L,d(k)]]),c(i(q,{total:d(x),page:d(N),"onUpdate:page":l[2]||(l[2]=e=>g(N)?N.value=e:null),limit:d(V),"onUpdate:limit":l[3]||(l[3]=e=>g(V)?V.value=e:null)},null,8,["total","page","limit"]),[[h,d(x)>0]])])}}});export{_ as default};
|