mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix(仪表板、数据大屏): 修复两个组件,组合后再拖入tab组件,导出应用报错 #15248
This commit is contained in:
committed by
xuwei-fit2cloud
parent
68cf81d798
commit
598c3f880c
@@ -138,43 +138,28 @@ const close = () => {
|
||||
state.applyDownloadDrawer = false
|
||||
}
|
||||
|
||||
const gatherAppInfo = (viewIds, dsIds) => {
|
||||
componentData.value.forEach(item => {
|
||||
const gatherAppInfo = (viewIds, dsIds, componentDataCheck) => {
|
||||
componentDataCheck.forEach(item => {
|
||||
if (item.component === 'UserView' && canvasViewInfo.value[item.id]) {
|
||||
const viewDetails = canvasViewInfo.value[item.id]
|
||||
const { id, tableId } = viewDetails
|
||||
viewIds.push(id)
|
||||
dsIds.push(tableId)
|
||||
} else if (item.component === 'Group') {
|
||||
item.propValue.forEach(groupItem => {
|
||||
if (groupItem.component === 'UserView') {
|
||||
const viewDetails = canvasViewInfo.value[groupItem.id]
|
||||
const { id, tableId } = viewDetails
|
||||
viewIds.push(id)
|
||||
dsIds.push(tableId)
|
||||
}
|
||||
})
|
||||
gatherAppInfo(viewIds, dsIds, item.propValue)
|
||||
} else if (item.component === 'DeTabs') {
|
||||
item.propValue.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
if (tabComponent.component === 'UserView') {
|
||||
const viewDetails = canvasViewInfo.value[tabComponent.id]
|
||||
const { id, tableId } = viewDetails
|
||||
viewIds.push(id)
|
||||
dsIds.push(tableId)
|
||||
}
|
||||
})
|
||||
gatherAppInfo(viewIds, dsIds, tabItem.componentData)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const downloadApp = () => {
|
||||
applyDownloadForm.value?.validate(valid => {
|
||||
if (valid) {
|
||||
const viewIds = []
|
||||
const dsIds = []
|
||||
gatherAppInfo(viewIds, dsIds)
|
||||
gatherAppInfo(viewIds, dsIds, componentData.value)
|
||||
export2AppCheck({ dvId: dvInfo.value.id, viewIds, dsIds }).then(rsp => {
|
||||
const params = {
|
||||
...rsp.data,
|
||||
|
||||
Reference in New Issue
Block a user