|
@@ -6,7 +6,7 @@
|
|
|
<van-loading type="spinner" size="20" />
|
|
|
</template>
|
|
|
</van-image>
|
|
|
- <h2 class="title">{{form.title}}</h2>
|
|
|
+ <h2 class="title">{{ form.title }}</h2>
|
|
|
</div>
|
|
|
<studentInfo v-if="form.loginFlag" class="studentInfo" />
|
|
|
<div class="questions">
|
|
@@ -32,13 +32,13 @@
|
|
|
'questionnaireQuestionItemList'
|
|
|
]"
|
|
|
:clickable="true"
|
|
|
- :key="item.id"
|
|
|
+ :key="item.answerValue"
|
|
|
:title="item.answerValue"
|
|
|
class="teacher-item"
|
|
|
- @click="toggle(item.id||item.answerValue)"
|
|
|
+ @click="toggle( item.answerValue)"
|
|
|
>
|
|
|
<template #right-icon>
|
|
|
- <van-radio :name="item.id||item.answerValue">
|
|
|
+ <van-radio :name=" item.answerValue">
|
|
|
<template #icon="props">
|
|
|
<!-- <img
|
|
|
class="img-icon"
|
|
@@ -69,7 +69,7 @@
|
|
|
'questionnaireQuestionItemList'
|
|
|
]"
|
|
|
:clickable="true"
|
|
|
- :key="item.id||item.answerValue"
|
|
|
+ :key="item.answerValue"
|
|
|
:title="item.answerValue"
|
|
|
class="teacher-item"
|
|
|
@click="toggle(index)"
|
|
@@ -77,7 +77,7 @@
|
|
|
<template #right-icon>
|
|
|
<van-checkbox
|
|
|
shape="square"
|
|
|
- :name="item.id ? item.id.toString() : item.answerValue"
|
|
|
+ :name="item.answerValue"
|
|
|
ref="checkboxes"
|
|
|
>
|
|
|
<template #icon="props">
|
|
@@ -414,6 +414,22 @@ export default {
|
|
|
this.$toast("请回答当前问题");
|
|
|
return;
|
|
|
}
|
|
|
+ // 判断是否终止
|
|
|
+ let answerList = selectList.questionnaireQuestionItemList || []; //当前题的选项
|
|
|
+ let currentIsOver = 0; // 是否终止答题
|
|
|
+ this.checkBox;
|
|
|
+ answerList.forEach((item) => {
|
|
|
+ console.log(item,this.check)
|
|
|
+ if (selectList.type == "radio" && this.check ==item.answerValue) {
|
|
|
+ currentIsOver = item.isOver;
|
|
|
+ } else if (
|
|
|
+ selectList.type == "checkbox" &&
|
|
|
+ this.checkBox.includes(item.answerValue + "")&&!currentIsOver
|
|
|
+ ) {
|
|
|
+ currentIsOver = item.isOver;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 判断是否在题目列表里面
|
|
|
if (this.currentIndex <= this.questionList.length) {
|
|
|
if (selectList.type == "radio") {
|
|
@@ -436,7 +452,7 @@ export default {
|
|
|
this.textarea = null;
|
|
|
}
|
|
|
|
|
|
- if (this.currentIndex == this.questionList.length) {
|
|
|
+ if (this.currentIndex == this.questionList.length || currentIsOver) {
|
|
|
// try {
|
|
|
// await questionnaireUserResult({
|
|
|
// topicId: this.topicId,
|
|
@@ -1195,7 +1211,8 @@ export default {
|
|
|
.noLine {
|
|
|
padding: 10px 28px 16px;
|
|
|
}
|
|
|
-/deep/.van-checkbox__icon,/deep/.van-radio__icon {
|
|
|
+/deep/.van-checkbox__icon,
|
|
|
+/deep/.van-radio__icon {
|
|
|
padding: 1px;
|
|
|
}
|
|
|
</style>
|