forked from github/dataease
Merge pull request #10572 from dataease/pr@dev-v2_st
fix(查询组件): 级联配置不生效
This commit is contained in:
commit
39f879b177
@ -60,7 +60,8 @@ const setCascadeArrBack = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const init = (cascadeMap: cascadeMap) => {
|
||||
const init = (cascadeMap: cascadeMap, arr) => {
|
||||
cascadeList.value = cloneDeep(arr)
|
||||
datasetMap.value = Object.values(cascadeMap).map(ele => ({
|
||||
label: ele.name,
|
||||
deType: ele.deType,
|
||||
|
@ -497,7 +497,7 @@ const openCascadeDialog = () => {
|
||||
}
|
||||
return pre
|
||||
}, {})
|
||||
cascadeDialog.value.init(cascadeMap)
|
||||
cascadeDialog.value.init(cascadeMap, cascadeArr)
|
||||
}
|
||||
|
||||
const indexCascade = ' 一二三四五'
|
||||
|
@ -83,7 +83,7 @@ const cascade = computed(() => {
|
||||
|
||||
const setDefaultMapValue = arr => {
|
||||
const { displayId, field } = config.value
|
||||
if (!displayId) {
|
||||
if (config.value.optionValueSource !== 1) {
|
||||
return []
|
||||
}
|
||||
let defaultMapValue = {}
|
||||
@ -92,8 +92,8 @@ const setDefaultMapValue = arr => {
|
||||
defaultMapValue[ele] = []
|
||||
})
|
||||
enumValueArr.forEach(ele => {
|
||||
if (defaultMapValue[ele[displayId]]) {
|
||||
defaultMapValue[ele[displayId]].push(ele[field?.id])
|
||||
if (defaultMapValue[ele[displayId || field?.id]]) {
|
||||
defaultMapValue[ele[displayId || field?.id]].push(ele[field?.id])
|
||||
}
|
||||
})
|
||||
Object.values(defaultMapValue).forEach(ele => {
|
||||
|
Loading…
Reference in New Issue
Block a user