模版下载
This commit is contained in:
@@ -393,8 +393,12 @@ const typeId = ref(null)
|
||||
// 过滤数据
|
||||
const formatter = (row: any) => {
|
||||
if (row.column.field == 'transtypeId') {
|
||||
const found = transformer.value.find((item: any) => item.transtypeId == row.cellValue)
|
||||
return found.transtypeName || '' // 使用可选链并提供默认值
|
||||
if (row.cellValue) {
|
||||
const found = transformer.value.find((item: any) => item.transtypeId == row.cellValue)
|
||||
return found?.transtypeName || ''
|
||||
} else {
|
||||
return '' // 或者返回默认值
|
||||
}
|
||||
}else if(row.column.field =='inpactloadtypeId'){
|
||||
const found = shockRef.value.find((item: any) => item.inpactloadtypeId == row.cellValue)
|
||||
typeId.value = found.inpactloadtypeId
|
||||
|
||||
Reference in New Issue
Block a user