修改多选题编辑不能复选的问题

This commit is contained in:
18571350067 2021-11-30 10:02:09 +08:00
parent 8a2841a21b
commit 4072740f68
1 changed files with 15 additions and 14 deletions

View File

@ -232,12 +232,6 @@ export default {
this.tabKey = key
},
//
onChange(checkedValues) {
console.log('checked = ', checkedValues);
this.checkedValues = checkedValues;
},
//
addAnswerSize() {
if (this.Completion.answerList.length == 5) {
@ -319,6 +313,12 @@ export default {
return from
},
//
onChange(checkedValues) {
console.log('checked = ', checkedValues);
this.checkedValues = checkedValues;
},
//
multiselectV() {
//
@ -352,18 +352,19 @@ export default {
from = this.multiselect
from.questionType = 2
from.rightAnswers = ''
// ,
if (this.multiselect.a && this.multiselect.a == true) from.rightAnswers += 'A'
if (this.multiselect.b && this.multiselect.b == true) from.rightAnswers += 'B'
if (this.multiselect.c && this.multiselect.c == true) from.rightAnswers += 'C'
if (this.multiselect.d && this.multiselect.d == true) from.rightAnswers += 'D'
if (this.multiselect.e && this.multiselect.e == true) from.rightAnswers += 'E'
if (this.multiselect.f && this.multiselect.f == true) from.rightAnswers += 'F'
if (from.rightAnswers.length < 1 || from.rightAnswers == '') {
console.log('this.checkedValues',this.checkedValues)
if (this.checkedValues.length < 1 || this.checkedValues.length == 0) {
this.$message.error('请选择正确答案!')
return false
}
for(let i = 0 ; i<this.checkedValues.length; i++) from.rightAnswers =from.rightAnswers+this.checkedValues[i];
console.log("rightAnswers",from.rightAnswers);
return from
},