You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 line
5.0KB

  1. import{d as E,B as c,r as m,o as R,D as G,c as d,e as s,G as g,i as a,h as t,f as w,H as x,u,F as j,g as U,j as k,q as H}from"./index.a2494fc2.js";import{h as D,b as I,f as Y}from"./uploadAction.0eabe13b.js";const O=E({name:"eduInfo"}),K=Object.assign(O,{setup(P,{expose:B}){const _=c.dictStore.uploadUrl,{proxy:M}=H(),o=m({}),v=m(),N={edu:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u5386",trigger:"blur"}],degree:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u4F4D",trigger:"blur"}]},L=r=>{v.value.validate(e=>{r(e)})},b=(r,e)=>{M.$message.warning("\u4EC5\u9650\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6")},T=async r=>{var e,p;o.value={...r,edu:((e=r.edu)==null?void 0:e[0])||void 0,degree:((p=r.degree)==null?void 0:p[0])||void 0,degreeCertificateFile:r.degreeCertificateFile&&r.degreeCertificateFile.map(i=>({name:i.fileName,response:{data:{id:i.fileId}},fileUrlById:i.url})),graduationCertificateFile:r.graduationCertificateFile&&r.graduationCertificateFile.map(i=>({name:i.fileName,response:{data:{id:i.fileId}},fileUrlById:i.url}))}},S=m();return B({validForm:L,formData:o,setFormData:T}),R(async()=>{const r=await G({regionCode:330500,regionLevel:2});S.value=[r.data]}),(r,e)=>{const p=d("el-input"),i=d("el-form-item"),n=d("el-col"),q=d("el-date-picker"),y=d("el-option"),F=d("el-select"),C=d("el-button"),V=d("el-upload"),A=d("el-row"),z=d("el-form");return s(),g(z,{ref_key:"formRef",ref:v,model:o.value,rules:N,"label-position":"right","label-width":"100px","label-suffix":":","scroll-to-error":"",class:"eduInfo"},{default:a(()=>[t(A,{gutter:8},{default:a(()=>[t(n,{span:8},{default:a(()=>[t(i,{label:"\u6BD5\u4E1A\u5B66\u6821",prop:"school"},{default:a(()=>[t(p,{modelValue:o.value.school,"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.school=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(n,{span:8},{default:a(()=>[t(i,{label:"\u6BD5\u4E1A\u65F6\u95F4",prop:"graduatedAt"},{default:a(()=>[t(q,{modelValue:o.value.graduatedAt,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.graduatedAt=l),type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:"\u8BF7\u9009\u62E9"},null,8,["modelValue"])]),_:1})]),_:1}),t(n,{span:8},{default:a(()=>[t(i,{label:"\u6240\u5B66\u4E13\u4E1A",prop:"academicTitle"},{default:a(()=>[t(p,{modelValue:o.value.academicTitle,"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.academicTitle=l),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(n,{span:8},{default:a(()=>[t(i,{label:"\u5B66\u5386",prop:"edu"},{default:a(()=>[t(F,{modelValue:o.value.edu,"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.edu=l),placeholder:"\u8BF7\u9009\u62E9\u5B66\u5386","value-key":"dictionaryCode",clearable:"",class:"w-full"},{default:a(()=>[(s(!0),w(j,null,x(u(c).dictStore.eduDict,(l,f)=>(s(),g(y,{key:f,label:l.dictionaryName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(n,{span:8},{default:a(()=>[t(i,{label:"\u5B66\u4F4D",prop:"degree"},{default:a(()=>[t(F,{modelValue:o.value.degree,"onUpdate:modelValue":e[4]||(e[4]=l=>o.value.degree=l),placeholder:"\u8BF7\u9009\u62E9\u5B66\u4F4D","value-key":"dictionaryCode",class:"w-full"},{default:a(()=>[(s(!0),w(j,null,x(u(c).dictStore.degreeDict,(l,f)=>(s(),g(y,{key:f,label:l.dictionaryName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(n,{span:24},{default:a(()=>[t(i,{label:"\u6BD5\u4E1A\u8BC1\u4E66",prop:"graduationCertificateFile"},{default:a(()=>[t(V,{"file-list":o.value.graduationCertificateFile,"onUpdate:fileList":e[5]||(e[5]=l=>o.value.graduationCertificateFile=l),class:"w-full",action:u(_),limit:1,"on-exceed":b,"on-success":l=>u(D)(l,o.value.graduationCertificateFile),"on-preview":u(I),accept:"application/pdf,image/png,image/jpeg","before-upload":l=>u(Y)(l,{size:1024,types:["png","jpg","jpeg","pdf"]})},{tip:a(()=>e[8]||(e[8]=[U("div",{class:"el-upload__tip"}," \u652F\u6301\u6269\u5C55\u540D:.pdf.png .jpg .pdf ,\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC71M ",-1)])),default:a(()=>[t(C,{type:"primary",plain:""},{default:a(()=>e[7]||(e[7]=[k("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","on-preview","before-upload"])]),_:1})]),_:1}),t(n,{span:24},{default:a(()=>[t(i,{label:"\u5B66\u4F4D\u8BC1\u4E66",prop:"degreeCertificateFile"},{default:a(()=>[t(V,{"file-list":o.value.degreeCertificateFile,"onUpdate:fileList":e[6]||(e[6]=l=>o.value.degreeCertificateFile=l),class:"w-full",action:u(_),"on-exceed":b,limit:1,"on-success":l=>u(D)(l,o.value.degreeCertificateFile),"before-upload":l=>u(Y)(l,{size:1024,types:["png","jpg","jpeg","pdf"]}),accept:"application/pdf,image/png,image/jpeg,image/jpg","on-preview":u(I)},{tip:a(()=>e[10]||(e[10]=[U("div",{class:"el-upload__tip"}," \u652F\u6301\u6269\u5C55\u540D:.pdf.png .jpg .pdf,\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC71M ",-1)])),default:a(()=>[t(C,{type:"primary",plain:""},{default:a(()=>e[9]||(e[9]=[k("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","on-preview"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])}}});export{K as default};