fix: 修复仪表板大屏资源树操作打开窗口不对问题

This commit is contained in:
wangjiahao 2023-12-25 20:39:08 +08:00
parent 6865bebaff
commit 92afdd0c64

View File

@ -232,7 +232,7 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => {
})
} else if (cmd === 'edit') {
resourceEdit(data.id)
} else {
} else if (cmd === 'copy') {
const targetPid = findParentIdByChildIdRecursive(state.resourceTree, data.id)
const params: ResourceOrFolder = {
nodeType: nodeType as 'folder' | 'leaf',
@ -248,6 +248,8 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => {
: `#/dashboard?opt=copy&pid=${params.pid}&resourceId=${data.data}`
window.open(baseUrl, '_blank')
})
} else {
resourceGroupOpt.value.optInit(nodeType, data, cmd, ['copy'].includes(cmd))
}
}