修复异常不良管理设备类别空值报错
This commit is contained in:
@@ -316,11 +316,12 @@ export default {
|
||||
return { list: [], total: 0 }
|
||||
},
|
||||
normalizeRow (row) {
|
||||
const deviceCategory = typeof row.DeviceCategory === 'object'
|
||||
const isObject = value => value && typeof value === 'object'
|
||||
const deviceCategory = isObject(row.DeviceCategory)
|
||||
? row.DeviceCategory
|
||||
: (typeof row.device_category === 'object'
|
||||
: (isObject(row.device_category)
|
||||
? row.device_category
|
||||
: (typeof row.category === 'object' ? row.category : {}))
|
||||
: (isObject(row.category) ? row.category : {}))
|
||||
const option = this.deviceCategoryOptions.find(item => String(item.value) === String(row.device_category_id || deviceCategory.id || ''))
|
||||
return {
|
||||
...row,
|
||||
|
||||
Reference in New Issue
Block a user