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