diff --git a/src/front/src/components/testing/ConstructorTest/CreatedTest.vue b/src/front/src/components/testing/ConstructorTest/CreatedTest.vue
new file mode 100644
index 000000000..64629d756
--- /dev/null
+++ b/src/front/src/components/testing/ConstructorTest/CreatedTest.vue
@@ -0,0 +1,14 @@
+
+
+ mdi-check-circle
+ Тест успешно создан
+ Тест добавлен в каталог и готов к назначению сотрудникам
+
+
+
+
+
diff --git a/src/front/src/components/testing/TestConstructor.vue b/src/front/src/components/testing/TestConstructor.vue
new file mode 100644
index 000000000..0fd1dcea7
--- /dev/null
+++ b/src/front/src/components/testing/TestConstructor.vue
@@ -0,0 +1,420 @@
+
+
+
+ Создать ещё
+
+
+
+
+
+ Основная информация
+
+ Создание теста
+
+ Подтверждение
+
+
+
+
+
+
+ Основная информация:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Далее
+
+
+
+
+
+
+
+ Создание вопросов:
+
+
+
+
+
+
Вопрос {{ index + 1 }}
+
+
+
+
+
+
+
+
+
+
+ Варианты ответов:
+
+
+ Добавить ответ
+
+
+
+
+
+
+ Добавить вопрос
+
+
+
+
+ Назад
+ Далее
+
+
+
+
+
+
+
+ Подтверждение создания теста
+
+
+ {{ errorMessage }}
+
+ Название: {{ form.name }}
+ Описание: {{ form.description }}
+ Период проведения: {{ formatDate(form.datestart) }} - {{ formatDate(form.dateend) }}
+ Время на прохождение: {{ form.time }} мин.
+ Кол-во вопросов: {{ form.question_count }}
+ Мин. процент правильных ответов: {{ form.pass_perc }}%
+ Кол-во попыток: {{ form.attemps_number }}
+ Вопросы:
+
+
+ Вопрос {{ index + 1 }}: {{ question.text }}
+
+
+
+ {{ answer.right_wrong ? 'mdi-check-circle' : 'mdi-close-circle' }}
+
+ {{ answer.text }}
+
+
+
+
+
+ Назад
+
+ Сохранить тест
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/front/src/components/vote/ConstructorVote/AnswerList.vue b/src/front/src/components/vote/ConstructorVote/AnswerList.vue
index 43225bda4..0897ed11e 100644
--- a/src/front/src/components/vote/ConstructorVote/AnswerList.vue
+++ b/src/front/src/components/vote/ConstructorVote/AnswerList.vue
@@ -6,15 +6,15 @@
:key="aIndex"
class="d-flex align-start mb-4"
>
-
+
- mdi-check
+ mdi-check
mdi-close
@@ -76,22 +76,29 @@ export default {
removeAnswer: {
type: Function,
required: true,
+ },
+ isTest: {
+ type: Boolean,
+ default: false
}
},
- setup() {
+ setup(props) {
const route = useRoute();
+ // Поддерживаем оба способа определения: через роут или через явный проп
const isTestRoute = computed(() => {
return route.path && String(route.path).includes('test');
});
const toggleCorrect = (answer) => {
- answer.correct = !answer.correct;
+ // Используем right_wrong для тестов (совместимо с бэкендом)
+ answer.right_wrong = !answer.right_wrong;
};
return {
isTestRoute,
toggleCorrect,
+ isTest: props.isTest
};
}
};
diff --git a/src/front/src/components/vote/ConstructorVote/CreatedVote.vue b/src/front/src/components/vote/ConstructorVote/CreatedVote.vue
index 5c7b7295b..0859d8aa4 100644
--- a/src/front/src/components/vote/ConstructorVote/CreatedVote.vue
+++ b/src/front/src/components/vote/ConstructorVote/CreatedVote.vue
@@ -3,11 +3,19 @@
mdi-check-circle
-
Голосование создано!
+ {{ title || 'Голосование создано!' }}
-
diff --git a/src/front/src/components/vote/ConstructorVote/MainInfo.vue b/src/front/src/components/vote/ConstructorVote/MainInfo.vue
index 3a3f7bd4f..0f4e14401 100644
--- a/src/front/src/components/vote/ConstructorVote/MainInfo.vue
+++ b/src/front/src/components/vote/ConstructorVote/MainInfo.vue
@@ -1,6 +1,6 @@
- Основная информация
+ {{ isTest ? 'Основная информация о тесте' : 'Основная информация' }}
!!value || 'Это поле обязательно для заполнения',
}),
},
+ isTest: {
+ type: Boolean,
+ default: false
+ }
},
emits: ['update:form'],
setup(props, { emit }) {
@@ -186,7 +190,8 @@ export default {
selectedTimeStart,
selectedTimeEnd,
timeOptions,
- isTestRoute
+ isTestRoute,
+ isTest: props.isTest
};
},
};
diff --git a/src/front/src/components/vote/ConstructorVote/NewQuestion.vue b/src/front/src/components/vote/ConstructorVote/NewQuestion.vue
index 2b09eb100..fb4c3a49a 100644
--- a/src/front/src/components/vote/ConstructorVote/NewQuestion.vue
+++ b/src/front/src/components/vote/ConstructorVote/NewQuestion.vue
@@ -16,6 +16,7 @@
:removeQuestion="removeQuestion"
:rules="rules"
:spravURL="spravURL"
+ :isTest="isTest"
@update:question="form.questions[index] = $event"
/>
@@ -67,6 +68,10 @@ export default {
onlyDepdict: {
type: Array,
},
+ isTest: {
+ type: Boolean,
+ default: false
+ },
},
emits: ['update:form'],
setup(props, { emit }) {
@@ -121,6 +126,7 @@ export default {
removeAnswer,
checkremote,
spravURL,
+ isTest: props.isTest
};
},
};
diff --git a/src/front/src/components/vote/ConstructorVote/QuestionItem.vue b/src/front/src/components/vote/ConstructorVote/QuestionItem.vue
index 74c13a14d..edbab750c 100644
--- a/src/front/src/components/vote/ConstructorVote/QuestionItem.vue
+++ b/src/front/src/components/vote/ConstructorVote/QuestionItem.vue
@@ -20,7 +20,7 @@
-
+
@@ -168,6 +168,10 @@ export default {
type: Array,
required: true,
},
+ isTest: {
+ type: Boolean,
+ default: false
+ },
onlyDepdict: {
type: Array,
default: () => [],
diff --git a/src/front/src/components/vote/VoteConstructor.vue b/src/front/src/components/vote/VoteConstructor.vue
index ce81a98d4..c6b0b2bdb 100644
--- a/src/front/src/components/vote/VoteConstructor.vue
+++ b/src/front/src/components/vote/VoteConstructor.vue
@@ -1,7 +1,9 @@
-
- Создать ещё
+
+
+ {{ isTest ? 'Создать ещё один тест' : 'Создать ещё одно голосование' }}
+
@@ -9,7 +11,7 @@
Основная информация
- Создание опроса
+ {{ isTest ? 'Создание теста' : 'Создание опроса' }}
Подтверждение
@@ -17,7 +19,52 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
Далее
@@ -27,7 +74,7 @@
- Создание опроса:
+ {{ isTest ? 'Создание теста:' : 'Создание опроса:' }}
Добавить вопрос
-
+
@@ -159,7 +206,7 @@