2024-11-18 22:04:59 +08:00
|
|
|
<template>
|
2024-12-05 15:22:46 +08:00
|
|
|
<div class="table-container table-main">
|
2024-12-18 15:49:29 +08:00
|
|
|
<el-table :data="tableData"
|
|
|
|
|
:header-cell-style="{ textAlign: 'center' } "
|
|
|
|
|
:cell-style="{ textAlign: 'center' }"
|
|
|
|
|
style="width: 100%"
|
2024-12-20 10:21:36 +08:00
|
|
|
max-height="400px"
|
|
|
|
|
:span-method="objectSpanMethod">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="MonitorIdx" label="监测点序号" width="80"/>
|
2024-12-18 15:49:29 +08:00
|
|
|
<!-- <el-table-column prop="updateTime" label="上送时刻" width="180"/> -->
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="deviceName" label="描述" width="90"/>
|
2024-11-18 22:04:59 +08:00
|
|
|
<el-table-column label="电压通道" >
|
|
|
|
|
<el-table-column prop="Ua" label="L1">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="UaData" label="数据(V)">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-if="scope.row.UaData === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.UaData }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<el-table-column prop="UaChannel" label="系数">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">
|
|
|
|
|
{{ scope.row.UaChannel }}
|
|
|
|
|
</el-tag>
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-else-if="scope.row.UaChannel === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.UaChannel }}
|
|
|
|
|
</span>
|
|
|
|
|
<!-- <el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">{{ scope.row.UaChannel }}</el-tag> -->
|
2024-12-20 10:21:36 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-18 22:04:59 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="Ub" label="L2">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="UbData" label="数据(V)">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-if="scope.row.UbData === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.UbData }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<el-table-column prop="UbChannel" label="系数">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-tag type="danger" v-if="scope.row.UbChannel === '不合格'">
|
|
|
|
|
{{ scope.row.UbChannel }}
|
|
|
|
|
</el-tag>
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-else-if="scope.row.UbChannel === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.UbChannel }}
|
|
|
|
|
</span>
|
2024-12-20 10:21:36 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-18 22:04:59 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="Uc" label="L3">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="UcData" label="数据(V)">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-if="scope.row.UcData === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.UcData }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<el-table-column prop="UcChannel" label="系数">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-tag type="danger" v-if="scope.row.UcChannel === '不合格'">
|
|
|
|
|
{{ scope.row.UcChannel }}
|
|
|
|
|
</el-tag>
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-else-if="scope.row.UcChannel === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.UcChannel }}
|
|
|
|
|
</span>
|
2024-12-20 10:21:36 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-18 22:04:59 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="电流通道" >
|
|
|
|
|
<el-table-column prop="Ia" label="L1">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="IaData" label="数据(A)">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-if="scope.row.IaData === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.IaData }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<el-table-column prop="IaChannel" label="系数">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-tag type="danger" v-if="scope.row.IaChannel === '不合格'">
|
|
|
|
|
{{ scope.row.IaChannel }}
|
|
|
|
|
</el-tag>
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-else-if="scope.row.IaChannel === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.IaChannel }}
|
|
|
|
|
</span>
|
2024-12-20 10:21:36 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-18 22:04:59 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="Ib" label="L2">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="IbData" label="数据(A)">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-if="scope.row.IbData === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.IbData }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<el-table-column prop="IbChannel" label="系数">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-tag type="danger" v-if="scope.row.IbChannel === '不合格'">
|
|
|
|
|
{{ scope.row.IbChannel }}
|
|
|
|
|
</el-tag>
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-else-if="scope.row.IbChannel === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.IbChannel }}
|
|
|
|
|
</span>
|
2024-12-20 10:21:36 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-18 22:04:59 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="Ic" label="L3">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-table-column prop="IcData" label="数据(A)">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-if="scope.row.IcData === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.IcData }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<el-table-column prop="IcChannel" label="系数">
|
|
|
|
|
<template #default="scope">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-tag type="danger" v-if="scope.row.IcChannel === '不合格'">
|
|
|
|
|
{{ scope.row.IcChannel }}
|
|
|
|
|
</el-tag>
|
2024-12-30 19:17:39 +08:00
|
|
|
<el-icon v-else-if="scope.row.IcChannel === '—'&& loading" class="loading-box">
|
2024-12-30 14:43:13 +08:00
|
|
|
<el-icon-loading />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{ scope.row.IcChannel }}
|
|
|
|
|
</span>
|
2024-12-20 10:21:36 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-18 22:04:59 +08:00
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
2024-12-20 10:21:36 +08:00
|
|
|
<!-- <el-table-column label="校准结果">
|
2024-11-21 23:02:43 +08:00
|
|
|
<template #default="scope">
|
2024-12-05 21:33:52 +08:00
|
|
|
<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>
|
2024-12-20 10:21:36 +08:00
|
|
|
</el-table-column> -->
|
2024-11-18 22:04:59 +08:00
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup name="ErrorSystemDialog">
|
2024-12-30 19:17:39 +08:00
|
|
|
import { defineProps } from 'vue';
|
2024-12-30 14:43:13 +08:00
|
|
|
import { ElIcon, ElLoading, ElTag } from 'element-plus';
|
2024-11-18 22:04:59 +08:00
|
|
|
//import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
|
2024-12-30 14:43:13 +08:00
|
|
|
|
2024-11-18 22:04:59 +08:00
|
|
|
const props = defineProps<{
|
2024-12-20 10:21:36 +08:00
|
|
|
tableData: Array<{
|
2024-11-25 21:11:10 +08:00
|
|
|
id: string;
|
2024-12-30 14:43:13 +08:00
|
|
|
deviceName?: string;
|
|
|
|
|
MonitorIdx: number;
|
|
|
|
|
UaData?: number | string;
|
|
|
|
|
UaChannel?: number | string;
|
|
|
|
|
UbData?: number | string;
|
|
|
|
|
UbChannel?: number | string;
|
|
|
|
|
UcData?: number | string;
|
|
|
|
|
UcChannel?: number | string;
|
|
|
|
|
IaData?: number | string;
|
|
|
|
|
IaChannel?: number | string;
|
|
|
|
|
IbData?: number | string;
|
|
|
|
|
IbChannel?: number | string;
|
|
|
|
|
IcData?: number | string;
|
|
|
|
|
IcChannel?: number | string;
|
|
|
|
|
Result?: string | string;
|
|
|
|
|
updateTime?: string;
|
2024-12-20 10:21:36 +08:00
|
|
|
}>
|
2024-12-30 14:43:13 +08:00
|
|
|
loading: boolean; // 定义 loading 属性
|
2024-11-18 22:04:59 +08:00
|
|
|
}>();
|
|
|
|
|
|
2024-12-20 10:21:36 +08:00
|
|
|
function objectSpanMethod({ row, column, rowIndex, columnIndex }: { row: any, column: any, rowIndex: number, columnIndex: number }) {
|
|
|
|
|
if (columnIndex === 0) {
|
2024-12-30 14:43:13 +08:00
|
|
|
if (rowIndex % 4 === 0) {
|
2024-12-20 10:21:36 +08:00
|
|
|
return {
|
|
|
|
|
rowspan: 4,
|
|
|
|
|
colspan: 1,
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
return {
|
|
|
|
|
rowspan: 0,
|
|
|
|
|
colspan: 0,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-30 14:43:13 +08:00
|
|
|
if (columnIndex === 1) {
|
|
|
|
|
if (rowIndex % 2 === 0) {
|
|
|
|
|
return {
|
|
|
|
|
rowspan: 2,
|
|
|
|
|
colspan: 1,
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
return {
|
|
|
|
|
rowspan: 0,
|
|
|
|
|
colspan: 0,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-20 10:21:36 +08:00
|
|
|
}
|
2024-11-18 22:04:59 +08:00
|
|
|
|
2024-11-25 21:11:10 +08:00
|
|
|
// 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: '合格',
|
|
|
|
|
// },
|
|
|
|
|
// ])
|
2024-11-18 22:04:59 +08:00
|
|
|
|
2024-12-30 14:43:13 +08:00
|
|
|
|
|
|
|
|
// 监听 tableData 的变化
|
|
|
|
|
|
2024-11-18 22:04:59 +08:00
|
|
|
</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; /* 隐藏水平滚动条 */
|
|
|
|
|
}
|
2024-12-30 14:43:13 +08:00
|
|
|
|
2024-12-30 19:17:39 +08:00
|
|
|
/* 确保 el-icon-loading 的动画效果没有被覆盖 */
|
|
|
|
|
.loading-box {
|
|
|
|
|
animation: rotate 2s linear infinite;
|
|
|
|
|
}
|
2024-12-30 14:43:13 +08:00
|
|
|
|
2024-12-30 19:17:39 +08:00
|
|
|
@keyframes rotate {
|
|
|
|
|
from {
|
|
|
|
|
transform: rotate(0deg);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
transform: rotate(360deg);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-18 22:04:59 +08:00
|
|
|
</style>
|