import y from"./BaseForm-2e045d54-1785478469326v=1.0.0.js";import{a as v,g as F}from"./sportsTargetApi-e7a26b67-1785478469326v=1.0.0.js";import{u as b}from"./useFormEdit-c3e1ba91-1785478469326v=1.0.0.js";import{b as C}from"./index-5a47c360-1785478469326v=1.0.0.js";import{E as u}from"./eleVendor-bc05bc4d-1785478469326v=1.0.0.js";import{x as c,r as n,k as I,al as _,y as q,H as E,I as L,Q as B,u as i,l as d}from"./vendor-46662d77-1785478469326v=1.0.0.js";import"./keepAlive-4a384a77-1785478469326v=1.0.0.js";const T=c({name:"sportsTargetEdit"}),H=c({...T,setup(w){const{closeCurrent:m}=b();n(null);const s=n({semester:"0",updater:"",updateTime:"",schoolYearName:"",synTargetConfAddReqVOList:[{}],totalVoList:{collegeId:0}}),a=n(!1),f=()=>{m()},g=async l=>{a.value=!0;try{let e=v,o="\u66F4\u65B0\u6210\u529F",t=await e(l);t.code==0?u({type:"success",message:`${o}!`}):u.warning(t.msg),a.value=!1,m()}catch{a.value=!1}},r=C(),p=async l=>{var o;let e=await F({semester:r.query.semester,schoolYearId:r.query.schoolYearId});if(e.code!=0){u.warning(e.msg);return}s.value={synTargetConfAddReqVOList:e.data.filter(t=>t.collegeId!=0),schoolYearId:Number(r.query.schoolYearId),semester:r.query.semester,totalVoList:(o=e.data.filter(t=>t.collegeId==0))==null?void 0:o[0]},s.value};return I(()=>{p(r.query.id)}),(l,e)=>{const o=_("HZPageLayout");return q(),E(o,{isBack:!0,title:"\u7F16\u8F91\u4F53\u80B2\u5DE5\u4F5C\u76EE\u6807"},{default:L(()=>[B(y,{value:i(s),"onUpdate:value":e[0]||(e[0]=t=>d(s)?s.value=t:null),loading:i(a),"onUpdate:loading":e[1]||(e[1]=t=>d(a)?a.value=t:null),onCancel:f,onSubmit:g},null,8,["value","loading"])]),_:1})}}});export{H as default};
