import{_ as g}from"./BaseForm.vue_vue_type_script_setup_true_lang-05c60824-1782729249161v=1.0.0.js";import{a as v}from"./offCampusGradeApi-ea6b84ca-1782729249161v=1.0.0.js";import{u as _}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as C}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as u}from"./eleVendor-5008d1ec-1782729249161v=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-1e24e3ad-1782729249161v=1.0.0.js";import"./useGetYear-c4555ce2-1782729249161v=1.0.0.js";import"./base-ea2d5d04-1782729249161v=1.0.0.js";import"./index-8c73734a-1782729249161v=1.0.0.js";import"./useTable-cf8e962b-1782729249161v=1.0.0.js";import"./notData-926f7286-1782729249161v=1.0.0.js";import"./useHandleData-54f3fb4d-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=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};
