fix(仪表板、数据大屏): 修复数据大屏图表跳转无法选择tab页内的过滤条件问题 #15203

This commit is contained in:
wangjiahao
2025-03-12 11:38:02 +08:00
committed by ulleo
parent fd1f437446
commit 599c80304c

View File

@@ -746,6 +746,28 @@ const dialogInit = viewItem => {
init(viewItem)
}
const initCurFilterFieldArray = componentDataCheck => {
componentDataCheck.forEach(componentItem => {
if (componentItem.component === 'VQuery' && componentItem.propValue instanceof Array) {
componentItem.propValue.forEach(filterItem => {
if (filterItem.checkedFields.includes(state.viewId)) {
state.linkJumpCurFilterFieldArray.push({
id: filterItem.id,
name: filterItem.name,
deType: 'filter'
})
}
})
} else if (componentItem.component === 'Group') {
initCurFilterFieldArray(componentItem.propValue)
} else if (componentItem.component === 'DeTabs') {
componentItem.propValue.forEach(tabItem => {
initCurFilterFieldArray(tabItem.componentData)
})
}
})
}
const init = viewItem => {
state.initState = false
state.viewId = viewItem.id
@@ -792,19 +814,7 @@ const init = viewItem => {
// 获取当前过滤条件明细 过滤原则1.在当前仪表板或者大屏 2.作用于当前图表
state.linkJumpCurFilterFieldArray = []
componentData.value.forEach(componentItem => {
if (componentItem.component === 'VQuery' && componentItem.propValue instanceof Array) {
componentItem.propValue.forEach(filterItem => {
if (filterItem.checkedFields.includes(state.viewId)) {
state.linkJumpCurFilterFieldArray.push({
id: filterItem.id,
name: filterItem.name,
deType: 'filter'
})
}
})
}
})
initCurFilterFieldArray(componentData.value)
if (chartDetails.tableId) {
// 获取当前数据集信息