From e21d3b331acc6a9126fd7a114458c2769ae2389f Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 11 Nov 2024 15:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A0=87=E5=87=86?= =?UTF-8?q?=E4=B8=8E=E8=BF=90=E7=AE=97=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicoms/customize/CustomizeQuestionFormItem.vue | 10 +++++++--- .../reading-unit/components/QuestionFormItem.vue | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) 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]))) {