import{_}from"./BaseForm.vue_vue_type_script_setup_true_lang-1fa35ff4-1782572373740v=1.0.0.js";import{u as v,b}from"./exerciseApi-1babb46d-1782572373740v=1.0.0.js";import{u as x}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as C}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as u}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as p,r as i,m as E,al as w,z as k,I as B,J as F,R as q,u as l,k as c}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 L=p({name:"exerciseEdit"}),N=p({...L,setup(R){const{closeCurrent:m}=x(),f=i(null),o=i({type:"",name:"",dictTypeSign:"",status:"",creatorOrganUnitType:""}),t=i(!1),s=C(),d=()=>{m()},g=async r=>{t.value=!0;try{let e=v,n="\u66F4\u65B0\u6210\u529F",a=await e(r);a.code==0?u({type:"success",message:`${n}!`}):u.warning(a.msg),t.value=!1,m()}catch{t.value=!1}},y=async r=>{let e=await b(r);if(e.code!=0){u.warning(e.msg);return}o.value=e.data};return E(()=>{s.query.id&&(f.value=s.query.id,y(s.query.id))}),(r,e)=>{const n=w("HZPageLayout");return k(),B(n,{isBack:!0,title:l(s).meta.title},{default:F(()=>[q(_,{value:l(o),"onUpdate:value":e[0]||(e[0]=a=>c(o)?o.value=a:null),loading:l(t),"onUpdate:loading":e[1]||(e[1]=a=>c(t)?t.value=a:null),onCancel:d,onSubmit:g},null,8,["value","loading"])]),_:1},8,["title"])}}});export{N as default};
