forked from github/dataease
fix(查询组件): 数据集没有被图表使用的情况下,无法设置跨数据集级联
This commit is contained in:
parent
9f9c665975
commit
86daf12f24
@ -209,7 +209,7 @@ defineExpose({
|
||||
<el-icon style="font-size: 16px">
|
||||
<Icon name="icon_info_colorful"></Icon>
|
||||
</el-icon>
|
||||
基于当前查询组件的查询条件,如果需要进行级联联配置,需要满足以下条件:<br />
|
||||
基于当前查询组件的查询条件,如果需要进行级联配置,需要满足以下条件:<br />
|
||||
1. 展示类型:文本下拉组件和数字下拉组件;2. 选项值来源:选择数据集<br />
|
||||
</div>
|
||||
<el-button text @click="addCascadeBlock">
|
||||
|
@ -540,14 +540,20 @@ const CascadeDialog = defineAsyncComponent(() => import('./QueryCascade.vue'))
|
||||
const cascadeDialog = ref()
|
||||
const openCascadeDialog = () => {
|
||||
const cascadeMap = conditions.value
|
||||
.filter(ele => [0, 2, 5].includes(+ele.displayType) && ele.optionValueSource === 1)
|
||||
.filter(
|
||||
ele =>
|
||||
[0, 2, 5].includes(+ele.displayType) &&
|
||||
ele.optionValueSource === 1 &&
|
||||
!!ele.checkedFields?.length &&
|
||||
!!Object.values(ele.checkedFieldsMap).filter(item => !!item).length
|
||||
)
|
||||
.reduce((pre, next) => {
|
||||
pre[next.id] = {
|
||||
datasetId: next.dataset.id,
|
||||
name: next.name,
|
||||
queryId: next.id,
|
||||
fieldId: next.field.id,
|
||||
deType: datasetMap[next.dataset.id].fields?.dimensionList.find(
|
||||
deType: (datasetMap[next.dataset.id]?.fields?.dimensionList || next.dataset.fields).find(
|
||||
ele => ele.id === next.field.id
|
||||
)?.deType
|
||||
}
|
||||
@ -1417,6 +1423,7 @@ defineExpose({
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span style="width: 172px; margin-left: 12px" v-else></span>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user