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")