Codex Assistant
昨天 58d9f460b2f8c34430285115e2557d18333c5cab
wx/pages/judge/review.js
@@ -117,10 +117,8 @@
              items {
                id
                name
                description
                maxScore
                weight
                sortOrder
                orderNo
              }
            }
          }
@@ -154,8 +152,10 @@
          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'
@@ -215,14 +215,14 @@
          currentJudgeRating(activityPlayerId: $activityPlayerId) {
            id
            totalScore
            comment
            remark
            status
            ratedAt
            items {
              ratingItemId
              ratingItemName
              score
              maxScore
              weightedScore
            }
          }
        }
@@ -247,7 +247,7 @@
        this.setData({
          scores,
          totalScore,
          comment: rating.comment || '',
          comment: rating.remark || '',
          existingReview: rating,
          reviewStatus: rating.status || 'COMPLETED'
        })
@@ -280,7 +280,7 @@
    
    criteria.forEach(criterion => {
      const score = scores[criterion.id] || 0
      totalScore += score * (criterion.weight || 1)
      totalScore += score
    })
    
    this.setData({ totalScore })
@@ -422,15 +422,7 @@
      })
      return false
    }
    if (comment.trim().length < 10) {
      wx.showToast({
        title: '评审意见至少10个字符',
        icon: 'error'
      })
      return false
    }
    return true
  },
@@ -443,8 +435,8 @@
      
      // 构建评分项数组
      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 = `
@@ -454,8 +446,8 @@
      `
      
      const input = {
        activityPlayerId,
        stageId: activity.stageId,
        activityPlayerId: parseInt(activityPlayerId),
        stageId: parseInt(activity.id),
        ratings,
        comment: comment.trim()
      }
@@ -521,7 +513,7 @@
      
      const input = {
        activityPlayerId,
        stageId: activity.stageId,
        stageId: activity.id,
        ratings,
        comment: comment.trim()
      }
@@ -559,12 +551,14 @@
    }
  },
  // 查看其他评审
  // 查看其他评审 - 已隐藏功能
  /*
  onViewOtherReviews() {
    wx.navigateTo({
      url: `/pages/judge/reviews?activityPlayerId=${this.data.activityPlayerId}`
    })
  },
  */
  // 联系参赛者
  onContactParticipant() {
@@ -610,6 +604,13 @@
    }
  },
  // 性别转换函数
  getGenderText(gender) {
    if (gender === 0) return '男'
    if (gender === 1) return '女'
    return '未填写'
  },
  // 格式化日期
  formatDate(dateString) {
    return formatDate(dateString, 'YYYY-MM-DD HH:mm')