diff --git a/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue b/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue index b751fdce..2fe1ebfe 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue @@ -276,7 +276,7 @@ export default { window.opener.postMessage(data, window.location) }, async receiveMsg(event) { - console.log('nonedicoms', event.data.type) + // console.log('nonedicoms', event.data.type) if (event.data.type === 'isCanActiveNoneDicomTool') { if (event.data.data.isCanActiveTool) { // this.model = 'ArrowAnnotate' @@ -304,8 +304,12 @@ export default { // this.canvasData.splice(i, 1) // } // } - var idx = this.canvasData.findIndex(item => item.data.uuid === event.data.data.data.uuid) - this.canvasData.splice(idx, 1) + if (!event.data.data) { + this.canvasData = [] + } else { + var idx = this.canvasData.findIndex(item => item.data.uuid === event.data.data.data.uuid) + this.canvasData.splice(idx, 1) + } ctx.clearRect(0, 0, this.canvasSize.width, this.canvasSize.height) // 清除画布后立刻重新绘制视觉上形成动画 await ctx.drawImage( this.currentImg, @@ -512,6 +516,11 @@ export default { this.canvasData.push(this.currentDrawData) // 添加当前绘图数据 } } + // 向主窗体发送测量数据 + if (this.model) { + var data = { type: 'setMeasurement', data: this.currentDrawData } + window.opener.postMessage(data, window.location) + } this.isMouseDown = false // 关闭鼠标状态 this.model = '' this.lesionName = '' @@ -519,9 +528,6 @@ export default { x: e.offsetX, // 更新位置 y: e.offsetY } - // 向主窗体发送测量数据 - var data = { type: 'setMeasurement', data: this.currentDrawData } - window.opener.postMessage(data, window.location) }, // 画标注 diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue index 22ea3311..f030df7d 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue @@ -1489,6 +1489,7 @@ export default { this.getOuterQuestions() this.getTableQuestions() this.$emit('resetAnnotations', this.visitTaskId) + DicomEvent.$emit('removeNoneDicomMeasureData', null) } loading.close() } catch (e) {