From ed82f08b12271461f031b557e0808200033c3d07 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 15 Jan 2024 10:34:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=8F=E8=AE=BF=E6=97=B6?= =?UTF-8?q?=E8=84=BE=E8=84=8F=E7=8A=B6=E6=80=81=E5=92=8C=E8=84=BE=E8=84=8F?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E7=9A=84=E9=80=BB=E8=BE=91=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=EF=BC=8C=E4=BB=A5=E5=8F=8A=E9=98=85=E7=89=87?= =?UTF-8?q?=E4=BA=BA=E6=9B=B4=E6=96=B0=E5=90=8E=E7=9A=84=E8=84=BE=E8=84=8F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=92=8C=E7=B3=BB=E7=BB=9F=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E7=9A=84=E8=84=BE=E8=84=8F=E7=8A=B6=E6=80=81=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=97=B6=EF=BC=8C=E9=9C=80=E8=A6=81=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicoms/components/Fusion/PetCt.vue | 33 +++---- .../dicoms/components/Fusion/Questions.vue | 52 +++++++++- .../dicoms/components/Lugano/QuestionForm.vue | 7 +- .../dicoms/components/QuestionItem.vue | 8 +- .../reading/dicoms/components/Questions.vue | 98 +++++++++++++------ 5 files changed, 146 insertions(+), 52 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue index 551786ee..6311f59c 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue @@ -696,27 +696,26 @@ export default { if (isNotValidAnnotationNum === 0) { this.onAnnotationModified(e) } else { - // annotation.isInsideVolume = false - console.log('异常标记:', annotation) - const { remark } = annotation.data - if (remark === 'Liver' || remark === 'Mediastinum') { - this.$refs['questions'].setOutsideMeasuredData(annotation) - } else { - this.$refs['tableQuestions'].setOutsideMeasuredData(annotation) - } - // // 移除标记 - // this.removeAnnotation({ otherMeasureData: annotation }) + // console.log('异常标记:', annotation) // const { remark } = annotation.data - // // 清除病灶上的标记信息 // if (remark === 'Liver' || remark === 'Mediastinum') { - // this.$refs['questions'].clearMeasuredData(remark) - // // 激活工具 - // this.setNonTargetMeasurementStatus({ status: true, toolName: 'CircleROI' }) + // this.$refs['questions'].setOutsideMeasuredData(annotation) // } else { - // this.$refs['tableQuestions'].clearMeasuredData() - // // 激活工具 - // this.setBasicToolActive('CircleROI') + // this.$refs['tableQuestions'].setOutsideMeasuredData(annotation) // } + // 移除标记 + this.removeAnnotation({ otherMeasureData: annotation }) + const { remark } = annotation.data + // 清除病灶上的标记信息 + if (remark === 'Liver' || remark === 'Mediastinum') { + this.$refs['questions'].clearMeasuredData(remark) + // 激活工具 + this.setNonTargetMeasurementStatus({ status: true, toolName: 'CircleROI' }) + } else { + this.$refs['tableQuestions'].clearMeasuredData() + // 激活工具 + this.setBasicToolActive('CircleROI') + } } }, 120) eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_MODIFIED, (e) => { 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 94e6e819..876fc587 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 @@ -57,8 +57,8 @@ export default { lungSuvmaxId: '', suvmaxId: '', questionFormChangeState: false, - questionFormChangeNum: 0 - + questionFormChangeNum: 0, + isInsideVolume: true } }, computed: { @@ -188,6 +188,17 @@ export default { handleSave() { this.$refs['questions'].validate((valid) => { if (!valid) return + if (!this.isInsideVolume) { + this.$alert('当前标记在图像外,不允许保存!', '提示', { + callback: action => { + this.$message({ + type: 'info', + message: `action: ${action}` + }) + } + }) + return + } // 肝脏血池SUVmax const liverSUVmax = !isNaN(parseFloat(this.questionForm[this.liverSuvmaxId])) ? parseFloat(this.questionForm[this.liverSuvmaxId]) : 0 // 纵膈血池SUVmax @@ -265,7 +276,9 @@ export default { } this.$emit('setNonTargetMeasurementStatus', { status: true, toolName: 'CircleROI' }) }, + removeAnnotation(obj) { + console.log('question_removeAnnotation') const { Id } = obj var idx = this.measurements.findIndex(i => i.QuestionId === Id) if (idx === -1) return @@ -273,6 +286,7 @@ export default { this.setpet5PS() FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.measurements[idx].OtherMeasureData, type: 'clear' }) this.measurements.splice(idx, 1) + console.log( this.measurements) this.questionFormChangeState = true }, locateAnnotation(obj) { @@ -285,6 +299,7 @@ export default { FusionEvent.$emit('imageLocation', { otherMeasureData: otherMeasureData }) }, setMeasuredData(measurement) { + this.isInsideVolume = true var idx = -1 if (this.currentQsId) { // 新增 @@ -316,6 +331,39 @@ export default { FusionEvent.$emit('addOrUpdateAnnotations', { data }) this.questionFormChangeState = true }, + setOutsideMeasuredData(measurement) { + this.isInsideVolume = false + var idx = -1 + if (this.currentQsId) { + // 新增 + idx = this.measurements.findIndex(i => i.QuestionId === this.currentQsId) + this.currentQsId = '' + } else { + // 编辑 + idx = this.measurements.findIndex(i => i.OrderMarkName === measurement.data.remark) + } + if (idx === -1) return + var obj = this.measurements[idx] + var remark = obj.QuestionType === 51 ? 'Liver' : obj.QuestionType === 52 ? 'Mediastinum' : '' + measurement.data.remark = remark + this.measurements[idx].OtherMeasureData = measurement + this.measurements[idx].OtherMarkTool = measurement.metadata.toolName + + // 添加标记 + var data = { + OtherMeasureData: measurement, + QuestionId: obj.QuestionId, + VisitTaskId: this.visitTaskId, + OrderMarkName: remark + } + if (measurement.metadata.toolName === 'CircleROI') { + // const suvMax = measurement.suvMax + this.$set(this.questionForm, obj.QuestionId, null) + this.setpet5PS() + } + FusionEvent.$emit('addOrUpdateAnnotations', { data }) + this.questionFormChangeState = true + }, clearMeasuredData(remark) { var idx = this.measurements.findIndex(i => i.OrderMarkName === remark) if (idx === -1) return diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionForm.vue b/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionForm.vue index 5b5faa12..9387578c 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionForm.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionForm.vue @@ -192,7 +192,7 @@ label="SUV测量截图" v-if="answers.OtherPicturePath" > - Image + Image @@ -1808,6 +1808,11 @@ export default { .input-width2{ width: 100% !important; } + .suv_viewer{ + /deep/ .viewer-play { + display: none; + } + } } diff --git a/src/views/trials/trials-panel/reading/dicoms/components/QuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/components/QuestionItem.vue index 451d124f..5922da6b 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/QuestionItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/QuestionItem.vue @@ -341,8 +341,12 @@ export default { }, methods: { formItemChange(v, question) { - if (question.QuestionType === 49 && parseInt(v) !== 5) { - return + // if (parseInt(v) !== 5) { + // return + // } + if(question.QuestionType === 49){ + console.log(question,v) + this.$emit('setFormItemData', {key:question.Id,val:v}) } if (question.Childrens.length > 0) { this.resetChild(question.Childrens) 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 3af9cd53..043e3223 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue @@ -76,6 +76,7 @@ export default { measurements: [], spleenStatusId: '', spleenLengthId: '', + spleenCommentsId:'', isBaseLineTask: false, criterionType: null, spleenInfo:null, @@ -93,14 +94,6 @@ export default { if(this.isQulityIssues){ DicomEvent.$emit('questionFormChange', true) } - // if(this.criterionType === 2 && this.groupClassify === 3 && this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]){ - // for (let i = 0; i < this.questions[0].Childrens.length; i++) { - // if (this.questions[0].Childrens[i].QuestionType === 49) { - // this.questions[0].Childrens[i].ShowQuestion = 2 - // break - // } - // } - // } } }, currentReadingTaskState: { @@ -126,6 +119,7 @@ export default { }, methods: { async getQuestions(visitTaskId) { + console.log('getQuestions') this.visitTaskId = visitTaskId // const loading = this.$loading({ fullscreen: true }) var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId) @@ -152,7 +146,7 @@ export default { var v = questions[i] v.IsBaseLineTask = this.isBaseLineTask if (v.Type === 'group' && v.GroupClassify !== this.groupClassify) continue - if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') { + if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && i.Id) { this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null) if (v.QuestionType === 44) { // 影像质量评估 @@ -166,8 +160,10 @@ export default { if (v.QuestionType === 48) { // 脾脏长度 this.spleenLengthId = v.Id - this.calculateSpleenStatus = '' - this.setSpleenStatus(this.questionForm[this.spleenLengthId]) + } + if(v.QuestionType === 58){ + //修改脾脏状态备注 + this.spleenCommentsId = v.Id } } if (v.Childrens.length > 0) { @@ -177,6 +173,10 @@ export default { } // this.questions = questions } + if(this.spleenLengthId){ + this.calculateSpleenStatus = this.setSpleenStatus(this.questionForm[this.spleenLengthId]) + this.setSpleenCommentDisplay() + } // loading.close() }, setChild(obj) { @@ -196,6 +196,11 @@ export default { if (i.QuestionType === 48) { // 脾脏长度 this.spleenLengthId = i.Id + + } + if(i.QuestionType === 58){ + //修改脾脏状态备注 + this.spleenCommentsId = i.Id } } if (i.Childrens && i.Childrens.length > 0) { @@ -268,7 +273,6 @@ export default { var trialId = this.$route.query.trialId await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId }) this.getQuestions(this.visitTaskId) - this.loading = false if(this.isQulityIssues){ DicomEvent.$emit('questionFormChange', false) @@ -292,6 +296,24 @@ export default { this.loading = false }) }, + setSpleenCommentDisplay(){ + console.log('setSpleenCommentDisplay') + if( this.spleenCommentsId && this.spleenStatusId ){ + for (let i = 0; i < this.questions[0].Childrens.length; i++) { + if (this.questions[0].Childrens[i].QuestionType === 58) { + if(this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]){ + this.questions[0].Childrens[i].ShowQuestion = 0 + this.questions[0].Childrens[i].IsRequired = 0 + }else{ + this.questions[0].Childrens[i].ShowQuestion = 2 + this.questions[0].Childrens[i].IsRequired = 3 + this.questionForm[this.spleenCommentsId] = '' + } + break + } + } + } + }, async getSplenicState() { try { var spleenLength = this.questionForm[this.spleenLengthId] @@ -376,6 +398,8 @@ export default { await store.dispatch('reading/removeNonTargetMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.measurements[idx].MeasureData, questionId: Id }) this.measurements.splice(idx, 1) DicomEvent.$emit('getMeasureData') + this.calculateSpleenStatus = '' + this.setSpleenCommentDisplay() }, locateAnnotation(obj) { const { Id } = obj @@ -424,8 +448,9 @@ export default { const length = measurement.data.length ? measurement.data.length : null this.$set(this.questionForm, this.measurements[idx].QuestionId, length || null) if (this.measurements[idx].QuestionType === 48){ - this.calculateSpleenStatus = '' - this.setSpleenStatus(length) + var status = this.setSpleenStatus(length) + this.$set(this.questionForm, this.spleenStatusId, status) + this.calculateSpleenStatus = status } // if (this.measurements[idx].QuestionType === 48 && length <= 130 && this.isBaseLineTask) { @@ -443,17 +468,20 @@ export default { } }, setSpleenStatus(length){ + var status = '' if(length){ if(this.isBaseLineTask){ // 直径≤130mm时,系统默认脾脏状态为“正常” if(length <= 130){ - this.$set(this.questionForm, this.spleenStatusId, '1') - this.calculateSpleenStatus = '1' + // this.$set(this.questionForm, this.spleenStatusId, '1') + // this.calculateSpleenStatus = '1' + status = '1' } // 直径>130mm时,系统默认脾脏状态为“肿大” if(length > 130){ - this.$set(this.questionForm, this.spleenStatusId, '6') - this.calculateSpleenStatus = '6' + // this.$set(this.questionForm, this.spleenStatusId, '6') + // this.calculateSpleenStatus = '6' + status = '6' } }else{ // 与基线相比脾垂直径变化值 @@ -467,40 +495,47 @@ export default { // 2、与基线相比脾垂直径变化值≥10 mm // 3、与基线相比脾肿大增加的百分比>50% // 系统默认脾脏状态为“显著增大” - this.$set(this.questionForm, this.spleenStatusId, '4') - this.calculateSpleenStatus = '4' + // this.$set(this.questionForm, this.spleenStatusId, '4') + // this.calculateSpleenStatus = '4' + status = '4' }else if( this.spleenInfo.BaseLineSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){ // 1、基线垂直径≤130mm // 2、与基线相比脾垂直径变化值≥20 mm // 3、当前垂直径>130 mm // 系统默认脾脏状态为“显著增大” - this.$set(this.questionForm, this.spleenStatusId, '4') - this.calculateSpleenStatus = '4' + // this.$set(this.questionForm, this.spleenStatusId, '4') + // this.calculateSpleenStatus = '4' + status = '4' }else if( this.spleenInfo.BaseLineSpleenLength > 130 && this.spleenInfo.LowSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){ // 1、基线 垂直径>130 mm // 2、当前访视的前面访视中 存在垂直径≤130mm // 3、与最低点相比脾脏垂直径的增加值≥20 mm // 4、当前垂直径>130 mm // 系统默认脾脏状态为“显著增大” - this.$set(this.questionForm, this.spleenStatusId, '4') - this.calculateSpleenStatus = '4' + // this.$set(this.questionForm, this.spleenStatusId, '4') + // this.calculateSpleenStatus = '4' + status = '4' }else if(length < 130){ // 当前访视的垂直径≤130mm // 系统默认脾脏状态为“正常” - this.$set(this.questionForm, this.spleenStatusId, '1') - this.calculateSpleenStatus = '1' + // this.$set(this.questionForm, this.spleenStatusId, '1') + // this.calculateSpleenStatus = '1' + status = '1' }else if(this.spleenInfo.BaseLineState === '6' && percentFormBaseline < -50){ // 1、基线期 状态为“肿大” // 2、与基线相比脾肿大增加的百分比小于-50% // 系统默认脾脏状态为“部分缓解” - this.$set(this.questionForm, this.spleenStatusId, '2') - this.calculateSpleenStatus = '2' + // this.$set(this.questionForm, this.spleenStatusId, '2') + // this.calculateSpleenStatus = '2' + status = '2' }else{ - this.$set(this.questionForm, this.spleenStatusId, '3') - this.calculateSpleenStatus = '3' + // this.$set(this.questionForm, this.spleenStatusId, '3') + // this.calculateSpleenStatus = '3' + status = '3' } } } + return status }, resetFormItemData(v) { this.questionForm[v] = null @@ -514,6 +549,9 @@ export default { }, setFormItemData(obj) { this.questionForm[obj.key] = obj.val + if(obj.key === this.spleenStatusId){ + this.setSpleenCommentDisplay() + } } } }