import{x as D,c,r as a,k as j,al as r,y as E,H as N,I as n,A as f,Q as u,M as g,u as l}from"./vendor-6ae0c374-1783405707921v=1.0.0.js";import{u as h,_ as w}from"./index-71d7b18c-1783405707921v=1.0.0.js";import"./eleVendor-d42abce8-1783405707921v=1.0.0.js";const M={majorName:[{max:200,message:"\u6700\u591A 200 \u4E2A\u5B57\u7B26",trigger:"blur"}],majorId:[{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"}]},A={class:"pt20 mt30"},O=D({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(_,{emit:B}){h();let d=_;const s=B,i=c({get(){return v(d.value)},set(o){s("update:value",o)}}),F=c({get(){return d.loading},set(o){s("update:loading",o)}}),p=a();a({xs:24,sm:22,md:20,lg:14,xl:13}),a({xs:24,sm:24,md:12,lg:12,xl:12}),a({xs:24,sm:22,md:18,lg:16,xl:8});const v=o=>o,x=()=>JSON.parse(JSON.stringify(i.value)),y=o=>{o.validate(async(e,m)=>{if(e){let t=x();s("submit",t)}else{const t=Object.keys(m)[0];o.scrollToField(t)}})},b=()=>{s("cancel")};return j(()=>{}),(o,e)=>{const m=r("PaRow"),t=r("el-button"),C=r("el-form-item"),k=r("el-form");return E(),N(k,{model:l(i),ref_key:"formRef",ref:p,rules:l(M),"label-width":"160px"},{default:n(()=>[e[3]||(e[3]=f("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),u(m),u(C,null,{default:n(()=>[f("div",A,[u(t,{onClick:b},{default:n(()=>e[1]||(e[1]=[g("\u8FD4\u56DE",-1)])),_:1,__:[1]}),u(t,{type:"primary",loading:l(F),onClick:e[0]||(e[0]=R=>y(l(p)))},{default:n(()=>e[2]||(e[2]=[g("\u4FDD\u5B58",-1)])),_:1,__:[2]},8,["loading"])])]),_:1})]),_:1,__:[3]},8,["model","rules"])}}}),q=w(O,[["__file","D:/desktop/huaZhong/huazhong-common/apps/vue-admin/src/views/baseManage/majorManage/components/BaseForm.vue"]]);export{q as default};
