import{b as R,m as w}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as O}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as M,c as C,r as i,m as T,al as a,z,I as $,J as r,R as t,a8 as g,a9 as f,u as l,M as J,B as L,O as D}from"./vendor-866bb149-1782572373740v=1.0.0.js";const U={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u59D3\u540D",trigger:"blur"},{message:"\u59D3\u540D\u6700\u591A10\u4E2A\u5B57\u7B26",max:10}],idNumber:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7\u7801",trigger:"blur"}],phone:[{required:!0,message:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",trigger:"blur"}],jobNumber:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u5DE5\u53F7",trigger:"blur"}],organization:[{required:!0,message:"\u8BF7\u8F93\u5165\u6240\u5728\u5355\u4F4D",trigger:"blur"}],specialty:[{required:!0,message:"\u8BF7\u8F93\u5165\u64C5\u957F\u9879\u76EE",trigger:"blur"}],introduction:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E2A\u4EBA\u4ECB\u7ECD",trigger:"blur"},{message:"\u4E2A\u4EBA\u4ECB\u7ECD\u6700\u591A200\u4E2A\u5B57\u7B26",max:200}]},H={class:"pt20 mt30"},K=M({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(b,{emit:y}){R();let F=b;const p=y,s=C({get(){return x(F.value)},set(u){p("update:value",u)}}),A=C({get(){return F.loading},set(u){p("update:loading",u)}}),_=i(),c=i({xs:24,sm:22,md:20,lg:14,xl:13});i({xs:24,sm:24,md:12,lg:12,xl:12}),i({xs:24,sm:22,md:18,lg:16,xl:8});const B=i([]),v=async(u,e,m)=>{e.loading=!0;try{const o=await w({page:e.page,size:10,keyword:u,tsId:m});if(o.code===0)return B.value=o.data.listData.map(n=>({label:`${n.tsNo}-${n.name}-${n.collegeName}`,value:n.tsId})),[B.value,o.data.total]}catch{O.error("\u83B7\u53D6\u5B66\u5DE5\u53F7\u5931\u8D25")}finally{e.loading=!1}},x=u=>u,P=()=>{let u=JSON.parse(JSON.stringify(s.value));return u.goodProject=u.goodProject.join(","),u.recruitType="referee",u},I=u=>{u.validate(async(e,m)=>{if(e){let o=P();p("submit",o)}else{const o=Object.keys(m)[0];u.scrollToField(o)}})},V=()=>{p("cancel")};return T(()=>{}),(u,e)=>{const m=a("PageSelect"),o=a("el-form-item"),n=a("PaCol"),j=a("DictSelect"),N=a("el-input"),S=a("PaRow"),k=a("HZStepItem"),E=a("el-button"),q=a("el-form");return z(),$(q,{model:l(s),ref_key:"formRef",ref:_,rules:l(U)},{default:r(()=>[t(k,{title:"\u57FA\u7840\u4FE1\u606F"},{default:r(()=>[t(S,null,{default:r(()=>[t(n,g(f(l(c))),{default:r(()=>[t(o,{label:"\u7528\u6237",prop:"tsId"},{default:r(()=>[J(' 				:disabled="tsIdDisable" '),t(m,{ref:"pageSelectRef",value:l(s).tsId,"onUpdate:value":e[0]||(e[0]=d=>l(s).tsId=d),"remote-method":v,placeholder:"\u8BF7\u8F93\u5165\u5B66\u5DE5\u53F7/\u624B\u673A\u53F7/\u59D3\u540D\u641C\u7D22"},null,8,["value"])]),_:1})]),_:1},16),t(n,g(f(l(c))),{default:r(()=>[t(o,{label:"\u64C5\u957F\u9879\u76EE",prop:"goodProject"},{default:r(()=>[t(j,{dictType:"sprot_project",modelValue:l(s).goodProject,"onUpdate:modelValue":e[1]||(e[1]=d=>l(s).goodProject=d),placeholder:"\u8BF7\u9009\u62E9\u64C5\u957F\u9879\u76EE",isAll:!1,style:{width:"100%"},multiple:""},null,8,["modelValue"])]),_:1})]),_:1},16),t(n,g(f(l(c))),{default:r(()=>[t(o,{label:"\u4E2A\u4EBA\u4ECB\u7ECD",prop:"introduction"},{default:r(()=>[t(N,{modelValue:l(s).introduction,"onUpdate:modelValue":e[2]||(e[2]=d=>l(s).introduction=d),type:"textarea",rows:3,placeholder:"\u8BF7\u8F93\u5165\u4E2A\u4EBA\u4ECB\u7ECD"},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1})]),_:1}),t(o,null,{default:r(()=>[L("div",H,[t(E,{onClick:V},{default:r(()=>e[4]||(e[4]=[D("\u8FD4\u56DE",-1)])),_:1,__:[4]}),t(E,{type:"primary",loading:l(A),onClick:e[3]||(e[3]=d=>I(l(_)))},{default:r(()=>e[5]||(e[5]=[D("\u4FDD\u5B58",-1)])),_:1,__:[5]},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{K as default};
