2024-11-19 19:34:00 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
|
2024-12-18 15:56:59 +08:00
|
|
|
|
<div class="table-main">
|
2024-12-20 10:19:58 +08:00
|
|
|
|
<el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } "
|
|
|
|
|
|
:cell-style="{ textAlign: 'center' }" height="335px"
|
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
|
<el-table-column type="index" label="序号" width="70" fixed="left"/>
|
|
|
|
|
|
<el-table-column prop="updateTime" label="数据时间"/>
|
2024-12-31 14:27:36 +08:00
|
|
|
|
<template v-if="phaseFlag === 0">
|
|
|
|
|
|
<el-table-column prop="A" :label="`A(${unit})`"/>
|
|
|
|
|
|
<el-table-column prop="B" :label="`B(${unit})`"/>
|
|
|
|
|
|
<el-table-column prop="C" :label="`C(${unit})`"/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-if="phaseFlag === 1">
|
|
|
|
|
|
<el-table-column prop="T" :label="`T(${unit})`"/>
|
|
|
|
|
|
</template>
|
2024-12-20 10:19:58 +08:00
|
|
|
|
</el-table>
|
2024-12-18 15:56:59 +08:00
|
|
|
|
</div>
|
2024-11-19 19:34:00 +08:00
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="tsx" setup>
|
|
|
|
|
|
|
2024-12-31 14:27:36 +08:00
|
|
|
|
import {CheckData} from "@/api/check/interface";
|
2024-11-19 19:34:00 +08:00
|
|
|
|
|
2024-12-18 15:56:59 +08:00
|
|
|
|
const {tableData} = defineProps<{
|
2024-12-25 18:04:16 +08:00
|
|
|
|
tableData: CheckData.RawDataItem[]
|
2024-12-18 15:56:59 +08:00
|
|
|
|
}>()
|
2024-11-19 19:34:00 +08:00
|
|
|
|
|
2024-12-05 18:14:43 +08:00
|
|
|
|
|
2024-12-31 14:27:36 +08:00
|
|
|
|
const unit = computed(() => {
|
|
|
|
|
|
return "V"
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const phaseFlag = computed(() => {
|
|
|
|
|
|
let result = 0;
|
|
|
|
|
|
if (tableData.length > 0) {
|
|
|
|
|
|
result = !tableData[0].T ? 0 : 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2024-12-18 15:56:59 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</style>
|