fix(仪表板、数据大屏): 修复当前页面打开从仪表板编辑数据集保存时提示被他人更新,是否覆盖保存,返回路径错误问题

This commit is contained in:
wangjiahao
2025-03-05 14:32:40 +08:00
committed by 王嘉豪
parent c5708b269a
commit 5cb31d140e
2 changed files with 8 additions and 2 deletions

View File

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

View File

@@ -394,7 +394,7 @@ onUnmounted(() => {
<style lang="less">
.dv-common-layout {
height: calc(100vh - 1px);
height: 100vh;
width: 100vw;
.dv-layout-container {