From 615c91b1970fae7fe4e0049f30ec489b44c44572 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Wed, 4 Sep 2024 09:32:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9Edicom=E6=8A=A5=E5=91=8A=E9=A1=B5?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E7=B1=BB=E5=9E=8B=E9=97=AE=E9=A2=98=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/none-dicoms/components/Report.vue | 32 ++++++------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/src/views/trials/trials-panel/reading/none-dicoms/components/Report.vue b/src/views/trials/trials-panel/reading/none-dicoms/components/Report.vue index 4c5b56b6..b0631b66 100644 --- a/src/views/trials/trials-panel/reading/none-dicoms/components/Report.vue +++ b/src/views/trials/trials-panel/reading/none-dicoms/components/Report.vue @@ -142,8 +142,7 @@ v-else-if="scope.row.DataSource !== 1 && questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='number' && (scope.row.xfIndex || scope.row.xfIndex === 0) && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]" :disabled="scope.row.DataSource === 1" - @onblur="limitBlur($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)" - @input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)" + @blur="limitBlur(questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)" size="mini" @focus="() => {questionId = scope.row.QuestionId}" > @@ -165,8 +164,7 @@ v-else-if="scope.row.DataSource !== 1 && scope.row.Type==='number' && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" v-model="questionForm[scope.row.QuestionId]" :disabled="scope.row.DataSource === 1" - @onblur="limitBlur($event, questionForm, scope.row.QuestionId, scope.row.ValueType)" - @input="limitInput($event, questionForm, scope.row.QuestionId, scope.row.ValueType)" + @blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)" size="mini" @focus="() => {questionId = scope.row.QuestionId}" > @@ -368,26 +366,14 @@ export default { DicomEvent.$off('getReportInfo') }, methods: { - limitInput(value, a, b, valueType) { + limitBlur(questionForm,id,valueType) { + let value = questionForm[id] if (valueType === 0) { - this.$set(a, b, parseInt(value)) + this.$set(questionForm, id, parseInt(value)) } else if (valueType === 3) { - this.$set(a, b, parseFloat(value)) - } else if (value.split('.')[1].length >= this.digitPlaces) { - this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces)) - } else { - this.$set(a, b, parseFloat(value)) - } - }, - limitBlur(value,a,b,valueType) { - if (valueType === 0) { - this.$set(a, b, parseInt(value)) - } else if (valueType === 3) { - this.$set(a, b, parseFloat(value)) - }else if (value.split('.')[1].length >= this.digitPlaces) { - this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces)) - } else { - this.$set(a, b, parseFloat(value)) + this.$set(questionForm, id, parseFloat(value)) + }else { + this.$set(questionForm, id, parseFloat(value).toFixed(this.digitPlaces)) } }, setImageUrl(qid, index, tqid, url, RowId) { @@ -777,7 +763,7 @@ export default { }, handleResize() { this.$nextTick(() => { - this.$refs.reportList.doLayout() + this.$refs.reportList ? this.$refs.reportList.doLayout() : '' }) }, // 关闭签名框