From 7afbc360e59971846bc9bd8840b7e536dbf2bbca Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Fri, 17 Apr 2026 15:52:55 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E5=88=86=E6=AE=B5?=
=?UTF-8?q?=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E8=AE=A1=E7=AE=97=E9=95=BF?=
=?UTF-8?q?=E7=9F=AD=E5=BE=84=E4=BF=9D=E5=AD=98=EF=BC=8C=E5=88=B7=E6=96=B0?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=90=8E=E8=AE=A1=E7=AE=97=E5=80=BC=E5=85=A8?=
=?UTF-8?q?=E9=83=A8=E5=8F=98=E4=B8=BA0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reading/dicoms3D/components/SegmentForm.vue | 1 -
.../dicoms3D/components/Segmentations.vue | 16 ++++++++++++----
.../reading/dicoms3D/components/StudyList.vue | 17 +++++++++++++++--
.../components/customize/QuestionList.vue | 2 +-
.../components/helpers/segmentations.js | 2 --
5 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/SegmentForm.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/SegmentForm.vue
index 53de004f..198f45c0 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/SegmentForm.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/SegmentForm.vue
@@ -146,7 +146,6 @@ export default {
},
async handleChange(e, key) {
if (key === 'study') {
- console.log(this.studyList, 'this.studyList')
this.seriesList = this.studyList.find(item => item.StudyId === this.form.studyId).SeriesArr
}
if (key === 'series') {
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
index 65f9f40b..36b2b14d 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
@@ -202,7 +202,8 @@
{{ k }}
- {{ Number(item.stats[k].value).toFixed(2)
+ {{ JSON.stringify(item.stats[k].value) !== 'null' ?
+ Number(item.stats[k].value).toFixed(2) : null
}}{{ item.stats[k].unit }}
@@ -402,13 +403,12 @@ export default {
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
// console.log(segmentation, 'segmentation')
// console.log(annotation, 'annotation')
- console.log(cache, 'cache')
+ // console.log(cache, 'cache')
eventTarget.addEventListener(
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
this.segmentationModifiedCallback
);
DicomEvent.$on('activeSeries', (series) => {
- console.log(series, 'series')
let { TaskInfo = {}, Id } = series
if (this.isMPR) return false
if (Id === this.series.Id && TaskInfo.VisitTaskId === this.visitInfo.VisitTaskId) return false
@@ -897,6 +897,8 @@ export default {
annotations.forEach(item => {
annotation.state.removeAnnotation(item.annotationUID)
})
+ let f = this.segmentList.some(item => item.segUrl)
+ DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
if (this.segmentList.length > 0) {
this.segmentationId = this.segmentList[0].segmentationId;
this.selectSegmentGroup()
@@ -1471,6 +1473,7 @@ export default {
}
this.$emit("update:globalLoading", true)
this.$emit("update:loadingText", this.$t("segment:loadingText:saveSegmentation"))
+ let IsBeSegment = false
for (let i = 0; i < segmentList.length; i++) {
let segmentGroup = segmentList[i]
// 将所有分割进行锁定
@@ -1487,6 +1490,7 @@ export default {
}/${this.series.Id}/${segmentGroup.name}.dcm`
const result = await this.OSSclient.put(path, blob)
segmentGroup.segUrl = this.$getObjectName(result.url)
+ DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: true })
} else {
segmentGroup.segUrl = null
}
@@ -1498,6 +1502,10 @@ export default {
this.syncBindingAnswer(segmentList)
}
}
+ if (!IsBeSegment) {
+ let f = this.segmentList.some(item => item.segUrl)
+ DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: f })
+ }
this.$emit("update:globalLoading", false)
} catch (err) {
this.loading = false
@@ -1535,7 +1543,7 @@ export default {
segmentationId: list[0].segmentationId,
segmentIndices: list.map(item => item.segmentIndex),
});
- console.log(bidirectionalData)
+ // console.log(bidirectionalData)
if (bidirectionalData.length <= 0) {
list.forEach(item => {
let annotations = annotation.state.getAllAnnotations().filter(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex);
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue
index c32bc205..14a05bde 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue
@@ -89,8 +89,8 @@
}} image
-
+
@@ -151,6 +151,19 @@ export default {
this.$nextTick(() => {
this.activeStudy(this.studyList[0].StudyId)
})
+ DicomEvent.$on('IsBeSegment', (obj) => {
+ this.studyList.some(study => {
+ if (study.StudyId === obj.StudyId) {
+ study.SeriesList.some(series => {
+ if (series.Id === obj.Id) {
+ series.IsBeSegment = obj.IsBeSegment
+ }
+ return series.Id === obj.Id
+ })
+ }
+ return study.StudyId === obj.StudyId
+ })
+ })
},
methods: {
activeSeries(series, seriesIndex, studyIndex) {
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 7c99c2fb..8d334b66 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
@@ -519,7 +519,7 @@ export default {
if (!obj.bidirectional || !obj.bidirectional.maxMajor) return this.$confirm(this.$t("segment:error:notValue"))
answer = obj.bidirectional[s[imageToolAttribute]] ? Number(obj.bidirectional[s[imageToolAttribute]]).toFixed(this.digitPlaces) : ''
} else {
- if (!obj.stats) return this.$confirm(this.$t("segment:error:notValue"))
+ if (!obj.stats || !obj.stats[imageToolAttribute] || obj.stats[imageToolAttribute].value === null) return this.$confirm(this.$t("segment:error:notValue"))
answer = obj.stats[imageToolAttribute] ? Number((obj.stats[imageToolAttribute]).value).toFixed(this.digitPlaces) : ''
}
let o = {
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js b/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js
index 594a53c8..fc75f336 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js
@@ -295,7 +295,6 @@ async function jumpBidirectional(item, viewportId, volumeId) {
// DicomEvent.$emit('jumpBidirectional', item)
if (item.bidirectional) {
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
- console.log(an, 'an')
if (!an) return false
if (['viewport-MPR-1', 'viewport-MPR-2'].includes(viewportId)) return false
const renderingEngine = getRenderingEngine(renderingEngineId)
@@ -400,7 +399,6 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
annotation.locking.setAnnotationLocked(an.annotationUID, true)
annotation.visibility.setAnnotationVisibility(an.annotationUID, true)
}
- console.log(an, 'an')
}
})