var E=Object.defineProperty,U=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var P=(n,o,e)=>o in n?E(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e,j=(n,o)=>{for(var e in o||(o={}))F.call(o,e)&&P(n,e,o[e]);if(B)for(var e of B(o))M.call(o,e)&&P(n,e,o[e]);return n},C=(n,o)=>U(n,$(o));var k=(n,o,e)=>new Promise((s,y)=>{var l=t=>{try{m(e.next(t))}catch(_){y(_)}},v=t=>{try{m(e.throw(t))}catch(_){y(_)}},m=t=>t.done?s(t.value):Promise.resolve(t.value).then(l,v);m((e=e.apply(n,o)).next())});import{_ as G,av as I,u as K,ci as Q,aw as W,c as z,w as a,f as A,bQ as H,C as h,E as q,o as J,k as r,j as L,q as O,p as c,t as i,bK as p,aq as X,P as w,ap as Y}from"./index-CZJgrp0v.js";import{_ as Z,a as ee}from"./uv-form.Cyxopp_J.js";import{_ as oe}from"./uv-textarea.DacViCPM.js";import{_ as te}from"./uv-button.DwAMxj01.js";import"./imgs.vue_vue_type_style_index_0_scoped_e5ff6870_lang.CnmSM4Oi.js";import{u as re}from"./useGetDIct.CgBQWumJ.js";import{a as ae,r as ne}from"./person.D70CBvre.js";import{a as se,r as le}from"./sporter.B2EWbByL.js";import"./dict.CxtX6q28.js";const ue={__name:"apply",setup(n){const{dictlist:o,getDict:e}=re("sprot_project");I(!0);const s=K(),y=I(s.userInfo),l=H(),v=I(null);I(null);const m={referee:"裁判员",athlete:"运动员",volunteer:"志愿者"},t=Q({name:"",department:"",employeeId:"",gender:"",phone:"",photoUrl:"",skillProject:"",refereeExperience:""}),_={};W(()=>{e()});const D=f=>{console.log({e:f}),t.goodProject=f.value[0].value},S=()=>{v.value.validate().then(f=>k(this,null,function*(){if(f){console.log("表单数据：",t);const b=l.query.isReiterate,x=l.query.type==="athlete"?se:ae,d=l.query.type==="sporter"?le:ne,g=yield(b?d:x)(C(j({},t),{tsId:y.value.tsId,recruitType:l.query.type,sporterId:l.query.sporterId,sporterTypeDictId:t.goodProject}));g.code===0?(w({title:"提交成功",icon:"success"}),setTimeout(()=>{Y({delta:1})},500)):w({title:g.msg||"提交失败",icon:"none"})}}))};return(f,b)=>{const x=O,d=L,u=h(q("uv-form-item"),Z),g=h(q("uv-textarea"),oe),T=h(q("uv-form"),ee),R=h(q("uv-button"),te),V=A("layout-default-uni");return J(),z(V,null,{default:a(()=>[r(d,{class:"container"},{default:a(()=>[r(d,{class:"nav-bar"},{default:a(()=>[r(x,{class:"nav-title"},{default:a(()=>[c(i(m[p(l).query.type])+"申请",1)]),_:1})]),_:1}),r(d,{class:"form-container"},{default:a(()=>[r(T,{labelPosition:"left",model:t,rules:_,ref_key:"formRef",ref:v,labelWidth:100},{default:a(()=>[r(u,{label:"姓名",prop:"name",borderBottom:"",required:""},{default:a(()=>[c(i(p(s).userInfo.name),1)]),_:1}),r(u,{label:"单位",prop:"department",borderBottom:"",required:""},{default:a(()=>[c(i(p(s).userInfo.collegeName),1)]),_:1}),r(u,{label:"工号",prop:"employeeId",borderBottom:"",required:""},{default:a(()=>[c(i(p(s).userInfo.tsNo),1)]),_:1}),r(u,{label:"性别",prop:"gender",borderBottom:"",required:""},{default:a(()=>[c(i(p(s).userInfo.genderCn),1)]),_:1}),r(u,{label:"手机号码",prop:"phone",borderBottom:""},{default:a(()=>[c(i(p(s).userInfo.phone),1)]),_:1}),r(u,{label:"擅长项目",prop:"goodProject",borderBottom:""},{default:a(()=>[r(X,{value:t.goodProject,options:[p(o)],placeholder:"请选择",onConfirm:D,border:!1},null,8,["value","options"])]),_:1}),r(u,{label:"个人经历",prop:"introduction",borderBottom:""},{default:a(()=>[r(g,{modelValue:t.introduction,"onUpdate:modelValue":b[0]||(b[0]=N=>t.introduction=N),placeholder:"请输入",border:"none",class:"form-textarea",rows:"4"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),r(d,{class:"submit-container"},{default:a(()=>[r(R,{type:"primary",onClick:S},{default:a(()=>[c("提交")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},ge=G(ue,[["__scopeId","data-v-a14e458e"]]);export{ge as default};
