var E=Object.defineProperty,M=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var y=(e,t,o)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(e,t)=>{for(var o in t||(t={}))V.call(t,o)&&y(e,o,t[o]);if(f)for(var o of f(t))B.call(t,o)&&y(e,o,t[o]);return e},v=(e,t)=>M(e,O(t));var g=(e,t,o)=>new Promise((d,s)=>{var c=r=>{try{i(o.next(r))}catch(l){s(l)}},_=r=>{try{i(o.throw(r))}catch(l){s(l)}},i=r=>r.done?d(r.value):Promise.resolve(r.value).then(c,_);i((o=o.apply(e,t)).next())});import{_ as I,c as p,w as n,a0 as P,a9 as z,f as b,C as k,D as J,E as T,o as u,k as a,j,aq as q,L as U,i as F,M as A,N as G,a6 as H,a7 as K,a8 as Q}from"./index-CZJgrp0v.js";import{_ as C}from"./FlatTab.DTGSghS1.js";import{_ as W}from"./uv-input.Ch8KxUbS.js";import{R as X}from"./recruitListItem.C68ju70c.js";import{l as Y}from"./listMixins.CccSbMD4.js";import{f as Z}from"./recruit.CTMkYi5I.js";import"./uv-tabs.Dgbny3zs.js";const $={name:"Recruit",mixins:[Y],components:{RecruitListItem:X,FlatTab:C},data(){return{scrollTop:0,tabList:[{name:"志愿者招募",key:"volunteer"},{name:"裁判员招募",key:"referee"}],searchForm:{recruitStatus:"",eventName:""},commonStore:z(),recruit_type:"volunteer"}},computed:{recruitStatusOptions(){let e=JSON.parse(JSON.stringify(this.commonStore.enumMap.recruitStatus||[]));return e=e.filter(t=>t.value!="removed"&&t.value!="wait"),e.unshift({label:"全部状态",value:"-1"}),e}},onPageScroll(e){this.scrollTop=e.scrollTop},onLoad(e){e.recruitType&&(this.recruit_type=e.recruitType),console.log({commonStore:this.commonStore})},onShow(){this.resetData()},mounted(){},methods:{changeStatus(e){var t;console.log({e}),this.searchForm.recruitStatus=((t=e.value[0])==null?void 0:t.value)||"",this.resetData()},toDetailRecruit(e){P({url:`/pages/recruitPart/recruitDetail/index?id=${e.id}`})},clickTab(e){console.log(e),this.recruit_type!==e.key&&(this.searchForm.eventName="",this.searchForm.recruitStatus="-1",this.recruit_type=e.key,this.list=[],this.resetData())},getList(e){return g(this,null,function*(){let t=v(S({page:this.page,size:10},this.searchForm),{recruitType:this.recruit_type,recruitStatus:this.searchForm.recruitStatus==="-1"?"":this.searchForm.recruitStatus}),o=yield Z(t);t.recruitType===this.recruit_type&&this.getListExtend(o,e)})}}};function ee(e,t,o,d,s,c){const _=C,i=k(T("uv-icon"),J),r=k(T("uv-input"),W),l=q,m=j,L=b("RecruitListItem"),w=H,N=K,D=Q,x=b("layout-tabbar-uni");return u(),p(x,null,{default:n(()=>[a(_,{tabList:s.tabList,onClickTab:c.clickTab,scrollable:!1},null,8,["tabList","onClickTab"]),a(m,{class:"page-main-container"},{default:n(()=>[a(m,{class:"searchForms"},{default:n(()=>[a(r,{modelValue:s.searchForm.eventName,"onUpdate:modelValue":t[0]||(t[0]=h=>s.searchForm.eventName=h),placeholder:"请输入赛事名称",clearable:"","suffix-icon":"search",onSearch:e.handleSearch},{suffix:n(()=>[a(i,{onClick:e.resetData,name:"search",size:"24",color:"#999"},null,8,["onClick"])]),_:1},8,["modelValue","onSearch"]),a(l,{value:s.searchForm.recruitStatus,class:"cellSelect",options:[c.recruitStatusOptions],placeholder:"状态",onConfirm:c.changeStatus},null,8,["value","options","onConfirm"])]),_:1}),a(m,{class:"list-container"},{default:n(()=>[(u(!0),U(A,null,G(e.list,(h,R)=>(u(),p(m,{key:R,class:"pt-32rpx"},{default:n(()=>[a(L,{item:h},null,8,["item"])]),_:2},1024))),128)),e.showEmpty?(u(),p(w,{key:0,marginTop:45})):F("",!0),e.showLoadMore?(u(),p(N,{key:1,status:e.loadStatus},null,8,["status"])):F("",!0),a(D,{"scroll-top":s.scrollTop},null,8,["scroll-top"])]),_:1})]),_:1})]),_:1})}const le=I($,[["render",ee],["__scopeId","data-v-b8d2a2b7"]]);export{le as default};
