import{u as U}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import Z from"./EventHeaderInfo-ab8e2440-1782572373740v=1.0.0.js";import z from"./index-359661c3-1782572373740v=1.0.0.js";import J from"./index-8bf6738e-1782572373740v=1.0.0.js";import Q from"./index-515a698b-1782572373740v=1.0.0.js";import G from"./index-552f5acb-1782572373740v=1.0.0.js";import{u as K}from"./useSignupDetailhooks-0a7e9b35-1782572373740v=1.0.0.js";import{p as W}from"./signupApi-62c85298-1782572373740v=1.0.0.js";import{a as X,_ as Y}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as D}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as M,r as f,c as y,m as $,al as i,z as a,I as u,J as _,R as P,u as e,k as ee,A as F,Q as te,a4 as oe,M as o}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";import"./SignUpUserDialog.vue_vue_type_script_setup_true_lang-6c1fbdb1-1782572373740v=1.0.0.js";import"./AddFormItemLine-e50f30dc-1782572373740v=1.0.0.js";import"./Imgs-ec8274aa-1782572373740v=1.0.0.js";import"./useDynamicFormHook-1d702eb2-1782572373740v=1.0.0.js";import"./TableItemShow-4fd6d25d-1782572373740v=1.0.0.js";import"./index.vue_vue_type_script_setup_true_lang-aea23a9b-1782572373740v=1.0.0.js";import"./SignUpUnitDialog.vue_vue_type_script_setup_true_lang-4ba06574-1782572373740v=1.0.0.js";import"./SporterDataview-6c58711e-1782572373740v=1.0.0.js";import"./SporterDataview-0898bdb2-1782572373740v=1.0.0.js";const ae={key:4,class:"loading-container"},ne=M({name:"signupDetail"}),re=M({...ne,props:{pageType:{type:String,default:"event"}},setup(h){const k=h,{closeCurrent:c}=U(),I=X();f(!0),y(()=>I.query.id);const l=y(()=>I.query.eventApplyMainId),m=y(()=>I.query.eventTermId),g=y(()=>r.value.eventProjectType),j=f([]),n=f([]),C=f(!1),B=t=>{C.value=!0},L=async()=>{if(n.value.length===0){D.warning("\u9879\u76EE\u4E0D\u80FD\u4E3A\u7A7A");return}if(C.value!==!1){C.value=!1;try{const t=await W({eventProjectIdList:n.value,eventApplyMainId:r.value.eventApplyMainId});t.code===0?D.success("\u9879\u76EE\u4FDD\u5B58\u6210\u529F"):D.error(t.msg)}catch(t){D.error(t)}}},{getSignupInfoData:w,getSignupCustomFieldDataDTOData:ue,eventDetail:r,personBaseData:S,getSignupInfoCustomDataByTermIdData:V,unitBaseData:x,groupBaseData:E,doubleBaseData:b}=K(l.value,k.pageType),s=y(()=>r.value.eventApplyMode),A=f(!1);$(async()=>{var v;A.value=!0,await V(m.value),await w(l.value),s.value,E.value,r.value;let t=[];if(r.value.eventProjectType==="much")switch(s.value){case"group":t=E.value.eventTermProjectListRespVOList;break;case"double":t=b.value.eventTermProjectListRespVOList;break}j.value=t==null?void 0:t.map(p=>({label:p.projectName,value:p.eventProjectId})),n.value=((v=r.value.eventProjectIds)==null?void 0:v.split(",").map(p=>Number(p)))||[],A.value=!1});const T=()=>{c()};return(t,v)=>{const p=i("el-option"),R=i("el-select"),N=i("el-form-item"),q=i("el-empty"),H=i("el-form"),O=i("HZPageLayout");return a(),u(O,{isBack:!0,title:e(I).meta.title},{default:_(()=>[P(H,{ref:"formRef"},{default:_(()=>[P(Z,{eventDetail:e(r)},{default:_(()=>[e(j).length>0?(a(),u(N,{key:0,label:"\u9879\u76EE\u9009\u62E9",prop:"type"},{default:_(()=>[P(R,{modelValue:e(n),"onUpdate:modelValue":v[0]||(v[0]=d=>ee(n)?n.value=d:null),multiple:"",style:{width:"100%"},onChange:B,onBlur:L},{default:_(()=>[(a(!0),F(te,null,oe(e(j),d=>(a(),u(p,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):o("v-if",!0)]),_:1},8,["eventDetail"]),o(" \u4E2A\u4EBA\u62A5\u540D\u4FE1\u606F "),e(s)==="person"?(a(),u(z,{key:0,eventProjectType:e(g),baseInfo:e(S),applyMainId:e(l),eventTermId:e(m),onCancel:e(c),onSubmit:T,showAdd:!0,pageType:"edit"},null,8,["eventProjectType","baseInfo","applyMainId","eventTermId","onCancel"])):o("v-if",!0),o(" \u5355\u4F4D\u62A5\u540D\u4FE1\u606F "),e(s)==="unit"?(a(),u(Q,{key:1,eventProjectType:e(g),baseInfo:e(x),applyMainId:e(l),eventTermId:e(m),onCancel:e(c),onSubmit:T,showAdd:!0,pageType:"edit"},null,8,["eventProjectType","baseInfo","applyMainId","eventTermId","onCancel"])):o("v-if",!0),o(" \u56E2\u961F\u62A5\u540D\u4FE1\u606F "),e(s)==="group"?(a(),u(J,{key:2,eventTermId:e(m),eventProjectType:e(g),baseInfo:e(E),applyMainId:e(l),onCancel:e(c),onSubmit:T,pageType:"edit",eventProjectIdList:e(n)},null,8,["eventTermId","eventProjectType","baseInfo","applyMainId","onCancel","eventProjectIdList"])):o("v-if",!0),o(" \u53CC\u4EBA\u62A5\u540D\u4FE1\u606F "),e(s)==="double"?(a(),u(G,{key:3,eventProjectType:e(g),baseInfo:e(b),applyMainId:e(l),eventTermId:e(m),onCancel:e(c),onSubmit:T,showAdd:!0,pageType:"edit",eventProjectIdList:e(n)},null,8,["eventProjectType","baseInfo","applyMainId","eventTermId","onCancel","eventProjectIdList"])):o("v-if",!0),e(A)?(a(),F("div",ae,[P(q,{description:"\u52A0\u8F7D\u4E2D..."})])):o("v-if",!0)]),_:1},512)]),_:1},8,["title"])}}});const Fe=Y(re,[["__scopeId","data-v-328f6e49"]]);export{Fe as default};
