import T from"./BaseForm-9df76103-1782572373740v=1.0.0.js";import{u as b,a as _}from"./signupTemplateApi-59fddc0d-1782572373740v=1.0.0.js";import{u as I}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as M}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as m}from"./eleVendor-48a7d3b8-1782572373740v=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-866bb149-1782572373740v=1.0.0.js";import"./eventTypeApi-155a5531-1782572373740v=1.0.0.js";import"./PersonalFormCom.vue_vue_type_script_setup_true_lang-35f011c9-1782572373740v=1.0.0.js";import"./useSignupTemplate-94c0c1aa-1782572373740v=1.0.0.js";import"./Imgs-ec8274aa-1782572373740v=1.0.0.js";import"./useDynamicFormHook-1d702eb2-1782572373740v=1.0.0.js";import"./UnitFormCom-b59a8c14-1782572373740v=1.0.0.js";import"./TeamFormCom.vue_vue_type_script_setup_true_lang-81341bae-1782572373740v=1.0.0.js";import"./DoubleFormCom.vue_vue_type_script_setup_true_lang-3e4db69a-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=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};
