样式调整

This commit is contained in:
GYYM
2024-11-25 21:11:10 +08:00
parent 428c74047b
commit a1d3485ba7
18 changed files with 1225 additions and 160 deletions

View File

@@ -6,23 +6,33 @@
<div class="right-title">
<!-- <div>系数校准表</div> -->
<div>当前源输出为Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A</div>
<div>当前源输出为Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A 电压误差为±0.1Un% 电流误差为±0.5%</div>
<div>
<el-button type="primary" loading v-if="activeIndex > 0 && activeIndex < activeTotalNum">通道系数已校准3台/共3台</el-button>
<el-button type="primary" disabled="true" v-if="activeIndex === activeTotalNum">通道系数已校准3台/共3台</el-button>
<el-button type="primary" :disabled="true" v-if="activeIndex === activeTotalNum">通道系数已校准3台/共3台</el-button>
</div>
</div>
<div class="right-content">
<el-tabs type="border-card">
<el-empty description="暂无数据,等待检测开始" v-if="activeIndex === 0"/>
<el-tab-pane label="被检设备1" v-if="activeIndex > 0">
<channelsTestTable></channelsTestTable>
<channelsTestTable
:tableData="tableData1"
></channelsTestTable>
</el-tab-pane>
<el-tab-pane label="被检设备2" v-if="activeIndex > 1 ">
<channelsTestTable></channelsTestTable>
<template #label>
<span class="custom-tabs-label">
<span>被检设备2</span>
<el-icon><Failed /></el-icon>
</span>
</template>
<channelsTestTable
:tableData="tableData2"></channelsTestTable>
</el-tab-pane>
<el-tab-pane label="被检设备3" v-if="activeIndex > 2 ">
<channelsTestTable></channelsTestTable>
<channelsTestTable
:tableData="tableData3"></channelsTestTable>
</el-tab-pane>
</el-tabs>
@@ -34,7 +44,7 @@
</template>
<script lang="tsx" setup name="channelsTest">
import { SuccessFilled } from '@element-plus/icons-vue'
import { SuccessFilled,Failed } from '@element-plus/icons-vue'
const activeIndex = ref(0)
const activeTotalNum = ref(3)
@@ -69,7 +79,168 @@ const activities = [
hollow: true,
},
]
const tableData1 = 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: '合格',
},
])
const tableData2 = ref([
{
id: '1',
updateTime: '2024-10-10 10:30:00',
deviceName:'被检设备2',
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:'被检设备2',
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:'被检设备2',
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:'被检设备2',
MonitorIdx: 4,
Ua:1.0003,
Ub:1.0003,
Uc:0.0096,
Ia:1.0003,
Ib:1.0003,
Ic:1.0008,
Result: '不合格',
},
])
const tableData3 = ref([
{
id: '1',
updateTime: '2024-10-10 10:30:00',
deviceName:'被检设备3',
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:'被检设备3',
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:'被检设备3',
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:'被检设备3',
MonitorIdx: 4,
Ua:1.0003,
Ub:1.0003,
Uc:0.0096,
Ia:1.0003,
Ib:1.0003,
Ic:1.0008,
Result: '合格',
},
])
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
const props = defineProps({
@@ -168,8 +339,6 @@ emit('update:testStatus',ts.value)
</script>
<style scoped>
.right-title{
display: flex;
flex-direction: row; /* 横向排列 */
@@ -179,4 +348,12 @@ emit('update:testStatus',ts.value)
.right-content{
max-height: 400px;
}
.custom-tabs-label .el-icon {
vertical-align: middle;
}
.custom-tabs-label span {
vertical-align: middle;
margin-left: 4px;
}
</style>

View File

@@ -52,75 +52,76 @@
import { useDictStore } from '@/stores/modules/dict'
const dictStore = useDictStore()
const props = defineProps<{
visible: boolean;
dialogTitle: string;
formData: {
id: string;//误差体系表Id
name: string;//误差体系名称
standard_Name:string;//参照标准名称
standard_Time:string;//标准推行时间
dev_Level:string;//使用设备等级
enable:number;//状态0-不启用 1-启用
state:number;//0-删除 1-正常
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: '合格',
},
])
// 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>

View File

@@ -28,8 +28,11 @@
v-for="plan in testErrSystDataList"
:key="plan.id"
:label="plan.label"
:value="plan.id">
:value="plan.id"
:disabled = "plan.label === errorSysName"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
@@ -220,12 +223,14 @@ import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,so
import ReportPopup from './reportPopup.vue'
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
const reportDisabled = ref(true)
const reportDisabled = ref(true)
const reportDialogVisible = ref(false)
const deviceName = ref('被检设备1');
const error_Sys_Id = ref('2');
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
const errorSysName = ref('Q/GDW 10650.2-2021');
const errorSysName = ref('Q/GDW 10650.2 - 2021');
const dataRule = ref('所有值');
const scriptSwitch = ref(true);
const currentScriptDsc = ref('频率准确度检测频率42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°');
@@ -234,7 +239,14 @@ import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingl
label: "name",
pid: "pid",
};
const judge = (label:string) =>
{
console.log(label,errorSysName.value)
if(label === errorSysName.value)
return true
else
return false
}
const testData = ref([
{
deviceName: '额定条件下频率检测42.5Hz',

View File

@@ -1,5 +1,5 @@
<template>
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" width="1065px">
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" width="1065px" draggable>
<div class="data-check-dialog">
<div class="data-check-title">
<el-form :model='formContent'>
@@ -26,17 +26,29 @@
<el-input v-model='deviceName' :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label='复检次数:'>
<el-select v-model="reCheckIdx">
<el-option
v-for="item in reCheckList"
:key="item.value"
:label="item.value"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label='通道号:'>
<el-select v-model="monitorIdx">
<el-option
v-for="item in monitorIdxList"
:key="item.value"
:label="item.value"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-select v-model="monitorIdx">
<el-option
v-for="item in monitorIdxList"
:key="item.value"
:label="item.value"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
@@ -106,6 +118,7 @@ import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
const activeName = ref('rawDataTab')
const deviceName = ref('被检设备1');
const monitorIdx = ref('1');
const reCheckIdx = ref('3');
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
const errorSysName = ref('Q/GDW 10650.2-2021');
const dataRule = ref('所有值');
@@ -117,6 +130,20 @@ const deviceName = ref('被检设备1');
pid: "pid",
};
const reCheckList = [
{
value: '0',
},
{
value: '1',
},
{
value: '2',
},
{
value: '3',
},
]
const monitorIdxList = [
{
value: '1',
@@ -162,6 +189,7 @@ const props = defineProps<{
.data-check-dialog{
display: flex;
flex-direction: column;
max-height: 580px;
}
.data-check-title{
@@ -177,6 +205,9 @@ const props = defineProps<{
.content-left-tree{
width: 20%;
max-height: 475px;
overflow-y: auto;
/* background-color: gray; */
}
.content-left-tree-switch{
text-align: right;

View File

@@ -4,9 +4,9 @@
<el-table :data="tableData" stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" height="310px" style="width: 100%" >
<el-table-column prop="id" label="序号" width="70" />
<el-table-column prop="updateTime" label="数据时间" />
<el-table-column prop="L1" label="L1" />
<el-table-column prop="L2" label="L2" />
<el-table-column prop="L3" label="L3" />
<el-table-column prop="L1" label="L1V" />
<el-table-column prop="L2" label="L2V" />
<el-table-column prop="L3" label="L3V" />
</el-table>
</div>

View File

@@ -4,9 +4,9 @@
<el-table :data="tableData" max-height="300" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" >
<el-table-column prop="id" label="序号" width="70" />
<el-table-column prop="standardValue" label="标准值" />
<el-table-column prop="standardValue" label="标准值V" />
<el-table-column label="L1" >
<el-table-column label="L1V" >
<el-table-column prop="L1" label="被检值">
</el-table-column>
@@ -14,7 +14,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="L2" >
<el-table-column label="L2V" >
<el-table-column prop="L2" label="被检值">
</el-table-column>
@@ -22,7 +22,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="L3" >
<el-table-column label="L3V" >
<el-table-column prop="L3" label="被检值">
</el-table-column>
@@ -31,11 +31,13 @@
</el-table-column>
</el-table-column>
<el-table-column prop="maxErrVaule" label="最大误差">
<el-table-column prop="maxErrVaule" label="最大误差V">
</el-table-column>
<el-table-column prop="Result" label="检测结果">
<template #default="scope">
<el-tag :type="scope.row.Result === '合格' ? 'success' : 'danger'">{{ scope.row.Result }}</el-tag>
</template>
</el-table-column>
</el-table>

View File

@@ -273,7 +273,7 @@ watch(ts, function (newValue, oldValue) {
})
</script>
<style scoped>
<style scoped lang="scss">
.test-dialog{
height: 350px;
@@ -290,24 +290,29 @@ watch(ts, function (newValue, oldValue) {
margin-left: 20px;
}
.dialog-left :deep(.test-head-steps){
height: 80px;
margin-bottom: 10px;
}
/* .dialog-left :deep(.test-head-steps){
height: 80px;
/* margin-bottom: 10px;
}
*/
.dialog-left :deep(.el-step__title) {
font-size: 18px !important; /* 设置标题字体大小 */
}
/* .dialog-left :deep(.el-step__title) {
font-size: 18px !important; /* 设置标题字体大小
} */
/* .dialog-left :deep(.el-step__icon-inner) {
font-size: 16px !important;
} */
/* .dialog-left :deep(.el-step__icon-inner) {
font-size: 24px !important;
} */
.dialog-right{
margin-left: 20px;
width: 80%;
height: 100%;
}
.dialog-right :deep(.el-collapse-item__header) {
font-size: 16px;
}
.div-log{
height: 100px;
padding-left: 10px;

View File

@@ -10,11 +10,16 @@
@drag-sort="sortTable"
:height="tableHeight"
:stripe="true"
:pagination = "false"
:key="tableKey"
@selection-change='handleSelectionChange'
>
<!-- 表格 header 按钮 -->
<template #tableHeader="scope">
<el-form :model="form" label-width="80px" :inline="true">
<el-form-item label="模糊搜索">
<el-input v-model="form.search" placeholder="请输入搜索内容" clearable></el-input>
</el-form-item>
<el-form-item label="检测状态">
<el-select v-model="form.checkStatus" clearable>
<el-option
@@ -96,7 +101,7 @@
<div class='cn-render-buttons' v-if="form.activeTabs === 3 && form.activeChildTabs === 0">
<el-dropdown trigger='click'>
<el-button link type='primary' :icon="View" class='table-operate'>
<div class='table-operate-text'>查看...</div>
<div class='table-operate-text'>查看</div>
</el-button>
<template #dropdown>
<el-dropdown-menu>
@@ -228,7 +233,7 @@ const dialogForm = ref<any>({
state:1,
});
//console.log(window.innerHeight, "+++++++++");
tableHeight.value = window.innerHeight - 630;
tableHeight.value = window.innerHeight - 600;
const deviceData = deviceDataList.plan_devicedata
const operationShow = ref(false);
const operationMinWidth = ref(200);
@@ -594,6 +599,9 @@ const resetSearchForm = () => {
checkResult: 0,
};
};
const handleSelectionChange = (selection: any[]) => {
console.log(selection);
}
//查询
const handleSearch = () => {
matchDialogVisible.value = true;

View File

@@ -10,18 +10,27 @@
<el-button
type="primary"
v-if="!isPause"
v-if="!isPause && activeIndex < activeTotalNum"
:disabled="activeIndex===0"
:icon="VideoPause"
@click="handlePauseTest"
>暂停检测</el-button
>
<el-button
type="warning"
v-if="isPause"
v-if="isPause && activeIndex < activeTotalNum"
:icon="Refresh"
@click="handlePauseTest"
>继续检测</el-button
>
<el-button
type="warning"
v-if="activeIndex >= activeTotalNum"
:icon="Refresh"
@click="handleReCheck"
>重新检测</el-button
>
<!-- <el-button type="danger" :icon="Close" @click="handleFinishTest"
>停止检测</el-button
> -->
@@ -32,12 +41,26 @@
<!-- <el-table :key="tableKey" :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border> -->
<!-- <el-table :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border> -->
<div class="dialog-content">
<el-table :data="tableData" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border>
<el-table-column fixed prop="scriptItemName" label="检测项目" width="210px" />
<el-table :data="tableData" :cell-class-name="tableCell" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border>
<el-table-column fixed prop="scriptItemName" label="检测项目" width="250px">
<!-- <template #default="scope">
<div :style="{ backgroundColor: '#003078' }">
{{ scope.row.name }}
</div>
</template> -->
</el-table-column>
<el-table-column label="被检通道1" align="center">
<el-table-column label="被检通道1" :min-width="minwidth" align="center">
<template #header>
<span>被检通道1</span>
<el-tooltip content = "被检装置1被检通道1" placement="top" style="align-items: bottom;">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<!-- <el-tooltip content = "info" placement="top">
<i class="el-icon-info"></i>
</el-tooltip> -->
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
:disabled = "scope.row.resultType1=='info'"
@@ -48,11 +71,16 @@
{{ scope.row.resultValue1 }}
</el-button>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="被检通道2" align="center">
<el-table-column label="被检通道2" :min-width="minwidth" align="center">
<template #header>
<span>被检通道2</span>
<el-tooltip content = "被检装置1被检通道2" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType2==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -67,7 +95,13 @@
</template>
</el-table-column>
<el-table-column label="被检通道3" align="center">
<el-table-column label="被检通道3" :min-width="minwidth" align="center">
<template #header>
<span>被检通道3</span>
<el-tooltip content = "被检装置1被检通道3" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType3==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -82,7 +116,13 @@
</template>
</el-table-column>
<el-table-column label="被检通道4" align="center">
<el-table-column label="被检通道4" :min-width="minwidth" align="center">
<template #header>
<span>被检通道4</span>
<el-tooltip content = "被检装置1被检通道4" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType4==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -97,7 +137,13 @@
</template>
</el-table-column>
<el-table-column p label="被检通道5" align="center">
<el-table-column p label="被检通道5" :min-width="minwidth" align="center">
<template #header>
<span>被检通道5</span>
<el-tooltip content = "被检装置2被检通道1" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType5==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -112,7 +158,13 @@
</template>
</el-table-column>
<el-table-column label="被检通道6" align="center">
<el-table-column label="被检通道6" :min-width="minwidth" align="center">
<template #header>
<span>被检通道6</span>
<el-tooltip content = "被检装置2被检通道2" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType6==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -128,7 +180,13 @@
</template>
</el-table-column>
<el-table-column label="被检通道7" align="center">
<el-table-column label="被检通道7" :min-width="minwidth" align="center">
<template #header>
<span>被检通道7</span>
<el-tooltip content = "被检装置2被检通道3" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType7==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -143,7 +201,13 @@
</template>
</el-table-column>
<el-table-column label="被检通道8" align="center">
<el-table-column label="被检通道8" :min-width="minwidth" align="center">
<template #header>
<span>被检通道8</span>
<el-tooltip content = "被检装置2被检通道4" placement="top">
<el-icon><InfoFilled /></el-icon>
</el-tooltip>
</template>
<template #default="scope">
<el-tooltip :content="scope.row.resultType8==='info' ? '暂无数据' : '点击查看详情'" placement="top">
<el-button
@@ -160,8 +224,6 @@
</el-table-column>
<!-- <el-table-column v-for="(item, index) in monitorList" :key="index" :prop="item.prop" :label="item.label">
</el-table-column> -->
</el-table>
</div>
<div >
@@ -187,11 +249,11 @@
></dataCheckSingleChannelSingleTestPopup>
</template>
<script lang="tsx" setup name="test">
import { VideoPause,Refresh,Close } from '@element-plus/icons-vue'
import { VideoPause,Refresh,Close,InfoFilled } from '@element-plus/icons-vue'
import resultPopup from './resultPopup.vue'
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
import temptest from './temptest.vue'
const minwidth = ref(110)
const activeIndex = ref(0)
const activeTotalNum = ref(12)
@@ -254,9 +316,9 @@ const scrollContainer = ref<HTMLElement | null>(null); // 声明 scrollContainer
const scrollToBottom = () => {
if (scrollContainer.value) {
console.log(scrollContainer.value)
//console.log(scrollContainer.value)
scrollContainer.value.scrollTop = scrollContainer.value.scrollHeight;
console.log(scrollContainer.value)
//console.log(scrollContainer.value)
}
};
@@ -320,6 +382,13 @@ const testLogList = ref([
])
const tableKey = ref(0);
function tableCell ({row,columnIndex}){
if(columnIndex === 0)
{
return 'warning-row'
}
}
const tableRowClassName = ({
row,
@@ -330,7 +399,7 @@ const tableRowClassName = ({
}) => {
// console.log(activeIndex.value,rowIndex,row)
if (row.id === activeIndex.value.toString()) {
if (row.rowIndex === activeIndex.value.toString()) {
return 'warning-row'
}
// else if (rowIndex === 3) {
@@ -387,6 +456,18 @@ const updateTableData = (id: string) => {
console.log(id)
};
const handleReCheck = () => {
console.log(tableData.value,operatorTableData.value)
activeIndex.value = 0;
percentage.value = 0;
tableData.value.length = 0;
testLogList.value.length = 0;
tableData.value = operatorTableData.value;
console.log(tableData.value,operatorTableData.value)
resumeTimer()
};
let timer: any = ref("");
const handlePauseTest = () => {
@@ -405,7 +486,6 @@ const handleFinishTest = () => {
};
const handleClick = (row:any) => {
console.log(111,row)
dataCheckSingleChannelSingleTestDialogVisable.value = true;
};
@@ -423,7 +503,644 @@ interface User {
// resultValue3:'×',
const operatorTableData = ref([
{
id: '1',
scriptItemName: '频率',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '1-1',
scriptItemName: '额定条件下的测量',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '1-1-1',
scriptItemName: '频率42.5Hz',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '1-1-2',
scriptItemName: '频率50Hz',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '1-1-3',
scriptItemName: '频率50.5Hz',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '1-1-4',
scriptItemName: '频率57.5Hz',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
],
},
{
id: '1-2',
scriptItemName: '电压对频率测量的影响',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '1-2-1',
scriptItemName: '频率50.5Hz 电压10%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
],
},
{
id: '1-3',
scriptItemName: '谐波对频率测量的影响',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '1-3-1',
scriptItemName: '频率50.5Hz 谐波电压h3 10%Un;h7 10%Un;h11 10%Un;h15 4%Un; h19 5%Un; h23 5%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
],
},
],
},
{
id: '2',
scriptItemName: '电压',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '2-1',
scriptItemName: '额定条件下的测量',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '2-1-1',
scriptItemName: '频率50Hz 电压10%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '2-1-2',
scriptItemName: '频率50Hz 电压45%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '2-1-3',
scriptItemName: '频率50Hz 电压80%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '2-1-4',
scriptItemName: '频率50Hz 电压115%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '2-1-5',
scriptItemName: '频率50Hz 电压150%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
],
},
{
id: '2-2',
scriptItemName: '频率对电压测量的影响',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '2-2-1',
scriptItemName: '频率42.5Hz 电压80%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
],
},
{
id: '2-3',
scriptItemName: '谐波对电压测量的影响',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
children: [
{
id: '2-3-1',
scriptItemName: '频率50Hz 电压80%Un 谐波电压h3 10%Un;h7 10%Un;h11 10%Un;h15 4%Un; h19 5%Un; h23 5%Un',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
],
},
],
},
{
id: '3',
scriptItemName: '谐波电压',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '4',
scriptItemName: '谐波电流',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '5',
scriptItemName: '谐波有功功率',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '6',
scriptItemName: '间谐波电压',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '7',
scriptItemName: '间谐波电流',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '8',
scriptItemName: '暂态',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '9',
scriptItemName: '电流',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '10',
scriptItemName: '电压不平衡度',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '11',
scriptItemName: '电流不平衡度',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
{
id: '12',
scriptItemName: '短时闪变',
resultType1: 'info',
resultValue1:'-',
resultType2: 'info',
resultValue2:'-',
resultType3: 'info',
resultValue3:'-',
resultType4: 'info',
resultValue4:'-',
resultType5: 'info',
resultValue5:'-',
resultType6: 'info',
resultValue6:'-',
resultType7: 'info',
resultValue7:'-',
resultType8: 'info',
resultValue8:'-',
},
])
const tableData = ref([
{
id: '1',
@@ -1077,6 +1794,7 @@ const ts = ref('');
const startTimer = () => {
//if (timer.value !== null) return; // 如果定时器已经启动,则不再重复启动
timer.value = setInterval(() => {
console.log(activeIndex.value,111,activeTotalNum.value,222)
if(activeIndex.value <= activeTotalNum.value)
{
@@ -1130,7 +1848,7 @@ const startTimer = () => {
} else {
percentage.value = 100;
clearInterval(timer)
clearInterval(timer.value)
ts.value = 'success'
ElMessageBox.alert('检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', '检测完成', {
@@ -1144,7 +1862,7 @@ const startTimer = () => {
}
else
{
clearInterval(timer)
clearInterval(timer.value)
ts.value = 'success'
}
@@ -1183,8 +1901,12 @@ watch(ts, function (newValue, oldValue) {
</script>
<style scoped lang="scss">
.el-table .warning-row {
--el-table-tr-bg-color: var(--el-color-warning-light-9);
:deep(.el-table .warning-row) {
// background-color:var(--el-color-warning-light-9);
background-color:#f5f7fa;
// color:red;
// font-size:30px;
// --el-table-tr-bg-color: var(--el-color-warning-light-9);
}
.el-table .success-row {
--el-table-tr-bg-color: var(--el-color-success-light-9);
@@ -1215,4 +1937,5 @@ watch(ts, function (newValue, oldValue) {
// flex-direction: column-reverse;
}
</style>

View File

@@ -6,15 +6,14 @@
<!-- :style="{color:node.label=='未检测'?'#F56C6C':node.label=='检测中'?'#E6A23C':'#67C23A'}" -->
<el-steps class="test-head-steps" simple :active="stepsActiveIndex" process-status="finish" finish-status="success" >
<!-- style="height:100px" -->
<el-step title="预检测" :icon="stepsActiveIndex > 0 ? SuccessFilled : Edit" />
<!-- <el-step title="预检测" :icon="getIcon(0)" /> -->
<el-step title="预检测" :icon="stepsActiveIndex > 1 ? SuccessFilled :Edit" />
<el-step title="守时检测" :icon="stepsActiveIndex > 1 ? SuccessFilled :UploadFilled"/>
<el-step title="系数校准" :icon="stepsActiveIndex > 2 ? SuccessFilled :Odometer" />
<el-step title="正式检测" :icon="stepsActiveIndex > 3 ? SuccessFilled :Coin" />
<el-step title="检测完成" :icon="stepsActiveIndex > 4 ? SuccessFilled :Key" />
</el-steps>
</div>
<preTest v-if="stepsActiveIndex === 0" v-model:testStatus="preTestStatus"></preTest>
<timeTest v-if="stepsActiveIndex === 1" v-model:testStatus="timeTestStatus"></timeTest>
<channelsTest v-if="stepsActiveIndex === 2" v-model:testStatus="channelsTestStatus"></channelsTest>
@@ -23,7 +22,7 @@
<template #footer>
<div>
<!-- <el-button @click="handleCancel"> </el-button> -->
<el-button type="primary" :icon="DArrowRight" v-if="stepsActiveIndex < 2" :disabled="skipDisabled" @click="nextStep">跳过</el-button>
<el-button type="primary" :icon="DArrowRight" v-if="stepsActiveIndex < 2 && ActiveStatue != 'success'" :disabled="skipDisabled" @click="nextStep">跳过</el-button>
<el-button type="primary" :icon="VideoPlay" v-if="ActiveStatue === 'waiting'" @click="handleSubmit">开始检测</el-button>
<el-button type="danger" :icon="Close" v-if="ActiveStatue === 'process'" @click="handleSubmit">停止检测</el-button>
<el-button type="primary" :icon="Refresh" v-if="ActiveStatue === 'error'" @click="handleSubmit">重新检测</el-button>
@@ -35,7 +34,8 @@
</template>
<script lang="ts" setup name="testPopup">
<script lang="tsx" setup name="testPopup">
import { h } from 'vue';
import{ElMessage, ElSelectV2, FormInstance,FormItemRule}from'element-plus'
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
@@ -45,7 +45,14 @@
import preTest from './preTest.vue'
import timeTest from './timeTest.vue'
import channelsTest from './channelsTest.vue'
//import SvgIcon from '@/components/SvgIcon.vue';
// import preTestIcon from '@/assets/icons/preTest.svg'
// const preTestIcon = `
// <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
// </svg>
// `;
const props = defineProps<{
visible: boolean;
dialogTitle: string;
@@ -152,6 +159,17 @@ const detectionOptions = ref([
}
})
const getIcon = (index: number) => {
if (stepsActiveIndex.value > index) return SuccessFilled;
switch (index) {
case 0: return h(<svg-icon name="preTest"></svg-icon>);
case 1: return UploadFilled;
case 2: return Odometer;
case 3: return Coin;
case 4: return Key;
default: return null;
}
};
const nextStep = () => {
if(stepsActiveIndex.value < stepsTotalNum.value )
@@ -272,12 +290,24 @@ const detectionOptions = ref([
.steps-container :deep(.el-step__title) {
font-size: 20px !important; /* 设置标题字体大小 */
vertical-align:baseline !important;
display: inline-block; /* 确保文字和图标在同一行 */
line-height: 1; /* 调整行高以确保底部对齐 */
}
.steps-container :deep(.el-step__icon-inner) {
font-size: 20px !important;
font-size: 18px !important;
vertical-align:baseline !important;
display: inline-block; /* 确保文字和图标在同一行 */
line-height: 1; /* 调整行高以确保底部对齐 */
}
.steps-container :deep(.el-step__icon) {
font-size: 18px !important;
vertical-align:baseline !important;
display: inline-block; /* 确保文字和图标在同一行 */
line-height: 1; /* 调整行高以确保底部对齐 */
}
// :deep(.test-head-steps){
// height: 100px;