P-97 форма отправки поправлена
This commit is contained in:
1 parent
d3b067bded
commit
a6dcc50a60
1 file changed
+7
-8
@@ -93,19 +93,19 @@
|
||||
outlined
|
||||
></v-file-input>
|
||||
<v-select
|
||||
v-model="question.type"
|
||||
v-model="question.settings.type"
|
||||
:items="questionTypes"
|
||||
label="Тип ответа"
|
||||
outlined
|
||||
></v-select>
|
||||
<v-text-field
|
||||
v-model="question.multiChoice"
|
||||
:rules="[rules.required && question.multiChoice > 0]"
|
||||
v-model="question.settings.multiChoice"
|
||||
:rules="[rules.required && question.settings.multiChoice > 0]"
|
||||
hide-details="auto"
|
||||
label="Число возможных ответов"
|
||||
></v-text-field>
|
||||
<v-card-text>
|
||||
<div v-if="question.type === 'Ввести вручную'">
|
||||
<div v-if="question.settings.type === 'Ввести вручную'">
|
||||
<div
|
||||
v-for="(answer, index) in question.answers"
|
||||
:key="index"
|
||||
@@ -197,7 +197,7 @@
|
||||
<ul>
|
||||
<li v-for="(question, index) in form.questions" :key="index" class="mb-4">
|
||||
<p><strong>Вопрос {{ index + 1 }}:</strong> {{ question.text }} ({{ question.type }})</p>
|
||||
<div v-if="question.type === 'Ввести вручную' && question.answers.length">
|
||||
<div v-if="question.settings.type === 'Ввести вручную' && question.answers.length">
|
||||
<p><strong>Варианты ответов:</strong></p>
|
||||
<ul>
|
||||
<li v-for="(answer, answerIndex) in question.answers" :key="answerIndex">
|
||||
@@ -205,7 +205,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="question.type === 'Выбрать сотрудника' && question.answers.length">
|
||||
<div v-if="question.settings.type === 'Выбрать сотрудника' && question.answers.length">
|
||||
<p><strong>Выбранные сотрудники:</strong></p>
|
||||
<ul>
|
||||
<li
|
||||
@@ -305,10 +305,9 @@ export default {
|
||||
const addQuestion = () => {
|
||||
form.value.questions.push({
|
||||
text: "",
|
||||
type: "Ввести вручную",
|
||||
settings: {type: "Ввести вручную", multiChoice: 1},
|
||||
image: null,
|
||||
answers: [],
|
||||
multiChoice: 1
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user