diff --git a/src/views/production-master-data/product-model/product-ng-info/index.vue b/src/views/production-master-data/product-model/product-ng-info/index.vue index 09e831e6..63153795 100644 --- a/src/views/production-master-data/product-model/product-ng-info/index.vue +++ b/src/views/production-master-data/product-model/product-ng-info/index.vue @@ -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,