/* empty css             *//* empty css                   */import{_ as e}from"./index-e025ca33.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-e74be938.js";/* empty css                        *//* empty css                    *//* empty css               */import"./el-tooltip-4ed993c7.js";/* empty css                  *//* empty css                     */import{_ as l}from"./update.vue_vue_type_script_setup_true_lang-b418af91.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-0d8f66cc.js";/* empty css                        */import{_ as s}from"./operate.vue_vue_type_script_setup_true_lang-ffb863d5.js";import{_ as r}from"./search.vue_vue_type_script_setup_true_lang-8edf6ccf.js";/* empty css                 *//* empty css                  *//* empty css                     */import{_ as o}from"./create.vue_vue_type_script_setup_true_lang-f90dfb2f.js";import{u as i}from"./useGetList-d550ec92.js";import{u}from"./useOpen-8f14d39d.js";import{g as m}from"./index-bb837113.js";import{d as p,m as d,p as n,x as _,ao as c,o as f,c as v,e as j,a as b,w as g,f as y,F as h,y as w,l as x,Z as V,b as k,t as U,a9 as A,a5 as I,a6 as P,A as C,B as q,aa as D,ak as F,D as Z,ab as B,a2 as G}from"./index-41bf27b7.js";/* empty css                  *//* empty css                   *//* empty css                  */import"./index-2a89b0c2.js";/* empty css                  */import"./add.vue_vue_type_script_setup_true_lang-ddaf2b26.js";import"./index-43bab232.js";import"./http-e55ef919.js";/* empty css                   */const L={class:"flex flex-col justify-between w-full sm:flex-row"},O={class:"w-full"},Q={class:"table-default"},R=j("br",null,null,-1),S={key:1},T={class:"mr-3 text-sm font-medium"},W=p({__name:"index",setup(p){const W=d([]),{data:X,query:Y,search:$,reset:z,loading:E}=i("channel/advertiser/listAdvertiser"),{open:H,close:J,title:K,visible:M,id:N}=u(),ee=n((()=>{var e;return null==(e=X.value)?void 0:e.data}));return _((()=>{m().then((e=>{W.value=e.data})),$()})),(i,u)=>{const m=I,p=P,d=C,n=q,_=r,X=s,ae=D,le=F,te=Z,se=t,re=l,oe=B,ie=a,ue=e,me=c("action"),pe=G;return f(),v("div",L,[j("div",O,[b(_,{search:y($),reset:y(z)},{body:g((()=>[b(p,{label:"邮箱"},{default:g((()=>[b(m,{modelValue:y(Y).email,"onUpdate:modelValue":u[0]||(u[0]=e=>y(Y).email=e),clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"用户名"},{default:g((()=>[b(m,{modelValue:y(Y).username,"onUpdate:modelValue":u[1]||(u[1]=e=>y(Y).username=e),clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"小程序"},{default:g((()=>[b(n,{modelValue:y(Y).miniProgramId,"onUpdate:modelValue":u[2]||(u[2]=e=>y(Y).miniProgramId=e),filterable:"",clearable:"",placeholder:"选择小程序"},{default:g((()=>[(f(!0),v(h,null,w(W.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",Q,[V(b(X,{show:y(H)},null,8,["show"]),[[me,"channel.Advertiser.addAdvertiser"]]),V((f(),x(oe,{data:y(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),R])),default:g((()=>[j("span",null,U(e.row.email),1)])),_:2},1024)):(f(),v("span",S,U(e.row.email),1))])),_:1}),b(ae,{prop:"username",label:"用户名"}),b(ae,{prop:"miniProgramIds",label:"已绑定小程序"},{default:g((e=>[(f(!0),v(h,null,w(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",T,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=>y(H)(e.row.id)},null,8,["onClick"]),[[me,"channel.Advertiser.updateAdvertiser"]])])),_:1})])),_:1},8,["data"])),[[pe,y(E)]]),b(ie)]),b(ue,{modelValue:y(M),"onUpdate:modelValue":u[4]||(u[4]=e=>A(M)?M.value=e:null),title:y(K),"destroy-on-close":""},{default:g((()=>[b(o,{onClose:u[3]||(u[3]=e=>y(J)(y($))),primary:y(N)},null,8,["primary"])])),_:1},8,["modelValue","title"])])])}}});export{W as default};
