import{d as z,r as n,z as N,c as b,a as e,w as a,a$ as T,B as D,b as L,q as j,Z as g,A as h,L as I,f as K,i as P,h as _,aY as S,b0 as U,b1 as q,t as y,b2 as A,by as M,bc as Y,o as p}from"./index-DqVhJ65C.js";/* empty css                *//* empty css                      *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  *//* empty css                 *//* empty css                        *//* empty css                    */import"./el-tooltip-l0sNRNKZ.js";const Z={class:"p-6"},$={class:"mb-4 flex justify-between items-center"},F={key:1,class:"mt-4 flex justify-end"},le=z({__name:"Sms",setup(G){const c=n([]),r=n(!1),d=n(""),u=n(1),v=n(20),m=n(0),i=async()=>{r.value=!0;try{const o=await D.get("/admin/log/sms",{params:{page:u.value,limit:v.value,keyword:d.value}});o.code===0&&(c.value=o.data.data||[],m.value=o.data.total||0)}catch(o){console.error(o)}finally{r.value=!1}};return N(()=>{i()}),(o,l)=>{const w=P,E=I,s=U,f=q,k=A,C=M,x=Y,V=T,B=S;return p(),b("div",Z,[e(V,{shadow:"hover"},{default:a(()=>[L("div",$,[e(E,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=t=>d.value=t),placeholder:"搜索手机号",class:"w-64",clearable:"",onKeyup:K(i,["enter"])},{append:a(()=>[e(w,{onClick:i},{default:a(()=>[...l[2]||(l[2]=[_("搜索",-1)])]),_:1})]),_:1},8,["modelValue"])]),j((p(),g(k,{data:c.value,stripe:"",border:""},{default:a(()=>[e(s,{prop:"id",label:"ID",width:"80"}),e(s,{prop:"phone",label:"手机号",width:"150"}),e(s,{prop:"content",label:"短信内容","min-width":"200","show-overflow-tooltip":""}),e(s,{prop:"channel",label:"发送通道",width:"100"},{default:a(({row:t})=>[e(f,{size:"small"},{default:a(()=>[_(y(t.channel||"默认"),1)]),_:2},1024)]),_:1}),e(s,{prop:"status",label:"状态",width:"80"},{default:a(({row:t})=>[e(f,{type:t.status===1?"success":"danger",size:"small"},{default:a(()=>[_(y(t.status===1?"成功":"失败"),1)]),_:2},1032,["type"])]),_:1}),e(s,{prop:"create_time",label:"发送时间",width:"180"})]),_:1},8,["data"])),[[B,r.value]]),!r.value&&c.value.length===0?(p(),g(C,{key:0,description:"暂无短信记录"})):h("",!0),m.value>0?(p(),b("div",F,[e(x,{background:"",layout:"total, prev, pager, next",total:m.value,"current-page":u.value,"onUpdate:currentPage":l[1]||(l[1]=t=>u.value=t),"page-size":v.value,onCurrentChange:i},null,8,["total","current-page","page-size"])])):h("",!0)]),_:1})])}}});export{le as default};
