import{_ as $,g as j,d as M}from"./PrizeDialog.vue_vue_type_script_setup_true_lang.2594fd63.js";import{d as R,a4 as O,b as F,r as g,p as S,c as i,e as r,f as p,g as d,h as t,i as a,u,F as E,j as G,k,m as v,t as A,A as f,q as H,y as B,N as J,E as K,_ as Q}from"./index.0308b213.js";import"./useInstance.233fbdde.js";const W={class:"filter-form"},X=v("\u67E5\u8BE2"),Y={class:"data"},Z={class:"operation-container"},ee={class:"operation-btn"},te=v("\u6DFB\u52A0\u62BD\u5956\u5956\u54C1"),ae={class:"table"},ue={key:0},le={key:1},oe={key:0},se={key:1},ne={class:"top"},ie=v("\u7F16\u8F91"),re=v("\u5220\u9664"),de={class:"pagination"},_e=R({setup(ce){const m=O(),l=F({page:1,limit:10,drawId:""}),_=F({list:[],activitys:[],count:0});let c=g(!1),w=g(!1),y=g(0),h=g(0);const x=()=>{y.value=0,m.query.draw_id&&(h.value=Number(m.query.draw_id)),w.value=!0,B(()=>{c.value=!0})},z=n=>{y.value=n,w.value=!0,B(()=>{c.value=!0})},D=()=>{m.query.draw_id&&(l.drawId=Number(m.query.draw_id)),j(l).then(n=>{_.count=n.count,_.list=n.list,_.activitys=n.activitys}),m.query.draw_id=""},V=()=>{y.value=0,B(()=>{w.value=!1}),D()},I=n=>{J.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u62BD\u5956\u5956\u54C1\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{M(n).then(()=>{K.success("\u5220\u9664\u62BD\u5956\u5956\u54C1\u6210\u529F")})}).catch(()=>{})};return D(),S(()=>[l.page,l.limit,l.drawId],()=>{D()}),(n,o)=>{const q=i("el-option"),N=i("el-select"),C=i("el-form-item"),b=i("el-button"),P=i("el-form"),s=i("el-table-column"),T=i("el-table"),U=i("el-pagination");return r(),p(E,null,[d("div",W,[t(P,{"label-width":"80px"},{default:a(()=>[t(C,{prop:"title",label:"\u62BD\u5956\u6D3B\u52A8",class:"tn-el-form-item"},{default:a(()=>[t(N,{modelValue:u(l).drawId,"onUpdate:modelValue":o[0]||(o[0]=e=>u(l).drawId=e),placeholder:"\u8BF7\u9009\u62E9\u62BD\u5956\u6D3B\u52A8",filterable:"",clearable:""},{default:a(()=>[(r(!0),p(E,null,G(u(_).activitys,e=>(r(),k(q,{key:e.id,label:e.name,value:e.id},{default:a(()=>[v(A(e.name),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(C,{width:"100"},{default:a(()=>[t(b,{type:"primary",onClick:o[1]||(o[1]=e=>D())},{default:a(()=>[X]),_:1})]),_:1})]),_:1})]),d("div",Y,[d("div",Z,[d("div",ee,[t(b,{class:"btn",type:"primary",onClick:x},{default:a(()=>[te]),_:1})])]),d("div",ae,[t(T,{data:u(_).list},{default:a(()=>[t(s,{label:"ID",prop:"id"}),t(s,{label:"\u62BD\u5956\u6D3B\u52A8\u540D\u79F0",prop:"draw_name"}),t(s,{label:"\u5956\u54C1\u7C7B\u578B"},{default:a(e=>[e.row.type==1?(r(),p("span",ue,"\u5956\u54C1")):f("",!0),e.row.type==2?(r(),p("span",le,"\u7EA2\u5305")):f("",!0)]),_:1}),t(s,{label:"\u5956\u54C1\u6807\u9898",prop:"title"}),t(s,{label:"\u6570\u91CF",prop:"num"}),t(s,{label:"\u5269\u4F59\u6570\u91CF",prop:"current_num"}),t(s,{label:"\u9886\u53D6\u65B9\u5F0F"},{default:a(e=>[e.row.receive_method==1?(r(),p("span",oe,"\u7EBF\u4E0B\u9886\u53D6")):f("",!0),e.row.receive_method==2?(r(),p("span",se,"\u7ACB\u5373\u9886\u53D6")):f("",!0)]),_:1}),t(s,{label:"\u6392\u5E8F",prop:"weigh"}),t(s,{label:"\u521B\u5EFA\u65F6\u95F4"},{default:a(e=>[d("span",null,A(e.row.createtime),1)]),_:1}),t(s,{label:"\u64CD\u4F5C",width:"auto"},{default:a(e=>[d("div",ne,[t(b,{type:"primary",onClick:L=>z(e.row.id)},{default:a(()=>[ie]),_:2},1032,["onClick"]),t(b,{type:"danger",onClick:L=>I(e.row.id)},{default:a(()=>[re]),_:2},1032,["onClick"])])]),_:1})]),_:1},8,["data"])])]),d("div",de,[t(U,{currentPage:u(l).page,"onUpdate:currentPage":o[2]||(o[2]=e=>u(l).page=e),"page-size":u(l).limit,"onUpdate:page-size":o[3]||(o[3]=e=>u(l).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:u(_).count},null,8,["currentPage","page-size","total"])]),u(w)?(r(),k($,{key:0,modelValue:u(c),"onUpdate:modelValue":o[4]||(o[4]=e=>H(c)?c.value=e:c=e),id:u(y),draw_id:u(h),activitys:u(_).activitys,onOnClose:V},null,8,["modelValue","id","draw_id","activitys"])):f("",!0)],64)}}});const ve=Q(_e,[["__scopeId","data-v-c3df9c05"]]);export{ve as default};
