From c35882b0afd528ea993a830ed5338708e787dbba Mon Sep 17 00:00:00 2001 From: Denzel Date: Wed, 15 Jan 2025 12:25:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D0=B3=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D1=81=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/vote/VoteConstructor.vue | 218 +++++++++--------- src/front/src/utils/axios-api.js | 1 + src/front/src/views/VoteHomePage.vue | 2 +- 3 files changed, 112 insertions(+), 109 deletions(-) diff --git a/src/front/src/components/vote/VoteConstructor.vue b/src/front/src/components/vote/VoteConstructor.vue index 6f288a63d..2110dcb84 100644 --- a/src/front/src/components/vote/VoteConstructor.vue +++ b/src/front/src/components/vote/VoteConstructor.vue @@ -14,9 +14,7 @@ Создание опроса - Настройка ответов - - Подтверждение + Подтверждение @@ -37,11 +35,12 @@ outlined :rules="[rules.required]" > + @@ -51,19 +50,18 @@ color="teal-darken-4" hideHeader hideWeekdays - > - + /> - mdi-calendar + mdi-calendar-clock @@ -73,13 +71,13 @@ color="teal-darken-4" hideHeader hideWeekdays - > - + /> - mdi-calendar + mdi-calendar-clock + Далее @@ -93,12 +91,17 @@ Создание опроса
- + + > + + mdi-delete + +
- - mdi-delete - + + +
+
+ + + + mdi-delete + +
+ Добавить ответ +
+
+ +
+ {{ findEmployeeById(person).fio }} + + + mdi-delete + +
+
+
Добавить вопрос
@@ -124,95 +191,8 @@ - - - - - Настройка ответов - - - -
-
-
- - - - mdi-delete - -
- Добавить ответ -
-
- -
- {{ findEmployeeById(person).fio }} - - - mdi-delete - -
-
-
-
-

Выберите вопрос, чтобы добавить ответы.

-
-
- - Назад - Далее - -
-
- - + Подтверждение @@ -310,6 +290,7 @@ export default { answers: [], selectedEmployees: [], selectedEmployeeImages: {}, + multiChoice: false }); }; @@ -383,3 +364,24 @@ export default { }, }; + + diff --git a/src/front/src/utils/axios-api.js b/src/front/src/utils/axios-api.js index e588e4d08..d14a6a835 100644 --- a/src/front/src/utils/axios-api.js +++ b/src/front/src/utils/axios-api.js @@ -118,6 +118,7 @@ async function createVote(voteData, files) { formData.append('startDate', new Date(voteData.startDate).toISOString()); formData.append('endDate', new Date(voteData.endDate).toISOString()); formData.append('questions', JSON.stringify(voteData.questions)); + formData.append('settings', {...voteData.type}); const response = await axiosApiInstance.post('/api/vote/votecreate/', formData, { headers: {'Content-Type': 'multipart/form-data'}, diff --git a/src/front/src/views/VoteHomePage.vue b/src/front/src/views/VoteHomePage.vue index 2f931f191..a96122617 100644 --- a/src/front/src/views/VoteHomePage.vue +++ b/src/front/src/views/VoteHomePage.vue @@ -84,7 +84,7 @@ - +{{res}} Редактировать голосование: {{ selectedVoting?.title }}