From e04e94a792c8dcdce1255c2b8e23e0d078cb1409 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 22 May 2026 13:57:58 +0800 Subject: [PATCH] =?UTF-8?q?total=E6=95=B0=E5=80=BC=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 24 ++++++------------- .../components/customize/QuestionList.vue | 13 ++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index 7cc0fb81..49c168e8 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -653,7 +653,7 @@ const newStyles = { } } annotation.config.style.setDefaultToolStyles(newStyles) -const { MouseBindings, Events: toolsEvents } = csToolsEnums +const { MouseBindings, Events: toolsEvents, ChangeTypes } = csToolsEnums export default { name: 'ReadPage', components: { @@ -974,7 +974,6 @@ export default { this.tools = getCustomizeStandardsTools(this.taskInfo.ReadingToolList) const toolNames = this.tools.map(i => i.toolName) this.customizeStandards = config.customizeStandards.filter(item => !toolNames.includes(item.toolName)) - console.log(this.customizeStandards, 'this.customizeStandards') } else { this.tools = getTools(this.criterionType) } @@ -1058,7 +1057,6 @@ export default { let imageId = imageIds[0] const imagePixelModule = metaData.get('imagePixelModule', imageId); const photometricInterpretation = imagePixelModule?.photometricInterpretation; - console.log(photometricInterpretation, 'photometricInterpretation') if (photometricInterpretation && photometricInterpretation !== 'MONOCHROME1' && photometricInterpretation !== 'MONOCHROME2') return this.$confirm(this.$t('trials:histogram:confirm:photometricInterpretationNotSupported')) this.histogramVisible = true this.setToolsPassive() @@ -1939,12 +1937,6 @@ export default { // this.toolModeChanged // ) }, - toolModeChanged(e) { - console.log(e) - const arr = cornerstoneTools.annotation.state.getAllAnnotations() - // if (arr) - console.log(arr) - }, annotationAddedListener(e) { }, @@ -1978,12 +1970,13 @@ export default { }, annotationModifiedListener(e) { console.log('Modified') - const { annotation } = e.detail + const { annotation, changeType } = e.detail + const isStatsUpdated = changeType === ChangeTypes.StatsUpdated if (!annotation) return if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation) if (this.readingTaskState === 2) return - if (!annotation.highlighted) return + if (!annotation.highlighted && !isStatsUpdated) return if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) { @@ -2040,7 +2033,6 @@ export default { const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) { const referencedImageId = annotation.metadata.referencedImageId - console.log(annotation, 'annotation') const params = this.getInstanceInfo(referencedImageId) annotation.visitTaskId = series.TaskInfo.VisitTaskId annotation.studyId = series.StudyId @@ -2114,12 +2106,13 @@ export default { } }, customAnnotationModifiedListener(e) { - const { annotation } = e.detail + const { annotation, changeType } = e.detail + const isStatsUpdated = changeType === ChangeTypes.StatsUpdated if (!annotation) return if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation) if (this.readingTaskState === 2) return - if (!annotation.highlighted) return + if (!annotation.highlighted && !isStatsUpdated) return const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName) if (i === -1) { if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive() @@ -2216,7 +2209,6 @@ export default { } }, contentMouseup(e) { - console.log('contentMouseup') if (this.$refs.Segmentations) { this.$refs.Segmentations.contentMouseup() } @@ -3395,7 +3387,6 @@ export default { this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resize(true) } else if (shortcutKeyEnum === 15) { // 截图 - console.log("截图") this.saveImage() } else if (shortcutKeyEnum === 16) { // 反色 @@ -4061,7 +4052,6 @@ export default { }) }, setToolToTarget(obj) { - console.log('setToolToTarget') if (obj.visitTaskId === this.taskInfo.VisitTaskId && this.readingTaskState !== 2 && obj.markTool && !obj.isMarked) { const toolName = obj.markTool if (this.activeTool) { diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue index 38c3ce25..29eadf0c 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue @@ -1263,10 +1263,23 @@ export default { } else if (this.isNoneDicom && value !== null) { value = this.reRound(csUtils.roundNumber(value), this.digitPlaces) } + if (prop === 'total' && value !== null) { + return this.formatStatSum(value) + } return value !== null ? parseFloat(value).toFixed(this.digitPlaces) : value }, + formatStatSum(value) { + const num = Number(value) + if (!Number.isFinite(num)) return value + + if (Math.abs(num - Math.round(num)) < 1e-6) { + return String(Math.round(num)) + } + + return this.reRound(num, this.digitPlaces) + }, reRound(result, finalPrecision) { if (typeof result === 'string' && result.includes(', ')) { const numStrs = result.split(', ')