import{A as T}from"./index.1d26a072.js";import{_ as $}from"./ActivitySelect.vue_vue_type_script_setup_true_lang.5af17dcb.js";import{_ as I,g as L,d as q,c as M}from"./EditBanner.vue_vue_type_script_setup_true_lang.18e4fa53.js";import{u as R}from"./useAgent.c0cb1751.js";import{d as j,r as E,b,p as H,c as d,e as C,f as G,g as s,h as e,i as n,u as a,m,t as J,k as K,q as O,A as P,F as Q,y as F,N as W,E as X,_ as Y}from"./index.0308b213.js";import"./install.524ae6f2.js";import"./activity.736c114f.js";import"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";import"./index.de7bcb5e.js";import"./index.e2f68f5b.js";import"./list.5526c7ef.js";const Z={class:"filter-form"},ee=m("\u67E5\u8BE2"),te={class:"data"},ae={class:"operation-btn",style:{"margin-bottom":"10px"}},le=m("\u6DFB\u52A0\u8F6E\u64AD\u56FE"),oe={class:"table"},ne={class:"logo"},ie=["src"],se={class:"table-operation-btn"},ue={class:"top"},de=m("\u4FEE\u6539"),re=m("\u5220\u9664"),pe={class:"bottom"},me={class:"pagination"},ce=j({setup(_e){let r=E(!1),c=E(!1),_=E(0);const l=b({agentid:"",page:1,limit:10}),g=b({limit:"",page:"",pages:1,total:0,list:[]}),p=()=>{L(l).then(u=>{g.list=u.list,g.total=u.count})},A=u=>{_.value=u,c.value=!0,F(()=>{r.value=!0})},D=()=>{c.value=!1,_.value=0},y=()=>{_.value=0,c.value=!0,F(()=>{r.value=!0})},w=u=>{W.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{q(u).then(o=>{X({message:"\u5220\u9664\u8F6E\u64AD\u56FE\u6210\u529F",type:"success"}),p()})}).catch(()=>{})},B=u=>{M(u)};p(),H(()=>[l.page,l.limit,l.agentid],()=>{p()});const x=()=>{p()},{getAgentList:V,getAgentTitle:k}=R();return V(),(u,o)=>{const h=d("el-form-item"),f=d("el-button"),S=d("el-form"),i=d("el-table-column"),U=d("el-switch"),z=d("el-table"),N=d("el-pagination");return C(),G(Q,null,[s("div",Z,[e(S,{model:a(l),"label-width":"90px"},{default:n(()=>[e(h,{class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:n(()=>[e(a(T),{modelValue:a(l).agentid,"onUpdate:modelValue":o[0]||(o[0]=t=>a(l).agentid=t)},null,8,["modelValue"])]),_:1}),e(h,{class:"tn-el-form-item",label:"\u6D3B\u52A8"},{default:n(()=>[e($,{modelValue:a(l).vote_activity_id,"onUpdate:modelValue":o[1]||(o[1]=t=>a(l).vote_activity_id=t)},null,8,["modelValue"])]),_:1}),e(h,null,{default:n(()=>[e(f,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:x},{default:n(()=>[ee]),_:1})]),_:1})]),_:1},8,["model"])]),s("div",te,[s("div",ae,[e(f,{class:"btn",type:"primary",onClick:y},{default:n(()=>[le]),_:1})]),s("div",oe,[e(z,{data:a(g).list,onSelectionChange:u.handleSelectionChange},{default:n(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"id",prop:"id"}),e(i,{label:"\u8F6E\u64AD\u56FE\u540D\u79F0",prop:"name"}),e(i,{label:"\u6240\u5C5E\u6D3B\u52A8",prop:"activity_name"}),e(i,{label:"\u6240\u5C5E\u57CE\u5E02",width:"100px"},{default:n(({row:t})=>[m(J(a(k)(t.agentid)),1)]),_:1}),e(i,{label:" \u6D3B\u52A8",prop:"vote_activity_id"}),e(i,{label:" \u56FE\u7247",prop:"image"},{default:n(t=>[s("div",ne,[s("div",null,[s("img",{src:t.row.image,style:{width:"150px"}},null,8,ie)])])]),_:1}),e(i,{label:" \u8DEF\u5F84",prop:"wxapp_link"}),e(i,{label:" \u6743\u91CD",prop:"weigh"}),e(i,{label:"\u5F00\u542F\u72B6\u6001"},{default:n(t=>[e(U,{modelValue:t.row.status,"onUpdate:modelValue":v=>t.row.status=v,size:"large",width:60,"inline-prompt":"","active-text":"\u5F00\u542F","inactive-text":"\u5173\u95ED","active-value":"1","inactive-value":0,onChange:v=>B(t.row.id)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(i,{label:"\u64CD\u4F5C"},{default:n(t=>[s("div",se,[s("div",ue,[e(f,{type:"primary",onClick:v=>A(t.row.id)},{default:n(()=>[de]),_:2},1032,["onClick"]),e(f,{type:"danger",onClick:v=>w(t.row.id)},{default:n(()=>[re]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data","onSelectionChange"])])]),s("div",pe,[s("div",me,[e(N,{"current-page":a(l).page,"onUpdate:current-page":o[2]||(o[2]=t=>a(l).page=t),"page-size":a(l).limit,"onUpdate:page-size":o[3]||(o[3]=t=>a(l).limit=t),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(g).total},null,8,["current-page","page-size","total"])])]),a(c)?(C(),K(I,{key:0,modelValue:a(r),"onUpdate:modelValue":o[4]||(o[4]=t=>O(r)?r.value=t:r=t),EditId:a(_),onHideEdit:D,onRefresh:o[5]||(o[5]=t=>p())},null,8,["modelValue","EditId"])):P("",!0)],64)}}});const Se=Y(ce,[["__scopeId","data-v-40c2395a"]]);export{Se as default};
