Commit 54acf496 authored by 李维's avatar 李维

补充部分题型没有配置检查的问题

parent 4d6c66a3
......@@ -416,6 +416,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
scoreConfigErr.push(`内容${hotZoneConfigIndex+1}: 分数配置为0或者有异常`)
}
break;
// 音频播放题型
case this.AUDIO_PLAY:
// 热区配置检查
if(hotZoneConfg.linkHotZoneIndex == null || hotZoneConfg.linkHotZoneIndex == undefined || hotZoneConfg.linkHotZoneIndex < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 关联热区为空`)
}
break;
// 视频播放题型
case this.VIDEO_PLAY:
// 热区配置检查
if(hotZoneConfg.linkHotZoneIndex == null || hotZoneConfg.linkHotZoneIndex == undefined || hotZoneConfg.linkHotZoneIndex < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 关联热区为空`)
}
break;
// 连线组
case this.CONNECTION:
hotZoneConfg.contentList.forEach((contentItem, contentIndex) => {
......@@ -549,6 +563,23 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
}
});
break;
// 涂色题(评分)
case this.DRAWING_CHECK:
// 热区配置检查
if(hotZoneConfg.linkHotZoneIndex == null || hotZoneConfg.linkHotZoneIndex == undefined || hotZoneConfg.linkHotZoneIndex < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 关联热区为空`)
}
// 结果显示热区配置检查
if(hotZoneConfg.linkResultShowHotZoneIndex == null || hotZoneConfg.linkResultShowHotZoneIndex == undefined || hotZoneConfg.linkResultShowHotZoneIndex < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 结果显示热区为空`)
}
// 分数检查
if(hotZoneConfg.score != null && !isNaN(Number(hotZoneConfg.score)) && Number(hotZoneConfg.score) > 0) {
totalScore += Number(hotZoneConfg.score);
} else {
scoreConfigErr.push(`内容${hotZoneConfigIndex+1}: 分数配置为0或者有异常`)
}
break;
default:;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment