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 4ea14080..fd0fc9de 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue @@ -811,7 +811,12 @@ export default { volume.destroy(); // 2. 从缓存中移除 volume.removeFromCache(); - cache.removeImageLoadObject(`wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.segUrl}`) + if (this.curSegmentGroup.oldSegUrl) { + cache.removeImageLoadObject(`wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.oldSegUrl}`) + this.curSegmentGroup.oldSegUrl = null + } else { + cache.removeImageLoadObject(`wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.segUrl}`) + } this.getSegmentation(this.segmentationId) DicomEvent.$emit('renderSegmentationBychangeSegmention') this.visible = false @@ -1660,6 +1665,7 @@ export default { }/${this.visitInfo.VisistId}/${this.series.StudyId }/${this.series.Id}/${segmentGroup.name}.dcm` const result = await this.OSSclient.put(path, blob) + segmentGroup.oldSegUrl = segmentGroup.segUrl segmentGroup.segUrl = this.$getObjectName(result.url) DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: true }) } else { @@ -1667,7 +1673,7 @@ export default { segmentGroup.segUrl = null } - this.addOrUpdateSegmentation({ name: segmentGroup.name, id: segmentGroup.segmentationId, url: segmentGroup.segUrl }) + this.addOrUpdateSegmentation({ name: segmentGroup.name, id: segmentGroup.segmentationId, url: segmentGroup.segUrl, size: blob.size }) this.changeSegmentationSavedStatus(segmentGroup.segmentationId, saveSegment) if (saveSegment) { await this.getBidirectionalSaveSegment(segmentList)