import{u as d,N as x,O as y,C as b}from"./index-Cl9RbTBn.js";import{d as D,u as R,r as A,D as s,e as g,i,o as p,w as a,h as l,p as t,g as E,t as I,S as u,q as V,P as N,X as P}from"./index-5k_MqT6o.js";import"./index-BHx7dntQ.js";import"./index-CAzgmO3A.js";const q=D({__name:"index",setup(T){const{t:n}=R(),o=A(!1),{register:w,tableActions:h}=d({title:"客服列表",api:s.getUserList,showSelection:!1,showIndex:!1,showAction:!1,immediate:!0,apiParams:{role:1},columns:[{prop:"user_id",label:"用户ID"},{prop:"realname",label:"用户名"},{prop:"avatar",label:"头像",isImage:!0},{prop:"phone",label:"手机号"},{prop:"email",label:"邮箱地址"},{prop:"score",label:"综合评分",slot:!0,align:"center",width:"100"},{prop:"status",label:"账号状态",tagEnums:x,align:"center"},{prop:"is_online",label:"在线状态",tagEnums:[...y.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:{}}),{register:k,tableActions:v}=d({api:s.kefuScore,showSelection:!1,showExport:!1,columns:[{prop:"realname",label:"用户"},{prop:"score",label:"评分"},{prop:"created_at",label:"评价时间"}]});function c(r){s.userSetStatus({user_id:r.user_id}).then(()=>{h.reload()})}function C(r){o.value=!0,P(()=>{v.getData({user_id:r.user_id})})}return(r,m)=>{const f=g("el-popconfirm"),S=g("el-dialog");return p(),i(N,null,{default:a(()=>[l(t(b),{onRegister:t(w)},{tableAction:a(e=>[e.row.status?(p(),i(f,{key:0,title:t(n)("确认封号吗")+"?",onConfirm:_=>c(e.row)},{reference:a(()=>[l(u,{link:"",value:"封号"})]),_:1},8,["title","onConfirm"])):(p(),i(f,{key:1,title:t(n)("确认解封吗")+"?",onConfirm:_=>c(e.row)},{reference:a(()=>[l(u,{link:"",value:"解封",type:"success"})]),_:1},8,["title","onConfirm"]))]),score:a(e=>[E("div",null,I(e.row.score),1),l(u,{value:"查看评分",link:"",onClick:_=>C(e.row)},null,8,["onClick"])]),_:1},8,["onRegister"]),l(S,{modelValue:t(o),"onUpdate:modelValue":m[0]||(m[0]=e=>V(o)?o.value=e:null),title:t(n)("用户评分")},{default:a(()=>[l(t(b),{onRegister:t(k)},null,8,["onRegister"])]),_:1},8,["modelValue","title"])]),_:1})}}});export{q as default};
