fix(数据大屏、仪表板): 修复div 嵌入仪表板设计器,编辑保存后,修改了第三方系统的路由问题

This commit is contained in:
wangjiahao 2024-10-14 15:37:00 +08:00
parent 35468d8e20
commit 07ee15ea32
2 changed files with 7 additions and 2 deletions

View File

@ -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')

View File

@ -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')