From e245057bb2f180211a638a91c2af5bd3c76f7e63 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 29 Apr 2026 17:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=A7=86=E5=8F=A3=E5=BF=AB?= =?UTF-8?q?=E9=80=9F=E6=8F=90=E4=BA=A4=E7=9B=91=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 4 ++- .../dicoms3D/components/Segmentations.vue | 32 +++++++++++++++++-- 2 files changed, 32 insertions(+), 4 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 be90aa94..f91f24e8 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -1011,7 +1011,9 @@ export default { if (isSaved) { let confirm = await this.$confirm(this.$t("trials:reading:Segmentations:confirm:changeScreenSave")) if (!confirm) reslove(true) - this.$refs.Segmentations.saveSegmentGroup(null, true, () => { + this.loading = true + this.loadingText = this.$t("segment:loadingText:saveSegmentation") + this.$refs.Segmentations.checkSaveLoading(() => { reslove(true) }) } else { 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 db5fa646..9a68afbf 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue @@ -163,7 +163,7 @@ - {{ $t("trials:reading:Segmentations:button:save") }} @@ -253,7 +253,7 @@
- + {{ $t("trials:reading:Segmentations:button:saveAll") }}
@@ -402,7 +402,8 @@ export default { isloaded: false, popoverId: null, saveLoading: false, - popoverVisible: false + popoverVisible: false, + timer: null } }, mounted() { @@ -424,6 +425,10 @@ export default { this.popoverId = null this.segmentIndex = null this.segmentationId = null + if (this.timer) { + clearInterval(this.timer) + this.timer = null + } this.getSegmentationList() }) DicomEvent.$on('isloaded', (data) => { @@ -1466,9 +1471,30 @@ export default { console.log(err) } }, + checkSaveLoading(callback) { + if (!this.saveLoading) { + if (this.timer) { + clearInterval(this.timer) + this.timer = null + } + this.saveSegmentGroup(null, true, callback) + } else { + this.timer = setInterval(() => { + if (!this.saveLoading) { + console.log(this.saveLoading, 'timer') + if (this.timer) { + clearInterval(this.timer) + this.timer = null + } + this.saveSegmentGroup(null, true, callback) + } + }, 100) + } + }, // 保存整个分组 async saveSegmentGroup(list = null, saveSegment = true, callback) { try { + console.log('saveSegmentGroup') let segmentList = list ? list : this.segmentList if (segmentList.length <= 0) return false this.$emit("setToolsPassive")