fix: 修复资产info信息展示list数据

This commit is contained in:
Bai
2023-02-20 17:18:46 +08:00
committed by Jiangjie.Bai
parent 494bb8ddcc
commit 413feb6372

View File

@@ -64,8 +64,10 @@ export default {
}
let value = this.object[name]
const label = fieldMeta.label
if (Array.isArray(value)) {
if (typeof value[0] === 'object') {
value.forEach(item => {
const fieldName = `${name}.${item.name}`
if (excludes.includes(fieldName)) {
@@ -76,9 +78,25 @@ export default {
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') {