import{b as z}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{u as H}from"./useGetYear-5b3908a7-1782572373740v=1.0.0.js";import Z from"./index-e049e929-1782572373740v=1.0.0.js";import{y as $,c as V,r as s,m as K,al as a,z as p,I as y,J as t,R as l,a8 as g,a9 as _,u as e,A as I,Q as S,a4 as x,O as F,P as M,B as Q}from"./vendor-866bb149-1782572373740v=1.0.0.js";const W={gradeDemandType:[{required:!0,message:"\u8BF7\u9009\u62E9\u8D5B\u4E8B\u7C7B\u578B",trigger:"change"}],eventName:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D5B\u4E8B\u540D\u79F0",trigger:"blur"},{max:500,message:"\u6700\u591A 500 \u4E2A\u5B57\u7B26",trigger:"blur"}],sportsIds:[{required:!0,message:"\u8BF7\u9009\u62E9\u8FD0\u52A8\u9879\u76EE",trigger:"change"}],schoolYearId:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u5E74",trigger:"change"}],gradeRecordNum:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D5B\u4E8B\u6210\u7EE9",trigger:"blur"}]},X={class:"pt20 mt30"},te=$({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(k,{emit:N}){const A=z();let b=k;const i=N,r=V({get(){return Y(b.value)},set(n){i("update:value",n)}}),T=V({get(){return b.loading},set(n){i("update:loading",n)}}),B=s(),c=s({xs:24,sm:22,md:20,lg:14,xl:13});s({xs:24,sm:24,md:12,lg:12,xl:12}),s({xs:24,sm:22,md:18,lg:16,xl:8});const{academicYearOptions:R}=H(),O=s(A.getEnumListByKey("gradeType"));s([]),s([]);const P=()=>{},Y=n=>n,h=()=>JSON.parse(JSON.stringify(r.value)),v=n=>{n.validate(async(u,E)=>{if(u){let d=h();i("submit",d)}else{const d=Object.keys(E)[0];n.scrollToField(d)}})},q=()=>{i("cancel")};return K(()=>{}),(n,u)=>{const E=a("el-option"),d=a("el-select"),m=a("el-form-item"),f=a("PaCol"),w=a("el-radio"),U=a("el-radio-group"),j=a("el-input"),G=a("DictSelect"),J=a("PaRow"),D=a("HZStepItem"),C=a("el-button"),L=a("el-form");return p(),y(L,{model:e(r),ref_key:"formRef",ref:B,rules:e(W)},{default:t(()=>[l(D,{title:"\u57FA\u7840\u4FE1\u606F"},{default:t(()=>[l(J,null,{default:t(()=>[l(f,g(_(e(c))),{default:t(()=>[l(m,{label:"\u6240\u5C5E\u5B66\u5E74",prop:"schoolYearId"},{default:t(()=>[l(d,{modelValue:e(r).schoolYearId,"onUpdate:modelValue":u[0]||(u[0]=o=>e(r).schoolYearId=o),filterable:"",onChange:P,placeholder:"\u8BF7\u9009\u62E9\u5B66\u5E74",style:{width:"100%"}},{default:t(()=>[(p(!0),I(S,null,x(e(R),o=>(p(),y(E,{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),l(f,g(_(e(c))),{default:t(()=>[l(m,{label:"\u8D5B\u4E8B\u7C7B\u578B",prop:"gradeType"},{default:t(()=>[l(U,{modelValue:e(r).gradeType,"onUpdate:modelValue":u[1]||(u[1]=o=>e(r).gradeType=o)},{default:t(()=>[(p(!0),I(S,null,x(e(O),o=>(p(),y(w,{key:o.value,label:o.label,value:o.value},{default:t(()=>[F(M(o.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),l(f,g(_(e(c))),{default:t(()=>[l(m,{label:"\u8D5B\u4E8B\u540D\u79F0",prop:"eventName"},{default:t(()=>[l(j,{modelValue:e(r).eventName,"onUpdate:modelValue":u[2]||(u[2]=o=>e(r).eventName=o),placeholder:"\u8BF7\u8F93\u5165\u8D5B\u4E8B\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},16),l(f,g(_(e(c))),{default:t(()=>[l(m,{label:"\u8FD0\u52A8\u9879\u76EE",prop:"sportsIds"},{default:t(()=>[l(G,{dictType:"sprot_project",modelValue:e(r).sportsIds,"onUpdate:modelValue":u[3]||(u[3]=o=>e(r).sportsIds=o),placeholder:"\u8BF7\u9009\u62E9\u8D5B\u4E8B\u9879\u76EE(\u591A\u9879\u76EE\u8D5B\u4E8B\u652F\u6301\u591A\u9009)",isAll:!1,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1})]),_:1}),l(D,{title:"\u8D5B\u4E8B\u6210\u7EE9\u8BE6\u60C5"},{default:t(()=>[l(Z,{gradeId:e(r).gradeId,onSubmitBase:u[4]||(u[4]=o=>v(e(B)))},null,8,["gradeId"])]),_:1}),l(m,null,{default:t(()=>[Q("div",X,[l(C,{onClick:q},{default:t(()=>u[6]||(u[6]=[F("\u8FD4\u56DE",-1)])),_:1,__:[6]}),l(C,{type:"primary",loading:e(T),onClick:u[5]||(u[5]=o=>v(e(B)))},{default:t(()=>u[7]||(u[7]=[F("\u4FDD\u5B58",-1)])),_:1,__:[7]},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{te as _};
