No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
9.0KB

  1. import{_ as J,d as K,x as Q,y as X,r as d,b as Y,C as Z,B as ee,o as ae,c as _,e as R,f as k,u as j,k as te,h as r,i as o,g as u,j as N,t as T,n as oe,q as re}from"./index.13afb401.js";import le from"./basicInfo.d3a298ec.js";import ie from"./eduInfo.c70a92eb.js";import ne from"./jobInfo.743df129.js";import se from"./professionalInfo.9c51fa2a.js";import fe from"./recommendInfo.518dde7d.js";import me from"./expertOtherInfo.ef768ba0.js";import{e as ue,m as de,a as ve,r as pe}from"./expertStore.6088ad4d.js";import{a as ce}from"./uploadAction.d6d53fa7.js";import{g as De}from"./expertVerify.d91d7dc4.js";import{g as ge}from"./auth.28abe554.js";import"./unitManage.81e63b6a.js";import"./index.a25aaacc.js";const Ie={key:0,class:"header"},_e={class:"footer"},ye={key:1,class:"itemBlue"},xe=K({name:"addOrEditExpert"}),Ce=Object.assign(xe,{setup(be){const{proxy:y}=re(),s=Q(),C=X(),V=d({basicInfo:{}}),l=d(),f=d(),v=d(),m=d(),p=d(),c=d(),A=async()=>{const t=[];t.push(new Promise((e,n)=>{l.value.validForm(i=>{i&&e()})})),t.push(new Promise((e,n)=>{f.value.validForm(i=>{i&&e()})})),t.push(new Promise((e,n)=>{v.value.validForm(i=>{i&&e()})})),t.push(new Promise((e,n)=>{m.value.validForm(i=>{i&&e()})})),t.push(new Promise((e,n)=>{p.value.validForm(i=>{i&&e()})})),t.push(new Promise((e,n)=>{c.value.validForm(i=>{i&&e()})})),Promise.all([...t]).then(async()=>{L()}).catch(e=>{e&&y.$message.warning(e)})},L=async()=>{var e,n,i,x,E,w;var t={expertUserId:s.name==="selfEditExpertInfo"?h.value.userId:s.query.id||void 0,basicInfo:{...l.value.formData,isDingUser:l.value.formData.isDingUser,avatarUrl:((n=(e=l.value.formData)==null?void 0:e.avatarFile)==null?void 0:n.fileId)&&await ce(l.value.formData.avatarFile.fileId),expertIntentionWorkRegions:(i=l.value.formData.expertIntentionWorkRegions)==null?void 0:i.map((a,I)=>{var S,$,U,O,B;return{regionName:(S=a.unionCode)==null?void 0:S.join("@@"),regionCode:(U=($=a.unionCode)==null?void 0:$.slice(-1)[0])==null?void 0:U.split("##")[0],regionLevel:(B=(O=a.unionCode)==null?void 0:O.slice(-1)[0])==null?void 0:B.split("##")[2]}}),expertRegionInfo:{regionName:(x=l.value.formData.expertRegionInfo)==null?void 0:x.join("@@"),regionCode:(E=l.value.formData.expertRegionInfo)==null?void 0:E.slice(-1)[0].split("##")[0],regionLevel:(w=l.value.formData.expertRegionInfo)==null?void 0:w.slice(-1)[0].split("##")[2]},political:l.value.formData.political&&[l.value.formData.political]||[],expertSource:l.value.formData.expertSource&&[l.value.formData.expertSource]||[],expertType:l.value.formData.expertType&&[l.value.formData.expertType]||[]},eduInfo:{...f.value.formData,edu:f.value.formData.edu&&[f.value.formData.edu],degree:f.value.formData.degree&&[f.value.formData.degree],degreeCertificateFile:f.value.formData.degreeCertificateFile&&await Promise.all(f.value.formData.degreeCertificateFile&&f.value.formData.degreeCertificateFile.map(async a=>({fileName:a.name,fileId:a.response.data.id,url:a.fileUrlById})))||[],graduationCertificateFile:f.value.formData.graduationCertificateFile&&await Promise.all(f.value.formData.graduationCertificateFile&&f.value.formData.graduationCertificateFile.map(async a=>({fileName:a.name,fileId:a.response.data.id,url:a.fileUrlById})))||[]},jobInfo:{...v.value.formData,administrativeRank:v.value.formData.administrativeRank&&[v.value.formData.administrativeRank]||[],jobStatus:v.value.formData.jobStatus&&[v.value.formData.jobStatus]||[],companyAttribute:v.value.formData.companyAttribute&&[v.value.formData.companyAttribute]||[]},professionalInfo:{...m.value.formData,goodAt:m.value.formData.goodAt.map(a=>({...a,tagFieldName:"good_at"}))||[],titleLevel:m.value.formData.titleLevel&&[m.value.formData.titleLevel]||[],titleCertificateFile:m.value.formData.titleCertificateFile&&await Promise.all(m.value.formData.titleCertificateFile&&m.value.formData.titleCertificateFile.map(async a=>({fileName:a.name,fileId:a.response.data.id,url:a.fileUrlById})))||[],technicalExpertise:m.value.formData.technicalExpertise&&m.value.formData.technicalExpertise.map(a=>({tagCode:a.split("##")[1],tagName:a.split("##")[0]})),industrySector:m.value.formData.industrySector&&m.value.formData.industrySector.map(a=>({tagCode:a.split("##")[1],tagName:a.split("##")[0]}))},recommendInfo:{...p.value.formData,recommendedWay:p.value.formData.recommendedWay&&[p.value.formData.recommendedWay]||[],recommendationProofFile:p.value.formData.recommendationProofFile&&await Promise.all(p.value.formData.recommendationProofFile&&p.value.formData.recommendationProofFile.map(async a=>({fileName:a.name,fileId:a.response.data.id,url:a.fileUrlById})))||[]},expertOtherInfo:{...c.value.formData,other:c.value.formData.other&&c.value.formData.other.map(a=>({tagCode:a.split("##")[1],tagName:a.split("##")[0]}))}};s.name==="expertEnroll"?q(t):!s.query.id&&s.name!=="selfEditExpertInfo"?(await ue(t),y.$message.success("\u4E13\u5BB6\u65B0\u589E\u6210\u529F"),C.go(-1)):(await(s.name==="selfEditExpertInfo"?de:ve)(t),y.$message.success(s.name==="selfEditExpertInfo"?"\u7533\u8BF7\u6210\u529F":"\u4E13\u5BB6\u7F16\u8F91\u6210\u529F"),s.name!=="selfEditExpertInfo"&&C.go(-1))},D=Y({visible:!1,data:{}}),q=t=>{D.data=t,D.visible=!0},P=d(),b=d({verificationCode:""}),M={verificationCode:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},W=d(!1),z=async t=>{!t||t.validate(async e=>{e&&(await pe({...D.data,verificationCode:b.value.verificationCode}),y.$message.success("\u63D0\u4EA4\u6210\u529F"),C.go(0))})},F=d(null),g=d(0),G=async()=>{await ge({mobile:l.value.formData.phoneNo,verificationType:"RECOMMENDATION_PROOF_FILE_SUBMIT"}),y.$message.success("\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001");const t=60;F.value||(g.value=t,F.value=setInterval(()=>{g.value>0&&g.value<=t?g.value--:(clearInterval(F.value),F.value=null)},1e3))},H=async()=>{const t=await De({expertUserId:s.name==="selfEditExpertInfo"?h.value.userId:s.query.id});l.value.setFormData(t.data.basicInfo),f.value.setFormData(t.data.eduInfo),v.value.setFormData(t.data.jobInfo),m.value.setFormData(t.data.professionalInfo),p.value.setFormData(t.data.recommendInfo),c.value.setFormData(t.data.expertOtherInfo)},h=Z(ee.userStore).userInfo;return ae(()=>{(s.query.id||s.name==="selfEditExpertInfo")&&H()}),(t,e)=>{const n=_("el-card"),i=_("el-button"),x=_("el-form-item"),E=_("el-input"),w=_("el-form"),a=_("el-dialog");return R(),k("div",{class:oe(["addOrEditExpert footerPage",{relative:j(s).path==="expertEnroll"}])},[j(s).name==="expertEnroll"?(R(),k("div",Ie,"\u6E56\u5DDE\u5E02\u4FE1\u606F\u5316\u4E13\u5BB6\u62A5\u540D")):te("",!0),r(n,{shadow:"never",class:"mb-16"},{header:o(()=>e[5]||(e[5]=[u("div",{class:"card-header flex items-center justify-between"},[u("span",null,"\u57FA\u672C\u4FE1\u606F")],-1)])),default:o(()=>[r(le,{ref_key:"basicInfoRef",ref:l,"basic-info":V.value.basicInfo},null,8,["basic-info"])]),_:1}),r(n,{shadow:"never",class:"mb-16"},{header:o(()=>e[6]||(e[6]=[u("div",null,[u("span",null,"\u5B66\u5386\u4FE1\u606F")],-1)])),default:o(()=>[r(ie,{ref_key:"eduInfoRef",ref:f},null,512)]),_:1}),r(n,{shadow:"never",class:"mb-16"},{header:o(()=>e[7]||(e[7]=[u("div",null,[u("span",null,"\u804C\u4E1A\u4FE1\u606F")],-1)])),default:o(()=>[r(ne,{ref_key:"jobInfoRef",ref:v},null,512)]),_:1}),r(n,{shadow:"never",class:"mb-16"},{header:o(()=>e[8]||(e[8]=[u("div",null,[u("span",null,"\u4E13\u4E1A\u4FE1\u606F")],-1)])),default:o(()=>[r(se,{ref_key:"professionalInfoRef",ref:m},null,512)]),_:1}),r(n,{shadow:"never",class:"mb-16"},{header:o(()=>e[9]||(e[9]=[u("div",null,[u("span",null,"\u63A8\u8350\u4FE1\u606F")],-1)])),default:o(()=>[r(fe,{ref_key:"recommendInfoRef",ref:p},null,512)]),_:1}),r(n,{shadow:"never",class:"mb-16"},{header:o(()=>e[10]||(e[10]=[u("div",null,[u("span",null,"\u5176\u4ED6\u4FE1\u606F")],-1)])),default:o(()=>[r(me,{ref_key:"expertOtherInfoRef",ref:c},null,512)]),_:1}),u("div",_e,[r(i,{type:"primary",onClick:A},{default:o(()=>e[11]||(e[11]=[N(" \u63D0\u4EA4 ")])),_:1}),r(i,{onClick:e[0]||(e[0]=I=>j(C).go(-1))},{default:o(()=>e[12]||(e[12]=[N("\u53D6\u6D88")])),_:1})]),r(a,{"model-value":D.visible,title:"\u77ED\u4FE1\u9A8C\u8BC1",width:"400px","destroy-on-close":"",onClose:e[4]||(e[4]=I=>D.visible=!1)},{footer:o(()=>[r(i,{type:"primary",loading:W.value,onClick:e[2]||(e[2]=I=>z(P.value))},{default:o(()=>e[13]||(e[13]=[N(" \u63D0\u4EA4 ")])),_:1},8,["loading"]),r(i,{onClick:e[3]||(e[3]=I=>D.visible=!1)},{default:o(()=>e[14]||(e[14]=[N(" \u5173\u95ED ")])),_:1})]),default:o(()=>[r(w,{ref_key:"smsDialogFormRef",ref:P,model:b.value,rules:M,"label-width":"auto","label-suffix":":"},{default:o(()=>[r(x,{label:"\u624B\u673A\u53F7"},{default:o(()=>[u("span",null,T(l.value.formData.phoneNo),1)]),_:1}),r(x,{label:"\u9A8C\u8BC1\u7801",prop:"verificationCode"},{default:o(()=>[r(E,{modelValue:b.value.verificationCode,"onUpdate:modelValue":e[1]||(e[1]=I=>b.value.verificationCode=I),placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"},{suffix:o(()=>[g.value?(R(),k("span",ye,T(g.value),1)):(R(),k("a",{key:0,class:"itemBlue",onClick:G}," \u83B7\u53D6\u9A8C\u8BC1\u7801"))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])],2)}}}),Be=J(Ce,[["__scopeId","data-v-23fea400"]]);export{Be as default};