import v from"./BaseForm-5822065e-1785478469326v=1.0.0.js";import{u as x,g as B}from"./exerciseConfApi-049fdfec-1785478469326v=1.0.0.js";import{u as C}from"./useFormEdit-c3e1ba91-1785478469326v=1.0.0.js";import{b as F}from"./index-5a47c360-1785478469326v=1.0.0.js";import{E as n}from"./eleVendor-bc05bc4d-1785478469326v=1.0.0.js";import{x as f,r as l,k as _,al as b,y as E,H as w,I as k,Q as T,u as m,l as c}from"./vendor-46662d77-1785478469326v=1.0.0.js";import"./eleValidate-142411d7-1785478469326v=1.0.0.js";import"./keepAlive-4a384a77-1785478469326v=1.0.0.js";const q=f({name:"exerciseConfEdit"}),Z=f({...q,setup(H){const{closeCurrent:i}=C(),d=l(null),t=l({exerciseType:[],fullNum:"",schoolYearId:"",semester:"",updateTime:"",updater:""}),a=l(!1),p=()=>{i()},g=async o=>{a.value=!0;try{let e=x,u="\u66F4\u65B0\u6210\u529F",s=await e(o);s.code==0?n({type:"success",message:`${u}!`}):n.warning(s.msg),a.value=!1,i()}catch{a.value=!1}},r=F(),y=async o=>{let e=await B(o);if(e.code!=0){n.warning(e.msg);return}e.data.exerciseTypes=e.data.exerciseTypes.split(","),t.value=e.data};return _(()=>{r.query.id&&(d.value=r.query.id,y(r.query.id))}),(o,e)=>{const u=b("HZPageLayout");return E(),w(u,{isBack:!0,title:"\u7F16\u8F91\u8BFE\u5916\u953B\u70BC\u8BB0\u5F55"},{default:k(()=>[T(v,{value:m(t),"onUpdate:value":e[0]||(e[0]=s=>c(t)?t.value=s:null),loading:m(a),"onUpdate:loading":e[1]||(e[1]=s=>c(a)?a.value=s:null),onCancel:p,onSubmit:g},null,8,["value","loading"])]),_:1})}}});export{Z as default};
