diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue index 100caa89..60026f17 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue @@ -666,7 +666,9 @@ export default { } } else { num = parseFloat(this.questionForm[o.TableQuestionId]) - dataArr.push(num) + if (!isNaN(num)) { + dataArr.push(num) + } } } else { switch (rules.CustomCalculateMark) { @@ -707,10 +709,12 @@ export default { num = Math.min(...dataArr); break; case 13: - if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { + if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) + } else { + dataArr.push(0) } - num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr, 0) ? 1 : 0; + num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0 break; case 14: if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { diff --git a/src/views/trials/trials-panel/setting/reading-unit/components/QuestionFormItem.vue b/src/views/trials/trials-panel/setting/reading-unit/components/QuestionFormItem.vue index 9039215d..5499b4e7 100644 --- a/src/views/trials/trials-panel/setting/reading-unit/components/QuestionFormItem.vue +++ b/src/views/trials/trials-panel/setting/reading-unit/components/QuestionFormItem.vue @@ -595,7 +595,9 @@ export default { } } else { num = parseFloat(this.questionForm[o.TableQuestionId]); - dataArr.push(num) + if (!isNaN(num)) { + dataArr.push(num) + } } } else { switch (rules.CustomCalculateMark) { @@ -634,8 +636,10 @@ export default { case 13: if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) { dataArr.push(parseFloat(this.questionForm[o.TableQuestionId])) + } else { + dataArr.push(0) } - num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr, 0) ? 1 : 0; + num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0 break; case 14: if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {