import{g as _,u as w}from"./account.d4c47bfc.js";import{r as b,R as I,k as R,a as x,b as m,o as N,c as P,d as r,e as s,g as t,a2 as U,f as p,K as C,H as h,ap as B,S as V}from"./index.699f1124.js";import{E as A}from"./index.581a1547.js";const S={class:"app-container"},z=p("p",null,[p("b",null,"\u57FA\u672C\u8D44\u6599")],-1),W=h("\u63D0\u4EA4"),H=p("p",null,[p("b",null,"\u4E13\u5BB6\u8D44\u6599")],-1),K=h("\u63D0\u4EA4"),G={__name:"basicInfo",setup(L){const v=b({PersonalInfoForm:{},queryParams:{pageNum:1,pageSize:10,postCode:void 0},expertForm:{gender:1},rules:{name:[{required:!0,message:"\u516C\u53F8\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],dutyParagraph:[{required:!0,message:"\u516C\u53F8\u7A0E\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bank:[{required:!0,message:"\u5F00\u6237\u884C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bankAccount:[{required:!0,message:"\u5F00\u6237\u884C\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],bankPhone:[{required:!0,message:"\u5F00\u6237\u884C\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],email:[{required:!0,message:"\u7535\u5B50\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],phone:[{required:!0,message:"\u8054\u7CFB\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],address:[{required:!0,message:"\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],username:[{required:!0,message:"\u8054\u7CFB\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],userPhone:[{required:!0,message:"\u8054\u7CFB\u4EBA\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],userAddress:[{required:!0,message:"\u90AE\u5BC4\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}}),{expertForm:d,PersonalInfoForm:a,rules:y}=I(v);R();const c=x(),f=140;(async()=>{var e,u,n,i;const{data:l}=await _();l.casExpert&&(l.casExpert.research&&(l.casExpert.researchs=(u=(e=l.casExpert.research)==null?void 0:e.split(","))!=null?u:[]),l.casExpert.area&&(l.casExpert.district=l.casExpert.area)),a.value=(n=l.user)!=null?n:{},d.value=(i=l.casExpert)!=null?i:{}})(),b({gender:1});const g=x(),E=async()=>{var l;try{await g.value.validate(),await B(a.value),V.success("\u66F4\u65B0\u4E2A\u4EBA\u4FE1\u606F\u6210\u529F");const{data:e}=await _();a.value=(l=e.user)!=null?l:{}}catch(e){console.log(e)}};async function k(l){await c.value.validateForm()?(d.value.area=d.value.district,w(d.value).then(u=>{V.success("\u4FEE\u6539\u6210\u529F")})):console.log("\u6821\u9A8C\u672A\u901A\u8FC7")}return(l,e)=>{const u=m("el-input"),n=m("el-form-item"),i=m("el-button"),q=m("el-form"),F=m("el-card");return N(),P("div",S,[r(F,{shadow:"always",style:{width:"55%",margin:"0 auto"}},{default:s(()=>[z,r(q,{ref_key:"personalInfoFormRef",ref:g,model:t(a),rules:t(y),"label-width":"100px"},{default:s(()=>[r(n,{label:"\u59D3\u540D:",prop:"nickName"},{default:s(()=>[r(u,{modelValue:t(a).nickName,"onUpdate:modelValue":e[0]||(e[0]=o=>t(a).nickName=o),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),r(n,{label:"\u624B\u673A:",prop:"mobile"},{default:s(()=>[r(u,{modelValue:t(a).mobile,"onUpdate:modelValue":e[1]||(e[1]=o=>t(a).mobile=o),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"},null,8,["modelValue"])]),_:1}),r(n,{label:"\u90AE\u7BB1:",prop:"email"},{default:s(()=>[r(u,{modelValue:t(a).email,"onUpdate:modelValue":e[2]||(e[2]=o=>t(a).email=o),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1"},null,8,["modelValue"])]),_:1}),r(n,{label:"\u804C\u52A1:",prop:"post"},{default:s(()=>[r(u,{modelValue:t(a).post,"onUpdate:modelValue":e[3]||(e[3]=o=>t(a).post=o),placeholder:"\u8BF7\u8F93\u5165\u804C\u52A1"},null,8,["modelValue"])]),_:1}),r(n,{label:"\u56FA\u5B9A\u7535\u8BDD:",prop:"phone"},{default:s(()=>[r(u,{modelValue:t(a).phone,"onUpdate:modelValue":e[4]||(e[4]=o=>t(a).phone=o),placeholder:"\u8BF7\u8F93\u5165\u56FA\u5B9A\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),r(n,null,{default:s(()=>[r(i,{type:"primary",onClick:E},{default:s(()=>[W]),_:1})]),_:1})]),_:1},8,["model","rules"]),H,r(t(A),{modelValue:t(d),"onUpdate:modelValue":e[5]||(e[5]=o=>U(d)?d.value=o:null),isAdd:!1,labelWidth:f,ref_key:"expertFormRef",ref:c},null,8,["modelValue"]),p("div",{style:C({marginLeft:f+"px"})},[r(i,{type:"primary",onClick:k},{default:s(()=>[K]),_:1})],4)]),_:1})])}}};export{G as default};
