import{u as v}from"./index-996f931c-1782111760424v=1.0.0.js";import{m as k,f as p,a as s,e as D,ai as o,p as S,M as O,O as a,t as c,U as l,S as f,u as n}from"./vendor-7f807b9d-1782111760424v=1.0.0.js";import"./eleVendor-99a45232-1782111760424v=1.0.0.js";const N={year:[{max:255,message:"\u6700\u591A 255 \u4E2A\u5B57\u7B26",trigger:"blur"}],title:[{required:!0,message:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u540D\u79F0",trigger:"blur"},{max:255,message:"\u6700\u591A 255 \u4E2A\u5B57\u7B26",trigger:"blur"}],specialWorkType:[{required:!0,message:"\u8BF7\u9009\u62E9\u63D0\u4EA4\u5355\u4F4D",trigger:"change"}],attachments:[{required:!0,message:"\u8BF7\u9009\u62E9\u7EA7\u522B",trigger:"change"}],provinceUnitStats:[],statusCn:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u72B6\u6001",trigger:"blur"},{max:50,message:"\u6700\u591A 50 \u4E2A\u5B57\u7B26",trigger:"blur"}],cityOrgStats:[{max:255,message:"\u6700\u591A 255 \u4E2A\u5B57\u7B26",trigger:"blur"}]},q={class:"pt20 mt30"},J=k({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(B,{emit:F}){v();let i=B;const r=F,d=p({get(){return y(i.value)},set(t){r("update:value",t)}}),_=p({get(){return i.loading},set(t){r("update:loading",t)}}),g=s();s({xs:24,sm:22,md:20,lg:14,xl:13}),s({xs:24,sm:24,md:12,lg:12,xl:12}),s({xs:24,sm:22,md:18,lg:16,xl:8});const y=t=>t,b=()=>JSON.parse(JSON.stringify(d.value)),x=t=>{t.validate(async(e,m)=>{if(e){let u=b();u.fileStr=JSON.stringify(u.attachments||[]),r("submit",u)}else{const u=Object.keys(m)[0];t.scrollToField(u)}})},A=()=>{r("cancel")};return D(()=>{}),(t,e)=>{const m=o("PaRow"),u=o("el-button"),C=o("el-form-item"),E=o("el-form");return S(),O(E,{model:n(d),ref_key:"formRef",ref:g,rules:n(N),"label-width":"160px"},{default:a(()=>[e[3]||(e[3]=c("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),l(m),l(C,null,{default:a(()=>[c("div",q,[l(u,{onClick:A},{default:a(()=>e[1]||(e[1]=[f("\u8FD4\u56DE")])),_:1}),l(u,{type:"primary",loading:n(_),onClick:e[0]||(e[0]=w=>x(n(g)))},{default:a(()=>e[2]||(e[2]=[f("\u4FDD\u5B58")])),_:1},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{J as default};
