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
|
||||
})
|
||||
|
||||
const { datasetFieldList } = comInfo(element.value.id)
|
||||
const { datasetFieldList } = comInfo()
|
||||
|
||||
const setCustomStyle = val => {
|
||||
const {
|
||||
|
@ -11,26 +11,44 @@ interface DatasetField {
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { componentData, canvasViewInfo } = storeToRefs(dvMainStore)
|
||||
|
||||
export const comInfo = (queryElementId: string) => {
|
||||
export const comInfo = () => {
|
||||
const dfsComponentData = () => {
|
||||
const isMain = componentData.value.some(ele => ele.id === queryElementId)
|
||||
let arr = componentData.value.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType))
|
||||
let tabArr = []
|
||||
let arr = componentData.value.filter(
|
||||
com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group'
|
||||
)
|
||||
componentData.value.forEach(ele => {
|
||||
if (ele.innerType === 'DeTabs') {
|
||||
ele.propValue.forEach(itx => {
|
||||
if (itx.componentData.some(item => item.id === queryElementId) && !isMain) {
|
||||
tabArr = itx.componentData.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType))
|
||||
} else {
|
||||
arr = [
|
||||
...arr,
|
||||
...itx.componentData.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType))
|
||||
]
|
||||
arr = [
|
||||
...arr,
|
||||
...itx.componentData.filter(
|
||||
com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group'
|
||||
)
|
||||
]
|
||||
})
|
||||
} 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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user