Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2 lines
8.9KB

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