import{u as I,C as U,A as S}from"./useSignupTemplate-94c0c1aa-1782572373740v=1.0.0.js";import{y as T,r as a,c as J,al as i,z as C,I as B,J as c,M as v,B as Q,R as m,u as t,A as R,Q as w,a4 as h,O as j,k as A}from"./vendor-866bb149-1782572373740v=1.0.0.js";const M=T({__name:"DoubleFormCom",props:{value:Object},emits:["update:value"],setup(E,{emit:g}){const{commonFields:k}=I(),_=E,V=a(),u=J({get(){return D(_.value)},set(o){x("update:value",o)}}),r=a(!1),b={fieldConfId:null,trainId:null,fieldName:"",fieldValue:"",fieldType:"input",prompt:"",isFill:0,isUnique:0,isLike:0,selectOption:[]},s=a({...b});a(null);const F=a(null),y=o=>{F.value===null?u.value.customFieldConfList.push(o):u.value.customFieldConfList[F.value]=o},L=(o,e)=>{var d,f;F.value=o,s.value=JSON.parse(JSON.stringify(u.value.customFieldConfList[o]));const n=JSON.parse(JSON.stringify(u.value.customFieldConfList[o]));((d=n.selectValues)==null?void 0:d.length)>0&&(n.selectOption=(f=n.selectValues)==null?void 0:f.map(p=>({label:p,value:p}))),s.value=n,r.value=!0},x=g,D=o=>o,O=o=>{s.value={...b},r.value=!0};return(o,e)=>{const n=i("el-checkbox"),d=i("el-checkbox-group"),f=i("el-form-item"),p=i("el-button"),N=i("el-form");return C(),B(N,{model:t(u),ref_key:"formRef",ref:V},{default:c(()=>[v("  \u62A5\u540D\u4EBA\u57FA\u672C\u4FE1\u606F"),e[7]||(e[7]=Q("div",{class:"divider mb8"},"\u62A5\u540D\u6A21\u677F\u8BBE\u7F6E",-1)),m(f,{label:"\u53CC\u4EBA\u53C2\u8D5B\u4EBA\u4FE1\u606F",prop:"personCustomInfo"},{default:c(()=>[m(d,{modelValue:t(u).commonUseFieldDTOList,"onUpdate:modelValue":e[0]||(e[0]=l=>t(u).commonUseFieldDTOList=l)},{default:c(()=>[(C(!0),R(w,null,h(t(k),l=>(C(),B(n,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),v(" {{ form.customFieldConfList }} "),m(U,{value:t(u).customFieldConfList,"onUpdate:value":e[1]||(e[1]=l=>t(u).customFieldConfList=l),onEdit:e[2]||(e[2]=l=>L(l,"register1")),showEmpty:!1},null,8,["value"]),m(p,{onClick:e[3]||(e[3]=l=>O("register1"))},{default:c(()=>e[6]||(e[6]=[j(" \u81EA\u5B9A\u4E49\u6DFB\u52A0\u5185\u5BB9 ",-1)])),_:1,__:[6]}),v(` <el-form-item label="\u53C2\u8D5B\u4EBA2\u4FE1\u606F" prop="personCustomInfo2">\r
			<el-checkbox-group v-model="form.personCustomInfo2.commonUseFieldDTOList">\r
				<el-checkbox v-for="item in commonFields" :key="item.value" :label="item.label" :value="item.value" />\r
			</el-checkbox-group>\r
		</el-form-item>\r
		<CustomForm\r
			v-model:value="form.personCustomInfo2.customFieldConfList"\r
			@edit="index => handleEditCustomForm(index, 'register2')"\r
			:showEmpty="false"\r
		/>\r
		<el-button @click="handleAddQuestion('register2')"> \u81EA\u5B9A\u4E49\u6DFB\u52A0\u5185\u5BB9 </el-button> `),v(" \u81EA\u5B9A\u4E49\u8868\u5355\u6DFB\u52A0\u5185\u5BB9 "),m(S,{visible:t(r),"onUpdate:visible":e[4]||(e[4]=l=>A(r)?r.value=l:null),value:t(s),"onUpdate:value":e[5]||(e[5]=l=>A(s)?s.value=l:null),onSubmit:y},null,8,["visible","value"])]),_:1,__:[7]},8,["model"])}}});export{M as _};
