import{A as U}from"./index.1d26a072.js";import{_ as $,g as L,d as q}from"./GroupDialog.vue_vue_type_script_setup_true_lang.2942ee27.js";import{_ as G}from"./ActivitySelect.vue_vue_type_script_setup_true_lang.5af17dcb.js";import{u as I}from"./useAgent.c0cb1751.js";import{d as M,r as v,b as E,p as j,c,e as y,f as O,g as i,h as e,i as n,u as a,m as p,t as R,k as H,q as J,A as K,F as P,y as C,N as Q,E as W,_ as X}from"./index.0308b213.js";import"./install.524ae6f2.js";import"./useInstance.233fbdde.js";import"./activity.736c114f.js";import"./list.5526c7ef.js";const Y={class:"filter-form"},Z=p("\u67E5\u8BE2"),ee={class:"data"},te={class:"operation-btn",style:{"margin-bottom":"10px"}},oe=p("\u6DFB\u52A0\u5206\u7EC4"),ae={class:"table"},le={class:"table-operation-btn"},ne={class:"top"},se=p("\u4FEE\u6539"),ie=p("\u5220\u9664"),ue={class:"bottom"},de={class:"pagination"},re=M({setup(ce){let d=v(!1),_=v(!1),m=v(0);const l=E({agentid:"",vote_activity_id:"",page:1,limit:10}),g=E({limit:"",page:"",pages:1,count:0,list:[]}),h=v([]),A=s=>{h.value=[],s.forEach(t=>h.value.push(t.id))},u=()=>{L(l).then(s=>{g.list=s.list,g.count=s.count})};u(),j(()=>[l.page,l.limit,l.agentid,l.vote_activity_id],()=>{u()});const D=()=>{u()},{getAgentList:x,getAgentTitle:B}=I();x();const V=()=>{m.value=0,C(()=>{_.value=!1}),u()},k=()=>{m.value=0,_.value=!0,C(()=>{d.value=!0})},F=s=>{m.value=s,_.value=!0,C(()=>{d.value=!0})},w=s=>{Q.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{q(s).then(t=>{W({message:"\u5220\u9664\u5206\u7EC4\u6210\u529F",type:"success"}),u()})}).catch(()=>{})};return(s,t)=>{const b=c("el-form-item"),f=c("el-button"),z=c("el-form"),r=c("el-table-column"),N=c("el-table"),S=c("el-pagination");return y(),O(P,null,[i("div",Y,[e(z,{model:a(l),"label-width":"90px"},{default:n(()=>[e(b,{class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:n(()=>[e(a(U),{modelValue:a(l).agentid,"onUpdate:modelValue":t[0]||(t[0]=o=>a(l).agentid=o)},null,8,["modelValue"])]),_:1}),e(b,{class:"tn-el-form-item",label:"\u6D3B\u52A8"},{default:n(()=>[e(G,{modelValue:a(l).vote_activity_id,"onUpdate:modelValue":t[1]||(t[1]=o=>a(l).vote_activity_id=o)},null,8,["modelValue"])]),_:1}),e(b,null,{default:n(()=>[e(f,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:D},{default:n(()=>[Z]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",ee,[i("div",te,[e(f,{class:"btn",type:"primary",onClick:k},{default:n(()=>[oe]),_:1})]),i("div",ae,[e(N,{data:a(g).list,onSelectionChange:A},{default:n(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id"}),e(r,{label:" \u5206\u7EC4\u540D\u79F0",prop:"name"}),e(r,{label:" \u6D3B\u52A8\u540D\u79F0",prop:"activity_name"}),e(r,{label:"\u6240\u5C5E\u57CE\u5E02",width:"100px"},{default:n(({row:o})=>[p(R(a(B)(o.agentid)),1)]),_:1}),e(r,{label:"\u64CD\u4F5C"},{default:n(o=>[i("div",le,[i("div",ne,[e(f,{type:"primary",onClick:T=>F(o.row.id)},{default:n(()=>[se]),_:2},1032,["onClick"]),e(f,{type:"danger",onClick:T=>w(o.row.id)},{default:n(()=>[ie]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),i("div",ue,[i("div",de,[e(S,{"current-page":a(l).page,"onUpdate:current-page":t[2]||(t[2]=o=>a(l).page=o),"page-size":a(l).limit,"onUpdate:page-size":t[3]||(t[3]=o=>a(l).limit=o),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:a(g).count,onSizeChange:t[4]||(t[4]=o=>u()),onCurrentChange:t[5]||(t[5]=o=>u())},null,8,["current-page","page-size","total"])])]),a(_)?(y(),H($,{key:0,modelValue:a(d),"onUpdate:modelValue":t[6]||(t[6]=o=>J(d)?d.value=o:d=o),id:a(m),onOnClose:V},null,8,["modelValue","id"])):K("",!0)],64)}}});const Ee=X(re,[["__scopeId","data-v-cbe136d8"]]);export{Ee as default};
