保存评估结果时验证是否有标注测量为完成
parent
994598c216
commit
0cd33687ee
|
@ -105,10 +105,11 @@ export default {
|
|||
this.resetSuvQuestions()
|
||||
})
|
||||
FusionEvent.$on('addAnnotation', obj => {
|
||||
this.$set(obj, 'SaveEnum', 0)
|
||||
this.$set(obj, 'SaveEnum', 1)
|
||||
this.addAnnotation(obj)
|
||||
})
|
||||
FusionEvent.$on('removeAnnotation', obj => {
|
||||
this.$set(obj, 'SaveEnum', 0)
|
||||
this.removeAnnotation(obj)
|
||||
})
|
||||
FusionEvent.$on('locateAnnotation', obj => {
|
||||
|
@ -235,7 +236,12 @@ export default {
|
|||
handleSave() {
|
||||
this.$refs['questions'].validate((valid) => {
|
||||
if (!valid) return
|
||||
|
||||
// 是否有标记未保存
|
||||
var existUnSave = this.checkAnnotationStatus(this.questions)
|
||||
if (existUnSave) {
|
||||
this.$alert(this.$t('trials:lugano:message:saveWarning1'))
|
||||
return
|
||||
}
|
||||
// 肝脏血池SUVmax
|
||||
const liverSUVmax = !isNaN(parseFloat(this.questionForm[this.liverSuvmaxId])) ? parseFloat(this.questionForm[this.liverSuvmaxId]) : 0
|
||||
// 纵膈血池SUVmax
|
||||
|
@ -295,6 +301,18 @@ export default {
|
|||
this.loading = false
|
||||
})
|
||||
},
|
||||
checkAnnotationStatus(obj) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
if (obj[i].SaveEnum === 1) {
|
||||
return true
|
||||
}
|
||||
if (obj[i].Childrens && obj[i].Childrens.length > 0) {
|
||||
if (this.checkAnnotationStatus(obj[i].Childrens)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
addAnnotation(obj) {
|
||||
const { Id, QuestionType } = obj
|
||||
this.currentQsId = Id
|
||||
|
@ -443,19 +461,19 @@ export default {
|
|||
}
|
||||
},
|
||||
setQuestionStatus(obj, questionType) {
|
||||
console.log(obj, questionType)
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
if (obj[i].QuestionType === questionType) {
|
||||
this.$set(obj[i], 'SaveEnum', 1)
|
||||
break
|
||||
return true
|
||||
}
|
||||
if (obj[i].Childrens && obj[i].Childrens.length > 0) {
|
||||
this.setQuestionStatus(obj[i].Childrens, questionType)
|
||||
if (this.setQuestionStatus(obj[i].Childrens, questionType)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
setOutsideMeasuredData(measurement) {
|
||||
console.log('setOutsideMeasuredData: ', measurement)
|
||||
if ((measurement.data.remark === 'Liver' && this.liverIsInsideVolume === false) || (measurement.data.remark === 'Mediastinum' && this.lungIsInsideVolume === false)) {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ export default {
|
|||
this.addAnnotation(obj)
|
||||
})
|
||||
DicomEvent.$on('removeAnnotation', obj => {
|
||||
this.$set(obj, 'SaveEnum', 0)
|
||||
this.removeAnnotation(obj)
|
||||
})
|
||||
DicomEvent.$on('saveAnnotation', obj => {
|
||||
|
@ -251,8 +252,15 @@ export default {
|
|||
handleSave() {
|
||||
this.$refs['questions'].validate(async(valid) => {
|
||||
if (!valid) return
|
||||
|
||||
// lugano标准校验脾脏状态是否符合要求
|
||||
if (this.criterionType === 2 && this.groupClassify === 3) {
|
||||
// 是否有标记未保存
|
||||
var existUnSave = this.checkAnnotationStatus(this.questions)
|
||||
if (existUnSave) {
|
||||
this.$alert(this.$t('trials:lugano:message:saveWarning'))
|
||||
return
|
||||
}
|
||||
var currentSpleenStatus = this.questionForm[this.spleenStatusId]
|
||||
var currentSpleenLength = this.questionForm[this.spleenLengthId]
|
||||
currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus)
|
||||
|
@ -337,6 +345,18 @@ export default {
|
|||
this.loading = false
|
||||
})
|
||||
},
|
||||
checkAnnotationStatus(obj) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
if (obj[i].SaveEnum === 1) {
|
||||
return true
|
||||
}
|
||||
if (obj[i].Childrens && obj[i].Childrens.length > 0) {
|
||||
if (this.checkAnnotationStatus(obj[i].Childrens)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
setSpleenCommentDisplay() {
|
||||
if (this.spleenCommentsId && this.spleenStatusId) {
|
||||
for (let i = 0; i < this.questions[0].Childrens.length; i++) {
|
||||
|
@ -573,10 +593,12 @@ export default {
|
|||
for (let i = 0; i < obj.length; i++) {
|
||||
if (obj[i].QuestionType === questionType) {
|
||||
this.$set(obj[i], 'SaveEnum', 1)
|
||||
break
|
||||
return true
|
||||
}
|
||||
if (obj[i].Childrens && obj[i].Childrens.length > 0) {
|
||||
this.setQuestionStatus(obj[i].Childrens, questionType)
|
||||
if (this.setQuestionStatus(obj[i].Childrens, questionType)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue