Merge pull request #13482 from dataease/pr@dev-v2_st
fix(仪表板): 当前窗口打开模式下,编辑仪表板并保存,点击左上角返回按钮,无法返回到仪表板列表页
This commit is contained in:
commit
2a30d42775
@ -224,7 +224,15 @@ const saveResource = () => {
|
|||||||
ElMessage.success(t('common.save_success'))
|
ElMessage.success(t('common.save_success'))
|
||||||
let url = window.location.href
|
let url = window.location.href
|
||||||
url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`)
|
url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`)
|
||||||
window.history.replaceState(null, '', url)
|
if (!embeddedStore.baseUrl) {
|
||||||
|
window.history.replaceState(
|
||||||
|
{
|
||||||
|
path: url
|
||||||
|
},
|
||||||
|
'',
|
||||||
|
url
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (appData.value) {
|
if (appData.value) {
|
||||||
initCanvasData(dvInfo.value.id, 'dashboard', () => {
|
initCanvasData(dvInfo.value.id, 'dashboard', () => {
|
||||||
|
|||||||
@ -166,7 +166,15 @@ const saveResource = () => {
|
|||||||
ElMessage.success('保存成功')
|
ElMessage.success('保存成功')
|
||||||
let url = window.location.href
|
let url = window.location.href
|
||||||
url = url.replace(/\?opt=create/, `?dvId=${dvInfo.value.id}`)
|
url = url.replace(/\?opt=create/, `?dvId=${dvInfo.value.id}`)
|
||||||
window.history.replaceState(null, '', url)
|
if (!embeddedStore.baseUrl) {
|
||||||
|
window.history.replaceState(
|
||||||
|
{
|
||||||
|
path: url
|
||||||
|
},
|
||||||
|
'',
|
||||||
|
url
|
||||||
|
)
|
||||||
|
}
|
||||||
if (appData.value) {
|
if (appData.value) {
|
||||||
initCanvasData(dvInfo.value.id, 'dataV', () => {
|
initCanvasData(dvInfo.value.id, 'dataV', () => {
|
||||||
useEmitt().emitter.emit('refresh-dataset-selector')
|
useEmitt().emitter.emit('refresh-dataset-selector')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user