diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue index fe2f8416..40daaef4 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue @@ -159,6 +159,7 @@ export default { this.loading = true var res = await getReadingCalculationData({ visitTaskId: this.visitTaskId }) this.baseLinePET5PS = res.Result.BaseLinePET5PS + this.calculatePet5PS = res.Result.CalculatePET5PS this.loading = false } this.initList(true) @@ -184,7 +185,6 @@ export default { } }) this.questions = questions - this.calculatePet5PS = this.setpet5PS() this.setPet5PSCommentDisplay() this.measurements = [] res.OtherInfo.QuestionMarkInfoList.forEach(i => { @@ -249,23 +249,7 @@ export default { this.$alert(this.$t('trials:lugano:message:saveWarning1'), this.$t('trials:lugano:fusionDialog:warning')) return } - // 肝脏血池SUVmax - const liverSUVmax = !isNaN(parseFloat(this.questionForm[this.liverSuvmaxId])) ? parseFloat(this.questionForm[this.liverSuvmaxId]) : 0 - // 纵膈血池SUVmax - const lungSUVmax = !isNaN(parseFloat(this.questionForm[this.lungSuvmaxId])) ? parseFloat(this.questionForm[this.lungSuvmaxId]) : 0 - // const pet5PS = !isNaN(parseInt(this.questionForm[this.pet5PSId])) ? parseInt(this.questionForm[this.pet5PSId]) : 0 - if (liverSUVmax && lungSUVmax && (liverSUVmax <= lungSUVmax)) { - // '当前肝脏血池SUVmax≤纵隔血池血池SUVmax,请确认!' - this.$confirm(this.$t('trials:lugano:message:validLung'), this.$t('trials:lugano:fusionDialog:warning'), { - type: 'warning' - }).then(() => { - this.saveQuestionsForm() - }).catch(() => { - - }) - } else { - this.saveQuestionsForm() - } + this.saveQuestionsForm() // else if (pet5PS > 1 && (!liverSUVmax || !lungSUVmax)) { // this.$alert('pet 5ps评分不为1,X或者NE,需要进行标记!', '提示', { // // confirmButtonText: '确定', @@ -344,11 +328,11 @@ export default { var idx = this.measurements.findIndex(i => i.QuestionId === Id) if (idx === -1) return this.$set(this.questionForm, Id, '') - var pet5PS = this.setpet5PS() - this.questionForm[this.pet5PSId] = pet5PS - this.calculatePet5PS = pet5PS - this.setPet5PSCommentDisplay() - this.setUptakeFormBaseline() + // var pet5PS = this.setpet5PS() + // this.questionForm[this.pet5PSId] = pet5PS + // this.calculatePet5PS = pet5PS + // this.setPet5PSCommentDisplay() + // this.setUptakeFormBaseline() FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.measurements[idx].OtherMeasureData, type: 'clear' }) var remark = this.measurements[idx].OtherMeasureData.data.remark remark === 'Liver' ? this.liverIsInsideVolume = true : remark === 'Mediastinum' ? this.lungIsInsideVolume = true : '' @@ -373,8 +357,26 @@ export default { }) return } - const loading = this.$loading({ fullscreen: true }) + // 肝脏血池SUVmax + const liverSUVmax = !isNaN(parseFloat(this.questionForm[this.liverSuvmaxId])) ? parseFloat(this.questionForm[this.liverSuvmaxId]) : 0 + // 纵膈血池SUVmax + const lungSUVmax = !isNaN(parseFloat(this.questionForm[this.lungSuvmaxId])) ? parseFloat(this.questionForm[this.lungSuvmaxId]) : 0 + // const pet5PS = !isNaN(parseInt(this.questionForm[this.pet5PSId])) ? parseInt(this.questionForm[this.pet5PSId]) : 0 + if (liverSUVmax && lungSUVmax && (liverSUVmax <= lungSUVmax)) { + // '当前肝脏血池SUVmax≤纵隔血池血池SUVmax,请确认!' + this.$confirm(this.$t('trials:lugano:message:validLung'), this.$t('trials:lugano:fusionDialog:warning'), { + type: 'warning' + }).then(() => { + this.handleSaveAnnotation(question) + }).catch(() => { + }) + } else { + this.handleSaveAnnotation(question) + } + }, + handleSaveAnnotation(question) { + const loading = this.$loading({ fullscreen: true }) // 获取截图 var answers = [] var questionMarkInfoList = [] @@ -414,6 +416,7 @@ export default { window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location) loading.close() this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) + this.resetSuvQuestions(1) }).catch(() => { loading.close() }) @@ -454,17 +457,20 @@ export default { OrderMarkName: remark } if (measurement.type === 'CircleROI') { - const suvMax = measurement.suvMax - - if (this.questionForm[obj.QuestionId] !== suvMax) { - this.setPet5PSCommentDisplay() - this.$set(this.questionForm, obj.QuestionId, suvMax || null) - var pet5PS = this.setpet5PS() - this.questionForm[this.pet5PSId] = pet5PS - this.calculatePet5PS = pet5PS - this.setUptakeFormBaseline() - } + this.$set(this.questionForm, obj.QuestionId, measurement.suvMax || null) } + // if (measurement.type === 'CircleROI') { + // const suvMax = measurement.suvMax + + // if (this.questionForm[obj.QuestionId] !== suvMax) { + // this.setPet5PSCommentDisplay() + // this.$set(this.questionForm, obj.QuestionId, suvMax || null) + // var pet5PS = this.setpet5PS() + // this.questionForm[this.pet5PSId] = pet5PS + // this.calculatePet5PS = pet5PS + // this.setUptakeFormBaseline() + // } + // } FusionEvent.$emit('addOrUpdateAnnotations', { data }) this.questionFormChangeState = true if (obj.QuestionType === 51 && !this.liverRender) { @@ -519,13 +525,16 @@ export default { OrderMarkName: remark } if (measurement.type === 'CircleROI') { - this.setPet5PSCommentDisplay() this.$set(this.questionForm, obj.QuestionId, null) - var pet5PS = this.setpet5PS() - this.questionForm[this.pet5PSId] = pet5PS - this.calculatePet5PS = pet5PS - this.setUptakeFormBaseline() } + // if (measurement.type === 'CircleROI') { + // this.setPet5PSCommentDisplay() + // this.$set(this.questionForm, obj.QuestionId, null) + // var pet5PS = this.setpet5PS() + // this.questionForm[this.pet5PSId] = pet5PS + // this.calculatePet5PS = pet5PS + // this.setUptakeFormBaseline() + // } FusionEvent.$emit('addOrUpdateAnnotations', { data }) this.questionFormChangeState = true this.setQuestionStatus(this.questions, this.measurements[idx].QuestionType) @@ -534,11 +543,11 @@ export default { var idx = this.measurements.findIndex(i => i.OrderMarkName === remark) if (idx === -1) return this.$set(this.questionForm, this.measurements[idx].QuestionId, '') - var pet5PS = this.setpet5PS() - this.questionForm[this.pet5PSId] = pet5PS - this.calculatePet5PS = pet5PS - this.setPet5PSCommentDisplay() - this.setUptakeFormBaseline() + // var pet5PS = this.setpet5PS() + // this.questionForm[this.pet5PSId] = pet5PS + // this.calculatePet5PS = pet5PS + // this.setPet5PSCommentDisplay() + // this.setUptakeFormBaseline() this.measurements[idx].OtherMeasureData = '' this.currentQsId = this.measurements[idx].QuestionId // const { QuestionId, QuestionType } = this.measurements[idx] @@ -575,7 +584,7 @@ export default { setUptakeFormBaseline() { // 自动计算与基线相比摄取值变化 if (!this.isBaseLineTask) { - console.log('setUptakeFormBaseline: ',this.questionForm[this.pet5PSId],this.baseLinePET5PS) + console.log('setUptakeFormBaseline: ', this.questionForm[this.pet5PSId], this.baseLinePET5PS) if (this.questionForm[this.pet5PSId] > 0) { // 当前访视的PET 5ps评分大于基线的PET 5ps评分 增大 // 当前访视的PET 5ps评分小于基线的PET 5ps评分 减小 @@ -619,7 +628,7 @@ export default { return '' } }, - resetSuvQuestions() { + resetSuvQuestions(type = 0) { this.loading = true var params = { trialId: this.trialId, @@ -634,40 +643,41 @@ export default { // this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null) // } if (v.Childrens.length > 0) { - this.setSuvChild(v.Childrens) + this.setSuvChild(v.Childrens, type) } - var pet5PS = this.setpet5PS() - this.questionForm[this.pet5PSId] = pet5PS - this.calculatePet5PS = pet5PS - this.setPet5PSCommentDisplay() - this.setUptakeFormBaseline() + // var pet5PS = this.setpet5PS() + // this.questionForm[this.pet5PSId] = pet5PS + // this.calculatePet5PS = pet5PS + // this.setPet5PSCommentDisplay() + // this.setUptakeFormBaseline() this.questionFormChangeState = true }) this.loading = false }).catch(() => { this.loading = false }) }, - setSuvChild(obj) { + setSuvChild(obj, type) { obj.forEach(i => { - if (i.QuestionType === 53) { + if (i.QuestionType === 53 && !type) { // SUVmax; this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null) } - if (i.QuestionType === 54) { + if (i.QuestionType === 54 && !type) { // SUVmax所在病灶; this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null) } - // if (i.QuestionType === 55) { - // // PET 5PS评分; - // this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null) - // } - // if (i.QuestionType === 56) { - // // 与基线相比摄取值变化; - // this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null) - // } + if (i.QuestionType === 55) { + // PET 5PS评分; + this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null) + this.calculatePet5PS = i.Answer + } + if (i.QuestionType === 56) { + // 与基线相比摄取值变化; + this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null) + } if (i.Childrens && i.Childrens.length > 0) { - this.setSuvChild(i.Childrens) + this.setSuvChild(i.Childrens, type) } }) }, diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue index 59cef3ee..a60bf11b 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue @@ -30,7 +30,7 @@