mirror of https://github.com/veops/cmdb.git
fix(ui): ipam - filter search value error
This commit is contained in:
parent
c50133b3e4
commit
6b16d393c7
|
@ -139,9 +139,9 @@
|
||||||
:normalizer="
|
:normalizer="
|
||||||
(node) => {
|
(node) => {
|
||||||
return {
|
return {
|
||||||
id: String(node[0] || ''),
|
id: node.id,
|
||||||
label: node[1] ? node[1].label || node[0] : node[0],
|
label: node.label,
|
||||||
children: node.children && node.children.length ? node.children : undefined,
|
children: node.children,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
@ -352,8 +352,12 @@ export default {
|
||||||
},
|
},
|
||||||
getChoiceValueByProperty(property) {
|
getChoiceValueByProperty(property) {
|
||||||
const _find = this.canSearchPreferenceAttrList.find((item) => item.name === property)
|
const _find = this.canSearchPreferenceAttrList.find((item) => item.name === property)
|
||||||
if (_find) {
|
if (_find?.choice_value?.length) {
|
||||||
return _find.choice_value
|
return _find.choice_value.map((node) => ({
|
||||||
|
id: String(node?.[0] ?? ''),
|
||||||
|
label: node?.[1]?.label || node?.[0] || '',
|
||||||
|
children: node?.children?.length ? node.children : undefined
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<div class="ipam-tree-main">
|
<div class="ipam-tree-main">
|
||||||
<a-tree
|
<a-tree
|
||||||
v-if="treeData.length"
|
v-if="treeData.length"
|
||||||
|
autoExpandParent
|
||||||
:treeData="filterTreeData"
|
:treeData="filterTreeData"
|
||||||
:selectedKeys="treeKey ? [treeKey] : []"
|
:selectedKeys="treeKey ? [treeKey] : []"
|
||||||
:defaultExpandedKeys="treeKey ? [treeKey] : []"
|
:defaultExpandedKeys="treeKey ? [treeKey] : []"
|
||||||
|
@ -238,7 +239,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& > li:first-child {
|
.ipam-tree-node-all {
|
||||||
.ant-tree-switcher {
|
.ant-tree-switcher {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,6 +185,7 @@ export default {
|
||||||
showCatalogBtn: rootShowCatalogBtn,
|
showCatalogBtn: rootShowCatalogBtn,
|
||||||
showSubnetBtn: rootShowSubnetBtn,
|
showSubnetBtn: rootShowSubnetBtn,
|
||||||
parentId: '',
|
parentId: '',
|
||||||
|
class: 'ipam-tree-node-all'
|
||||||
})
|
})
|
||||||
|
|
||||||
this.treeData = treeData
|
this.treeData = treeData
|
||||||
|
|
Loading…
Reference in New Issue