mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 07:42:41 +00:00
fix: 修复资产info信息展示list数据
This commit is contained in:
@@ -64,8 +64,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let value = this.object[name]
|
let value = this.object[name]
|
||||||
|
const label = fieldMeta.label
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
|
if (typeof value[0] === 'object') {
|
||||||
value.forEach(item => {
|
value.forEach(item => {
|
||||||
const fieldName = `${name}.${item.name}`
|
const fieldName = `${name}.${item.name}`
|
||||||
if (excludes.includes(fieldName)) {
|
if (excludes.includes(fieldName)) {
|
||||||
@@ -76,9 +78,25 @@ export default {
|
|||||||
value: item.value
|
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
|
continue
|
||||||
}
|
}
|
||||||
const label = fieldMeta.label
|
|
||||||
if (value === null || value === '') {
|
if (value === null || value === '') {
|
||||||
value = '-'
|
value = '-'
|
||||||
} else if (fieldMeta.type === 'datetime') {
|
} else if (fieldMeta.type === 'datetime') {
|
||||||
|
Reference in New Issue
Block a user