fix: 查询按钮设置关联范围失效
This commit is contained in:
parent
065853cd80
commit
491f1b9f76
@ -569,7 +569,23 @@ export default {
|
|||||||
|
|
||||||
result.relationFilterIds = matchFilters.map(item => item.id)
|
result.relationFilterIds = matchFilters.map(item => item.id)
|
||||||
|
|
||||||
|
let matchViewIds = []
|
||||||
|
matchFilters.forEach(item => {
|
||||||
|
if (!item.options.attrs.viewIds?.length) {
|
||||||
|
matchViewIds = null
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
matchViewIds = matchViewIds.concat(item.options.attrs.viewIds)
|
||||||
|
})
|
||||||
|
|
||||||
let viewKeyMap = buildViewKeyMap(panelItems)
|
let viewKeyMap = buildViewKeyMap(panelItems)
|
||||||
|
if (matchViewIds) {
|
||||||
|
matchViewIds = [...new Set(matchViewIds)]
|
||||||
|
const keys = Object.keys(viewKeyMap).filter(key => !matchViewIds.includes(key))
|
||||||
|
keys.forEach(key => {
|
||||||
|
delete viewKeyMap[key]
|
||||||
|
})
|
||||||
|
}
|
||||||
viewKeyMap = this.buildViewKeyFilters(matchFilters, viewKeyMap, isClear)
|
viewKeyMap = this.buildViewKeyFilters(matchFilters, viewKeyMap, isClear)
|
||||||
result.filterMap = viewKeyMap
|
result.filterMap = viewKeyMap
|
||||||
return result
|
return result
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user