import v from"./BaseForm-8630d9ab-1782572373740v=1.0.0.js";import{b as _}from"./volunteerRecruitApi-a86c68c5-1782572373740v=1.0.0.js";import{u as b}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as C}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 n,al as B,z as R,I as k,J as E,R as F,u,k as p}from"./vendor-866bb149-1782572373740v=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 _};
