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