forked from github/dataease
fix(仪表板): 修复查询组件只过滤tab组件第一页
This commit is contained in:
parent
3c85a0c291
commit
469589516b
@ -53,7 +53,7 @@ const props = defineProps({
|
||||
const { element, view, scale } = toRefs(props)
|
||||
const { t } = useI18n()
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { curComponent, canvasViewInfo, mobileInPc } = storeToRefs(dvMainStore)
|
||||
const { curComponent, canvasViewInfo, mobileInPc, firstLoadMap } = storeToRefs(dvMainStore)
|
||||
const canEdit = ref(false)
|
||||
const queryConfig = ref()
|
||||
const defaultStyle = {
|
||||
@ -299,7 +299,7 @@ const queryData = () => {
|
||||
return
|
||||
}
|
||||
if (!emitterList.length) return
|
||||
|
||||
dvMainStore.setFirstLoadMap([...new Set([...emitterList, ...firstLoadMap.value])])
|
||||
emitterList.forEach(ele => {
|
||||
emitter.emit(`query-data-${ele}`)
|
||||
})
|
||||
|
@ -30,6 +30,7 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
},
|
||||
editMode: 'edit', // 编辑器模式 edit preview
|
||||
mobileInPc: false,
|
||||
firstLoadMap: [],
|
||||
canvasStyleData: { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null },
|
||||
// 当前展示画布缓存数据
|
||||
componentDataCache: null,
|
||||
@ -170,6 +171,9 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
setPublicLinkStatus(value) {
|
||||
this.publicLinkStatus = value
|
||||
},
|
||||
setFirstLoadMap(value) {
|
||||
this.firstLoadMap = value
|
||||
},
|
||||
setDataPrepareState(value) {
|
||||
this.dataPrepareState = value
|
||||
},
|
||||
|
@ -383,7 +383,8 @@ const queryData = (firstLoad = false) => {
|
||||
if (loading.value) {
|
||||
return
|
||||
}
|
||||
const queryFilter = filter(firstLoad)
|
||||
const searched = dvMainStore.firstLoadMap.includes(element.value.id)
|
||||
const queryFilter = filter(searched ? false : firstLoad)
|
||||
let params = cloneDeep(view.value)
|
||||
params['chartExtRequest'] = queryFilter
|
||||
chartExtRequest.value = queryFilter
|
||||
|
Loading…
Reference in New Issue
Block a user