import{u as q}from"./index-c87bcfde-1782468512657v=1.0.0.js";import{g as z}from"./collageManageApi-6fb2328f-1782468512657v=1.0.0.js";import{x as T,c as y,r as d,k as j,al as n,y as p,H as B,I as t,L as E,Q as a,a8 as x,a9 as N,u as o,z as A,P as J,a4 as U,A as H,M as V}from"./vendor-27e23c1b-1782468512657v=1.0.0.js";const Q={clubName:[{required:!0,message:"\u8BF7\u9009\u62E9\u4FF1\u4E50\u90E8\u540D\u79F0",trigger:"blur"}],collegeName:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u9662\u540D\u79F0",trigger:"change"}],collegeId:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u9662\u540D\u79F0",trigger:"change"}]},$={class:"pt20 mt30"},X=T({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(k,{emit:D}){q();let g=k;const c=D,s=y({get(){return w(g.value)},set(l){c("update:value",l)}}),h=y({get(){return g.loading},set(l){c("update:loading",l)}}),f=d(),_=d({xs:24,sm:22,md:20,lg:14,xl:13});d({xs:24,sm:24,md:12,lg:12,xl:12}),d({xs:24,sm:22,md:18,lg:16,xl:8});const F=d([]),I=()=>{},b=async l=>{const e=await z({page:1,size:999,collegeName:l});e.code===0&&(F.value=e.data.listData.map(r=>({label:r.collegeName,value:r.collegeId})))},w=l=>l,P=()=>JSON.parse(JSON.stringify(s.value)),M=l=>{l.validate(async(e,r)=>{if(e){let m=P();c("submit",m)}else{const m=Object.keys(r)[0];l.scrollToField(m)}})},L=()=>{c("cancel")};return j(()=>{b()}),(l,e)=>{const r=n("el-option"),m=n("el-select"),i=n("el-form-item"),C=n("PaCol"),O=n("el-input"),R=n("PaRow"),v=n("el-button"),S=n("el-form");return p(),B(S,{model:o(s),ref_key:"formRef",ref:f,rules:o(Q),"label-width":"160px"},{default:t(()=>[E(' <div class="divider mb30">\u57FA\u7840\u4FE1\u606F</div> '),a(R,null,{default:t(()=>[a(C,x(N(o(_))),{default:t(()=>[a(i,{label:"\u6240\u5C5E\u5B66\u9662",prop:"collegeId"},{default:t(()=>[a(m,{modelValue:o(s).collegeId,"onUpdate:modelValue":e[0]||(e[0]=u=>o(s).collegeId=u),filterable:"",onChange:I,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u5B66\u9662",style:{width:"100%"},remote:!0,"remote-method":b},{default:t(()=>[(p(!0),A(J,null,U(o(F),u=>(p(),B(r,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),a(C,x(N(o(_))),{default:t(()=>[a(i,{label:"\u4FF1\u4E50\u90E8\u540D\u79F0",prop:"clubName"},{default:t(()=>[E(" {{ form.schManagerType }} "),a(O,{modelValue:o(s).clubName,"onUpdate:modelValue":e[1]||(e[1]=u=>o(s).clubName=u),placeholder:"\u8BF7\u8F93\u5165\u4FF1\u4E50\u90E8\u540D\u79F0",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),a(i,null,{default:t(()=>[H("div",$,[a(v,{onClick:L},{default:t(()=>e[3]||(e[3]=[V("\u8FD4\u56DE",-1)])),_:1,__:[3]}),a(v,{type:"primary",loading:o(h),onClick:e[2]||(e[2]=u=>M(o(f)))},{default:t(()=>e[4]||(e[4]=[V("\u4FDD\u5B58",-1)])),_:1,__:[4]},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{X as _};
