/* empty css             *//* empty css                   */import{_ as e}from"./index-ec277c8c.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-e601cfd0.js";/* empty css                        *//* empty css                    *//* empty css               */import"./el-tooltip-4ed993c7.js";/* empty css                     */import{_ as l}from"./update.vue_vue_type_script_setup_true_lang-2f3455ac.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-f20025cf.js";/* empty css                        */import{_ as s}from"./operate.vue_vue_type_script_setup_true_lang-6b1c85b1.js";import{_ as r}from"./search.vue_vue_type_script_setup_true_lang-8a36466d.js";/* empty css                 *//* empty css                  *//* empty css                     */import{_ as o}from"./create.vue_vue_type_script_setup_true_lang-f76cef6d.js";import{u as i}from"./useGetList-33a80877.js";import{u}from"./useOpen-ae3f1df9.js";import{f as m}from"./index-47a02500.js";import{d as p,q as d,n,z as _,ao as c,o as f,c as v,e as j,a as b,w as g,f as h,F as w,p as y,l as x,Z as V,b as k,t as U,a9 as A,a5 as I,a6 as C,B as P,D as q,aa as z,ak as D,G,ab as L,a2 as O}from"./index-545c1a76.js";/* empty css                  *//* empty css                   *//* empty css                  */import"./index-b347df0b.js";/* empty css                  */import"./add.vue_vue_type_script_setup_true_lang-90917888.js";import"./index-a698fba0.js";import"./http-795fd5dc.js";/* empty css                   */const B={class:"flex flex-col justify-between w-full sm:flex-row"},F={class:"w-full"},H={class:"table-default"},K=j("br",null,null,-1),M={key:1},N={class:"mr-3 text-sm font-medium"},Q=p({__name:"index",setup(p){const Q=d([]),{data:R,query:S,search:Z,reset:E,loading:J}=i("channel/advertiser/listAdvertiser"),{open:T,close:W,title:X,visible:Y,id:$}=u(),ee=n((()=>{var e;return null==(e=R.value)?void 0:e.data}));return _((()=>{m().then((e=>{Q.value=e.data})),Z()})),(i,u)=>{const m=I,p=C,d=P,n=q,_=r,R=s,ae=z,le=D,te=G,se=t,re=l,oe=L,ie=a,ue=e,me=c("action"),pe=O;return f(),v("div",B,[j("div",F,[b(_,{search:h(Z),reset:h(E)},{body:g((()=>[b(p,{label:"邮箱"},{default:g((()=>[b(m,{modelValue:h(S).email,"onUpdate:modelValue":u[0]||(u[0]=e=>h(S).email=e),clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"用户名"},{default:g((()=>[b(m,{modelValue:h(S).username,"onUpdate:modelValue":u[1]||(u[1]=e=>h(S).username=e),clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"小程序"},{default:g((()=>[b(n,{modelValue:h(S).miniProgramId,"onUpdate:modelValue":u[2]||(u[2]=e=>h(S).miniProgramId=e),filterable:"",clearable:"",placeholder:"选择小程序"},{default:g((()=>[(f(!0),v(w,null,y(Q.value,(e=>(f(),x(d,{key:e.miniprogram_id,label:e.name,value:e.miniprogram_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),j("div",H,[V(b(R,{show:h(T)},null,8,["show"]),[[me,"channel.Advertiser.addAdvertiser"]]),V((f(),x(oe,{data:h(ee),class:"mt-3"},{default:g((()=>[b(ae,{prop:"id",label:"ID"}),b(ae,{prop:"email",label:"邮箱"},{default:g((e=>[e.row.remark?(f(),x(le,{key:0,placement:"top"},{content:g((()=>[k(U(e.row.remark),1),K])),default:g((()=>[j("span",null,U(e.row.email),1)])),_:2},1024)):(f(),v("span",M,U(e.row.email),1))])),_:1}),b(ae,{prop:"username",label:"用户名"}),b(ae,{prop:"miniProgramIds",label:"已绑定小程序"},{default:g((e=>[(f(!0),v(w,null,y(e.row.miniPrograms,(e=>(f(),v("div",{key:e.id,class:"flex items-center h-8"},[b(te,{style:{width:"20px",height:"20px"},class:"mt-1 mr-5",src:e.type_logo,fit:"contain"},null,8,["src"]),j("span",N,U(e.name),1)])))),128))])),_:1}),V((f(),x(ae,{prop:"status",label:"状态"},{default:g((e=>[b(se,{modelValue:e.row.status,"onUpdate:modelValue":a=>e.row.status=a,id:e.row.id,api:"users"},null,8,["modelValue","onUpdate:modelValue","id"])])),_:1})),[[me,"User.user.enable"]]),b(ae,{prop:"created_at",label:"创建时间"}),b(ae,{label:"操作",width:"200"},{default:g((e=>[V(b(re,{onClick:a=>h(T)(e.row.id)},null,8,["onClick"]),[[me,"channel.Advertiser.updateAdvertiser"]])])),_:1})])),_:1},8,["data"])),[[pe,h(J)]]),b(ie)]),b(ue,{modelValue:h(Y),"onUpdate:modelValue":u[4]||(u[4]=e=>A(Y)?Y.value=e:null),title:h(X),"destroy-on-close":""},{default:g((()=>[b(o,{onClose:u[3]||(u[3]=e=>h(W)(h(Z))),primary:h($)},null,8,["primary"])])),_:1},8,["modelValue","title"])])])}}});export{Q as default};
