From 9ff7928b16c85b3479a7a419bbcb746dcf88ad38 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 6 May 2026 14:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8C=BF=E5=90=8D=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dicom/DicomCanvas.vue | 2 +- src/components/Dicom/DicomViewer.vue | 40 +++++++++++++++++++++------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/components/Dicom/DicomCanvas.vue b/src/components/Dicom/DicomCanvas.vue index 45721380..a82ec638 100644 --- a/src/components/Dicom/DicomCanvas.vue +++ b/src/components/Dicom/DicomCanvas.vue @@ -304,7 +304,7 @@ export default { cornerstoneTools.addToolForElement(element, Note_RectangleRoiTool, { configuration: { color: '#f00', - lineWidth: 0.5, + lineWidth: 2, drawHandles: false, fillColor: 'rgba(0, 0, 0, 1)', }, diff --git a/src/components/Dicom/DicomViewer.vue b/src/components/Dicom/DicomViewer.vue index 9b916af2..6fa58ec3 100644 --- a/src/components/Dicom/DicomViewer.vue +++ b/src/components/Dicom/DicomViewer.vue @@ -9,10 +9,10 @@
{{ + @click="setToolActive($event, 'Note_RectangleRoi', true)">{{ $t('DicomViewer:anonymous:Note_RectangleRoi') }}
{{ + @click="setToolActive($event, 'Eraser', true)">{{ $t('DicomViewer:anonymous:Eraser') }}
{{ @@ -299,7 +299,8 @@ v-if="type === 'Study' && modality && ['PT、CT', 'CT、PT', 'PET-CT'].includes(modality)">
{{ $t('trials:tab:patientData') }}
- + { + this.$nextTick(() => { this.getPatientInfo() }) - } + } } } } @@ -641,7 +642,7 @@ export default { }) }) let res = await this.studyMaskImage(data) - if (!res) return false + if (!res || res.length <= 0) return false this.$emit("update:loading", true) if (!isAll) { let strs = image.imageId.split("?") @@ -839,8 +840,25 @@ export default { } }) }, - setToolActive(e, toolName) { + setToolActive(e, toolName, isNotSetClassName = false) { const elements = document.querySelectorAll('.dicom-item') + if (isNotSetClassName) { + const scope = this + if (scope.activeTool) { + Array.from(elements).forEach((element, index) => { + if (element.style.display !== 'none') { + scope.$refs[`dicomCanvas${index}`].setToolPassive(scope.activeTool) + } + }) + } + if (scope.activeTool === toolName) return scope.activeTool = null + scope.activeTool = toolName + return Array.from(elements).forEach((element, index) => { + if (element.style.display !== 'none') { + scope.$refs[`dicomCanvas${index}`].setToolActive(toolName) + } + }) + } if (e.currentTarget.classList.contains('activeTool')) { e.currentTarget.classList.remove('activeTool') const scope = this @@ -1020,7 +1038,7 @@ export default { try { this.formLoading = true let studyId = this.$route.query.studyId - let res = await getPatientInfo({studyId: studyId}) + let res = await getPatientInfo({ studyId: studyId }) this.formData = { Id: res.Result.Id || '', PatientSex: res.Result.PatientSex || '', @@ -1035,7 +1053,7 @@ export default { // 缓存 PT 临床数据:用于 2D SUV 计算时优先使用接口/人工录入值 this.cachePtClinicalDataToInstances() this.formLoading = false - } catch(e) { + } catch (e) { this.formLoading = false console.log(e) } @@ -1161,6 +1179,7 @@ export default { cursor: pointer; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .7); + color: #000; &:hover { background-color: rgba(255, 255, 255, .5); @@ -1168,7 +1187,8 @@ export default { } .activeBtn { - background-color: rgba(255, 255, 255, .5); + background-color: #16477b90; + color: #fff; } .isNoted {