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