This commit is contained in:
sjl
2025-01-06 14:07:21 +08:00
parent c4e2da8d67
commit 99e6abbcfd
4 changed files with 511 additions and 494 deletions

View File

@@ -21,22 +21,36 @@
</template>
</el-table-column>
<el-table-column prop="UaChannel" label="结果">
<template #header >
<span>结果</span>
<el-tooltip class="item" effect="light" placement="top-start" content="电压L1系数校准不合格原因">
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">
<el-tooltip
v-if="scope.row.UaChannel === '不合格'"
class="item"
effect="light"
placement="top-start"
:content="'电压L1系数校准不合格原因'+scope.row.UaData"
>
<el-tag type="danger" class="tooltip-content">
{{ scope.row.UaChannel }}
</el-tag>
</el-tooltip>
<el-tooltip
v-else-if="scope.row.UaChannel === '合格'"
class="item"
effect="light"
placement="top-start"
:content="'电压L1系数校准合格原因'+scope.row.UaData"
>
<span class="tooltip-content">{{ scope.row.UaChannel }}</span>
</el-tooltip>
<!-- <el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">
{{ scope.row.UaChannel }}
</el-tag>
</el-tag> -->
<el-icon v-else-if="scope.row.UaChannel === '—'&& loading" class="loading-box">
<el-icon-loading />
</el-icon>
<span v-else>
<!-- <span v-else>
{{ scope.row.UaChannel }}
</span>
</span> -->
</template>
</el-table-column>
</el-table-column>
@@ -52,22 +66,30 @@
</template>
</el-table-column>
<el-table-column prop="UbChannel" label="结果">
<template #header >
<span>结果</span>
<el-tooltip class="item" effect="light" placement="top-start" content="电压L2系数校准不合格原因">
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tag type="danger" v-if="scope.row.UbChannel === '不合格'">
{{ scope.row.UbChannel }}
</el-tag>
<el-tooltip
v-if="scope.row.UbChannel === '不合格'"
class="item"
effect="light"
placement="top-start"
content="电压L2系数校准不合格原因"
>
<el-tag type="danger" class="tooltip-content">
{{ scope.row.UbChannel }}
</el-tag>
</el-tooltip>
<el-tooltip
v-else-if="scope.row.UbChannel === '合格'"
class="item"
effect="light"
placement="top-start"
content="电压L2系数校准合格原因"
>
<span class="tooltip-content">{{ scope.row.UbChannel }}</span>
</el-tooltip>
<el-icon v-else-if="scope.row.UbChannel === '—'&& loading" class="loading-box">
<el-icon-loading />
</el-icon>
<span v-else>
{{ scope.row.UbChannel }}
</span>
</template>
</el-table-column>
</el-table-column>
@@ -83,22 +105,30 @@
</template>
</el-table-column>
<el-table-column prop="UcChannel" label="结果">
<template #header >
<span>结果</span>
<el-tooltip class="item" effect="light" placement="top-start" content="电压L3系数校准不合格原因">
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tag type="danger" v-if="scope.row.UcChannel === '不合格'">
{{ scope.row.UcChannel }}
</el-tag>
<el-tooltip
v-if="scope.row.UcChannel === '不合格'"
class="item"
effect="light"
placement="top-start"
content="电压L3系数校准不合格原因"
>
<el-tag type="danger" class="tooltip-content">
{{ scope.row.UcChannel }}
</el-tag>
</el-tooltip>
<el-tooltip
v-else-if="scope.row.UcChannel === '合格'"
class="item"
effect="light"
placement="top-start"
content="电压L3系数校准合格原因"
>
<span class="tooltip-content">{{ scope.row.UcChannel }}</span>
</el-tooltip>
<el-icon v-else-if="scope.row.UcChannel === '—'&& loading" class="loading-box">
<el-icon-loading />
</el-icon>
<span v-else>
{{ scope.row.UcChannel }}
</span>
</template>
</el-table-column>
</el-table-column>
@@ -116,22 +146,30 @@
</template>
</el-table-column>
<el-table-column prop="IaChannel" label="结果">
<template #header >
<span>结果</span>
<el-tooltip class="item" effect="light" placement="top-start" content="电流L1系数校准不合格原因">
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tag type="danger" v-if="scope.row.IaChannel === '不合格'">
{{ scope.row.IaChannel }}
</el-tag>
<el-tooltip
v-if="scope.row.IaChannel === '不合格'"
class="item"
effect="light"
placement="top-start"
content="电流L1系数校准不合格原因"
>
<el-tag type="danger" class="tooltip-content">
{{ scope.row.IaChannel }}
</el-tag>
</el-tooltip>
<el-tooltip
v-else-if="scope.row.IaChannel === '合格'"
class="item"
effect="light"
placement="top-start"
content="电流L1系数校准合格原因"
>
<span class="tooltip-content">{{ scope.row.IaChannel }}</span>
</el-tooltip>
<el-icon v-else-if="scope.row.IaChannel === '—'&& loading" class="loading-box">
<el-icon-loading />
</el-icon>
<span v-else>
{{ scope.row.IaChannel }}
</span>
</template>
</el-table-column>
</el-table-column>
@@ -147,22 +185,30 @@
</template>
</el-table-column>
<el-table-column prop="IbChannel" label="结果">
<template #header >
<span>结果</span>
<el-tooltip class="item" effect="light" placement="top-start" content="电流L2系数校准不合格原因">
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tag type="danger" v-if="scope.row.IbChannel === '不合格'">
{{ scope.row.IbChannel }}
</el-tag>
<el-tooltip
v-if="scope.row.IbChannel === '不合格'"
class="item"
effect="light"
placement="top-start"
content="电流L2系数校准不合格原因"
>
<el-tag type="danger" class="tooltip-content">
{{ scope.row.IbChannel }}
</el-tag>
</el-tooltip>
<el-tooltip
v-else-if="scope.row.IbChannel === '合格'"
class="item"
effect="light"
placement="top-start"
content="电流L2系数校准合格原因"
>
<span class="tooltip-content">{{ scope.row.IbChannel }}</span>
</el-tooltip>
<el-icon v-else-if="scope.row.IbChannel === '—'&& loading" class="loading-box">
<el-icon-loading />
</el-icon>
<span v-else>
{{ scope.row.IbChannel }}
</span>
</template>
</el-table-column>
</el-table-column>
@@ -178,22 +224,30 @@
</template>
</el-table-column>
<el-table-column prop="IcChannel" label="结果">
<template #header >
<span>结果</span>
<el-tooltip class="item" effect="light" placement="top-start" content="电流L3系数准不合格原因">
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tag type="danger" v-if="scope.row.IcChannel === '不合格'">
{{ scope.row.IcChannel }}
</el-tag>
<el-tooltip
v-if="scope.row.IcChannel === '不合格'"
class="item"
effect="light"
placement="top-start"
content="电流L3系数校准不合格原因"
>
<el-tag type="danger" class="tooltip-content">
{{ scope.row.IcChannel }}
</el-tag>
</el-tooltip>
<el-tooltip
v-else-if="scope.row.IcChannel === '合格'"
class="item"
effect="light"
placement="top-start"
content="电流L3系数校准合格原因"
>
<span class="tooltip-content">{{ scope.row.IcChannel }}</span>
</el-tooltip>
<el-icon v-else-if="scope.row.IcChannel === '—'&& loading" class="loading-box">
<el-icon-loading />
</el-icon>
<span v-else>
{{ scope.row.IcChannel }}
</span>
</template>
</el-table-column>
</el-table-column>
@@ -357,6 +411,19 @@
animation: rotate 2s linear infinite;
}
.icon-margin {
margin-left: 0px;
}
.icon-align {
vertical-align: 0px;
}
.tooltip-content {
cursor: pointer;
}
@keyframes rotate {
from {
transform: rotate(0deg);

View File

@@ -4,17 +4,17 @@
<el-tab-pane label="守时误差">
<div class="right-title" >
<span v-if="activeIndex <= 1"> </span>
<span v-if="activeIndex > 1" style=" font-size: 18px;font-weight: 600;">
<span v-if="activeIndex > 1" class="time-text">
标准时间: <span style="color: #003078">{{ gpsTime }}</span>
</span>
<div class="error-dsc">
<div class="green-div"></div>
<span style=" color: #606266; font-size: 16px;font-weight: 600;">
<span class="description-text">
合格1000ms
</span>
<div class="red-div"></div>
<span style=" color: #F56C6c; font-size: 16px;font-weight: 600;">
<span class="description-text unqualified">
不合格>1000ms
</span>
</div>
@@ -78,7 +78,14 @@
:cell-style="{ textAlign: 'center' }" style="width: 100%; height:435px" border>
</ProTable> -->
<el-table v-if="activeIndex > 0" :data="deviceOperatorData" stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="margin-top: -30px;width: 100%" border>
<el-table
v-if="activeIndex > 0"
:data="deviceOperatorData"
stripe
:header-cell-class-name="'el-table-header'"
:cell-class-name="'el-table-cell'"
class="el-table"
border>
<el-table-column prop="deviceName" label="设备名称" />
<el-table-column prop="updataTime" label="上送时刻" />
<el-table-column prop="ErrorValue" label="守时误差(ms)">
@@ -110,6 +117,7 @@
</template>
<script lang="tsx" setup name="timeTest">
import { SuccessFilled } from '@element-plus/icons-vue'
import { reactive, ref, toRef, watch } from 'vue'
const stepsIndex = ref(0)
const activeIndex = ref(0)
@@ -196,7 +204,7 @@ const columns = reactive([
prop: 'Result',
label: '检测结果',
// width: 100,
render: (scope) => {
render: (scope: { row: { Result: string } }) => {
if (scope.row.Result === '不合格') {
return (
<el-tag type='danger'>{scope.row.Result}</el-tag>
@@ -231,7 +239,7 @@ watch(testStatus, function (newValue, oldValue) {
}
})
function formatDateTime(date) {
function formatDateTime(date: Date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
@@ -408,4 +416,70 @@ watch(ts, function (newValue, oldValue) {
margin-bottom: 10px;
padding: 10px 20px 10px 20px;
box-sizing: border-box; */
.right-title .time-text {
font-size: 18px;
font-weight: 600;
}
.right-title .gps-time {
color: #003078;
}
.error-dsc {
display: flex;
align-items: center;
margin-top: 10px; /* 根据需要调整 */
}
.error-dsc .green-div,
.error-dsc .red-div {
width: 12px;
height: 12px;
margin-right: 8px;
}
.error-dsc .green-div {
background-color: #67C23A;
}
.error-dsc .red-div {
background-color: #F56C6C;
}
.error-dsc .description-text {
color: #606266;
font-size: 16px;
font-weight: 600;
}
.error-dsc .description-text.unqualified {
color: #F56C6C;
}
.el-table-header {
text-align: center;
}
.el-table-cell {
text-align: center;
}
.el-table {
margin-top: -30px;
width: 100%;
}
.tooltip-icon {
margin-left: 4px;
vertical-align: middle;
}
.result-tag {
font-weight: 600;
}
.result-text {
font-weight: 600;
}
</style>

View File

@@ -113,13 +113,10 @@ defineExpose({ getTreeData })
</script>
<style lang='scss' scoped>
.plan_tree {
// width: 200px;
height: 100%;
display: flex;
flex-direction: column;
padding: 5px;
// height: calc(100% - 70px);
background-color: #ffffff;
background-color: #fff;
.search_view {
width: 100%;
@@ -162,7 +159,7 @@ defineExpose({ getTreeData })
display: inline-block;
overflow: auto;
margin-top: 12px;
}
//.filter-tree span {