import{_ as g}from"./BaseForm.vue_vue_type_script_setup_true_lang-b3ff6459-1782572373740v=1.0.0.js";import{a as v}from"./offCampusGradeApi-a03fdc28-1782572373740v=1.0.0.js";import{u as _}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 d,r as n,al as y,z as I,I as b,J as B,R as F,u as l,k as i}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 k=d({name:"offCampusGradeAdd"}),z=d({...k,setup(D){const{closeCurrent:m}=_(),o=n({gradeDemandType:"",eventName:"",sportsIds:"",schoolYearId:"",gradeRecordNum:"",gradeId:""}),e=n(!1),f=()=>{m()};n("");const p=C(),c=async s=>{e.value=!0;try{let a=v,r="\u65B0\u589E\u6210\u529F";if(s.gradeId){u.success("\u5DF2\u4FDD\u5B58"),e.value=!1,m();return}let t=await a(s);t.code==0?(u({type:"success",message:`${r}!`}),o.value.gradeId=t.data):u.warning(t.msg),e.value=!1}catch{e.value=!1}};return(s,a)=>{const r=y("HZPageLayout");return I(),b(r,{title:l(p).meta.title,isBack:!0},{default:B(()=>[F(g,{value:l(o),"onUpdate:value":a[0]||(a[0]=t=>i(o)?o.value=t:null),loading:l(e),"onUpdate:loading":a[1]||(a[1]=t=>i(e)?e.value=t:null),onCancel:f,onSubmit:c},null,8,["value","loading"])]),_:1},8,["title"])}}});export{z as default};
