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