var b=Object.defineProperty,k=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var a=(t,e,o)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,p=(t,e)=>{for(var o in e||(e={}))y.call(e,o)&&a(t,o,e[o]);if(m)for(var o of m(e))C.call(e,o)&&a(t,o,e[o]);return t},l=(t,e)=>k(t,I(e));import{d as u,a2 as R,ad as S,af as L,k as T,u as i}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import{render as c}from"./renderUtils-CGtepdOw.js";import{b3 as v,h as d,u as K}from"./index-CYriLmQo.js";import{useListPage as M}from"./useListPage-i3Wl0_Fg.js";import{Q as P}from"./componentMap-7D1QIeNI.js";import B from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-BTSd5ebC.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./index-CxQILSKV.js";import"./index-CF_FJn6P.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./JAreaLinkage-DFTeDmm8.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JSelectDept-DorRVguN.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./JCodeEditor-_KZ8XnNK.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-CXT54-j9.js";import"./depart.api-C9T5xfw6.js";import"./JPopup-KP1kIsae.js";import"./EasyCronInput-XK54XB3r.js";import"./JEllipsis-287cEHxd.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./injectionKey-DPVn4AgL.js";const F=[{title:"用户账号",align:"center",dataIndex:"username",customRender:({text:t,record:e})=>{let o=v();return e.token===o?t+"（我）":t}},{title:"用户姓名",align:"center",dataIndex:"realname"},{title:"头像",align:"center",width:120,dataIndex:"avatar",customRender:c.renderAvatar},{title:"生日",align:"center",dataIndex:"birthday"},{title:"性别",align:"center",dataIndex:"sex",customRender:({text:t})=>c.renderDict(t,"sex")},{title:"手机号",align:"center",dataIndex:"phone"}],X=[{field:"username",label:"用户账号",component:"Input",colProps:{span:6}}];const A=t=>d.get({url:"/sys/online/list",params:t}),D=t=>d.post({url:"/sys/online/forceLogout",params:t},{isTransformResponse:!1}),E=u({name:"online-user"}),jt=u(l(p({},E),{setup(t){const{prefixCls:e,tableContext:o,onImportXls:H,onExportXls:N}=M({designScope:"online-user",tableProps:{rowKey:"token",title:"在线用户",api:A,columns:F,formConfig:{schemas:X},actionColumn:{width:120},rowSelection:null}}),[f,{reload:g},{rowSelection:x,selectedRowKeys:Q}]=o,s=K();function h(r){return[{label:"强退",popConfirm:{title:"强制退出用户？",confirm:_.bind(null,r)}}]}function _(r){D({token:r.token}).then(n=>{n.success?(g(),s.createMessage.success("强制退出用户”"+r.realname+"“成功！")):s.createMessage.warn(n.message)})}return(r,n)=>(R(),S(i(B),{onRegister:i(f),rowSelection:i(x)},{action:L(({record:w})=>[T(i(P),{actions:h(w)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]))}}));export{jt as default};
