import{_ as E,d as G,H,r as g,o as J,f as a,g as n,K as u,m as s,l as d,h as _,G as c,L as f,$ as x,p as v,t as b,k as p,i as z,j as A}from"./index.9fabe127.js";import{h as I,f as O,c as k,b as Q,e as W}from"./uploadAction.3a8ed42d.js";const X={class:"el-upload__tip"},Y=G({name:"newModuleForm"}),Z=Object.assign(Y,{props:{data:{type:Object,default:null}},setup(w,{expose:U}){const M=H.dictStore.uploadUrl,i=w,l=g({formList:[]}),y=g(),N=V=>{y.value.validate(r=>{V(r)})};return J(()=>{l.value=i.data}),U({validForm:N,formData:l}),(V,r)=>{var L;const j=a("el-input"),h=a("el-input-number"),D=a("el-radio"),B=a("el-radio-group"),C=a("el-checkbox"),S=a("el-checkbox-group"),P=a("el-button"),$=a("el-upload"),q=a("el-form-item"),K=a("el-col"),R=a("el-row"),T=a("el-form");return l.value&&((L=l.value.formList)==null?void 0:L.length)?(n(),u(T,{key:0,ref_key:"formRef",ref:y,model:l.value,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":"",onSubmit:r[1]||(r[1]=x(()=>{},["prevent"]))},{default:s(()=>[d(R,{gutter:40},{default:s(()=>[(n(!0),_(c,null,f(i.data&&i.data.formList,(t,o)=>(n(),u(K,{key:o,span:12},{default:s(()=>[d(q,{label:t.name,prop:`formList[${o}].value`,rules:[{required:t.props.required,message:"\u8BF7\u5B8C\u5584\u5FC5\u586B\u5185\u5BB9"}]},{default:s(()=>[t.props.type==="\u8F93\u5165"?(n(),u(j,{key:0,modelValue:l.value.formList[o].value,"onUpdate:modelValue":e=>l.value.formList[o].value=e,placeholder:"\u8BF7\u8F93\u5165",maxlength:t.props.maxLength},null,8,["modelValue","onUpdate:modelValue","maxlength"])):t.props.type==="\u6570\u503C\u8F93\u5165"?(n(),u(h,{key:1,modelValue:l.value.formList[o].value,"onUpdate:modelValue":e=>l.value.formList[o].value=e,placeholder:"\u8BF7\u8F93\u5165",min:t.props.minNumber,max:t.props.maxNumber,controls:!1,onMousewheel:r[0]||(r[0]=x(()=>{},["prevent"]))},null,8,["modelValue","onUpdate:modelValue","min","max"])):t.props.type==="\u5355\u9009"?(n(),u(B,{key:2,modelValue:l.value.formList[o].value,"onUpdate:modelValue":e=>l.value.formList[o].value=e},{default:s(()=>[(n(!0),_(c,null,f(t.props.options,(e,m)=>(n(),u(D,{key:m,label:e.name},{default:s(()=>[v(b(e.name),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.props.type==="\u591A\u9009"?(n(),u(S,{key:3,modelValue:l.value.formList[o].value,"onUpdate:modelValue":e=>l.value.formList[o].value=e},{default:s(()=>[(n(!0),_(c,null,f(t.props.options,(e,m)=>(n(),u(C,{key:m,label:e.name},{default:s(()=>[v(b(e.name),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):(n(),u($,{key:4,"file-list":l.value.formList[o].value,"onUpdate:fileList":e=>l.value.formList[o].value=e,class:"w-full",limit:t.props.fileNumber,action:p(M),"on-success":e=>p(I)(e,l.value.formList[o].value,!1),"before-upload":e=>p(O)(e,{types:p(k)}),accept:p(k).map(e=>`.${e}`).join(","),"on-preview":p(Q)},{tip:s(()=>[z("div",X," \u652F\u6301"+b(p(W))+"\u6587\u4EF6 ",1)]),default:s(()=>[d(P,{type:"primary",plain:""},{default:s(()=>[v("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:2},1032,["file-list","onUpdate:fileList","limit","action","on-success","before-upload","accept","on-preview"]))]),_:2},1032,["label","prop","rules"])]),_:2},1024))),128))]),_:1})]),_:1},8,["model"])):A("v-if",!0)}}}),le=E(Z,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/declareManage/projectDeclare/declarePage/components/newModuleForm.vue"]]);export{le as default};
