forked from github/dataease
Merge pull request #12286 from dataease/pr@dev-v2_dzz
fix(查询组件): 组件中 “选择关联图表及字段” 的“维度”和“参数”混淆,选择“维度”后显示的仍然是“参数”的过滤数据 #12236
This commit is contained in:
commit
554c5414c9
@ -1,5 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useAttrs, computed } from 'vue'
|
||||
import icon_visible_outlined from '@/assets/svg/icon_visible_outlined.svg'
|
||||
import icon_invisible_outlined from '@/assets/svg/icon_invisible_outlined.svg'
|
||||
import { hIcon } from '@/components/icon-custom'
|
||||
const attrs = useAttrs()
|
||||
const props = defineProps(['modelValue'])
|
||||
@ -13,8 +15,8 @@ const value = computed({
|
||||
}
|
||||
})
|
||||
|
||||
const iconView = hIcon('icon_visible_outlined')
|
||||
const iconHide = hIcon('icon_invisible_outlined')
|
||||
const iconView = hIcon(icon_visible_outlined)
|
||||
const iconHide = hIcon(icon_invisible_outlined)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -3,7 +3,7 @@ import { ElIcon } from 'element-plus-secondary'
|
||||
import Icon from './src/Icon.vue'
|
||||
const hIcon = (name: string) => {
|
||||
return h(ElIcon, null, {
|
||||
default: () => h(Icon, { name })
|
||||
default: () => h(name)
|
||||
})
|
||||
}
|
||||
export { Icon, hIcon }
|
||||
|
@ -379,7 +379,7 @@
|
||||
<Icon
|
||||
><component
|
||||
class="svg-icon"
|
||||
:className="`field-icon-${fieldType[item.sourceDeType]}`"
|
||||
:class="`field-icon-${fieldType[item.sourceDeType]}`"
|
||||
:is="iconFieldMap[fieldType[item.sourceDeType]]"
|
||||
></component
|
||||
></Icon>
|
||||
|
@ -1574,7 +1574,8 @@ defineExpose({
|
||||
<template v-if="curComponent.checkedFieldsMap[field.componentId]" #prefix>
|
||||
<el-icon>
|
||||
<Icon
|
||||
:className="`field-icon-${
|
||||
><component
|
||||
:class="`field-icon-${
|
||||
fieldType[
|
||||
getDetype(
|
||||
curComponent.checkedFieldsMap[field.componentId],
|
||||
@ -1582,7 +1583,6 @@ defineExpose({
|
||||
)
|
||||
]
|
||||
}`"
|
||||
><component
|
||||
:is="
|
||||
iconFieldMap[
|
||||
fieldType[
|
||||
|
@ -354,14 +354,21 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
|
||||
firstLoad
|
||||
)
|
||||
if (result?.length) {
|
||||
const fieldId = isTree
|
||||
? getFieldId(treeFieldList, result)
|
||||
: item.checkedFieldsMap[curComponentId]
|
||||
const parametersFilter = parameters.reduce((pre, next) => {
|
||||
if (next.id === fieldId && !pre.length) {
|
||||
pre.push(next)
|
||||
}
|
||||
return pre
|
||||
}, [])
|
||||
filter.push({
|
||||
componentId: ele.id,
|
||||
fieldId: isTree
|
||||
? getFieldId(treeFieldList, result)
|
||||
: item.checkedFieldsMap[curComponentId],
|
||||
fieldId,
|
||||
operator,
|
||||
value: result,
|
||||
parameters,
|
||||
parameters: parametersFilter,
|
||||
isTree
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user