forked from github/dataease
fix(仪表板): 修复当仪表板存在查询按钮时,变动窗口大小会导致视图重新加载且未加过滤条件问题
This commit is contained in:
parent
878cac2434
commit
b931da354d
@ -313,7 +313,7 @@ export default {
|
||||
scaleWidth: '100',
|
||||
scaleHeight: '100',
|
||||
timer: null,
|
||||
componentDataShow: null,
|
||||
componentDataShow: [],
|
||||
mainWidth: '100%',
|
||||
mainHeight: '100%',
|
||||
searchCount: 0,
|
||||
|
@ -946,6 +946,7 @@ export default {
|
||||
}
|
||||
if (this.isFirstLoad) {
|
||||
this.element.filters = this.filter.filter?.length ? JSON.parse(JSON.stringify(this.filter.filter)) : []
|
||||
this.$store.commit('setViewInitFilter', this.element)
|
||||
}
|
||||
method(id, this.panelInfo.id, requestInfo).then(response => {
|
||||
try {
|
||||
|
@ -938,6 +938,15 @@ const data = {
|
||||
if (state.lastValidFilters[id]) {
|
||||
delete state.lastValidFilters[id]
|
||||
}
|
||||
},
|
||||
setViewInitFilter(state, viewInfo) {
|
||||
if (viewInfo) {
|
||||
state.componentData.forEach(component => {
|
||||
if (viewInfo.id === component.id) {
|
||||
component.filters = viewInfo.filters
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
modules: {
|
||||
|
Loading…
Reference in New Issue
Block a user