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