import{d as B,r as v,b as I,e as n,o,c as l,a as N,f as a,y as U,w as r,h as _,m as k,t as p,l as D,F as V,_ as q}from"./index-go251NJo.js";import{h as z}from"./axios--FnjuHWf.js";const F={style:{padding:"10px 10px"}},H={key:0},K={key:1},M=B({__name:"ContactsList",props:["tableData"],emits:["userData"],setup(m,{emit:h}){const d=v([]),y=async(t,s,x="")=>{try{return await z.post("/api/contact_count_list",{start:t,limit:s,word:x})}catch(i){return console.error("Error fetching data:",i),[]}};I(async()=>{try{const t=await y(0,800);d.value=t}catch(t){return console.error("Error fetching data:",t),[]}});const c=v(""),u=async()=>{try{const t=await y(0,100,c.value);d.value=t}catch(t){return console.error("Error fetching data:",t),[]}},b=h,w=t=>{t!==void 0&&b("userData",t)};return(t,s)=>{const x=n("el-input"),i=n("el-button"),C=n("el-avatar"),g=n("el-table-column"),E=n("el-table");return o(),l("div",null,[N("div",F,[a(x,{placeholder:"请输入关键字",modelValue:c.value,"onUpdate:modelValue":s[0]||(s[0]=e=>c.value=e),onKeyup:U(u,["enter"]),style:{width:"180px","margin-left":"15px"}},null,8,["modelValue"]),a(i,{type:"primary",onClick:u,style:{width:"70px"}},{default:r(()=>[_("搜索")]),_:1})]),a(E,{data:d.value,stripe:"",style:{width:"100%"},"max-height":"100%",height:"100%","highlight-current-row":"",onCurrentChange:w},{default:r(()=>[a(g,{width:"57"},{default:r(({row:e})=>[e.headImgUrl!==""?(o(),k(C,{key:0,size:33,src:e.headImgUrl},null,8,["src"])):(o(),k(C,{key:1,size:33},{default:r(()=>[_(" 群聊 ")]),_:1}))]),_:1}),a(g,{label:"name",width:"180"},{default:r(({row:e})=>[e.remark!==null&&e.remark!==""?(o(),l("span",H,p(e.remark),1)):(o(),l("span",K,p(e.nickname),1))]),_:1}),a(g,{prop:"chat_count",label:"num",width:"70"})]),_:1},8,["data"])])}}}),L=B({__name:"ChatRecprdsHeader",props:{userData:{type:Object,required:!0}},setup(m){const h=[{wxid:"username",账号:"account",昵称:"nickname"},{备注:"remark",描述:"describe",数量:"chat_count"}];return(d,y)=>{const f=n("el-text"),c=n("el-col"),u=n("el-row");return o(),l(V,null,D(h,(b,w)=>a(u,{gutter:5,style:{width:"100%"},key:w},{default:r(()=>[(o(!0),l(V,null,D(b,(t,s)=>(o(),k(c,{key:s,span:8,style:{"white-space":"nowrap"}},{default:r(()=>[a(f,{class:"label_color mx-1",truncated:""},{default:r(()=>[_(p(s)+":",1)]),_:2},1024),_("  "),a(f,{class:"data_color mx-1",truncated:"",title:m.userData[t]},{default:r(()=>[_(p(m.userData[t]),1)]),_:2},1032,["title"])]),_:2},1024))),128))]),_:2},1024)),64)}}}),O=q(L,[["__scopeId","data-v-cb8b8fa3"]]);export{O as C,M as _};
