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 lines
6.8KB

  1. import{E as g,G as z,r as S,a as H,o as J,b as i,c as m,d as _,f as t,h as a,F as v,H as y,u as r,e as b,i as C,k as Q,L as x,t as W,s as X}from"./index-dd5fae99.js";import{_ as Y}from"./index-4950cfb0.js";import{h as Z,c as ee,f as le}from"./uploadAction-3962500e.js";import"./unitManage-104cfe86.js";const te={class:"flex flex-col items-start"},ae=Q({name:"professionalInfo"}),de=Object.assign(ae,{setup(oe,{expose:U}){const N=g.dictStore.uploadUrl,{tagList:f}=z(g.dictStore),{proxy:E}=X(),o=S({}),h=S(),T={technicalTitles:[{required:!0,message:"请输入技术职称",trigger:"blur"}],titleLevel:[{required:!0,message:"请选择职称级别",trigger:"blur"}],goodAt:[{required:!0,message:"请选择擅长方向",trigger:"blur"}],technicalExpertise:[{required:!0,message:"请选择技术专长",trigger:"blur"}],industrySector:[{required:!0,message:"请选择行业领域",trigger:"blur"}],avoidCompanyList:[{required:!0,message:"请输入回避单位",trigger:"blur"}],titleCertificateFile:[{required:!0,message:"请上传职称证明",trigger:"blur"}]},q=n=>{h.value.validate(e=>{n(e)})},A=(n,e)=>{E.$message.warning("仅限上传一个文件")},$=n=>{o.value={...n,goodAt:n.goodAt&&n.goodAt||void 0,titleLevel:n.titleLevel&&n.titleLevel[0]||void 0,industrySector:n.industrySector&&n.industrySector.map(e=>`${e.tagName}##${e.tagCode}`),technicalExpertise:n.technicalExpertise&&n.technicalExpertise.map(e=>`${e.tagName}##${e.tagCode}`),titleCertificateFile:n.titleCertificateFile&&n.titleCertificateFile.map(e=>({name:e.fileName,response:{data:{id:e.fileId}},fileUrlById:e.url}))}},w=(n,e,s)=>{console.log(e)},d=H({unitVisible:!1,showCheckbox:!1,data:void 0,name:void 0}),D=n=>{var e;d.name=n,d.unitVisible=!0,d.showCheckbox=!0,d.data=(e=o.value.avoidCompanyList)==null?void 0:e.map(s=>({key:s.companyUniqCode,title:s.companyName}))},I=()=>{d.unitVisible=!1},R=(n,e)=>{o.value[d.name]=n.map(s=>({companyUniqCode:s.key,companyName:s.title}))},j=n=>{o.value.avoidCompanyList.splice(n,1)};return U({validForm:q,formData:o,setFormData:$}),J(async()=>{}),(n,e)=>{const s=i("el-input"),p=i("el-form-item"),c=i("el-col"),k=i("el-option"),V=i("el-select"),L=i("el-tree-select"),B=i("Plus"),O=i("el-icon"),F=i("el-button"),P=i("el-tag"),G=i("el-upload"),K=i("el-row"),M=i("el-form");return m(),_(v,null,[t(M,{ref_key:"formRef",ref:h,model:o.value,rules:T,"label-position":"right","label-width":"120px","label-suffix":":","scroll-to-error":"",class:"professionalInfo"},{default:a(()=>[t(K,{gutter:8},{default:a(()=>[t(c,{span:8},{default:a(()=>[t(p,{label:"技术职称",prop:"technicalTitles"},{default:a(()=>[t(s,{modelValue:o.value.technicalTitles,"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.technicalTitles=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(c,{span:8},{default:a(()=>[t(p,{label:"职称级别",prop:"titleLevel"},{default:a(()=>[t(V,{modelValue:o.value.titleLevel,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.titleLevel=l),class:"w-full",placeholder:"请选择","value-key":"dictionaryCode"},{default:a(()=>[(m(!0),_(v,null,y(r(g).dictStore.titleLevelDict,(l,u)=>(m(),x(k,{key:u,label:l.dictionaryName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(c,{span:8},{default:a(()=>[t(p,{label:"擅长方向",prop:"goodAt"},{default:a(()=>[t(V,{modelValue:o.value.goodAt,"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.goodAt=l),class:"w-full",placeholder:"请选择",clearable:"","value-key":"tagCode",multiple:""},{default:a(()=>[(m(!0),_(v,null,y(r(g).dictStore.goodAtDict,(l,u)=>(m(),x(k,{key:u,label:l.tagName,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(c,{span:8},{default:a(()=>[t(p,{label:"技术专长",prop:"technicalExpertise"},{default:a(()=>[t(L,{modelValue:o.value.technicalExpertise,"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.technicalExpertise=l),class:"w-full",placeholder:"请选择技术专长",data:r(f)&&r(f).length&&r(f).find(l=>l.tagCode==="technical_expertise").children||[],props:{label:"tagName",value:"unionCode"},"node-key":"unionCode","collapse-tags":"",multiple:"","show-checkbox":"","check-on-click-node":"",onCheck:e[4]||(e[4]=(l,u)=>w(l,u,"technicalExpertise"))},null,8,["modelValue","data"])]),_:1})]),_:1}),t(c,{span:8},{default:a(()=>[t(p,{label:"行业领域",prop:"industrySector"},{default:a(()=>[t(L,{modelValue:o.value.industrySector,"onUpdate:modelValue":e[5]||(e[5]=l=>o.value.industrySector=l),class:"w-full",placeholder:"请选择行业领域",data:r(f)&&r(f).length&&r(f).find(l=>l.tagCode==="industry_sector").children||[],props:{label:"tagName",value:"unionCode"},"node-key":"unionCode","collapse-tags":"",multiple:"","show-checkbox":"","check-on-click-node":"",onCheck:e[6]||(e[6]=(l,u)=>w(l,u,"industrySector"))},null,8,["modelValue","data"])]),_:1})]),_:1}),t(c,{span:24},{default:a(()=>[t(p,{label:"获奖情况",prop:"awards"},{default:a(()=>[t(s,{modelValue:o.value.awards,"onUpdate:modelValue":e[7]||(e[7]=l=>o.value.awards=l),maxlength:"200","show-word-limit":"",type:"textarea",placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(c,{span:24},{default:a(()=>[t(p,{label:"表彰奖励",prop:"recognitionReward"},{default:a(()=>[t(s,{modelValue:o.value.recognitionReward,"onUpdate:modelValue":e[8]||(e[8]=l=>o.value.recognitionReward=l),maxlength:"200","show-word-limit":"",type:"textarea",placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(c,{span:24},{default:a(()=>[t(p,{label:"回避单位",prop:"avoidCompanyList"},{default:a(()=>[b("div",te,[t(F,{type:"primary",onClick:e[9]||(e[9]=l=>D("avoidCompanyList"))},{default:a(()=>[t(O,null,{default:a(()=>[t(B)]),_:1}),e[11]||(e[11]=C("选择回避单位 "))]),_:1}),b("p",null,[(m(!0),_(v,null,y(o.value.avoidCompanyList,(l,u)=>(m(),x(P,{key:u,class:"mr-8",closable:"",onClose:ne=>j(u)},{default:a(()=>[C(W(l.companyName),1)]),_:2},1032,["onClose"]))),128))])])]),_:1})]),_:1}),t(c,{span:24},{default:a(()=>[t(p,{label:"职称证明",prop:"titleCertificateFile"},{default:a(()=>[t(G,{"file-list":o.value.titleCertificateFile,"onUpdate:fileList":e[10]||(e[10]=l=>o.value.titleCertificateFile=l),class:"w-full",action:r(N),"on-exceed":A,limit:1,"on-success":l=>r(Z)(l,o.value.titleCertificateFile),"on-preview":r(ee),accept:"application/pdf,image/png,image/jpeg","before-upload":l=>r(le)(l,{types:["png","jpg","jpeg","pdf"],size:1024})},{tip:a(()=>e[13]||(e[13]=[b("div",{class:"el-upload__tip"}," 支持扩展名:.pdf .png .jpg .pdf,文件大小不超过1M ",-1)])),default:a(()=>[t(F,{type:"primary",plain:""},{default:a(()=>e[12]||(e[12]=[C("选择文件")])),_:1})]),_:1},8,["file-list","action","on-success","on-preview","before-upload"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),t(Y,{visible:d.unitVisible,"show-checkbox":d.showCheckbox,"default-data":d.data,onClose:I,onGetSelectUnit:R},null,8,["visible","show-checkbox","default-data"])],64)}}});export{de as default};