模版下载

This commit is contained in:
sjl
2025-08-26 15:39:20 +08:00
parent 1fb833c6ad
commit cf91f53b45
4 changed files with 355 additions and 214 deletions

View File

@@ -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