import{u as p,Y as t,C as u}from"./index-mBiSeZ4c.js";import{d as c,u as _,b as m,G as a,Z as d,D as f,j as b,o as g,w as h,i as w,q as r,P as x}from"./index-B0IDQb1y.js";import"./index-BGWIXl6v.js";import"./index-DxKS1-Vo.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)=>(g(),b(x,null,{default:h(()=>[w(r(u),{onRegister:r(i)},null,8,["onRegister"])]),_:1}))}});export{S as default};