import{_}from"./BaseForm.vue_vue_type_script_setup_true_lang-05c60824-1782729249161v=1.0.0.js";import{u as y,g as C}from"./offCampusGradeApi-ea6b84ca-1782729249161v=1.0.0.js";import{u as b}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as I}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as u}from"./eleVendor-5008d1ec-1782729249161v=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-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 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};
