import{_ as e}from"./index-7266ee79.js";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-a66505b9.js";import{_ as a}from"./update.vue_vue_type_script_setup_true_lang-34cf7a97.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-5d221a19.js";import{_ as s}from"./operate.vue_vue_type_script_setup_true_lang-b52831fd.js";import{_ as r}from"./search.vue_vue_type_script_setup_true_lang-bbdf4bb9.js";import{_ as o}from"./create.vue_vue_type_script_setup_true_lang-bd520c0b.js";import{u}from"./useGetList-4b13a7ea.js";import{u as i}from"./useOpen-280ec4e6.js";import{g as d}from"./index-937329f9.js";import{d as m,k as n,m as p,p as _,r as c,K as f,o as v,c as b,e as g,a as j,w as y,f as w,F as h,q as V,j as x,J as k,b as U,t as A,Q as I}from"./index-018fb6dd.js";import"./index-765bf96c.js";import"./add.vue_vue_type_script_setup_true_lang-9cf41186.js";import"./index-cb41d118.js";import"./http-338d117f.js";/* empty css             *//* empty css                   */const P={class:"flex flex-col justify-between w-full sm:flex-row"},C={class:"w-full"},q={class:"table-default"},F=g("br",null,null,-1),J={key:1},Q={class:"mr-3 text-sm font-medium"},D=m({__name:"index",setup(m){const D=n([]),{data:E,query:G,search:H,reset:K,loading:L}=u("channel/advertiser/listAdvertiser"),{open:N,close:O,title:R,visible:S,id:T}=i(),W=p((()=>{var e;return null==(e=E.value)?void 0:e.data}));return _((()=>{d().then((e=>{D.value=e.data})),H()})),(u,i)=>{const d=c("el-input"),m=c("el-form-item"),n=c("el-option"),p=c("el-select"),_=r,E=s,Y=c("el-table-column"),z=c("el-tooltip"),B=c("el-image"),M=t,X=a,Z=c("el-table"),$=l,ee=e,le=f("action"),ae=f("loading");return v(),b("div",P,[g("div",C,[j(_,{search:w(H),reset:w(K)},{body:y((()=>[j(m,{label:"邮箱"},{default:y((()=>[j(d,{modelValue:w(G).email,"onUpdate:modelValue":i[0]||(i[0]=e=>w(G).email=e),clearable:""},null,8,["modelValue"])])),_:1}),j(m,{label:"用户名"},{default:y((()=>[j(d,{modelValue:w(G).username,"onUpdate:modelValue":i[1]||(i[1]=e=>w(G).username=e),clearable:""},null,8,["modelValue"])])),_:1}),j(m,{label:"小程序"},{default:y((()=>[j(p,{modelValue:w(G).miniProgramId,"onUpdate:modelValue":i[2]||(i[2]=e=>w(G).miniProgramId=e),filterable:"",clearable:"",placeholder:"选择小程序"},{default:y((()=>[(v(!0),b(h,null,V(D.value,(e=>(v(),x(n,{key:e.miniprogram_id,label:e.name,value:e.miniprogram_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),g("div",q,[k(j(E,{show:w(N)},null,8,["show"]),[[le,"channel.Advertiser.addAdvertiser"]]),k((v(),x(Z,{data:w(W),class:"mt-3"},{default:y((()=>[j(Y,{prop:"id",label:"ID"}),j(Y,{prop:"email",label:"邮箱"},{default:y((e=>[e.row.remark?(v(),x(z,{key:0,placement:"top"},{content:y((()=>[U(A(e.row.remark),1),F])),default:y((()=>[g("span",null,A(e.row.email),1)])),_:2},1024)):(v(),b("span",J,A(e.row.email),1))])),_:1}),j(Y,{prop:"username",label:"用户名"}),j(Y,{prop:"miniProgramIds",label:"已绑定小程序"},{default:y((e=>[(v(!0),b(h,null,V(e.row.miniPrograms,(e=>(v(),b("div",{key:e.id,class:"flex items-center h-8"},[j(B,{style:{width:"20px",height:"20px"},class:"mt-1 mr-5",src:e.type_logo,fit:"contain"},null,8,["src"]),g("span",Q,A(e.name),1)])))),128))])),_:1}),k((v(),x(Y,{prop:"status",label:"状态"},{default:y((e=>[j(M,{modelValue:e.row.status,"onUpdate:modelValue":l=>e.row.status=l,id:e.row.id,api:"users"},null,8,["modelValue","onUpdate:modelValue","id"])])),_:1})),[[le,"User.user.enable"]]),j(Y,{prop:"created_at",label:"创建时间"}),j(Y,{label:"操作",width:"200"},{default:y((e=>[k(j(X,{onClick:l=>w(N)(e.row.id)},null,8,["onClick"]),[[le,"channel.Advertiser.updateAdvertiser"]])])),_:1})])),_:1},8,["data"])),[[ae,w(L)]]),j($)]),j(ee,{modelValue:w(S),"onUpdate:modelValue":i[4]||(i[4]=e=>I(S)?S.value=e:null),title:w(R),"destroy-on-close":""},{default:y((()=>[j(o,{onClose:i[3]||(i[3]=e=>w(O)(w(H))),primary:w(T)},null,8,["primary"])])),_:1},8,["modelValue","title"])])])}}});export{D as default};
