Files
pqs-9100_client/frontend/src/views/home/components/compareDataCheckRawDataTable.vue
caozehui 647afd9fc9 微调
2025-12-11 08:35:01 +08:00

65 lines
2.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="table-main">
<el-table
:data="prop.tableData"
stripe
border
:header-cell-style="{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }"
height="368px"
style="width: 100%"
>
<el-table-column type="index" label="序号" width="70" fixed="left"/>
<el-table-column :label="'标准设备'">
<el-table-column prop="timeStdDev" label="数据时间" width="200"/>
<el-table-column prop="uaStdDev" :label="'A相'+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData.length==0||prop.tableData[0]?.uaStdDev != null"/>
<el-table-column prop="ubStdDev" :label="setB+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData.length==0||prop.tableData[0]?.ubStdDev != null"/>
<el-table-column prop="ucStdDev" :label="'C相'+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData.length==0||prop.tableData[0]?.ucStdDev != null"/>
<el-table-column prop="utStdDev" :label="setT+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData[0]?.utStdDev != null"/>
</el-table-column>
<el-table-column :label="'被检设备'">
<el-table-column prop="timeDev" label="数据时间" width="200"/>
<el-table-column prop="uaDev" :label="'A相'+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData.length==0||prop.tableData[0]?.uaDev != null"/>
<el-table-column prop="ubDev" :label="setB+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData.length==0||prop.tableData[0]?.ubDev != null"/>
<el-table-column prop="ucDev" :label="'C相'+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData.length==0||prop.tableData[0]?.ucDev != null"/>
<el-table-column prop="utDev" :label="setT+(outerUnit==''?'':''+outerUnit+'')" v-if="prop.tableData[0]?.utDev != null"/>
</el-table-column>
</el-table>
</div>
</template>
<script lang="tsx" setup>
import { computed } from 'vue'
import { CheckData } from '@/api/check/interface'
const prop = defineProps({
tableData: {
type: Array as () => CheckData.TableRow[],
default: []
},
currentCheckItem: {
type: String,
default: ''
}
})
const outerUnit = computed(() => {
return prop.tableData.length > 0 ? prop.tableData[0].unit : '';
})
const setB = computed(() => {
return prop.currentCheckItem == '三相电流不平衡度'
? '负序不平衡度'
: prop.currentCheckItem == '三相电压不平衡度'
? '负序不平衡度'
: 'B相'
})
const setT = computed(() => {
return prop.currentCheckItem == '频率' ? '频率' : 'T相'
})
</script>
<style scoped></style>