import{_}from"./BaseForm.vue_vue_type_script_setup_true_lang-b3ff6459-1782572373740v=1.0.0.js";import{u as y,g as C}from"./offCampusGradeApi-a03fdc28-1782572373740v=1.0.0.js";import{u as b}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as I}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 l,m as w,al as k,z as B,I as E,J as F,R as N,u as m,k as d}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./useGetYear-5b3908a7-1782572373740v=1.0.0.js";import"./base-f440e6a9-1782572373740v=1.0.0.js";import"./index-e049e929-1782572373740v=1.0.0.js";import"./useTable-34acff72-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./useHandleData-64cc6aad-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";const R=p({name:"offCampusGradeEdit"}),J=p({...R,setup(q){const{closeCurrent:i}=b(),f=l(null),s=l({gradeDemandType:"",eventName:"",sportsIds:"",schoolYearId:"",gradeRecordNum:""}),a=l(!1),o=I(),c=()=>{i()},g=async r=>{a.value=!0;try{let e=y,n="\u66F4\u65B0\u6210\u529F",t=await e(r);t.code==0?(u({type:"success",message:`${n}!`}),i()):u.warning(t.msg),a.value=!1}catch{a.value=!1}},v=async r=>{let e=await C(r);if(e.code!=0){u.warning(e.msg);return}e.data.sportsIds=e.data.sportsIds?Number(e.data.sportsIds):"",s.value=e.data};return w(()=>{o.query.id&&(f.value=o.query.id,v(o.query.id))}),(r,e)=>{const n=k("HZPageLayout");return B(),E(n,{title:m(o).meta.title,isBack:!0},{default:F(()=>[N(_,{value:m(s),"onUpdate:value":e[0]||(e[0]=t=>d(s)?s.value=t:null),loading:m(a),"onUpdate:loading":e[1]||(e[1]=t=>d(a)?a.value=t:null),onCancel:c,onSubmit:g},null,8,["value","loading"])]),_:1},8,["title"])}}});export{J as default};
