From 4569f16050bb81e827c94de733809b302fa11d06 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 6 Sep 2024 18:01:21 +0800 Subject: [PATCH] =?UTF-8?q?IVUS=E8=87=AA=E5=8A=A8=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicoms/components/IVUS/QuestionForm.vue | 19 ++++++++++++------- .../dicoms/components/IVUS/QuestionList.vue | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue index 9a6fa142..f1b9b099 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionForm.vue @@ -390,20 +390,25 @@ export default { }, calculate(qsMarkArr, type) { var num = 0 - qsMarkArr.map((qsmark, i) => { + for (let i = 0; i< qsMarkArr.length; i++) { + const mark = qsMarkArr[i] + const v = this.questionForm[this.getQuestionId(mark)] + if (isNaN(parseFloat(v))) { + num = null + break + } if (i === 0) { - const v = this.questionForm[this.getQuestionId(qsmark)] - num = isNaN(parseFloat(v)) ? 0 : parseFloat(v) + num = parseFloat(v) } else { - const v = this.questionForm[this.getQuestionId(qsmark)] switch (type) { case '-': - num -= isNaN(parseFloat(v)) ? 0 : parseFloat(v) + num -= parseFloat(v) break } } - }) - return parseFloat(num).toFixed(this.digitPlaces) + } + + return num === null ? num : num.toFixed(this.digitPlaces) }, limitBlur(qId, valueType) { const value = this.questionForm[qId] diff --git a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue index 3e79ddaa..b4f44a10 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/IVUS/QuestionList.vue @@ -638,6 +638,7 @@ export default { async close(questionsObj) { if (questionsObj) { this.getReadingQuestionAndAnswer(questionsObj.visitTaskId) + this.refreshQuestions() } this.activeItem.activeRowIndex = null this.activeItem.activeCollapseId = null