import{_ as N,P as k,c as m,w as s,j as P,C as g,E as x,D as B,o as r,k as n,l as C,Q as j,t as l,L as E,i as w,M,N as R,p as d}from"./index-CZJgrp0v.js";import{_ as A}from"./uv-tags.Iqd2Do9l.js";import{d as S}from"./dayjs.min.17IgkfKq.js";const D={name:"ApplyHostory",props:{data:{type:Object,default:()=>({})},type:{type:String,default:"match"},applyPersonNum:{type:Number,default:0}},data(){return{activeStatus:"all",showReasonPopup:!1,rejectReason:"",tagList:[{name:"all",text:"全部"},{name:"passed",text:"已通过"},{name:"rejected",text:"未通过"},{name:"pending",text:"待审核"}]}},computed:{formatProjectNames(){var t;const e=this.data.eventTypeName,o=((t=this.data.eventProjectNames||this.data.sportProjectIdsCn)==null?void 0:t.split(","))||[];return e&&o.unshift(e),o}},methods:{countTagLength(e){const o=(e==null?void 0:e.slice(0,3))||[];let t=15,i=[];return o.forEach(u=>{t-=u.length,t>0&&i.push(u)}),{tags:i,isExceed:t<0}},handleClick(){this.$emit("click",this.data)},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,o="YYYY.MM.DD"){return S(e).format(o)}}};function L(e,o,t,i,u,c){const y=C,a=P,v=g(x("uv-tags"),A),_=g(x("uv-icon"),B);return r(),m(a,{class:"event-card",onClick:c.handleClick},{default:s(()=>[n(a,{class:"card-left"},{default:s(()=>[n(y,{src:t.data.img,mode:"aspectFill",class:"cover-image"},null,8,["src"])]),_:1}),n(a,{class:"card-right"},{default:s(()=>[n(a,{class:"record-info"},{default:s(()=>[j("div",{class:"name",title:t.data.eventName||t.data.name},l(t.data.eventName||t.data.name),9,["title"]),n(a,{class:"tags-container"},{default:s(()=>{var f,p;return[(r(!0),E(M,null,R((f=c.countTagLength(c.formatProjectNames))==null?void 0:f.tags,(h,T)=>(r(),m(v,{key:T,text:h,size:"mini",name:h,plain:!0,type:"primary",plainFill:!0,borderColor:"#4c95d3"},null,8,["text","name"]))),128)),(p=c.countTagLength(c.formatProjectNames))!=null&&p.isExceed?(r(),m(a,{key:0,class:"more-tag"},{default:s(()=>[d("...")]),_:1})):w("",!0)]}),_:1}),n(a,{class:"iconText flexBox"},{default:s(()=>[n(_,{name:"account",color:"#A8ABB2"}),t.applyPersonNum?(r(),m(a,{key:0},{default:s(()=>[d(l(t.applyPersonNum)+"人",1)]),_:1})):(r(),m(a,{key:1},{default:s(()=>[d(l(t.data.eventGroupName)+"-"+l(t.data.eventTermName),1)]),_:1}))]),_:1}),n(a,{class:"iconText flexBox"},{default:s(()=>[n(_,{name:"clock",color:"#A8ABB2"}),d(" "+l(c.formatTime(t.data.eventStartTime))+"-"+l(c.formatTime(t.data.eventEndTime)),1)]),_:1}),n(a,{class:"iconText flexBox"},{default:s(()=>[n(_,{name:"map",color:"#A8ABB2"}),d(" "+l(t.data.address),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["onClick"])}const F=N(D,[["render",L],["__scopeId","data-v-c37ee183"]]);export{F as E};
