index-CGA5xggj.js 2.4 KB

1
  1. import{u as d,N as x,O as y,C as b}from"./index-D0GF1i1e.js";import{d as R,u as A,r as D,G as n,e as g,j as i,o as p,w as a,i as l,q as t,g as E,t as I,T as u,s as T,P as V,Y as N}from"./index-br5FpDum.js";import"./index-gnLZZr6g.js";import"./index-CUdvMcsf.js";const j=R({__name:"index",setup(P){const{t:s}=A(),o=D(!1),{register:w,tableActions:h}=d({title:"客服列表",api:n.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:n.kefuScore,showSelection:!1,showExport:!1,columns:[{prop:"realname",label:"用户"},{prop:"score",label:"评分"},{prop:"created_at",label:"评价时间"}]});function c(r){n.userSetStatus({user_id:r.user_id}).then(()=>{h.reload()})}function C(r){o.value=!0,N(()=>{v.getData({user_id:r.user_id})})}return(r,m)=>{const f=g("el-popconfirm"),S=g("el-dialog");return p(),i(V,null,{default:a(()=>[l(t(b),{onRegister:t(w)},{tableAction:a(e=>[e.row.status?(p(),i(f,{key:0,title:t(s)("确认封号吗")+"?",onConfirm:_=>c(e.row)},{reference:a(()=>[l(u,{link:"",value:"封号"})]),_:1},8,["title","onConfirm"])):(p(),i(f,{key:1,title:t(s)("确认解封吗")+"?",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=>T(o)?o.value=e:null),title:t(s)("用户评分")},{default:a(()=>[l(t(b),{onRegister:t(k)},null,8,["onRegister"])]),_:1},8,["modelValue","title"])]),_:1})}}});export{j as default};