import T from"./BaseForm-37bc4868-1782729249161v=1.0.0.js";import{u as b,a as _}from"./signupTemplateApi-da258822-1782729249161v=1.0.0.js";import{u as I}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as M}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as m}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as c,r as s,m as C,al as w,z as B,I as F,J as k,R as E,u as p,k as d}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./eventTypeApi-be275193-1782729249161v=1.0.0.js";import"./PersonalFormCom.vue_vue_type_script_setup_true_lang-9bb9c282-1782729249161v=1.0.0.js";import"./useSignupTemplate-2b906224-1782729249161v=1.0.0.js";import"./Imgs-0a9c1d5a-1782729249161v=1.0.0.js";import"./useDynamicFormHook-140c1b9e-1782729249161v=1.0.0.js";import"./UnitFormCom-36792dae-1782729249161v=1.0.0.js";import"./TeamFormCom.vue_vue_type_script_setup_true_lang-7f195220-1782729249161v=1.0.0.js";import"./DoubleFormCom.vue_vue_type_script_setup_true_lang-7cc4de51-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=1.0.0.js";const S=c({name:"signupTemplateEdit"}),j=c({...S,setup(q){const{closeCurrent:u}=I(),f=s(null),o=s({eventApplyMode:"person",name:"",eventTypeId:null,applyMemberType:"school",applyTmplId:""}),i=s({}),a=s(!1),l=M(),y=()=>{u()},g=async n=>{a.value=!0;try{let e=b,r="\u66F4\u65B0\u6210\u529F",t=await e(n);t.code==0?m({type:"success",message:`${r}!`}):m.warning(t.msg),a.value=!1,u()}catch{a.value=!1}},v=async n=>{let e=await _(n);if(e.code!=0){m.warning(e.msg);return}i.value=e.data,o.value={eventApplyMode:e.data.eventApplyMode,name:e.data.name,eventTypeId:e.data.eventTypeId,applyMemberType:e.data.applyMemberType,applyTmplId:e.data.applyTmplId}};return C(()=>{l.query.id&&(f.value=l.query.id,v(l.query.id))}),(n,e)=>{const r=w("HZPageLayout");return B(),F(r,{isBack:!0,title:p(l).meta.title},{default:k(()=>[E(T,{value:p(o),"onUpdate:value":e[0]||(e[0]=t=>d(o)?o.value=t:null),"all-data":p(i),loading:p(a),"onUpdate:loading":e[1]||(e[1]=t=>d(a)?a.value=t:null),onCancel:y,onSubmit:g},null,8,["value","all-data","loading"])]),_:1},8,["title"])}}});export{j as default};
