We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 108c110 + c62e403 commit 53e8d34Copy full SHA for 53e8d34
cmdb-ui/src/modules/cmdb/views/dcim/components/rackDetail/rackView/deviceForm/deviceSelect.vue
@@ -112,11 +112,18 @@ export default {
112
})
113
let CIList = res?.result || []
114
115
+ const {
116
+ show_key = '',
117
+ unique_id = '',
118
+ attributes = []
119
+ } = this?.currentCITYpe || {}
120
+ const unique_key = attributes?.find((attr) => attr?.id === unique_id)?.name || ''
121
+
122
if (CIList.length) {
123
CIList = CIList.map((item) => {
124
return {
125
value: item?._id,
- name: item?.[this?.currentCITYpe?.show_key] || item?._id || '',
126
+ name: item?.[show_key] || item?.[unique_key] || item?._id || '',
127
unitCount: item?.u_count ?? 0
128
}
129
0 commit comments