处理源未知异常、检测结果最大误差回显

This commit is contained in:
caozehui
2025-01-10 13:49:09 +08:00
parent b614767b2d
commit de8a392d2c
6 changed files with 58 additions and 65 deletions

View File

@@ -16,7 +16,7 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差{{ maxErrorStr }}<br/>
最大误差{{ scope.row.maxErrorA }} <br/>
误差值{{ scope.row.errorA }} {{ scope.row.errorA !== '/' ? unit : '' }}
</template>
<el-tag type="success" v-if="scope.row.isDataA === 1">符合</el-tag>
@@ -33,7 +33,7 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差{{ maxErrorStr }}<br/>
最大误差{{ scope.row.maxErrorB }}<br/>
误差值{{ scope.row.errorB }} {{ scope.row.errorB !== '/' ? unit : '' }}
</template>
<el-tag type="success" v-if="scope.row.isDataB === 1">符合</el-tag>
@@ -50,7 +50,7 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差 {{ maxErrorStr }}<br/>
最大误差 {{ scope.row.maxErrorC }}<br/>
误差值{{ scope.row.errorC }} {{ scope.row.errorC !== '/' ? unit : '' }}
</template>
<el-tag type="success" v-if="scope.row.isDataC === 1">符合</el-tag>
@@ -70,7 +70,7 @@
<template #default="scope">
<el-tooltip effect="dark" placement="bottom">
<template #content>
最大误差 {{ maxErrorStr }}<br/>
最大误差 {{ scope.row.maxErrorT }}<br/>
误差值{{ scope.row.errorT }} {{ scope.row.errorT !== '/' ? unit : '' }}
</template>
<el-tag type="success" v-if="scope.row.isDataT === 1">符合</el-tag>
@@ -112,14 +112,14 @@ const phaseT = computed(() => {
return tableData[0].dataT == null || tableData[0].dataT == undefined ? 0 : 1
})
const maxErrorStr = computed((data) => {
let result = tableData[0].maxError ?? '/'
let idx = result.indexOf('~');
if (idx > 0) {
result = result.substring(0, idx) + unit.value + result.substring(idx, result.length) + unit.value;
}
return result;
})
// const maxErrorStr = computed((data) => {
// let result = tableData[0].maxError ?? '/'
// let idx = result.indexOf('~');
// if (idx > 0) {
// result = result.substring(0, idx) + unit.value + result.substring(idx, result.length) + unit.value;
// }
// return result;
// })
</script>