import{u as b,N as d,O as h,C as w}from"./index-Cl9RbTBn.js";import{d as g,u as C,V as k,D as u,e as v,i as n,o,w as e,h as r,p as t,S as m,P as S}from"./index-5k_MqT6o.js";import"./index-BHx7dntQ.js";import"./index-CAzgmO3A.js";const P=g({__name:"index",setup(y){const{t:l}=C(),{register:c,tableActions:_}=b({title:"会员管理",api:u.getUserList,showSelection:!1,showIndex:!1,showAction:k(60,70,80),immediate:!0,columns:[{prop:"user_id",label:"用户ID"},{prop:"realname",label:"用户名"},{prop:"avatar",label:"头像",isImage:!0},{prop:"phone",label:"手机号"},{prop:"email",label:"邮箱地址"},{prop:"status",label:"账号状态",tagEnums:d,align:"center"},{prop:"is_online",label:"在线状态",tagEnums:[...h.slice(1),{label:"忙碌",value:2}],align:"center"},{prop:"create_time",label:"注册时间",width:140},{prop:"update_time",label:"最近接线",width:140},{prop:"offline_time",label:"离线时间",width:140},{prop:"remark",label:"备注"}],schema:[{label:"用户昵称/用户名/手机号",prop:"name",type:"input"},{label:"用户ID",prop:"user_id",type:"input"}],actionProps:{}});function s(i){u.userSetStatus({user_id:i.user_id}).then(()=>{_.reload()})}return(i,x)=>{const p=v("el-popconfirm");return o(),n(S,null,{default:e(()=>[r(t(w),{onRegister:t(c)},{tableAction:e(a=>[a.row.status?(o(),n(p,{key:0,title:t(l)("确认封号吗")+"?",onConfirm:f=>s(a.row)},{reference:e(()=>[r(m,{link:"",value:"封号"})]),_:1},8,["title","onConfirm"])):(o(),n(p,{key:1,title:t(l)("确认解封吗")+"?",onConfirm:f=>s(a.row)},{reference:e(()=>[r(m,{link:"",value:"解封",type:"success"})]),_:1},8,["title","onConfirm"]))]),_:1},8,["onRegister"])]),_:1})}}});export{P as default};
