mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-16 23:31:29 +00:00
fix: 修复资产info信息展示list数据
This commit is contained in:
@@ -64,21 +64,39 @@ export default {
|
||||
}
|
||||
|
||||
let value = this.object[name]
|
||||
const label = fieldMeta.label
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(item => {
|
||||
const fieldName = `${name}.${item.name}`
|
||||
if (excludes.includes(fieldName)) {
|
||||
return
|
||||
}
|
||||
this.items.push({
|
||||
key: item.label,
|
||||
value: item.value
|
||||
if (typeof value[0] === 'object') {
|
||||
value.forEach(item => {
|
||||
const fieldName = `${name}.${item.name}`
|
||||
if (excludes.includes(fieldName)) {
|
||||
return
|
||||
}
|
||||
this.items.push({
|
||||
key: item.label,
|
||||
value: item.value
|
||||
})
|
||||
})
|
||||
})
|
||||
} else if (typeof value[0] === 'string') {
|
||||
value.forEach((item, index) => {
|
||||
let data = {}
|
||||
if (index === 0) {
|
||||
data = {
|
||||
key: label,
|
||||
value: value[index]
|
||||
}
|
||||
} else {
|
||||
data = {
|
||||
key: '',
|
||||
value: value[index]
|
||||
}
|
||||
}
|
||||
this.items.push(data)
|
||||
})
|
||||
}
|
||||
continue
|
||||
}
|
||||
const label = fieldMeta.label
|
||||
if (value === null || value === '') {
|
||||
value = '-'
|
||||
} else if (fieldMeta.type === 'datetime') {
|
||||
|
Reference in New Issue
Block a user