var v=(e,a,o)=>new Promise((_,n)=>{var m=t=>{try{s(o.next(t))}catch(r){n(r)}},d=t=>{try{s(o.throw(t))}catch(r){n(r)}},s=t=>t.done?_(t.value):Promise.resolve(t.value).then(m,d);s((o=o.apply(e,a)).next())});import{_ as I,c as u,w as c,P as k,a0 as w,u as x,f as h,C as S,E as M,o as i,Q as g,k as p,j as N,L as E,i as f,M as R,N as P,a6 as L,a7 as $,a8 as D}from"./index-CZJgrp0v.js";import{_ as V}from"./uv-input.Ch8KxUbS.js";import{E as j}from"./eventCard.B7bqff8T.js";import{l as B}from"./listMixins.CccSbMD4.js";import{c as b}from"./grade.rBF1MO5i.js";import"./uv-tags.Iqd2Do9l.js";import"./dayjs.min.17IgkfKq.js";const G={name:"ApplyHostory",components:{EventCard:j},mixins:[B],data(){return{activeStatus:"all",showReasonPopup:!1,rejectReason:"",tagList:[{name:"all",text:"全部"},{name:"passed",text:"已通过"},{name:"rejected",text:"未通过"},{name:"pending",text:"待审核"}],records:[],userStore:x(),eventName:""}},computed:{filteredRecords(){return this.activeStatus==="all"?this.records:this.records.filter(e=>e.status===this.activeStatus)}},mounted(){this.getList()},methods:{getList(){return v(this,null,function*(){const e=yield b({page:this.page,size:5,tsId:this.userStore.userInfo.tsId,eventName:this.eventName});this.getListExtend(e)})},navigateToDetail(e){w({url:`/pages/matchPart/matchGrade/detail?id=${e.eventId}&eventApplyId=${e.eventApplyId}&eventTermId=${e.eventTermId}&eventGroupId=${e.eventGroupId}`})},handleTagClick(e){console.log({e}),this.activeStatus=e.name},showReason(e){this.rejectReason=e||"暂无具体原因",this.showReasonPopup=!0},closeReasonPopup(){this.showReasonPopup=!1},handleReapply(e){console.log("重新申请"+this.getTypeText(e)),k({title:"前往"+this.getTypeText(e)+"重新申请",icon:"none"})},getTypeText(e){return{referee:"裁判员",athlete:"运动员",volunteer:"志愿者"}[e]||""},getStatusText(e){return{passed:"已通过",rejected:"未通过",pending:"待审核"}[e]||""},getCoverImage(){return"/static/images/myModulePart/test.png"},formatTime(e){return e}}};function A(e,a,o,_,n,m){const d=S(M("uv-input"),V),s=N,t=h("EventCard"),r=L,y=$,T=D,C=h("layout-default-uni");return i(),u(C,null,{default:c(()=>[g("div",{class:"outerContainer"},[g("div",{class:"header"},[p(s,{class:"top-search-bar"},{default:c(()=>[p(d,{modelValue:n.eventName,"onUpdate:modelValue":a[0]||(a[0]=l=>n.eventName=l),placeholder:"请输入赛事名称搜索",clearable:"",onConfirm:e.resetData,onSearch:e.resetData,onClear:a[1]||(a[1]=()=>{this.eventName="",this.resetData()}),shape:"circle","suffix-icon":"search"},null,8,["modelValue","onConfirm","onSearch"])]),_:1})]),p(s,{class:"container"},{default:c(()=>[p(s,{class:"record-list"},{default:c(()=>[(i(!0),E(R,null,P(e.list,l=>(i(),u(t,{type:"grade",onClick:U=>m.navigateToDetail(l),key:l.id,data:l,class:"event-card"},null,8,["onClick","data"]))),128)),e.showEmpty?(i(),u(r,{key:0,marginTop:45})):f("",!0),e.showLoadMore?(i(),u(y,{key:1,status:e.loadStatus},null,8,["status"])):f("",!0),p(T,{"scroll-top":e.scrollTop},null,8,["scroll-top"])]),_:1})]),_:1})])]),_:1})}const W=I(G,[["render",A],["__scopeId","data-v-2fb132b2"]]);export{W as default};
