fix: bug#10824
This commit is contained in:
parent
c366f4a2cc
commit
c34647fad5
|
@ -192,7 +192,8 @@ const columns = [
|
|||
hideInTable: true,
|
||||
search: {
|
||||
type: 'treeSelect',
|
||||
options: getTreeData_api({ paging: false }).then((resp: any) => {
|
||||
options: () => new Promise((resolve) => {
|
||||
getTreeData_api({ paging: false }).then((resp: any) => {
|
||||
const formatValue = (list: any[]) => {
|
||||
return list.map((item: any) => {
|
||||
if (item.children) {
|
||||
|
@ -212,8 +213,9 @@ const columns = [
|
|||
}
|
||||
})
|
||||
}
|
||||
return formatValue(resp.result)
|
||||
}),
|
||||
resolve(formatValue(resp.result) || [])
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -175,14 +175,14 @@ const handOptionByColumn = (option: any) => {
|
|||
termTypeOptions.value = option.termTypes || []
|
||||
tabsOptions.value[0].component = option.type
|
||||
if (option.type === 'boolean') {
|
||||
valueOptions.value = [
|
||||
{ name: '是', id: true },
|
||||
{ name: '否', id: false },
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
]
|
||||
} else if(option.type === 'enum') {
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || []
|
||||
} else{
|
||||
valueOptions.value = option.options || []
|
||||
valueOptions.value = (option.options || []).map((item: any) => ({ ...item, label: item.name, value: item.id}))
|
||||
}
|
||||
valueColumnOptions.value = treeFilter(cloneDeep(columnOptions.value), option.type, 'type')
|
||||
} else {
|
||||
|
|
|
@ -176,14 +176,14 @@ const handOptionByColumn = (option: any) => {
|
|||
}
|
||||
|
||||
if (option.dataType === 'boolean') {
|
||||
valueOptions.value = [
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
]
|
||||
} else if(option.dataType === 'enum') {
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || []
|
||||
} else{
|
||||
valueOptions.value = option.options || []
|
||||
valueOptions.value = (option.options || []).map((item: any) => ({ ...item, label: item.name, value: item.id}))
|
||||
}
|
||||
} else {
|
||||
termTypeOptions.value = []
|
||||
|
|
Loading…
Reference in New Issue