diff --git a/src/components/examination/radio-subject-item.vue b/src/components/examination/radio-subject-item.vue index db2f29c8..5f1b3cf4 100644 --- a/src/components/examination/radio-subject-item.vue +++ b/src/components/examination/radio-subject-item.vue @@ -39,7 +39,6 @@ // 只要是正确答案 就是绿色 if (props.analysisVo.correctFlag === 'R') return 'success'; // 是错误答案但是被用户错误选中的为红 - console.log('props.my_answer', props.my_answer); const my_answer_array = props.my_answer; if(my_answer_array.includes(props.analysisVo.itemId) && props.analysisVo.correctFlag === 'E') return 'error'; diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue index 2700e9d6..1fbde1e6 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -125,6 +125,7 @@ ); // 我的答案选项 const myResultLabel = computed(() => { + if (!props.item.anserResult) return ['无']; const anserResultArray = props.item.anserResult.split(','); return subject_data.itemVos.filter((res) => anserResultArray.includes(res.itemId)).map((res) => res.itemNo); }); @@ -134,6 +135,7 @@ correctResultLabel.value.length === myResultLabel.value.length && myResultLabel.value.every((res) => correctResultLabel.value.includes(res)) ); + const subject_data = reactive({ qnsId: props.item.qnsId, qnsContent: props.item.qnsContent, @@ -144,7 +146,7 @@ correctFlag: props.clearResult ? '' : res.correctFlag })) }); - + // 题类型 const subject_type_text = computed(() => SUBJECT_TYPE.find((res) => qnsTyp.value === res.value)?.label || ''); // 点击答题 @@ -156,20 +158,17 @@ if (!['study'].includes(props.mode)) { muCheckbox('choose'); } - } else if (props.item.qnsTyp === 'SN') { - // 单选 + } else if (props.item.qnsTyp === 'SN') { // 单选 // 单选插入,并且移除其他 item_answer.value[0] = analysisVo.itemId; muCheckbox('choose'); - } else if (props.item.qnsTyp === 'MU') { - // 多选题 + } else if (props.item.qnsTyp === 'MU') { // 多选题 // 多选直接插入 item_answer.value.push(analysisVo.itemId); if (!['study'].includes(props.mode)) { muCheckbox('choose'); } - } else if (props.item.qnsTyp === 'JD') { - // 判断题 + } else if (props.item.qnsTyp === 'JD') {// 判断题 // 判断插入,并且移除其他 item_answer.value = [analysisVo.itemId]; muCheckbox('choose'); @@ -284,7 +283,6 @@ line-height: 40px; text-align: left; font-style: normal; - } } }