mirror of
https://github.com/veops/cmdb.git
synced 2025-08-25 17:46:52 +08:00
Merge pull request #693 from veops/dev_ui_250411
fix(ui): dcim - device select name display
This commit is contained in:
@@ -112,11 +112,18 @@ export default {
|
|||||||
})
|
})
|
||||||
let CIList = res?.result || []
|
let CIList = res?.result || []
|
||||||
|
|
||||||
|
const {
|
||||||
|
show_key = '',
|
||||||
|
unique_id = '',
|
||||||
|
attributes = []
|
||||||
|
} = this?.currentCITYpe || {}
|
||||||
|
const unique_key = attributes?.find((attr) => attr?.id === unique_id)?.name || ''
|
||||||
|
|
||||||
if (CIList.length) {
|
if (CIList.length) {
|
||||||
CIList = CIList.map((item) => {
|
CIList = CIList.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item?._id,
|
value: item?._id,
|
||||||
name: item?.[this?.currentCITYpe?.show_key] || item?._id || '',
|
name: item?.[show_key] || item?.[unique_key] || item?._id || '',
|
||||||
unitCount: item?.u_count ?? 0
|
unitCount: item?.u_count ?? 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user