slice location显示值根据项目标准配置的保留小数位数进行处理

uat_us
caiyiling 2024-03-18 16:06:38 +08:00
parent cd45362a07
commit dc6340f65c
2 changed files with 7 additions and 4 deletions

View File

@ -99,7 +99,7 @@
</div> </div>
<div class="info-instance"> <div class="info-instance">
<div v-show="dicomInfo.location">Location: {{ dicomInfo.location }}</div> <div v-if="dicomInfo.location">Location: {{ Number(dicomInfo.location).toFixed(digitPlaces) }}</div>
<div v-show="dicomInfo.thick">Slice Thickness: {{ dicomInfo.thick }}mm</div> <div v-show="dicomInfo.thick">Slice Thickness: {{ dicomInfo.thick }}mm</div>
<div v-show="dicomInfo.wwwc">WW/WL: {{ dicomInfo.wwwc }}</div> <div v-show="dicomInfo.wwwc">WW/WL: {{ dicomInfo.wwwc }}</div>
</div> </div>

View File

@ -80,7 +80,8 @@ export default {
criterionType: null, criterionType: null,
spleenInfo: null, spleenInfo: null,
calculateSpleenStatus: '', calculateSpleenStatus: '',
formChanged: false formChanged: false,
digitPlaces:null
} }
}, },
computed: { computed: {
@ -106,6 +107,8 @@ export default {
} }
}, },
mounted() { mounted() {
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.criterionType = parseInt(localStorage.getItem('CriterionType')) this.criterionType = parseInt(localStorage.getItem('CriterionType'))
DicomEvent.$on('setReadingState', readingTaskState => { DicomEvent.$on('setReadingState', readingTaskState => {
this.readingTaskState = readingTaskState this.readingTaskState = readingTaskState
@ -477,7 +480,7 @@ export default {
frame: isNaN(parseInt(measurement.frame)) ? 0 : measurement.frame frame: isNaN(parseInt(measurement.frame)) ? 0 : measurement.frame
} }
if (measurement.type === 'ArrowAnnotate') { if (measurement.type === 'ArrowAnnotate') {
const location = measurement.location ? measurement.location : null const location = measurement.location ? Number(measurement.location).toFixed(this.digitPlaces) : null
this.$set(this.questionForm, this.measurements[idx].QuestionId, location || null) this.$set(this.questionForm, this.measurements[idx].QuestionId, location || null)
if (this.measurements[idx].QuestionType === 60 || this.measurements[idx].QuestionType === 61) { if (this.measurements[idx].QuestionType === 60 || this.measurements[idx].QuestionType === 61) {
var length = this.getSpleenL() var length = this.getSpleenL()
@ -511,7 +514,7 @@ export default {
var sb = this.questionForm[this.spleenBottomId] var sb = this.questionForm[this.spleenBottomId]
sb = isNaN(parseFloat(sb)) ? null : parseFloat(sb) sb = isNaN(parseFloat(sb)) ? null : parseFloat(sb)
if (st && sb) { if (st && sb) {
length = Math.abs(st - sb) length = Math.abs(st - sb).toFixed(this.digitPlaces)
} }
return length return length
}, },