refactor [P-36 УМТ]: страница конкретного теста

This commit is contained in:
Denzel committed 2025-02-18 09:50:59 +03:00
1 parent 4e13d9f547
commit e6327bfcb0
4 files changed
+11 -5

No files matched your search

@@ -16,7 +16,7 @@
<!-- Карточка где буду отрисовываться тесты в цикле -->
<v-card v-for="cardValue in searchTest" :key="cardValue.id" class="my-2 border-sm">
<v-row class="pa-2">
<v-col cols="2" class="justify-center">
<v-col cols="2" class="justify-center my-auto">
<v-img :src="cardValue.file" class="mx-auto" />
</v-col>
<v-col cols="auto" class="d-flex flex-grow-1">
@@ -42,7 +42,7 @@
<v-card-title class="text-h6">Завершить тест?</v-card-title>
<v-card-text>Вы уверены, что хотите завершить тестирование?</v-card-text>
<v-card-actions class="d-flex justify-end">
<v-btn color="teal-darken-1" @click="finishTest">Да, завершить</v-btn>
<v-btn color="teal-darken-4" @click="finishTest">Да, завершить</v-btn>
<v-btn color="grey" @click="showFinishDialog = false">Отмена</v-btn>
</v-card-actions>
</v-card>
@@ -21,6 +21,7 @@
v-if="testStarted"
:length="totalQuestions"
:total-visible="5"
active-color="teal-darken-4"
:model-value="currentQuestion + 1"
@update:model-value="changePage"
></v-pagination>
@@ -1,10 +1,15 @@
<template>
<v-card class="mt-4 w-75 mx-auto h-50 d-flex flex-lg-column">
<v-card class="mt-4 w-75 mx-auto d-flex flex-lg-column" style="min-height: 350px">
<v-card-title class="text-h6 font-weight-bold">
Вопрос {{ currentQuestion + 1 }} из {{ totalQuestions }}
</v-card-title>
<v-card-text>
<p>{{ question.name }}</p>
<h3>{{ question.name }}</h3>
<v-img
v-if="question.file"
:src="`http://127.0.0.1:8000${question.file}`"
class="w-50 mx-auto"
/>
<v-radio-group v-model="answers[currentQuestion]">
<v-radio
v-for="(option, index) in question.settings.options"
@@ -33,7 +38,7 @@
elevation="0"
color="white"
rounded="lg"
class="bg-teal-darken-1"
class="bg-teal-darken-4"
@click="finishTest"
>
Завершить