import{_ as b}from"./BaseForm.vue_vue_type_script_setup_true_lang-658e5317-1782572373740v=1.0.0.js";import{a as C,aa as w,a9 as I}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{u as k}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{E as u}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as f,r as l,m as B,al as E,z as F,I as P,J as S,R as q,u as i,k as m}from"./vendor-866bb149-1782572373740v=1.0.0.js";const x=f({name:"volunteerInfoEdit"}),H=f({...x,props:{type:{type:String,default:"volunteer"}},setup(p){const{closeCurrent:c}=k(),d=l(null),g=p,n=l({type:"",name:"",dictTypeSign:"",status:"",creatorOrganUnitType:""}),a=l(!1),r=C(),y=()=>{c()},v=async s=>{a.value=!0;try{let e=w,o="\u66F4\u65B0\u6210\u529F";s.recruitType=g.type;let t=await e(s);t.code==0?u({type:"success",message:`${o}!`}):u.warning(t.msg),a.value=!1,c()}catch{a.value=!1}},_=async s=>{var o;let e=await I(s);if(e.code!=0){u.warning(e.msg);return}e.data.goodProject=(o=e.data.goodProject)==null?void 0:o.split(",").map(t=>Number(t)),n.value=e.data};return B(()=>{r.query.id&&(d.value=r.query.id,_(r.query.id))}),(s,e)=>{const o=E("HZPageLayout");return F(),P(o,{isBack:!0,title:i(r).meta.title},{default:S(()=>[q(b,{value:i(n),"onUpdate:value":e[0]||(e[0]=t=>m(n)?n.value=t:null),loading:i(a),"onUpdate:loading":e[1]||(e[1]=t=>m(a)?a.value=t:null),onCancel:y,onSubmit:v},null,8,["value","loading"])]),_:1},8,["title"])}}});export{H as _};
