Merge pull request #9219 from dataease/pr@dev-v2_st

feat(嵌入式): div嵌入支持新增仪表板和新增数据大屏
This commit is contained in:
dataeaseShu 2024-04-19 10:41:19 +08:00 committed by GitHub
commit 86a102a5d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -317,10 +317,14 @@ const addOperation = (
const baseUrl =
curCanvasType.value === 'dataV' ? '#/dvCanvas?opt=create' : '#/dashboard?opt=create'
let newWindow = null
let embeddedBaseUrl = ''
if (isDataEaseBi.value) {
embeddedBaseUrl = embeddedStore.baseUrl
}
if (data?.id) {
newWindow = window.open(baseUrl + `&pid=${data.id}`, '_blank')
newWindow = window.open(embeddedBaseUrl + baseUrl + `&pid=${data.id}`, '_blank')
} else {
newWindow = window.open(baseUrl, '_blank')
newWindow = window.open(embeddedBaseUrl + baseUrl, '_blank')
}
initOpenHandler(newWindow)
} else if (cmd === 'newFromTemplate') {