import{_ as g}from"./BaseForm.vue_vue_type_script_setup_true_lang-1fa35ff4-1782572373740v=1.0.0.js";import{a as _}from"./exerciseApi-1babb46d-1782572373740v=1.0.0.js";import{u as v}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as y}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as i}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as c,r,al as b,z as C,I as x,J as E,R as k,u as n,k as m}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./eleValidate-aae13e4d-1782572373740v=1.0.0.js";import"./useGetYear-5b3908a7-1782572373740v=1.0.0.js";import"./base-f440e6a9-1782572373740v=1.0.0.js";import"./eventListApi-0bc79350-1782572373740v=1.0.0.js";import"./eventProjectAndTypeApi-0c7a84fc-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";const B=c({name:"exerciseAdd"}),I=c({...B,setup(w){const{closeCurrent:l}=v(),o=r({type:"",name:"",dictTypeSign:"",status:"",creatorOrganUnitType:""}),t=r(!1),p=()=>{l()};r("");const f=y(),d=async u=>{t.value=!0;try{let e=_,s="\u65B0\u589E\u6210\u529F",a=await e(u);a.code==0?(i({type:"success",message:`${s}!`}),l()):i.warning(a.msg),t.value=!1}catch{t.value=!1}};return(u,e)=>{const s=b("HZPageLayout");return C(),x(s,{isBack:!0,title:n(f).meta.title},{default:E(()=>[k(g,{value:n(o),"onUpdate:value":e[0]||(e[0]=a=>m(o)?o.value=a:null),loading:n(t),"onUpdate:loading":e[1]||(e[1]=a=>m(t)?t.value=a:null),onCancel:p,onSubmit:d},null,8,["value","loading"])]),_:1},8,["title"])}}});export{I as default};
