import{b as D}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{y as S,c as y,r as g,m as P,al as d,z as R,I as w,J as t,B as b,R as u,a8 as i,a9 as f,u as l,O as C}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";const N={type:[],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0",trigger:"blur"},{max:255,message:"\u6700\u591A 255 \u4E2A\u5B57\u7B26",trigger:"blur"}],dictTypeSign:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u8BC6",trigger:"blur"},{max:50,message:"\u6700\u591A 50 \u4E2A\u5B57\u7B26",trigger:"blur"}],status:[],creatorOrganUnitType:[{max:200,message:"\u6700\u591A 200 \u4E2A\u5B57\u7B26",trigger:"blur"}]},J={class:"pt20 mt30"},z=S({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(V,{emit:x}){D();let _=V;const B=x,o=y({get(){return A(_.value)},set(a){B("update:value",a)}}),v=y({get(){return _.loading},set(a){B("update:loading",a)}}),c=g();g({xs:24,sm:22,md:20,lg:14,xl:13});const m=g({xs:24,sm:24,md:12,lg:12,xl:12});g({xs:24,sm:22,md:18,lg:16,xl:8});const A=a=>a,E=()=>JSON.parse(JSON.stringify(o.value)),T=a=>{a.validate(async(e,s)=>{if(e){let n=E();B("submit",n)}else{const n=Object.keys(s)[0];a.scrollToField(n)}})},O=()=>{B("cancel")};return P(()=>{}),(a,e)=>{const s=d("el-input"),n=d("el-form-item"),p=d("PaCol"),U=d("PaRow"),F=d("el-button"),k=d("el-form");return R(),w(k,{model:l(o),ref_key:"formRef",ref:c,rules:l(N),"label-width":"160px"},{default:t(()=>[e[8]||(e[8]=b("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),u(U,null,{default:t(()=>[u(p,i(f(l(m))),{default:t(()=>[u(n,{label:"\u7C7B\u578B ",prop:"type"},{default:t(()=>[u(s,{modelValue:l(o).type,"onUpdate:modelValue":e[0]||(e[0]=r=>l(o).type=r),placeholder:"\u8BF7\u8F93\u5165\u7C7B\u578B "},null,8,["modelValue"])]),_:1})]),_:1},16),u(p,i(f(l(m))),{default:t(()=>[u(n,{label:"\u540D\u79F0",prop:"name"},{default:t(()=>[u(s,{modelValue:l(o).name,"onUpdate:modelValue":e[1]||(e[1]=r=>l(o).name=r),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},16),u(p,i(f(l(m))),{default:t(()=>[u(n,{label:"\u5B57\u5178\u6807\u8BC6",prop:"dictTypeSign"},{default:t(()=>[u(s,{modelValue:l(o).dictTypeSign,"onUpdate:modelValue":e[2]||(e[2]=r=>l(o).dictTypeSign=r),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u8BC6"},null,8,["modelValue"])]),_:1})]),_:1},16),u(p,i(f(l(m))),{default:t(()=>[u(n,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[u(s,{modelValue:l(o).status,"onUpdate:modelValue":e[3]||(e[3]=r=>l(o).status=r),placeholder:"\u8BF7\u8F93\u5165\u72B6\u6001"},null,8,["modelValue"])]),_:1})]),_:1},16),u(p,i(f(l(m))),{default:t(()=>[u(n,{label:"\u521B\u5EFA\u4EBA",prop:"creatorOrganUnitType"},{default:t(()=>[u(s,{modelValue:l(o).creatorOrganUnitType,"onUpdate:modelValue":e[4]||(e[4]=r=>l(o).creatorOrganUnitType=r),placeholder:"\u8BF7\u8F93\u5165\u521B\u5EFA\u4EBA"},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),u(n,null,{default:t(()=>[b("div",J,[u(F,{onClick:O},{default:t(()=>e[6]||(e[6]=[C("\u8FD4\u56DE",-1)])),_:1,__:[6]}),u(F,{type:"primary",loading:l(v),onClick:e[5]||(e[5]=r=>T(l(c)))},{default:t(()=>e[7]||(e[7]=[C("\u4FDD\u5B58",-1)])),_:1,__:[7]},8,["loading"])])]),_:1})]),_:1,__:[8]},8,["model","rules"])}}});export{z as _};
