二级评估bug修改

This commit is contained in:
sjl
2025-09-03 18:26:19 +08:00
parent 65f645eaaf
commit 8b20307a14
6 changed files with 43 additions and 12 deletions

View File

@@ -402,6 +402,11 @@ const info = async (i: number) => {
const typeId = ref(null)
// 过滤数据
const formatter = (row: any) => {
// 检查数据是否已加载完成
if (!row.cellValue && row.cellValue !== 0) {
return ''; // 数据未加载时返回空字符串
}
if (row.column.field == 'transtypeId') {
if (row.cellValue) {
const found = transformer.value.find((item: any) => item.transtypeId == row.cellValue)
@@ -430,7 +435,11 @@ const formatter = (row: any) => {
}
else if (row.column.field == 'harmId') {
const found = characteristic.value.find((item: any) => item.harmId == row.cellValue)
return found.harmName || '' // 使用可选链并提供默认值
if(found){
return found.harmName
}else{
return ''
}
} else if (
row.column.field == 'capacitorScale' ||
row.column.field == 'linevoltageScale' ||
@@ -459,7 +468,7 @@ const dictionary = () => {
})
}
onMounted(async () => {
onBeforeMount(async () => {
await dictionary()
info(0) // 变压器参数维护
info(1) // 电容器参数维护