| | |
| | | items { |
| | | id |
| | | name |
| | | description |
| | | maxScore |
| | | weight |
| | | sortOrder |
| | | orderNo |
| | | } |
| | | } |
| | | } |
| | |
| | | participant: { |
| | | id: detail.playerInfo.id, |
| | | name: detail.playerInfo.name, |
| | | school: detail.regionInfo ? detail.regionInfo.name : '', |
| | | major: detail.playerInfo.education || '', |
| | | gender: this.getGenderText(detail.playerInfo.gender), |
| | | birthday: detail.playerInfo.birthday || '', |
| | | region: detail.regionInfo ? detail.regionInfo.name : '', |
| | | education: detail.playerInfo.education || '', |
| | | avatar: detail.playerInfo.userInfo?.avatarUrl || '/images/default-avatar.svg' |
| | | }, |
| | | status: detail.state === 1 ? 'APPROVED' : detail.state === 2 ? 'REJECTED' : 'PENDING' |
| | |
| | | currentJudgeRating(activityPlayerId: $activityPlayerId) { |
| | | id |
| | | totalScore |
| | | comment |
| | | remark |
| | | status |
| | | ratedAt |
| | | items { |
| | | ratingItemId |
| | | ratingItemName |
| | | score |
| | | maxScore |
| | | weightedScore |
| | | } |
| | | } |
| | | } |
| | |
| | | this.setData({ |
| | | scores, |
| | | totalScore, |
| | | comment: rating.comment || '', |
| | | comment: rating.remark || '', |
| | | existingReview: rating, |
| | | reviewStatus: rating.status || 'COMPLETED' |
| | | }) |
| | |
| | | |
| | | criteria.forEach(criterion => { |
| | | const score = scores[criterion.id] || 0 |
| | | totalScore += score * (criterion.weight || 1) |
| | | totalScore += score |
| | | }) |
| | | |
| | | this.setData({ totalScore }) |
| | |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | if (comment.trim().length < 10) { |
| | | wx.showToast({ |
| | | title: '评审意见至少10个字符', |
| | | icon: 'error' |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | |
| | | return true |
| | | }, |
| | | |
| | |
| | | |
| | | // 构建评分项数组 |
| | | const ratings = criteria.map(criterion => ({ |
| | | itemId: criterion.id, |
| | | score: scores[criterion.id] || 0 |
| | | itemId: parseInt(criterion.id), |
| | | score: parseFloat(scores[criterion.id] || 0) |
| | | })) |
| | | |
| | | const mutation = ` |
| | |
| | | ` |
| | | |
| | | const input = { |
| | | activityPlayerId, |
| | | stageId: activity.stageId, |
| | | activityPlayerId: parseInt(activityPlayerId), |
| | | stageId: parseInt(activity.id), |
| | | ratings, |
| | | comment: comment.trim() |
| | | } |
| | |
| | | |
| | | const input = { |
| | | activityPlayerId, |
| | | stageId: activity.stageId, |
| | | stageId: activity.id, |
| | | ratings, |
| | | comment: comment.trim() |
| | | } |
| | |
| | | } |
| | | }, |
| | | |
| | | // 查看其他评审 |
| | | // 查看其他评审 - 已隐藏功能 |
| | | /* |
| | | onViewOtherReviews() { |
| | | wx.navigateTo({ |
| | | url: `/pages/judge/reviews?activityPlayerId=${this.data.activityPlayerId}` |
| | | }) |
| | | }, |
| | | */ |
| | | |
| | | // 联系参赛者 |
| | | onContactParticipant() { |
| | |
| | | } |
| | | }, |
| | | |
| | | // 性别转换函数 |
| | | getGenderText(gender) { |
| | | if (gender === 0) return '男' |
| | | if (gender === 1) return '女' |
| | | return '未填写' |
| | | }, |
| | | |
| | | // 格式化日期 |
| | | formatDate(dateString) { |
| | | return formatDate(dateString, 'YYYY-MM-DD HH:mm') |