|
- import{_ as Q,r as u,a as Y,o as Z,b as D,c as C,d as F,e as r,F as A,f as l,h as o,i as j,u as L,t as O,n as ee,k as ae,x as te,y as oe,s as le}from"./index-dd5fae99.js";import ie from"./basicInfo-ac387065.js";import re from"./eduInfo-6803748c.js";import se from"./jobInfo-1350f6cc.js";import ne from"./professionalInfo-d42cdfaa.js";import me from"./recommendInfo-c24b560d.js";import{e as fe,a as ue,r as de}from"./expertStore-7d1ebc1f.js";import{a as ve}from"./uploadAction-3962500e.js";import{g as pe}from"./expertVerify-436f4e27.js";import{g as ce}from"./auth-0be88622.js";import{g as ge}from"./getTimeDiffer-b6027bbf.js";import De from"./expertOtherInfo-59be870f.js";import"./unitManage-104cfe86.js";import"./index-4950cfb0.js";const _e="/assets/link-failure-img-6af694cb.png";const ye={class:"px-[107px] mt-[-60px]"},Ie={class:"pb-24"},xe={class:"pb-24"},be={class:"pb-24"},Ce={class:"pb-24"},Fe={class:"pb-24"},Re={class:"pb-24"},we={class:"footer"},ke={key:1,class:"itemBlue"},Pe=ae({name:"expertEnroll"}),je=Object.assign(Pe,{setup(Ne){const{proxy:x}=le(),c=te(),R=oe(),W=u({basicInfo:{}}),$=u(["1","2","3","4","5","6"]),i=u(),f=u(),d=u(),n=u(),p=u(),_=u(),M=async()=>{const t=[];t.push(new Promise((e,m)=>{i.value.validForm(s=>{s&&e()})})),t.push(new Promise((e,m)=>{f.value.validForm(s=>{s&&e()})})),t.push(new Promise((e,m)=>{d.value.validForm(s=>{s&&e()})})),t.push(new Promise((e,m)=>{n.value.validForm(s=>{s&&e()})})),t.push(new Promise((e,m)=>{p.value.validForm(s=>{s&&e()})})),t.push(new Promise((e,m)=>{_.value.validForm(s=>{s&&e()})})),Promise.all([...t]).then(async()=>{h()}).catch(e=>{e&&x.$message.warning(e)})},h=async()=>{var e,m,s,g,b,P;var t={expertUserId:c.query.id||void 0,basicInfo:{...i.value.formData,avatarUrl:((m=(e=i.value.formData)==null?void 0:e.avatarFile)==null?void 0:m.fileId)&&await ve(i.value.formData.avatarFile.fileId),expertIntentionWorkRegions:(s=i.value.formData.expertIntentionWorkRegions)==null?void 0:s.map((a,U)=>{var v,V,T,B,q;return{regionName:(v=a.unionCode)==null?void 0:v.join("@@"),regionCode:(T=(V=a.unionCode)==null?void 0:V.slice(-1)[0])==null?void 0:T.split("##")[0],regionLevel:(q=(B=a.unionCode)==null?void 0:B.slice(-1)[0])==null?void 0:q.split("##")[2]}}),expertRegionInfo:{regionName:(g=i.value.formData.expertRegionInfo)==null?void 0:g.join("@@"),regionCode:(b=i.value.formData.expertRegionInfo)==null?void 0:b.slice(-1)[0].split("##")[0],regionLevel:(P=i.value.formData.expertRegionInfo)==null?void 0:P.slice(-1)[0].split("##")[2]},political:i.value.formData.political&&[i.value.formData.political]||[],expertSource:i.value.formData.expertSource&&[i.value.formData.expertSource]||[],expertType:i.value.formData.expertType&&[i.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:{...d.value.formData,administrativeRank:d.value.formData.administrativeRank&&[d.value.formData.administrativeRank]||[],jobStatus:d.value.formData.jobStatus&&[d.value.formData.jobStatus]||[],companyAttribute:d.value.formData.companyAttribute&&[d.value.formData.companyAttribute]||[]},professionalInfo:{...n.value.formData,goodAt:n.value.formData.goodAt&&[n.value.formData.goodAt]||[],titleLevel:n.value.formData.titleLevel&&[n.value.formData.titleLevel]||[],titleCertificateFile:n.value.formData.titleCertificateFile&&await Promise.all(n.value.formData.titleCertificateFile&&n.value.formData.titleCertificateFile.map(async a=>({fileName:a.name,fileId:a.response.data.id,url:a.fileUrlById})))||[],technicalExpertise:n.value.formData.technicalExpertise&&n.value.formData.technicalExpertise.map(a=>({tagCode:a.split("##")[1],tagName:a.split("##")[0]})),industrySector:n.value.formData.industrySector&&n.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:{..._.value.formData,other:_.value.formData.other&&_.value.formData.other.map(a=>({tagCode:a.split("##")[1],tagName:a.split("##")[0]}))}};c.name==="expertEnroll"?z(t):c.query.id?(await ue(t),x.$message.success("专家编辑成功"),R.go(-1)):(await fe(t),x.$message.success("专家新增成功"),R.go(-1))},y=Y({visible:!1,data:{}}),z=t=>{y.data=t,y.visible=!0},E=u(),w=u({verificationCode:""}),G={verificationCode:[{required:!0,message:"请输入"}]},X=u(!1),H=async t=>{t&&t.validate(async e=>{e&&(await de({...y.data,verificationCode:w.value.verificationCode}),x.$message.success("提交成功"),R.go(0))})},k=u(null),I=u(0),J=async()=>{await ce({mobile:i.value.formData.phoneNo,verificationType:"EXPERT_REGISTER"}),x.$message.success("验证码已发送");const t=60;k.value||(I.value=t,k.value=setInterval(()=>{I.value>0&&I.value<=t?I.value--:(clearInterval(k.value),k.value=null)},1e3))},K=async()=>{const t=await pe({expertUserId:c.query.id});i.value.setFormData(t.data.basicInfo),f.value.setFormData(t.data.eduInfo),d.value.setFormData(t.data.jobInfo),n.value.setFormData(t.data.professionalInfo),p.value.setFormData(t.data.recommendInfo),_.value.setFormData(t.data.expertOtherInfo)},N=u(!1),S=()=>{const t=window.atob(c.query.time);ge(new Date,new Date(t*1),"d")>3&&(N.value=!0)};return Z(()=>{c.query.time?(S(),setInterval(()=>{S()},1e4)):N.value=!0,c.query.id&&K()}),(t,e)=>{const m=D("el-collapse-item"),s=D("el-collapse"),g=D("el-button"),b=D("el-form-item"),P=D("el-input"),a=D("el-form"),U=D("el-dialog");return C(),F("div",{class:ee(["expertEnroll footerPage",{relative:L(c).path==="expertEnroll"}])},[e[18]||(e[18]=r("div",{class:"top"},"湖州市信息化专家报名",-1)),N.value?(C(),F(A,{key:1},[e[14]||(e[14]=r("img",{src:_e,style:{width:"320px",height:"245px",margin:"160px auto 0"}},null,-1)),e[15]||(e[15]=r("p",{style:{color:"#83868C"},class:"mt-32 text-19 text-center"},"链接已失效,请联系管理员",-1))],64)):(C(),F(A,{key:0},[r("div",ye,[l(s,{modelValue:$.value,"onUpdate:modelValue":e[0]||(e[0]=v=>$.value=v)},{default:o(()=>[l(m,{name:"1",class:"mb-16"},{title:o(()=>e[6]||(e[6]=[r("div",{class:"collapse-title"},"基本信息",-1)])),default:o(()=>[r("div",Ie,[l(ie,{ref_key:"basicInfoRef",ref:i,"basic-info":W.value.basicInfo},null,8,["basic-info"])])]),_:1}),l(m,{name:"2",class:"mb-16"},{title:o(()=>e[7]||(e[7]=[r("div",{class:"collapse-title"},"学历信息",-1)])),default:o(()=>[r("div",xe,[l(re,{ref_key:"eduInfoRef",ref:f},null,512)])]),_:1}),l(m,{name:"3",class:"mb-16"},{title:o(()=>e[8]||(e[8]=[r("div",{class:"collapse-title"},"职业信息",-1)])),default:o(()=>[r("div",be,[l(se,{ref_key:"jobInfoRef",ref:d},null,512)])]),_:1}),l(m,{name:"4",class:"mb-16"},{title:o(()=>e[9]||(e[9]=[r("div",{class:"collapse-title"},"专业信息",-1)])),default:o(()=>[r("div",Ce,[l(ne,{ref_key:"professionalInfoRef",ref:n},null,512)])]),_:1}),l(m,{name:"5",class:"mb-16"},{title:o(()=>e[10]||(e[10]=[r("div",{class:"collapse-title"},"推荐信息",-1)])),default:o(()=>[r("div",Fe,[l(me,{ref_key:"recommendInfoRef",ref:p},null,512)])]),_:1}),l(m,{name:"6",class:"mb-16"},{title:o(()=>e[11]||(e[11]=[r("div",{class:"collapse-title"},"其他信息",-1)])),default:o(()=>[r("div",Re,[l(De,{ref_key:"expertOtherInfoRef",ref:_},null,512)])]),_:1})]),_:1},8,["modelValue"])]),r("div",we,[l(g,{type:"primary",onClick:M},{default:o(()=>e[12]||(e[12]=[j(" 提交 ")])),_:1}),l(g,{onClick:e[1]||(e[1]=v=>L(R).go(-1))},{default:o(()=>e[13]||(e[13]=[j("取消")])),_:1})])],64)),l(U,{"model-value":y.visible,title:"短信验证",width:"400px","destroy-on-close":"",onClose:e[5]||(e[5]=v=>y.visible=!1)},{footer:o(()=>[l(g,{type:"primary",loading:X.value,onClick:e[3]||(e[3]=v=>H(E.value))},{default:o(()=>e[16]||(e[16]=[j(" 提交 ")])),_:1},8,["loading"]),l(g,{onClick:e[4]||(e[4]=v=>y.visible=!1)},{default:o(()=>e[17]||(e[17]=[j(" 关闭 ")])),_:1})]),default:o(()=>[l(a,{ref_key:"smsDialogFormRef",ref:E,model:w.value,rules:G,"label-width":"auto","label-suffix":":"},{default:o(()=>[l(b,{label:"手机号"},{default:o(()=>[r("span",null,O(i.value.formData.phoneNo),1)]),_:1}),l(b,{label:"验证码",prop:"verificationCode"},{default:o(()=>[l(P,{modelValue:w.value.verificationCode,"onUpdate:modelValue":e[2]||(e[2]=v=>w.value.verificationCode=v),placeholder:"请输入验证码"},{suffix:o(()=>[I.value?(C(),F("span",ke,O(I.value),1)):(C(),F("a",{key:0,class:"itemBlue",onClick:J}," 获取验证码"))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])],2)}}}),ze=Q(je,[["__scopeId","data-v-ecea41c5"]]);export{ze as default};
|