mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 03:22:56 +08:00
fix(X-Pack): 仪表板中如果存在空的筛选框定时报告失败 #14880
Some checks are pending
Typos Check / Spell Check with Typos (push) Waiting to run
Some checks are pending
Typos Check / Spell Check with Typos (push) Waiting to run
This commit is contained in:
parent
d5dbcdb63f
commit
5ae02353af
@ -117,11 +117,11 @@ function matrixAdaptor(componentItem) {
|
||||
componentItem['mSizeX'] = componentItem.mSizeX * 2
|
||||
componentItem['mSizeY'] = componentItem.mSizeY * 2
|
||||
if (componentItem.component === 'Group') {
|
||||
componentItem.propValue.forEach(groupItem => {
|
||||
componentItem.propValue?.forEach(groupItem => {
|
||||
matrixAdaptor(groupItem)
|
||||
})
|
||||
} else if (componentItem.component === 'DeTabs') {
|
||||
componentItem.propValue.forEach(tabItem => {
|
||||
componentItem.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
matrixAdaptor(tabComponent)
|
||||
})
|
||||
@ -141,9 +141,10 @@ export function historyItemAdaptor(
|
||||
if (
|
||||
componentItem.component === 'VQuery' &&
|
||||
attachInfo?.source === 'report' &&
|
||||
!!reportFilterInfo
|
||||
!!reportFilterInfo &&
|
||||
componentItem.propValue?.forEach
|
||||
) {
|
||||
componentItem.propValue.forEach((filterItem, index) => {
|
||||
componentItem.propValue?.forEach((filterItem, index) => {
|
||||
if (reportFilterInfo[filterItem.id]) {
|
||||
componentItem.propValue[index] = JSON.parse(reportFilterInfo[filterItem.id].filterInfo)
|
||||
}
|
||||
@ -213,13 +214,13 @@ export function historyItemAdaptor(
|
||||
componentItem.style.fontStyle = componentItem.style.fontStyle || 'normal'
|
||||
componentItem.style.fontWeight = componentItem.style.fontWeight || 'normal'
|
||||
componentItem.style.textDecoration = componentItem.style.textDecoration || 'none'
|
||||
componentItem.propValue.forEach(tabItem => {
|
||||
componentItem.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
historyItemAdaptor(tabComponent, reportFilterInfo, attachInfo, canvasVersion, canvasInfo)
|
||||
})
|
||||
})
|
||||
} else if (componentItem.component === 'Group') {
|
||||
componentItem.propValue.forEach(groupItem => {
|
||||
componentItem.propValue?.forEach(groupItem => {
|
||||
historyItemAdaptor(groupItem, reportFilterInfo, attachInfo, canvasVersion, canvasInfo)
|
||||
})
|
||||
}
|
||||
@ -473,7 +474,7 @@ export function initCanvasDataMobile(dvId, busiFlag, callBack) {
|
||||
ele.events = mEvents || events
|
||||
ele.commonBackground = mCommonBackground || commonBackground
|
||||
if (ele.component === 'DeTabs') {
|
||||
ele.propValue.forEach(tabItem => {
|
||||
ele.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
tabComponent.style = tabComponent.mStyle || tabComponent.style
|
||||
tabComponent.propValue = tabComponent.mPropValue || tabComponent.propValue
|
||||
@ -550,11 +551,11 @@ export async function canvasSave(callBack) {
|
||||
if (item.component === 'UserView') {
|
||||
item.linkageFilters = []
|
||||
} else if (item.component === 'Group') {
|
||||
item.propValue.forEach(groupItem => {
|
||||
item.propValue?.forEach(groupItem => {
|
||||
groupItem.linkageFilters = []
|
||||
})
|
||||
} else if (item.component === 'DeTabs') {
|
||||
item.propValue.forEach(tabItem => {
|
||||
item.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
tabComponent.linkageFilters = []
|
||||
})
|
||||
@ -640,7 +641,7 @@ export function isMainCanvas(canvasId) {
|
||||
export function checkJoinGroup(item) {
|
||||
if (item.component === 'DeTabs') {
|
||||
let result = true
|
||||
item.propValue.forEach(tabItem => {
|
||||
item.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
if (tabComponent.component === 'Group') {
|
||||
result = false
|
||||
@ -656,7 +657,7 @@ export function checkJoinGroup(item) {
|
||||
export function checkJoinTab(item) {
|
||||
if (item.component === 'Group') {
|
||||
let result = true
|
||||
item.propValue.forEach(groupItem => {
|
||||
item.propValue?.forEach(groupItem => {
|
||||
if (groupItem.component === 'DeTabs') {
|
||||
result = false
|
||||
}
|
||||
@ -707,13 +708,13 @@ export function itemCanvasPathCheck(item, checkType) {
|
||||
export function canvasIdMapCheck(item, pItem, pathMap) {
|
||||
pathMap[item.id] = pItem
|
||||
if (item.component === 'DeTabs') {
|
||||
item.propValue.forEach(tabItem => {
|
||||
item.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
canvasIdMapCheck(tabComponent, item, pathMap)
|
||||
})
|
||||
})
|
||||
} else if (item.component === 'Group') {
|
||||
item.propValue.forEach(groupItem => {
|
||||
item.propValue?.forEach(groupItem => {
|
||||
canvasIdMapCheck(groupItem, item, pathMap)
|
||||
})
|
||||
}
|
||||
@ -770,11 +771,11 @@ export function findAllViewsId(componentData, idArray) {
|
||||
if (item.component === 'UserView' && item.innerType != 'VQuery') {
|
||||
idArray.push(item.id)
|
||||
} else if (item.component === 'Group') {
|
||||
item.propValue.forEach(groupItem => {
|
||||
item.propValue?.forEach(groupItem => {
|
||||
idArray.push(groupItem.id)
|
||||
})
|
||||
} else if (item.component === 'DeTabs') {
|
||||
item.propValue.forEach(tabItem => {
|
||||
item.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
idArray.push(tabComponent.id)
|
||||
})
|
||||
@ -914,7 +915,7 @@ export function componentPreSort(componentData) {
|
||||
componentData.sort((c1, c2) => c1.y - c2.y)
|
||||
componentData.forEach(componentItem => {
|
||||
if (componentItem.component === 'DeTabs') {
|
||||
componentItem.propValue.forEach(tabItem => {
|
||||
componentItem.propValue?.forEach(tabItem => {
|
||||
componentPreSort(tabItem.componentData)
|
||||
})
|
||||
}
|
||||
@ -943,13 +944,13 @@ export function findComponentById(componentId) {
|
||||
if (item.id === componentId) {
|
||||
result = item
|
||||
} else if (item.component === 'Group') {
|
||||
item.propValue.forEach(groupItem => {
|
||||
item.propValue?.forEach(groupItem => {
|
||||
if (groupItem.id === componentId) {
|
||||
result = groupItem
|
||||
}
|
||||
})
|
||||
} else if (item.component === 'DeTabs') {
|
||||
item.propValue.forEach(tabItem => {
|
||||
item.propValue?.forEach(tabItem => {
|
||||
tabItem.componentData.forEach(tabComponent => {
|
||||
if (tabComponent.id === componentId) {
|
||||
result = tabComponent
|
||||
|
Loading…
Reference in New Issue
Block a user