From c93048033658d1cd5a54073c2e7586a39b54498b Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Tue, 31 Mar 2026 16:47:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E6=95=B0=E6=8D=AE=E6=94=BE=E5=A4=A7?= =?UTF-8?q?=E5=8F=98=E5=BD=A2=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 33 ++++++++++++++++--- 1 file changed, 29 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 e4216528..9dcd67ca 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -760,7 +760,9 @@ export default { }, fusionOverlayModality: null, lastUpper: null, - hasFusionUpperInitialized: false + hasFusionUpperInitialized: false, + timer: null, + timeNum: 0 } }, computed: { @@ -2817,6 +2819,25 @@ export default { this.forceFitToWindow = !forceFitToWindow this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resize(forceFitToWindow) }, + // 重置视口 + resetRenderingEngine() { + if (this.timer) { + clearInterval(this.timer) + this.timer = null + this.timeNum = 0 + } + this.timer = setInterval(() => { + this.timeNum++ + const renderingEngine = getRenderingEngine(renderingEngineId) + renderingEngine.resize(true, false) + renderingEngine.render() + if (this.timeNum >= 3) { + clearInterval(this.timer) + this.timer = null + this.timeNum = 0 + } + }, 500) + }, // 切换全屏 toggleFullScreen(e, index) { this.fullScreenIndex = this.fullScreenIndex === index ? null : index @@ -2824,9 +2845,8 @@ export default { if (this.readingTool === 3 || this.isMPR) { // this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series) this.$nextTick(() => { - const renderingEngine = getRenderingEngine(renderingEngineId) - renderingEngine.resize(true, false) - renderingEngine.render() + this.resetRenderingEngine() + if (this.readingTool === 3) { DicomEvent.$emit('isloaded', { isChange: false }) } @@ -3930,6 +3950,11 @@ export default { clearTimeout(this.saveCustomAnnotationTimer) this.saveCustomAnnotationTimer = null } + if (this.timer) { + clearInterval(this.timer) + this.timer = null + this.timeNum = 0 + } workSpeedclose(true) } }