diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index a07689c3e0..cc4e1a459b 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -219,7 +219,10 @@ const saveResource = () => { canvasSave(() => { snapshotStore.resetStyleChangeTimes() ElMessage.success('保存成功') - window.history.pushState({}, '', `#/dashboard?resourceId=${dvInfo.value.id}`) + let url = window.location.href + url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`) + window.history.replaceState(null, '', url) + if (appData.value) { initCanvasData(dvInfo.value.id, 'dashboard', () => { useEmitt().emitter.emit('refresh-dataset-selector') diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 163a03f1a8..39920bb4c4 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -161,7 +161,9 @@ const saveResource = () => { snapshotStore.resetStyleChangeTimes() wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id) ElMessage.success('保存成功') - window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`) + let url = window.location.href + url = url.replace(/\?opt=create/, `?dvId=${dvInfo.value.id}`) + window.history.replaceState(null, '', url) if (appData.value) { initCanvasData(dvInfo.value.id, 'dataV', () => { useEmitt().emitter.emit('refresh-dataset-selector')