非dicom报告页数值类型问题精度bug修复
continuous-integration/drone/push Build is running Details

uat_us
caiyiling 2024-09-04 09:32:31 +08:00
parent a7c0ae6d7a
commit 615c91b197
1 changed files with 9 additions and 23 deletions

View File

@ -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-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]" v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
:disabled="scope.row.DataSource === 1" :disabled="scope.row.DataSource === 1"
@onblur="limitBlur($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)"
@input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
size="mini" size="mini"
@focus="() => {questionId = scope.row.QuestionId}" @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-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]" v-model="questionForm[scope.row.QuestionId]"
:disabled="scope.row.DataSource === 1" :disabled="scope.row.DataSource === 1"
@onblur="limitBlur($event, questionForm, scope.row.QuestionId, scope.row.ValueType)" @blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)"
@input="limitInput($event, questionForm, scope.row.QuestionId, scope.row.ValueType)"
size="mini" size="mini"
@focus="() => {questionId = scope.row.QuestionId}" @focus="() => {questionId = scope.row.QuestionId}"
> >
@ -368,26 +366,14 @@ export default {
DicomEvent.$off('getReportInfo') DicomEvent.$off('getReportInfo')
}, },
methods: { methods: {
limitInput(value, a, b, valueType) { limitBlur(questionForm,id,valueType) {
let value = questionForm[id]
if (valueType === 0) { if (valueType === 0) {
this.$set(a, b, parseInt(value)) this.$set(questionForm, id, parseInt(value))
} else if (valueType === 3) { } else if (valueType === 3) {
this.$set(a, b, parseFloat(value)) this.$set(questionForm, id, parseFloat(value))
} else if (value.split('.')[1].length >= this.digitPlaces) { }else {
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces)) this.$set(questionForm, id, 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))
} }
}, },
setImageUrl(qid, index, tqid, url, RowId) { setImageUrl(qid, index, tqid, url, RowId) {
@ -777,7 +763,7 @@ export default {
}, },
handleResize() { handleResize() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.reportList.doLayout() this.$refs.reportList ? this.$refs.reportList.doLayout() : ''
}) })
}, },
// //