From f04f35b562760afbac0c477357e2a29f77aec3b9 Mon Sep 17 00:00:00 2001 From: lrj <owen.stl@gmail.com> Date: 星期四, 02 十月 2025 13:51:47 +0800 Subject: [PATCH] fix: 修复评审次数重复显示问题 --- web/src/api/projectReview.js | 41 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 5 deletions(-) diff --git a/web/src/api/projectReview.js b/web/src/api/projectReview.js index c668f3b..0808aa2 100644 --- a/web/src/api/projectReview.js +++ b/web/src/api/projectReview.js @@ -100,12 +100,31 @@ currentJudgeRating(activityPlayerId: $activityPlayerId) { id totalScore - comments - ratingItems { - itemId - itemName + status + remark + items { + ratingItemId + ratingItemName score - maxScore + weightedScore + } + } + } +` + +// 鑾峰彇鎸囧畾璇勫鐨勮瘎鍒嗘槑缁� +const GET_JUDGE_RATING_DETAIL_QUERY = ` + query GetJudgeRatingDetail($activityPlayerId: ID!, $judgeId: ID!) { + judgeRatingDetail(activityPlayerId: $activityPlayerId, judgeId: $judgeId) { + id + totalScore + status + remark + items { + ratingItemId + ratingItemName + score + weightedScore } } } @@ -258,6 +277,18 @@ } /** + * 鑾峰彇鎸囧畾璇勫鐨勮瘎鍒嗘槑缁� + */ +export const getJudgeRatingDetail = async (activityPlayerId, judgeId) => { + try { + const result = await graphqlRequest(GET_JUDGE_RATING_DETAIL_QUERY, { activityPlayerId, judgeId }) + return result.data.judgeRatingDetail + } catch (error) { + throw new Error(error.message || '鑾峰彇璇勫璇勫垎鏄庣粏澶辫触') + } +} + +/** * 鎻愪氦璇勫垎 */ export const submitRating = async (ratingInput) => { -- Gitblit v1.8.0