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 { element, view, scale } = toRefs(props)
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { curComponent, canvasViewInfo, mobileInPc } = storeToRefs(dvMainStore)
|
const { curComponent, canvasViewInfo, mobileInPc, firstLoadMap } = storeToRefs(dvMainStore)
|
||||||
const canEdit = ref(false)
|
const canEdit = ref(false)
|
||||||
const queryConfig = ref()
|
const queryConfig = ref()
|
||||||
const defaultStyle = {
|
const defaultStyle = {
|
||||||
@ -299,7 +299,7 @@ const queryData = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!emitterList.length) return
|
if (!emitterList.length) return
|
||||||
|
dvMainStore.setFirstLoadMap([...new Set([...emitterList, ...firstLoadMap.value])])
|
||||||
emitterList.forEach(ele => {
|
emitterList.forEach(ele => {
|
||||||
emitter.emit(`query-data-${ele}`)
|
emitter.emit(`query-data-${ele}`)
|
||||||
})
|
})
|
||||||
|
@ -30,6 +30,7 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
},
|
},
|
||||||
editMode: 'edit', // 编辑器模式 edit preview
|
editMode: 'edit', // 编辑器模式 edit preview
|
||||||
mobileInPc: false,
|
mobileInPc: false,
|
||||||
|
firstLoadMap: [],
|
||||||
canvasStyleData: { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null },
|
canvasStyleData: { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null },
|
||||||
// 当前展示画布缓存数据
|
// 当前展示画布缓存数据
|
||||||
componentDataCache: null,
|
componentDataCache: null,
|
||||||
@ -170,6 +171,9 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
setPublicLinkStatus(value) {
|
setPublicLinkStatus(value) {
|
||||||
this.publicLinkStatus = value
|
this.publicLinkStatus = value
|
||||||
},
|
},
|
||||||
|
setFirstLoadMap(value) {
|
||||||
|
this.firstLoadMap = value
|
||||||
|
},
|
||||||
setDataPrepareState(value) {
|
setDataPrepareState(value) {
|
||||||
this.dataPrepareState = value
|
this.dataPrepareState = value
|
||||||
},
|
},
|
||||||
|
@ -383,7 +383,8 @@ const queryData = (firstLoad = false) => {
|
|||||||
if (loading.value) {
|
if (loading.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const queryFilter = filter(firstLoad)
|
const searched = dvMainStore.firstLoadMap.includes(element.value.id)
|
||||||
|
const queryFilter = filter(searched ? false : firstLoad)
|
||||||
let params = cloneDeep(view.value)
|
let params = cloneDeep(view.value)
|
||||||
params['chartExtRequest'] = queryFilter
|
params['chartExtRequest'] = queryFilter
|
||||||
chartExtRequest.value = queryFilter
|
chartExtRequest.value = queryFilter
|
||||||
|
Loading…
Reference in New Issue
Block a user