forked from github/dataease
fix(查询组件): 修复tab组件内查询校验bug
This commit is contained in:
parent
1c4c653f71
commit
9066405a1c
@ -113,7 +113,7 @@ const curComponentView = computed(() => {
|
|||||||
return (canvasViewInfo.value[element.value.id] || {}).customStyle
|
return (canvasViewInfo.value[element.value.id] || {}).customStyle
|
||||||
})
|
})
|
||||||
|
|
||||||
const { datasetFieldList } = comInfo(element.value.id)
|
const { datasetFieldList } = comInfo()
|
||||||
|
|
||||||
const setCustomStyle = val => {
|
const setCustomStyle = val => {
|
||||||
const {
|
const {
|
||||||
|
@ -11,26 +11,44 @@ interface DatasetField {
|
|||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { componentData, canvasViewInfo } = storeToRefs(dvMainStore)
|
const { componentData, canvasViewInfo } = storeToRefs(dvMainStore)
|
||||||
|
|
||||||
export const comInfo = (queryElementId: string) => {
|
export const comInfo = () => {
|
||||||
const dfsComponentData = () => {
|
const dfsComponentData = () => {
|
||||||
const isMain = componentData.value.some(ele => ele.id === queryElementId)
|
let arr = componentData.value.filter(
|
||||||
let arr = componentData.value.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType))
|
com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group'
|
||||||
let tabArr = []
|
)
|
||||||
componentData.value.forEach(ele => {
|
componentData.value.forEach(ele => {
|
||||||
if (ele.innerType === 'DeTabs') {
|
if (ele.innerType === 'DeTabs') {
|
||||||
ele.propValue.forEach(itx => {
|
ele.propValue.forEach(itx => {
|
||||||
if (itx.componentData.some(item => item.id === queryElementId) && !isMain) {
|
arr = [
|
||||||
tabArr = itx.componentData.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType))
|
...arr,
|
||||||
} else {
|
...itx.componentData.filter(
|
||||||
arr = [
|
com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group'
|
||||||
...arr,
|
)
|
||||||
...itx.componentData.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType))
|
]
|
||||||
]
|
})
|
||||||
|
} else if (ele.component === 'Group') {
|
||||||
|
arr = [
|
||||||
|
...arr,
|
||||||
|
ele.propValue.filter(
|
||||||
|
com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group'
|
||||||
|
)
|
||||||
|
]
|
||||||
|
ele.propValue.forEach(element => {
|
||||||
|
if (element.innerType === 'DeTabs') {
|
||||||
|
element.propValue.forEach(itx => {
|
||||||
|
arr = [
|
||||||
|
...arr,
|
||||||
|
...itx.componentData.filter(
|
||||||
|
com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group'
|
||||||
|
)
|
||||||
|
]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return isMain ? arr : tabArr
|
|
||||||
|
return arr.flat()
|
||||||
}
|
}
|
||||||
|
|
||||||
const datasetFieldList = computed(() => {
|
const datasetFieldList = computed(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user