From 5cb31d140e1c1e2d112155dfd29eb72bed2745eb Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 5 Mar 2025 14:32:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E9=A1=B5=E9=9D=A2=E6=89=93=E5=BC=80=E4=BB=8E?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=BC=96=E8=BE=91=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E4=BF=9D=E5=AD=98=E6=97=B6=E6=8F=90=E7=A4=BA=E8=A2=AB?= =?UTF-8?q?=E4=BB=96=E4=BA=BA=E6=9B=B4=E6=96=B0=EF=BC=8C=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E4=BF=9D=E5=AD=98=EF=BC=8C=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/editor/index.vue | 8 +++++++- core/core-frontend/src/views/dashboard/index.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 275ed43f7f..d5bdd75594 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -1513,13 +1513,18 @@ const addDsWindow = () => { const editDs = () => { const path = embeddedStore.getToken && appStore.getIsIframe ? 'dataset-embedded-form' : '/dataset-form' + const openType = wsCache.get('open-backend') === '1' ? '_self' : '_blank' + // 此处校验提前 防止router返回时找到错误的路径 + if (openType === '_self' && !dvInfo.value.id) { + ElMessage.warning(t('visualization.save_page_tips')) + return + } let routeData = router.resolve({ path: path, query: { id: view.value.tableId } }) - const openType = wsCache.get('open-backend') === '1' ? '_self' : '_blank' // 检查是否保存 if (openType === '_self') { if (!dvInfo.value.id) { @@ -1527,6 +1532,7 @@ const editDs = () => { return } canvasSave(() => { + wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id) const newWindow = window.open(routeData.href, openType) initOpenHandler(newWindow) }) diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue index bf731bc727..3c00ea4e46 100644 --- a/core/core-frontend/src/views/dashboard/index.vue +++ b/core/core-frontend/src/views/dashboard/index.vue @@ -394,7 +394,7 @@ onUnmounted(() => {