|
@@ -632,13 +632,31 @@ export default {
|
|
alert(`最少需选中${this.currentQuestion.minOptions}项`);
|
|
alert(`最少需选中${this.currentQuestion.minOptions}项`);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- for (let index in this.selectedOpenList) {
|
|
|
|
- if (
|
|
|
|
- this.selectedOpenList[index].selectedIndex &&
|
|
|
|
- !this.selectedOpenList[index].selectedValue
|
|
|
|
- ) {
|
|
|
|
- alert("请填写开放性选项答案");
|
|
|
|
- return;
|
|
|
|
|
|
+
|
|
|
|
+ // 判断选择题中的开放回答是否填写
|
|
|
|
+ let optionList = this.questionaire.questions[this.questionHEAD].options;
|
|
|
|
+ for (let selIndex in selectionIds) {
|
|
|
|
+ for (let optIndex in optionList) {
|
|
|
|
+ if (
|
|
|
|
+ selectionIds[selIndex] == optionList[optIndex].id &&
|
|
|
|
+ optionList[optIndex].open
|
|
|
|
+ ) {
|
|
|
|
+ // selectionIds[selIndex] 是选中的开放性答案的id,判断其有没有对应填写的开放回答
|
|
|
|
+ let isPass = false;
|
|
|
|
+ for (let oIndex in this.selectedOpenList) {
|
|
|
|
+ if (
|
|
|
|
+ this.selectedOpenList[oIndex].selectedId ==
|
|
|
|
+ selectionIds[selIndex] &&
|
|
|
|
+ this.selectedOpenList[oIndex].selectedValue
|
|
|
|
+ ) {
|
|
|
|
+ isPass = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!isPass) {
|
|
|
|
+ alert("请填写开放性选项答案");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -854,7 +872,7 @@ export default {
|
|
.select-open-dialog {
|
|
.select-open-dialog {
|
|
width: 50%;
|
|
width: 50%;
|
|
}
|
|
}
|
|
-.select-open-dialog textarea{
|
|
|
|
- height: 100px;
|
|
|
|
|
|
+.select-open-dialog textarea {
|
|
|
|
+ height: 100px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|