import{I}from"./Imgs-fee891de-1779868775780v=1.0.0.js";import{a as D}from"./addOrganAccount-f8281166-1779868775780v=1.0.0.js";import{l as S,a as U,e as g,ah as i,m as k,M as N,O as l,q as O,U as t,u as a,S as p}from"./vendor-98154105-1779868775780v=1.0.0.js";import{_ as w}from"./_plugin-vue_export-helper-8c5478df-1779868775780v=1.0.0.js";import"./index-0f3e2c06-1779868775780v=1.0.0.js";import"./eleVendor-dbf96bf3-1779868775780v=1.0.0.js";import"./upload-a2386bf9-1779868775780v=1.0.0.js";import"./eleValidate-dfbd5aa5-1779868775780v=1.0.0.js";const A={class:"form\u2014container"},R=S({__name:"accountBaseInfo",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(b,{emit:v}){const d=U();let f=b;const m=v,n=g({get(){return y(f.value)},set(o){m("update:value",o)}}),B=g({get(){return f.loading},set(o){m("update:loading",o)}}),L=async o=>{o.validate(async(e,s)=>{if(e){let r=F();m("submit",r)}})},V=()=>{m("cancel")},y=o=>{let e=o,s=[];return e.avatar&&(s=[{name:String(e.avatar),url:e.avatar,imgPath:e.avatar}]),e.imagesList=s,e},F=()=>{let o=JSON.parse(JSON.stringify(n.value));o.imagesList;let e=o.imagesList.map(s=>s.imgPath);return o.avatar=e.join(","),o.imagesList&&delete o.imagesList,o};return(o,e)=>{const s=i("el-input"),r=i("el-form-item"),_=i("el-radio"),x=i("el-radio-group"),c=i("el-button"),C=i("el-form");return k(),N(C,{model:a(n),rules:a(D),ref_key:"ruleFormRef",ref:d,"scroll-to-error":!0,"label-width":"120px"},{default:l(()=>[O("div",A,[t(r,{label:"\u59D3\u540D",prop:"personnel_name"},{default:l(()=>[t(s,{modelValue:a(n).personnel_name,"onUpdate:modelValue":e[0]||(e[0]=u=>a(n).personnel_name=u),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(r,{label:"\u6027\u522B",prop:"sex"},{default:l(()=>[t(x,{modelValue:a(n).sex,"onUpdate:modelValue":e[1]||(e[1]=u=>a(n).sex=u)},{default:l(()=>[t(_,{label:1},{default:l(()=>[p("\u7537")]),_:1}),t(_,{label:2},{default:l(()=>[p("\u5973")]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(r,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:l(()=>[t(s,{modelValue:a(n).mobile,"onUpdate:modelValue":e[2]||(e[2]=u=>a(n).mobile=u),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"},null,8,["modelValue"])]),_:1}),t(r,{label:"\u5934\u50CF",prop:"imagesList"},{default:l(()=>[t(I,{fileList:a(n).imagesList,"onUpdate:fileList":e[3]||(e[3]=u=>a(n).imagesList=u),isFullUrl:!1,fileSize:5,limit:1,showTip:""},null,8,["fileList"])]),_:1}),t(r,null,{default:l(()=>[t(c,{type:"primary",loading:a(B),onClick:e[4]||(e[4]=u=>L(a(d)))},{default:l(()=>[p("\u63D0\u4EA4")]),_:1},8,["loading"]),t(c,{onClick:V},{default:l(()=>[p("\u53D6\u6D88")]),_:1})]),_:1})])]),_:1},8,["model","rules"])}}});const M=w(R,[["__scopeId","data-v-82a46abb"]]);export{M as default};
