import{x as S,c as B,r as d,k as q,al as n,y as p,H as y,I as t,L as E,Q as a,a8 as x,a9 as h,u as o,z as T,P as j,a4 as A,A as J,M as N}from"./vendor-6ae0c374-1783405707921v=1.0.0.js";import{u as U,_ as H}from"./index-71d7b18c-1783405707921v=1.0.0.js";import{g as Q}from"./collageManageApi-e21931eb-1783405707921v=1.0.0.js";import"./eleVendor-d42abce8-1783405707921v=1.0.0.js";const Z={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"},G=S({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(k,{emit:D}){U();let g=k;const c=D,s=B({get(){return I(g.value)},set(l){c("update:value",l)}}),V=B({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([]),w=()=>{},b=async l=>{const e=await Q({page:1,size:999,collegeName:l});e.code===0&&(F.value=e.data.listData.map(r=>({label:r.collegeName,value:r.collegeId})))},I=l=>l,M=()=>JSON.parse(JSON.stringify(s.value)),P=l=>{l.validate(async(e,r)=>{if(e){let m=M();c("submit",m)}else{const m=Object.keys(r)[0];l.scrollToField(m)}})},L=()=>{c("cancel")};return q(()=>{b()}),(l,e)=>{const r=n("el-option"),m=n("el-select"),i=n("el-form-item"),v=n("PaCol"),O=n("el-input"),R=n("PaRow"),C=n("el-button"),z=n("el-form");return p(),y(z,{model:o(s),ref_key:"formRef",ref:f,rules:o(Z),"label-width":"160px"},{default:t(()=>[E(' <div class="divider mb30">\u57FA\u7840\u4FE1\u606F</div> '),a(R,null,{default:t(()=>[a(v,x(h(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:w,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u5B66\u9662",style:{width:"100%"},remote:!0,"remote-method":b},{default:t(()=>[(p(!0),T(j,null,A(o(F),u=>(p(),y(r,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),a(v,x(h(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(()=>[J("div",$,[a(C,{onClick:L},{default:t(()=>e[3]||(e[3]=[N("\u8FD4\u56DE",-1)])),_:1,__:[3]}),a(C,{type:"primary",loading:o(V),onClick:e[2]||(e[2]=u=>P(o(f)))},{default:t(()=>e[4]||(e[4]=[N("\u4FDD\u5B58",-1)])),_:1,__:[4]},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}}),ee=H(G,[["__file","D:/desktop/huaZhong/huazhong-common/apps/vue-admin/src/views/baseManage/clubManage/components/BaseForm.vue"]]);export{ee as default};
