From 53a60dee6b0f3473484d41f3ac9a7f431afac853 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Mon, 19 Oct 2026 02:56:22 +0700 Subject: [PATCH] up --- src/components/GamePage.vue | 126 +++++++++++++++++++++++++++++------- 1 file changed, 103 insertions(+), 23 deletions(-) diff --git a/src/components/GamePage.vue b/src/components/GamePage.vue index 7a3730c..9816ce9 100644 --- a/src/components/GamePage.vue +++ b/src/components/GamePage.vue @@ -12,6 +12,7 @@ import { NRate, NSelect, NSpace, + NTable, NTabPane, NTabs, NText, @@ -1064,6 +1065,26 @@ const reviewsCount = ref(0) const answersQuestions = ref([]) const answersTeams = ref([]) +const resultQuestions = ref([]) +const resultTeams = ref([]) +const isLoadingResults = ref(false) +const hasResultsError = ref(false) + +async function loadAnswerResults() { + isLoadingResults.value = true + hasResultsError.value = false + try { + const res = await client.GetGameResults({ gameID: Number(gameId) }) + resultQuestions.value = res.questions || [] + resultTeams.value = res.teams || [] + } catch (err) { + hasResultsError.value = true + console.error('Не удалось загрузить таблицу результатов', err) + } finally { + isLoadingResults.value = false + } +} + // Баллы по ключу "teamID:questionCode" (undefined — балл не выставлен) const scores = ref>({}) @@ -1090,6 +1111,7 @@ async function loadGameAnswers() { } } scores.value = next + await loadAnswerResults() } async function openReviewsModal() { @@ -1538,31 +1560,78 @@ useSimplePolling(() => {
-
- Вопросы дела не заданы или команды ещё не отвечали. -
- -

{{ question.code }}: {{ question.text }}

-

- Правильный ответ:
{{ question.answer || '—' }} -

-
-
- {{ team.team?.name }} -
-
- {{ teamAnswer(team, question.code) || '—' }} -
- + +

Таблица результатов

+

Сохранённые оценки. Таблица обновляется после сохранения баллов.

+ Загрузка результатов… + + Не удалось загрузить таблицу результатов. + +

Результатов пока нет.

+
+ + + + Место + Команда + + {{ question.code }} + + Сумма + Поездки + + + + + {{ team.place }} + {{ team.team?.name }} + + {{ team.answers?.find((answer) => answer.questionCode === question.code)?.score ?? '—' }} + + {{ team.totalScore }} + {{ team.actionsCount }} + + +
+
+ Вопросы дела не заданы или команды ещё не отвечали. +
+ - + Сохранить баллы @@ -1980,10 +2049,19 @@ useSimplePolling(() => { text-decoration: underline; } +.answer-results-scroll { + overflow-x: auto; +} + .answers-empty { color: #777; } +.answers-question { + margin-top: 16px; + overflow-wrap: anywhere; +} + .answers-question-title { font-size: 17px; font-weight: 600; @@ -2015,8 +2093,10 @@ useSimplePolling(() => { } .answers-team-name { + font-size: 18px; font-weight: 600; - width: 180px; + margin: 0; + overflow-wrap: anywhere; } .answers-team-answer {