Files
pqs-9100_client/frontend/src/views/home/components/channelsTestTable.vue
2024-12-18 15:49:29 +08:00

179 lines
5.8 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-container table-main">
<el-table :data="tableData"
:header-cell-style="{ textAlign: 'center' } "
:cell-style="{ textAlign: 'center' }"
style="width: 100%"
max-height="400px">
<el-table-column type="expand">
<template #default="props">
<div style="display: flex">
<p >大电压A相57.74V,</p>
<p >大电压B相57.74V,</p>
<p >大电压C相57.74V,</p>
<p >大电流A相1A,</p>
<p >大电流B相1A,</p>
<p >大电流C相1A</p>
</div>
<div style="display: flex">
<p >小电压A相57.74V,</p>
<p >小电压B相57.74V,</p>
<p >小电压C相57.74V,</p>
<p >小电流A相1A,</p>
<p >小电流B相1A,</p>
<p >小电流C相1A</p>
</div>
</template>
</el-table-column>
<el-table-column prop="MonitorIdx" label="监测点序号"/>
<!-- <el-table-column prop="updateTime" label="上送时刻" width="180"/> -->
<!-- <el-table-column prop="deviceName" label="设备名称" /> -->
<el-table-column label="电压通道" >
<el-table-column prop="Ua" label="L1">
</el-table-column>
<el-table-column prop="Ub" label="L2">
</el-table-column>
<el-table-column prop="Uc" label="L3">
</el-table-column>
</el-table-column>
<el-table-column label="电流通道" >
<el-table-column prop="Ia" label="L1">
</el-table-column>
<el-table-column prop="Ib" label="L2">
</el-table-column>
<el-table-column prop="Ic" label="L3">
</el-table-column>
</el-table-column>
<el-table-column label="校准结果">
<template #default="scope">
<el-tag type="danger" v-if="scope.row.Result === '不合格'">{{ scope.row.Result }}</el-tag>
<span v-if="scope.row.Result != '不合格'">{{ scope.row.Result }}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script lang="ts" setup name="ErrorSystemDialog">
import{ElMessage, FormInstance,FormItemRule}from'element-plus'
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
//import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
import {CirclePlus, Delete, EditPen,FolderOpened,CopyDocument} from '@element-plus/icons-vue'
import { useDictStore } from '@/stores/modules/dict'
const dictStore = useDictStore()
const props = defineProps<{
tableData: {
id: string;
updateTime: string;
deviceName:string;
MonitorIdx:number;
Ua:number;
Ub:number;
Uc:number;
Ia:number;
Ib:number;
Ic:number;
Result: string;
};
}>();
// const tableData = ref([
// {
// id: '1',
// updateTime: '2024-10-10 10:30:00',
// deviceName:'被检设备1',
// MonitorIdx: 1,
// Ua:1.0003,
// Ub:1.0003,
// Uc:0.0096,
// Ia:1.0003,
// Ib:1.0003,
// Ic:1.0008,
// Result: '合格',
// },
// {
// id: '2',
// updateTime: '2024-10-10 10:30:00',
// deviceName:'被检设备1',
// MonitorIdx: 2,
// Ua:1.0003,
// Ub:1.0003,
// Uc:0.0096,
// Ia:1.0003,
// Ib:1.0003,
// Ic:1.0008,
// Result: '合格',
// },
// {
// id: '3',
// updateTime: '2024-10-10 10:30:00',
// deviceName:'被检设备1',
// MonitorIdx: 3,
// Ua:1.0003,
// Ub:1.0003,
// Uc:0.0096,
// Ia:1.0003,
// Ib:1.0003,
// Ic:1.0008,
// Result: '合格',
// },
// {
// id: '4',
// updateTime: '2024-10-10 10:30:00',
// deviceName:'被检设备1',
// MonitorIdx: 4,
// Ua:1.0003,
// Ub:1.0003,
// Uc:0.0096,
// Ia:1.0003,
// Ib:1.0003,
// Ic:1.0008,
// Result: '合格',
// },
// ])
</script>
<style scoped>
.form-grid {
display: flex;
flex-direction: row; /* 横向排列 */
flex-wrap: wrap; /* 允许换行 */
}
.form-grid .el-form-item {
flex: 1 1 30%; /* 控件宽度 */
margin-right: 20px; /* 控件间距 */
}
.form-grid .el-form-item:last-child {
margin-right: 0; /* 最后一个控件不需要右边距 */
}
.dialog-footer {
display: flex;
justify-content: flex-start;
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
}
.el-tabs {
margin-bottom: 20px; /* 添加底部边距 */
}
.el-table th, .el-table td {
text-align: center; /* 所有单元格文字居中 */
}
.table-container {
max-height: 400px; /* 根据需要调整高度 */
overflow-y: auto; /* 允许垂直滚动 */
overflow-x: hidden; /* 隐藏水平滚动条 */
}
</style>