Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / index.0ce35aea.js
import{B as S,M as P,r as p,e as r,D as V,o as b,c as z,f as t,w as n,h as e,k as C,p as w,F as k,l as K,m as B,z as D,K as O,ab as L,v as Q}from"./index.82404a61.js";function j(c){return S({url:"/system/online/list",method:"get",params:c})}function E(c){return S({url:"/system/online/"+c,method:"delete"})}const M={class:"app-container"},A=P({name:"Online"}),J=Object.assign(A,{setup(c){const{proxy:f}=Q(),N=p([]),_=p(!0),g=p(0),a=p(1),s=p(10),u=p({ipaddr:void 0,userName:void 0});function h(){_.value=!0,j(u.value).then(i=>{N.value=i.data,g.value=i.total,_.value=!1})}function m(){a.value=1,h()}function R(){f.resetForm("queryRef"),m()}function T(i){f.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5F3A\u9000\u540D\u79F0\u4E3A"'+i.userName+'"\u7684\u7528\u6237?').then(function(){return E(i.tokenId)}).then(()=>{h(),f.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}return h(),(i,o)=>{const x=r("el-input"),v=r("el-form-item"),y=r("el-button"),U=r("el-form"),d=r("el-table-column"),$=r("el-table"),q=r("pagination"),F=V("hasPermi"),I=V("loading");return b(),z("div",M,[t(U,{model:e(u),ref:"queryRef",inline:!0},{default:n(()=>[t(v,{label:"\u767B\u5F55\u5730\u5740",prop:"ipaddr"},{default:n(()=>[t(x,{modelValue:e(u).ipaddr,"onUpdate:modelValue":o[0]||(o[0]=l=>e(u).ipaddr=l),placeholder:"\u8BF7\u8F93\u5165\u767B\u5F55\u5730\u5740",clearable:"",style:{width:"200px"},onKeyup:C(m,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(v,{label:"\u7528\u6237\u540D\u79F0",prop:"userName"},{default:n(()=>[t(x,{modelValue:e(u).userName,"onUpdate:modelValue":o[1]||(o[1]=l=>e(u).userName=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0",clearable:"",style:{width:"200px"},onKeyup:C(m,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),t(v,null,{default:n(()=>[t(y,{type:"primary",icon:"Search",onClick:m},{default:n(()=>[w("\u641C\u7D22")]),_:1}),t(y,{icon:"Refresh",onClick:R},{default:n(()=>[w("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),k((b(),K($,{data:e(N).slice((e(a)-1)*e(s),e(a)*e(s)),style:{width:"100%"}},{default:n(()=>[t(d,{label:"\u5E8F\u53F7",width:"50",type:"index",align:"center"},{default:n(l=>[B("span",null,D((e(a)-1)*e(s)+l.$index+1),1)]),_:1}),t(d,{label:"\u4F1A\u8BDD\u7F16\u53F7",align:"center",prop:"tokenId","show-overflow-tooltip":!0}),t(d,{label:"\u767B\u5F55\u540D\u79F0",align:"center",prop:"userName","show-overflow-tooltip":!0}),t(d,{label:"\u4E3B\u673A",align:"center",prop:"ipaddr","show-overflow-tooltip":!0}),t(d,{label:"\u767B\u5F55\u65F6\u95F4",align:"center",prop:"loginTime",width:"180"},{default:n(l=>[B("span",null,D(i.parseTime(l.row.loginTime)),1)]),_:1}),t(d,{label:"\u64CD\u4F5C",align:"center","class-name":"small-padding fixed-width"},{default:n(l=>[k((b(),K(y,{link:"",type:"primary",icon:"Delete",onClick:G=>T(l.row)},{default:n(()=>[w("\u5F3A\u9000")]),_:2},1032,["onClick"])),[[F,["monitor:online:forceLogout"]]])]),_:1})]),_:1},8,["data"])),[[I,e(_)]]),k(t(q,{total:e(g),page:e(a),"onUpdate:page":o[2]||(o[2]=l=>L(a)?a.value=l:null),limit:e(s),"onUpdate:limit":o[3]||(o[3]=l=>L(s)?s.value=l:null)},null,8,["total","page","limit"]),[[O,e(g)>0]])])}}});export{J as default};