import M from"./CommonTitle-82e6d38a-1782729249161v=1.0.0.js";import{i as R}from"./eventGroupAndTermApi-7b02c2ee-1782729249161v=1.0.0.js";import{m as A}from"./mittBus-cd2c11e6-1782729249161v=1.0.0.js";import{b as O,u as P,a as V,_ as K}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{y as q,c as i,i as m,r as v,m as U,U as $,Y as z,al as g,ar as J,z as r,A as Y,R as o,B as H,M as y,K as Q,I as s,J as u,O as p,P as _,u as f}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";const W={class:"signup-rule-container"},X={class:"pa-protable"},Z=q({__name:"SignupRuleConfig",emits:["submit"],setup(ee,{emit:te}){const T=O(),h=i(()=>T.getEnumObjByKey("eventApplyMode")),w=m("pageType"),F=i(()=>w!=="detail"),b=m("eventInfo"),S=i(()=>b.value.eventProjectType),C=v([]),d=v(!1),k=P(),D=V(),x=()=>{},L=i(()=>D.query.id),E=v(""),c=m("eventTypeId"),B=(n,e=0)=>{k.push({name:"eventListSignupSet",query:{activeTab:"signupSetting",type:b.value.eventProjectType,eventId:L.value,eventGroupId:n.eventGroupId,eventTermId:n.eventTermId,eventTypeId:c==null?void 0:c.value,detail:e}})},I=async n=>{d.value=!0;let e=await R({eventGroupId:n});if(e.code===0){let t={1:"\u7537",2:"\u5973",0:"\u4E0D\u9650"};e.data.listData.forEach(l=>{l.genderStr=t[l.applyLimitBase.gender]}),C.value=e.data.listData}d.value=!1};return U(()=>{A.on("EventAddSignupTypeCategoryChangeEventGroupInfo",n=>{E.value=n.eventGroupId,I(n.eventGroupId)})}),$(()=>{A.off("EventAddSignupTypeCategoryChangeEventGroupInfo")}),z(()=>{I(E.value)}),(n,e)=>{const t=g("el-table-column"),l=g("el-link"),j=g("el-table"),G=J("loading");return r(),Y("div",W,[o(M,{title:"\u7EC4\u522B\u5C0F\u9879",onAdd:x,showAdd:!1}),H("div",X,[y(" {{ eventTypeId }}eventTypeId "),Q((r(),s(j,{data:C.value,style:{width:"100%"},align:"center",border:""},{default:u(()=>[o(t,{type:"index",label:"\u5E8F\u53F7",width:"60",align:"center"}),o(t,{prop:"name",label:"\u5C0F\u7EC4\u540D\u79F0",align:"center"}),o(t,{prop:"minAge",label:"\u5E74\u9F84\u9650\u5236",align:"center"},{default:u(a=>[p(_(a.row.applyLimitBase.minAge)+" - "+_(a.row.applyLimitBase.maxAge),1)]),_:1}),o(t,{prop:"genderStr",label:"\u6027\u522B\u9650\u5236",align:"center"}),y(` <el-table-column prop="compatibilityNum" label="\u53EF\u517C\u9879\u6570\u91CF" align="center">\r
					<template #default="scope">\r
						{{ scope.row.applyLimitBase.compatibilityNum ? scope.row.applyLimitBase.compatibilityNum : "-" }}\r
					</template>\r
				</el-table-column> `),f(S)!="one"?(r(),s(t,{key:0,prop:"eventProjectIdsCn",label:"\u5C0F\u7EC4\u9879\u76EE",align:"center"})):y("v-if",!0),o(t,{prop:"eventApplyMode",label:"\u62A5\u540D\u65B9\u5F0F",align:"center"},{default:u(a=>[p(_(f(h)[a.row.eventApplyMode]||"\u672A\u8BBE\u7F6E"),1)]),_:1}),o(t,{label:"\u64CD\u4F5C",width:"120",fixed:"right",align:"center"},{default:u(a=>[f(F)?(r(),s(l,{key:0,type:"primary",style:{"margin-right":"10px"},onClick:N=>B(a.row)},{default:u(()=>e[0]||(e[0]=[p("\u62A5\u540D\u8BBE\u7F6E",-1)])),_:2,__:[0]},1032,["onClick"])):(r(),s(l,{key:1,type:"primary",style:{"margin-right":"10px"},onClick:N=>B(a.row,1)},{default:u(()=>e[1]||(e[1]=[p("\u67E5\u770B",-1)])),_:2,__:[1]},1032,["onClick"]))]),_:1})]),_:1},8,["data"])),[[G,d.value]])])])}}});const ie=K(Z,[["__scopeId","data-v-e6a6e831"]]);export{ie as default};
