Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2 lignes
4.9KB

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