mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix(数据大屏): 修复弹窗区域禁用时默认值依然影响大屏数据等问题
This commit is contained in:
@@ -82,6 +82,7 @@ import RealTimeTab from '@/components/data-visualization/RealTimeTab.vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import circlePackingOrigin from '@/assets/svg/circle-packing-origin.svg'
|
||||
import { checkJoinGroup } from '@/utils/canvasUtils'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
const dropdownMore = ref(null)
|
||||
const lockStore = lockStoreWithOut()
|
||||
|
||||
@@ -392,6 +393,10 @@ const areaClick = area => {
|
||||
dvMainStore.canvasStateChange({ key: 'curPointArea', value: area })
|
||||
}
|
||||
|
||||
const popupAvailableChange = () => {
|
||||
useEmitt().emitter.emit('calcData-all')
|
||||
canvasChange()
|
||||
}
|
||||
const canvasChange = () => {
|
||||
snapshotStore.recordSnapshotCache('canvasChange')
|
||||
}
|
||||
@@ -403,7 +408,11 @@ const canvasChange = () => {
|
||||
<button hidden="true" id="close-button"></button>
|
||||
<div class="layer-area" @click="areaClick('hidden')" :class="{ activated: hiddenAreaActive }">
|
||||
<span>{{ t('visualization.pop_area') }}({{ popComponentData.length }})</span>
|
||||
<el-switch v-model="canvasStyleData.popupAvailable" @change="canvasChange" size="small" />
|
||||
<el-switch
|
||||
v-model="canvasStyleData.popupAvailable"
|
||||
@change="popupAvailableChange"
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
<el-row class="list-wrap">
|
||||
<div class="list-container" @contextmenu="handleContextMenu">
|
||||
|
||||
@@ -3,7 +3,7 @@ import { storeToRefs } from 'pinia'
|
||||
import { getDynamicRange, getCustomTime } from '@/custom-component/v-query/time-format'
|
||||
import { getCustomRange } from '@/custom-component/v-query/time-format-dayjs'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { componentData } = storeToRefs(dvMainStore)
|
||||
const { componentData, canvasStyleData } = storeToRefs(dvMainStore)
|
||||
|
||||
const getDynamicRangeTime = (type: number, selectValue: any, timeGranularityMultiple: string) => {
|
||||
const timeType = (timeGranularityMultiple || '').split('range')[0]
|
||||
@@ -130,18 +130,32 @@ const getValueByDefaultValueCheckOrFirstLoad = (
|
||||
}
|
||||
|
||||
export const useFilter = (curComponentId: string, firstLoad = false) => {
|
||||
// 弹窗区域过滤组件是否生效
|
||||
const popupAvailable = canvasStyleData.value.popupAvailable
|
||||
const filter = []
|
||||
const queryComponentList = componentData.value.filter(ele => ele.component === 'VQuery')
|
||||
const queryComponentList = componentData.value.filter(
|
||||
ele =>
|
||||
ele.component === 'VQuery' &&
|
||||
(popupAvailable || (!popupAvailable && ele.category !== 'hidden'))
|
||||
)
|
||||
searchQuery(queryComponentList, filter, curComponentId, firstLoad)
|
||||
componentData.value.forEach(ele => {
|
||||
if (ele.component === 'Group') {
|
||||
const list = ele.propValue.filter(item => item.innerType === 'VQuery')
|
||||
const list = ele.propValue.filter(
|
||||
item =>
|
||||
item.innerType === 'VQuery' &&
|
||||
(popupAvailable || (!popupAvailable && ele.category !== 'hidden'))
|
||||
)
|
||||
searchQuery(list, filter, curComponentId, firstLoad)
|
||||
|
||||
list.forEach(element => {
|
||||
if (element.innerType === 'DeTabs') {
|
||||
element.propValue.forEach(itx => {
|
||||
const elementArr = itx.componentData.filter(item => item.innerType === 'VQuery')
|
||||
const elementArr = itx.componentData.filter(
|
||||
item =>
|
||||
item.innerType === 'VQuery' &&
|
||||
(popupAvailable || (!popupAvailable && ele.category !== 'hidden'))
|
||||
)
|
||||
searchQuery(elementArr, filter, curComponentId, firstLoad)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user