微调
This commit is contained in:
@@ -6,9 +6,14 @@
|
||||
style="width: 100%;">
|
||||
<el-table-column type="index" label="序号" width="70" fixed="left"/>
|
||||
<el-table-column prop="updateTime" label="数据时间"/>
|
||||
<el-table-column prop="L1" label="L1(V)"/>
|
||||
<el-table-column prop="L2" label="L2(V)"/>
|
||||
<el-table-column prop="L3" label="L3(V)"/>
|
||||
<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>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -16,13 +21,26 @@
|
||||
|
||||
<script lang="tsx" setup>
|
||||
|
||||
import{CheckData} from "@/api/check/interface";
|
||||
import {CheckData} from "@/api/check/interface";
|
||||
|
||||
const {tableData} = defineProps<{
|
||||
tableData: CheckData.RawDataItem[]
|
||||
}>()
|
||||
|
||||
|
||||
const unit = computed(() => {
|
||||
return "V"
|
||||
})
|
||||
|
||||
const phaseFlag = computed(() => {
|
||||
let result = 0;
|
||||
if (tableData.length > 0) {
|
||||
result = !tableData[0].T ? 0 : 1;
|
||||
}
|
||||
console.log(result);
|
||||
return result;
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user