import{d as x,u as V,r as l,D as p,e as m,i as P,o as L,w as i,h as o,p as n,q as c,S as d,P as S}from"./index-5k_MqT6o.js";import{u as B,P as f,C as E}from"./index-Cl9RbTBn.js";import"./index-BHx7dntQ.js";import"./index-CAzgmO3A.js";const F=x({__name:"index",setup(I){const{t:b}=V(),t=l(!1),r=l(""),u=l({});l("zh");const _=l([]),{register:g,tableActions:v}=B({title:"投诉列表",showSelection:!1,showIndex:!0,immediate:!0,showExport:!1,api:p.complaintList,apiParams:{},columns:[{prop:"realname",label:"被投诉客服名称"},{prop:"user",label:"投诉用户",formatter(e){return e.user?.realname}},{prop:"created_at",label:"投诉时间"},{prop:"complaint_item",label:"投诉原因",formatter(e){return e.complaint_item?.name}},{prop:"remark",label:"投诉说明"},{prop:"status",label:"处理状态",tagEnums:f},{prop:"operation",label:"投诉处理人",formatter(e){return e.operation?.nickname}},{label:"处理结果",prop:"result"}],schema:[{prop:"keyword",label:"客服名称",type:"input"},{label:"时间范围",prop:"range",type:"range-time-picker",props:{},rangeFields:["start_time","end_time"]},{prop:"status",label:"处理状态",type:"select",options:f},{prop:"complaint_item_id",label:"投诉原因",type:"sync-select",api:p.complaintItemList,immediate:!1,syncOptions:{label:"name",value:"id",remoteKey:"name"},props:{filterable:!0,remote:!1},options:[]}],showAction:!0,actionProps:{btnList:[{label:"处理",click(e){u.value=e.row,t.value=!0},disabledFn(e){return e.status===1}}]}});function C(){p.complaintUpdate({id:u.value.id,result:r.value}).then(e=>{v.reload(),t.value=!1})}function k(){p.homeGetLanguageCode().then(e=>{_.value=e})}function w(e){}return k(),(e,a)=>{const h=m("el-input"),y=m("el-dialog");return L(),P(S,null,{default:i(()=>[o(n(E),{onRegister:n(g),onSetCallBack:w},null,8,["onRegister"]),o(y,{modelValue:n(t),"onUpdate:modelValue":a[2]||(a[2]=s=>c(t)?t.value=s:null),title:"处理投诉",width:"400px"},{footer:i(()=>[o(d,{value:"取消",type:"default",onClick:a[1]||(a[1]=s=>t.value=!1)}),o(d,{value:"确定",onClick:C})]),default:i(()=>[o(h,{modelValue:n(r),"onUpdate:modelValue":a[0]||(a[0]=s=>c(r)?r.value=s:null),type:"textarea",placeholder:n(b)("请输入")},null,8,["modelValue","placeholder"])]),_:1},8,["modelValue"])]),_:1})}}});export{F as default};
