import v from"./BaseForm-e1a23399-1782729249161v=1.0.0.js";import{b as _}from"./volunteerRecruitApi-68ceee39-1782729249161v=1.0.0.js";import{u as b}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as C}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 n,al as B,z as R,I as k,J as E,R as F,u,k as p}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";const L=c({name:"volunteerRecruitAdd"}),H=c({...L,props:{type:{type:String,default:"volunteer"}},setup(f){const{closeCurrent:l}=b(),o=n({type:"",name:"",dictTypeSign:"",status:"",creatorOrganUnitType:"",serviceTimeList:[],isPerson:0}),i=f,t=n(!1),d=()=>{l()};n("");const y=C(),g=async s=>{t.value=!0;try{let e=_,r="\u65B0\u589E\u6210\u529F";s.recruitType=i.type;let a=await e(s);a.code==0?(m({type:"success",message:`${r}!`}),l()):m.warning(a.msg),t.value=!1}catch{t.value=!1}};return(s,e)=>{const r=B("HZPageLayout");return R(),k(r,{isBack:!0,title:u(y).meta.title},{default:E(()=>[F(v,{value:u(o),"onUpdate:value":e[0]||(e[0]=a=>p(o)?o.value=a:null),loading:u(t),"onUpdate:loading":e[1]||(e[1]=a=>p(t)?t.value=a:null),onCancel:d,onSubmit:g,type:i.type},null,8,["value","loading","type"])]),_:1},8,["title"])}}});export{H as _};
