import{d as R,a as b,r as i,b as U,e as r,o as B,f as E,w as l,n as v,g as o,W as f,h as t,c as Y,L as h,M as L,l as V}from"./index-17740f03-1778929502341v=1.0.0.js";const S={administrationNoticeTypeId:[{required:!0,message:"\u8BF7\u9009\u62E9\u8868\u552F\u4E00id",trigger:"change"}],operator:[{required:!0,message:"\u8BF7\u8F93\u5165\u521B\u5EFA\u4EBA",trigger:"blur"}],type:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u7C7B\u578B",trigger:"blur"}],cTime:[{required:!0,message:"\u8BF7\u9009\u62E9\u521B\u5EFA\u65F6\u95F4",trigger:"change"}]},j={class:"pt20 mt30"},W=R({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(A,{emit:T}){let _=A;const m=T,a=b({get(){return D(_.value)},set(n){m("update:value",n)}}),k=b({get(){return _.loading},set(n){m("update:loading",n)}}),g=i();i({xs:24,sm:22,md:20,lg:14,xl:13});const p=i({xs:24,sm:24,md:12,lg:12,xl:12});i({xs:24,sm:22,md:18,lg:16,xl:8});const x=i([]),N=()=>{},D=n=>n,P=()=>JSON.parse(JSON.stringify(a.value)),w=n=>{n.validate(async(e,F)=>{if(e){let s=P();m("submit",s)}else{const s=Object.keys(F)[0];n.scrollToField(s)}})},I=()=>{m("cancel")};return U(()=>{}),(n,e)=>{const F=r("el-option"),s=r("el-select"),d=r("el-form-item"),c=r("PaCol"),y=r("el-input"),O=r("el-date-picker"),q=r("PaRow"),C=r("el-button"),M=r("el-form");return B(),E(M,{model:t(a),ref_key:"formRef",ref:g,rules:t(S),"label-width":"160px"},{default:l(()=>[e[7]||(e[7]=v("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),o(q,null,{default:l(()=>[o(c,f({PaCol:""},t(p)),{default:l(()=>[o(d,{label:"\u8868\u552F\u4E00id",prop:"administrationNoticeTypeId"},{default:l(()=>[o(s,{modelValue:t(a).administrationNoticeTypeId,"onUpdate:modelValue":e[0]||(e[0]=u=>t(a).administrationNoticeTypeId=u),onChange:N,placeholder:"\u8BF7\u9009\u62E9\u8868\u552F\u4E00id",style:{width:"100%"}},{default:l(()=>[(B(!0),Y(h,null,L(t(x),u=>(B(),E(F,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),o(c,f({PaCol:""},t(p)),{default:l(()=>[o(d,{label:"\u521B\u5EFA\u4EBA",prop:"operator"},{default:l(()=>[o(y,{modelValue:t(a).operator,"onUpdate:modelValue":e[1]||(e[1]=u=>t(a).operator=u),placeholder:"\u8BF7\u8F93\u5165\u521B\u5EFA\u4EBA"},null,8,["modelValue"])]),_:1})]),_:1},16),o(c,f({PaCol:""},t(p)),{default:l(()=>[o(d,{label:"\u6D41\u7A0B\u7C7B\u578B",prop:"type"},{default:l(()=>[o(y,{modelValue:t(a).type,"onUpdate:modelValue":e[2]||(e[2]=u=>t(a).type=u),placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u7C7B\u578B"},null,8,["modelValue"])]),_:1})]),_:1},16),o(c,f({PaCol:""},t(p)),{default:l(()=>[o(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"cTime"},{default:l(()=>[o(O,{modelValue:t(a).cTime,"onUpdate:modelValue":e[3]||(e[3]=u=>t(a).cTime=u),type:"date","value-format":"YYYY-MM-DD",placeholder:"\u8BF7\u9009\u62E9\u521B\u5EFA\u65F6\u95F4",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),o(d,null,{default:l(()=>[v("div",j,[o(C,{onClick:I},{default:l(()=>e[5]||(e[5]=[V("\u8FD4\u56DE")])),_:1}),o(C,{type:"primary",loading:t(k),onClick:e[4]||(e[4]=u=>w(t(g)))},{default:l(()=>e[6]||(e[6]=[V("\u4FDD\u5B58")])),_:1},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{W as default};
