微调
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
<!-- </el-table-column>-->
|
||||
<template v-if="phaseT === 0">
|
||||
<el-table-column :label="`A(${unit})`">
|
||||
<el-table-column prop="aStd" width="100" label="标准值"/>
|
||||
<el-table-column prop="aData" width="100" label="被检值"/>
|
||||
<el-table-column prop="stdA" width="100" label="标准值"/>
|
||||
<el-table-column prop="dataA" width="100" label="被检值"/>
|
||||
<el-table-column prop="isDataA" label="检测结果">
|
||||
<template #default="scope">
|
||||
<el-tooltip effect="dark" placement="bottom">
|
||||
<template #content>
|
||||
最大误差:{{ maxErrorView }}<br/>
|
||||
误差值:{{ scope.row.aError }} {{ unit }}
|
||||
最大误差:{{ maxErrorStr }}<br/>
|
||||
误差值:{{ scope.row.errorA }} {{ scope.row.errorA !== '/' ? unit : '' }}
|
||||
</template>
|
||||
<el-tag type="success" v-if="scope.row.isDataA === 1">符合</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.isDataA === 2">不符合</el-tag>
|
||||
@@ -25,23 +25,16 @@
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="aError" width="92" label="误差值">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <span v-if="scope.row.isDataA === 1">{{scope.row.aError}}</span>-->
|
||||
<!-- <el-tag type="danger" v-if="scope.row.isDataA === 2">{{scope.row.aError}}</el-tag>-->
|
||||
<!-- <span v-if="scope.row.isDataA === 4">/</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table-column>
|
||||
<el-table-column :label="`B(${unit})`">
|
||||
<el-table-column prop="bStd" width="100" label="标准值"/>
|
||||
<el-table-column prop="bData" width="100" label="被检值"/>
|
||||
<el-table-column prop="stdB" width="100" label="标准值"/>
|
||||
<el-table-column prop="dataB" width="100" label="被检值"/>
|
||||
<el-table-column prop="isDataB" label="检测结果">
|
||||
<template #default="scope">
|
||||
<el-tooltip effect="dark" placement="bottom">
|
||||
<template #content>
|
||||
最大误差:{{ maxErrorView }}<br/>
|
||||
误差值:{{ scope.row.bError }} {{ unit }}
|
||||
最大误差:{{ maxErrorStr }}<br/>
|
||||
误差值:{{ scope.row.errorB }} {{ scope.row.errorB !== '/' ? unit : '' }}
|
||||
</template>
|
||||
<el-tag type="success" v-if="scope.row.isDataB === 1">符合</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.isDataB === 2">不符合</el-tag>
|
||||
@@ -51,14 +44,14 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column :label="`C(${unit})`">
|
||||
<el-table-column prop="cStd" width="100" label="标准值"/>
|
||||
<el-table-column prop="cData" width="100" label="被检值"/>
|
||||
<el-table-column prop="stdC" width="100" label="标准值"/>
|
||||
<el-table-column prop="dataC" width="100" label="被检值"/>
|
||||
<el-table-column prop="isDataC" label="检测结果">
|
||||
<template #default="scope">
|
||||
<el-tooltip effect="dark" placement="bottom">
|
||||
<template #content>
|
||||
最大误差: {{ maxErrorView }}<br/>
|
||||
误差值:{{ scope.row.cError }} {{ unit }}
|
||||
最大误差: {{ maxErrorStr }}<br/>
|
||||
误差值:{{ scope.row.errorC }} {{ scope.row.errorC !== '/' ? unit : '' }}
|
||||
</template>
|
||||
<el-tag type="success" v-if="scope.row.isDataC === 1">符合</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.isDataC === 2">不符合</el-tag>
|
||||
@@ -67,27 +60,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="maxError" :label="`最大误差(${unit})`"/>-->
|
||||
<!-- <el-table-column prop="result" label="检测结果" width="88">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-tag type="danger" v-if="scope.row.result === 2">不符合</el-tag>-->
|
||||
<!-- <span v-if="scope.row.result === 1">符合</span>-->
|
||||
<!-- <span v-if="scope.row.result === 4">/</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</template>
|
||||
|
||||
<template v-if="phaseT === 1">
|
||||
<el-table-column :label="`T(${unit})`">
|
||||
<el-table-column prop="tStd" label="标准值"/>
|
||||
<el-table-column prop="tData" label="被检值"/>
|
||||
<el-table-column prop="tError" label="误差值"/>
|
||||
<el-table-column prop="result" label="检测结果">
|
||||
<el-table-column prop="stdT" label="标准值"/>
|
||||
<el-table-column prop="dataT" label="被检值"/>
|
||||
<el-table-column prop="isDataT" label="检测结果">
|
||||
<template #default="scope">
|
||||
<el-tooltip effect="dark" placement="bottom">
|
||||
<template #content>
|
||||
最大误差: {{ maxErrorView }}<br/>
|
||||
误差值:{{ scope.row.tError }} {{ unit }}
|
||||
最大误差: {{ maxErrorStr }}<br/>
|
||||
误差值:{{ scope.row.errorT }} {{ scope.row.errorT !== '/' ? unit : '' }}
|
||||
</template>
|
||||
<el-tag type="success" v-if="scope.row.isDataT === 1">符合</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.isDataT === 2">不符合</el-tag>
|
||||
@@ -125,18 +109,11 @@ const unit = computed(() => {
|
||||
})
|
||||
|
||||
const phaseT = computed(() => {
|
||||
let result = 0;
|
||||
if (tableData.length > 0) {
|
||||
result = !tableData[0].tData ? 0 : 1;
|
||||
}
|
||||
return result;
|
||||
return tableData[0].dataT == null || tableData[0].dataT == undefined ? 0 : 1
|
||||
})
|
||||
|
||||
const maxErrorView = computed((data) => {
|
||||
let result = '';
|
||||
if (tableData.length > 0) {
|
||||
result = tableData[0].maxError ? tableData[0].maxError : '';
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user