import{u as p,Y as t,C as u}from"./index-Cl9RbTBn.js";import{d as c,u as _,b as m,D as a,Y as d,B as f,i as h,o as b,w as g,h as w,p as r,P as x}from"./index-5k_MqT6o.js";import"./index-BHx7dntQ.js";import"./index-CAzgmO3A.js";const S=c({__name:"index",setup(I){const{t:o}=_(),n=m(),{register:i}=p({title:"客服对接记录",api:a.kefuLog,showSelection:!1,showIndex:!1,showAction:!0,immediate:!0,columns:[{prop:"avatar",label:"用户头像",isImage:!0,width:100,align:"center"},{prop:"user_id",label:"用户ID"},{prop:"realname",label:"用户名"},{prop:"cs_name",label:"客服昵称"},{prop:"is_online",label:"用户是否在线",tagEnums:t,align:"center"},{prop:"status",label:"是否结束",tagEnums:t,align:"center"},{prop:"created_at",label:"对接开始时间",width:140},{prop:"updated_at",label:"对接结束时间",width:140}],schema:[{label:"用户昵称/用户ID",prop:"keyword",type:"input"},{label:"客服昵称",prop:"cs_name",type:"input"},{label:"是否在线",prop:"is_online",type:"select",options:t}],actionProps:{btnList:[{label:"对接",click:e=>{a.kefuIsChat({user_id:e.row.user_id,cs_uid:e.row.cs_uid}).then(s=>{s.is_chat===1?d.confirm("确认是否对接?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let l=JSON.parse(localStorage.getItem("zjxc_session_userInfo"));a.kefuTransferChat({user_id:e.row.user_id,cs_uid:l.user_id}).then(k=>{n.push("/ServiceSupervision")})}):f.error(o("当前用户处于不可以对接状态"))})}}]}});return(e,s)=>(b(),h(x,null,{default:g(()=>[w(r(u),{onRegister:r(i)},null,8,["onRegister"])]),_:1}))}});export{S as default};
