正式检测页面修改
This commit is contained in:
33
frontend/src/api/check/interface/index.ts
Normal file
33
frontend/src/api/check/interface/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* 用于定义 查看(设备)通道检测结果 类型
|
||||
*/
|
||||
export interface CheckResult {
|
||||
chnNum: string,
|
||||
standardValue: number,
|
||||
L1: number,
|
||||
L1_errValue: number,
|
||||
L2: number,
|
||||
L2_errValue: number,
|
||||
L3: number,
|
||||
L3_errValue: number,
|
||||
maxErrVaule: number,
|
||||
result: string,
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于定义 具体通道的原始数据类型
|
||||
*/
|
||||
export interface RawDataItem {
|
||||
updateTime: string,
|
||||
L1: number,
|
||||
L2: number,
|
||||
L3: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于定义 (设备)通道的原始数据
|
||||
*/
|
||||
export interface RawData {
|
||||
chnNum: string,
|
||||
rawDataItems: RawDataItem[]
|
||||
}
|
||||
@@ -1,177 +1,44 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container table-main">
|
||||
<el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" height="335px" style="width: 100%" >
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="updateTime" label="数据时间" />
|
||||
<el-table-column prop="L1" label="L1(V)" />
|
||||
<el-table-column prop="L2" label="L2(V)" />
|
||||
<el-table-column prop="L3" label="L3(V)" />
|
||||
|
||||
<div class="table-main">
|
||||
<el-collapse v-model="activeName" accordion style="width: 100%;height:335px">
|
||||
<el-collapse-item v-for="(item, index) in tableData" :key="index+1" :title="'通道'+ (index+1)" :name="'通道'+ (index+1)">
|
||||
|
||||
<el-table :data="item.rawDataItems" stripe border :header-cell-style="{ textAlign: 'center' } "
|
||||
:cell-style="{ textAlign: 'center' }" height="335px" style="width: 100%;max-height: 250px;overflow-y: auto;">
|
||||
<el-table-column type="index" fixed="left" label="序号" width="70"/>
|
||||
<el-table-column prop="updateTime" label="数据时间"/>
|
||||
<el-table-column prop="L1" label="L1(V)"/>
|
||||
<el-table-column prop="L2" label="L2(V)"/>
|
||||
<el-table-column prop="L3" label="L3(V)"/>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
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 tableData = ref([
|
||||
{
|
||||
id: 1,
|
||||
updateTime: "2024-10-10 09:30:00",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
updateTime: "2024-10-10 09:30:03",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
updateTime: "2024-10-10 09:30:06",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
updateTime: "2024-10-10 09:30:09",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
updateTime: "2024-10-10 09:30:12",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
updateTime: "2024-10-10 09:30:15",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
updateTime: "2024-10-10 09:30:18",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
updateTime: "2024-10-10 09:30:21",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
updateTime: "2024-10-10 09:30:24",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
updateTime: "2024-10-10 09:30:27",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
updateTime: "2024-10-10 09:30:30",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
updateTime: "2024-10-10 09:30:33",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
updateTime: "2024-10-10 09:30:36",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
updateTime: "2024-10-10 09:30:39",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
updateTime: "2024-10-10 09:30:42",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
updateTime: "2024-10-10 09:30:45",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 17,
|
||||
updateTime: "2024-10-10 09:30:48",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 18,
|
||||
updateTime: "2024-10-10 09:30:51",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 19,
|
||||
updateTime: "2024-10-10 09:30:54",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 20,
|
||||
updateTime: "2024-10-10 09:30:57",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
])
|
||||
|
||||
import type {RawData} from "@/api/check/interface";
|
||||
|
||||
const {tableData} = defineProps<{
|
||||
tableData:RawData[]
|
||||
}>()
|
||||
|
||||
const activeName = ref('通道1')
|
||||
|
||||
// 清空数据
|
||||
const clear = () => {
|
||||
activeName.value = '通道1'
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
clear
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.table-container {
|
||||
|
||||
overflow-y: auto; /* 允许垂直滚动 */
|
||||
overflow-x: hidden; /* 隐藏水平滚动条 */
|
||||
}
|
||||
</style>
|
||||
@@ -1,80 +1,60 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container table-main">
|
||||
|
||||
<el-table :data="tableData" height="335px" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" >
|
||||
<div class="table-main">
|
||||
<el-table :data="tableData" height="335px" :header-cell-style="{ textAlign: 'center' } "
|
||||
:cell-style="{ textAlign: 'center' }">
|
||||
<el-table-column prop="chnNum" label="序号" width="70"/>
|
||||
<el-table-column prop="standardValue" label="标准值(V)"/>
|
||||
<el-table-column label="L1(V)">
|
||||
<el-table-column prop="L1" width="80" label="被检值">
|
||||
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="standardValue" label="标准值(V)" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="L1_errValue" width="80" label="误差值">
|
||||
|
||||
<el-table-column label="L1(V)" >
|
||||
<el-table-column prop="L1" width="70" label="被检值">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="L2(V)">
|
||||
<el-table-column prop="L2" width="80" label="被检值">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="L1_errValue" width="70" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="L2(V)" >
|
||||
<el-table-column prop="L2" width="70" label="被检值">
|
||||
</el-table-column>
|
||||
<el-table-column prop="L2_errValue" width="80" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="L2_errValue" width="70" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="L3(V)" >
|
||||
<el-table-column prop="L3" width="70" label="被检值">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="L3(V)">
|
||||
<el-table-column prop="L3" width="80" label="被检值">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="L3_errValue" width="70" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<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> -->
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="L3_errValue" width="80" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="maxErrVaule" width="130" 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> -->
|
||||
<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="tsx" setup>
|
||||
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'
|
||||
import {defineProps, reactive} from 'vue';
|
||||
import type {CheckResult} from "@/api/check/interface";
|
||||
|
||||
const tableData = ref([
|
||||
{
|
||||
id: '1',
|
||||
standardValue: 57.74,
|
||||
L1:57.73,
|
||||
L1_errValue: 0.01,
|
||||
L2:57.73,
|
||||
L2_errValue: 0.01,
|
||||
L3:57.73,
|
||||
L3_errValue: 0.01,
|
||||
maxErrVaule: 0.05774,
|
||||
Result: '合格',
|
||||
},
|
||||
const {tableData}=defineProps<{
|
||||
tableData:CheckResult[],
|
||||
}>();
|
||||
|
||||
])
|
||||
|
||||
</script>
|
||||
|
||||
@@ -105,9 +85,4 @@ margin-bottom: 20px; /* 添加底部边距 */
|
||||
text-align: center; /* 所有单元格文字居中 */
|
||||
}
|
||||
|
||||
.table-container {
|
||||
/* max-height: 400px; */
|
||||
overflow-y: auto; /* 允许垂直滚动 */
|
||||
overflow-x: hidden; /* 隐藏水平滚动条 */
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" v-bind="dialogBig" width="950px">
|
||||
<el-dialog title="数据查询" :model-value='visible' @close="close" v-bind="dialogBig">
|
||||
<div class="data-check-dialog">
|
||||
<div class="data-check-title">
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
<div class="content-right-Tabs">
|
||||
<el-tabs type="border-card" v-model="activeName">
|
||||
<el-tab-pane label="检测结果" name="resultTab">
|
||||
<DataCheckResultTable></DataCheckResultTable>
|
||||
<DataCheckResultTable :tableData="checkResultTableData" ref="resultTableRef"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="原始数据" name="rawDataTab">
|
||||
<DataCheckRawDataTable></DataCheckRawDataTable>
|
||||
<DataCheckRawDataTable :tableData="rawTableData" ref="rawDataTableRef"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<script setup lang='ts'>
|
||||
|
||||
import IPAddress from '@/components/IpAddress/index.vue'
|
||||
import { dialogBig } from '@/utils/elementBind'
|
||||
import {dialogBig, dialogMiddle} from '@/utils/elementBind'
|
||||
import { type Device } from '@/api/device/interface/device'
|
||||
import { ElMessage, type FormItemRule } from 'element-plus'
|
||||
import { addPqDev, updatePqDev } from '@/api/device/device'
|
||||
@@ -58,8 +58,10 @@ import { type Monitor } from '@/api/device/interface/monitor'
|
||||
import { data } from "@/api/plan/autoTest.json";
|
||||
import DataCheckResultTable from './dataCheckResultTable.vue'
|
||||
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
|
||||
import type {CheckResult, RawData} from "@/api/check/interface";
|
||||
|
||||
const activeName = ref('rawDataTab')
|
||||
|
||||
const deviceName = ref('被检设备1');
|
||||
const monitorIdx = ref('1');
|
||||
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
|
||||
@@ -73,45 +75,466 @@ const deviceName = ref('被检设备1');
|
||||
pid: "pid",
|
||||
};
|
||||
|
||||
const monitorIdxList = [
|
||||
{
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
},
|
||||
]
|
||||
const handleNodeClick = (data) => {
|
||||
console.log(data);
|
||||
};
|
||||
const MonIsShow = ref(false)
|
||||
const DevIsShow = ref(false)
|
||||
const IsPasswordShow = ref(false)
|
||||
const dictStore = useDictStore()
|
||||
// const monitorIdxList = [
|
||||
// {
|
||||
// value: '1',
|
||||
// },
|
||||
// {
|
||||
// value: '2',
|
||||
// },
|
||||
// {
|
||||
// value: '3',
|
||||
// },
|
||||
// {
|
||||
// value: '4',
|
||||
// },
|
||||
// ]
|
||||
|
||||
// const handleNodeClick = (data) => {
|
||||
// console.log(data);
|
||||
// };
|
||||
// const MonIsShow = ref(false)
|
||||
// const DevIsShow = ref(false)
|
||||
// const IsPasswordShow = ref(false)
|
||||
// const dictStore = useDictStore()
|
||||
// 定义弹出组件元信息
|
||||
const dialogFormRef = ref()
|
||||
const disabledDate = (time: Date) => {
|
||||
return time.getTime() > Date.now()
|
||||
// const dialogFormRef = ref()
|
||||
// const disabledDate = (time: Date) => {
|
||||
// return time.getTime() > Date.now()
|
||||
// }
|
||||
|
||||
const checkResultTableData = reactive<CheckResult[]>([
|
||||
{
|
||||
chnNum: '1',
|
||||
standardValue: 57.74,
|
||||
L1: 57.73,
|
||||
L1_errValue: 0.01,
|
||||
L2: 57.73,
|
||||
L2_errValue: 0.01,
|
||||
L3: 57.73,
|
||||
L3_errValue: 0.01,
|
||||
maxErrVaule: 0.05774,
|
||||
result: '合格',
|
||||
},
|
||||
{
|
||||
chnNum: '2',
|
||||
standardValue: 57.74,
|
||||
L1: 57.73,
|
||||
L1_errValue: 0.01,
|
||||
L2: 57.73,
|
||||
L2_errValue: 0.01,
|
||||
L3: 57.73,
|
||||
L3_errValue: 0.01,
|
||||
maxErrVaule: 0.05774,
|
||||
result: '合格',
|
||||
}
|
||||
])
|
||||
const rawTableData = reactive<RawData[]>([
|
||||
{
|
||||
chnNum: '1',
|
||||
rawDataItems: [
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:00",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:03",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:06",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:09",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:12",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:15",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:18",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:21",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:24",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:27",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:30",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:33",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:36",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:39",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:42",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:45",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:48",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:51",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:54",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:57",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
chnNum: '2',
|
||||
rawDataItems: [
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:00",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:03",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:06",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:09",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:12",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:15",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:18",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:21",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:24",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:27",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:30",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:33",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:36",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:39",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:42",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:45",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:48",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:51",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:54",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:57",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
chnNum: '3',
|
||||
rawDataItems: [
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:00",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:03",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:06",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:09",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:12",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:15",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:18",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:21",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:24",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:27",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:30",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:33",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:36",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:39",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:42",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:45",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:48",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:51",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:54",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
},
|
||||
{
|
||||
updateTime: "2024-10-10 09:30:57",
|
||||
L1: 57.73,
|
||||
L2: 57.73,
|
||||
L3: 57.73,
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
|
||||
const resultTableRef=ref()
|
||||
const rawDataTableRef = ref()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
const close = () => {
|
||||
//数据清空
|
||||
|
||||
activeName.value = 'rawDataTab'
|
||||
rawDataTableRef.value?.clear()
|
||||
|
||||
visible.value = false;
|
||||
};
|
||||
|
||||
const open = (deviceItem:any,chnNum:number) => {
|
||||
// 发起后端请求,查询详细信息
|
||||
// const deviceItem = await getDetail(planId,checkItemId,deviceItem.id, chnNum)
|
||||
|
||||
// 数据处理
|
||||
// checkResultTableData=[];
|
||||
|
||||
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void;
|
||||
(e: 'submit', data: any): void;
|
||||
}>();
|
||||
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false); // 关闭对话框
|
||||
};
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<template>
|
||||
|
||||
<div class = "dialog">
|
||||
<div class="dialog-title">
|
||||
<div class="dialog-title">
|
||||
<el-progress
|
||||
style="width: 90%"
|
||||
:percentage="percentage"
|
||||
:color="customColors"
|
||||
/>
|
||||
|
||||
|
||||
<!-- v-if="!isPause && activeIndex < activeTotalNum" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="!isPause"
|
||||
:disabled="activeIndex===0 || activeIndex >= activeTotalNum"
|
||||
v-if="!isPause&&activeIndex < activeTotalNum"
|
||||
:disabled="activeIndex===0"
|
||||
:icon="VideoPause"
|
||||
@click="handlePauseTest"
|
||||
>暂停检测</el-button
|
||||
>
|
||||
<el-button type="success" v-if="activeIndex >= activeTotalNum" :icon="Check" disabled>检测完成</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
v-if="isPause && activeIndex < activeTotalNum"
|
||||
@@ -24,7 +26,7 @@
|
||||
@click="handlePauseTest"
|
||||
>继续检测</el-button
|
||||
>
|
||||
|
||||
<el-button type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button>
|
||||
<!-- <el-button
|
||||
type="warning"
|
||||
v-if="activeIndex >= activeTotalNum"
|
||||
@@ -51,85 +53,61 @@
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-for="(item, index) in monitorList" :key="index" :label="item.label" :min-width="minwidth" align="center">
|
||||
<!-- <template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template> -->
|
||||
<el-table-column prop="Ua" label="通道1" align="center">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Ub" label="通道2" align="center">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Uc" label="通道3" align="center">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Ux" label="通道4" align="center">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column v-for="(item, index) in monitorList" :key="index" :prop="item.prop" :label="item.label">
|
||||
</el-table-column> -->
|
||||
<template v-if="chnSum<=MAX_CHN_SUM">
|
||||
<el-table-column v-for="(item) in monitorList" :key="item.deviceID" :label="item.label" :min-width="minwidth" align="center">
|
||||
<!-- <template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(scope.row)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template> -->
|
||||
<el-table-column v-for="(chnItem, index) in item.chnNum" :key="item.deviceID+index" :label="'通道'+(index+1)" align="center">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(item,index+1)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<el-table-column v-for="(item) in monitorList" :key="item.deviceID" :label="item.label" :min-width="minwidth" align="center">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.resultType1==='info' ? '暂无数据' : '点击查看详情'" placement="top">
|
||||
<el-button
|
||||
:disabled = "scope.row.resultType1=='info'"
|
||||
:type="scope.row.resultType1"
|
||||
size="small"
|
||||
@click="handleClick(item,-1)"
|
||||
>
|
||||
{{ scope.row.resultValue1 }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div style="height: 80px;">
|
||||
<el-collapse model-value="1" accordion>
|
||||
<el-collapse-item title="检测项进度" name="1">
|
||||
<div ref="scrollContainer" class="dialog-log">
|
||||
<div ref="scrollContainer" class="dialog-log">
|
||||
<p v-for="(item, index) in testLogList" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
||||
{{ item.log }} <br />
|
||||
</p>
|
||||
@@ -143,54 +121,70 @@
|
||||
:visible="resultDialogVisible"
|
||||
@update:visible="resultDialogVisible = $event"
|
||||
></resultPopup>
|
||||
<dataCheckSingleChannelSingleTestPopup
|
||||
:visible="dataCheckSingleChannelSingleTestDialogVisable"
|
||||
@update:visible="dataCheckSingleChannelSingleTestDialogVisable = $event"
|
||||
></dataCheckSingleChannelSingleTestPopup>
|
||||
<dataCheckSingleChannelSingleTestPopup ref="dialogRef1"/>
|
||||
</template>
|
||||
<script lang="tsx" setup name="test">
|
||||
import { VideoPause,Refresh,Close,InfoFilled } from '@element-plus/icons-vue'
|
||||
import { VideoPause,Refresh,Close,InfoFilled,Check } from '@element-plus/icons-vue'
|
||||
import resultPopup from './resultPopup.vue'
|
||||
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||
import temptest from './temptest.vue'
|
||||
import {reactive} from "vue";
|
||||
const minwidth = ref(110)
|
||||
const activeIndex = ref(0)
|
||||
const activeTotalNum = ref(12)
|
||||
const dialogRef1 = ref();
|
||||
|
||||
const currentRow = ref<{ id: number; scriptItemName: string; name: string; address: string; hasChildren?: boolean; children?: User[] } | null>(null);
|
||||
// const currentRow = ref(null); // 用于存储当前选中的行
|
||||
|
||||
const monitorList = ref([
|
||||
const monitorList = reactive([
|
||||
{
|
||||
deviceID: '1',
|
||||
deviceName: '被检设备1',
|
||||
chnNum: 2,
|
||||
monitorIdx: 1,
|
||||
label:'240001',
|
||||
prop: 'Result1',
|
||||
},
|
||||
{
|
||||
deviceID: '1',
|
||||
deviceName: '被检设备1',
|
||||
deviceID: '2',
|
||||
deviceName: '被检设备2',
|
||||
chnNum: 2,
|
||||
monitorIdx: 2,
|
||||
label:'240002',
|
||||
prop: 'Result2',
|
||||
},
|
||||
{
|
||||
deviceID: '2',
|
||||
deviceName: '被检设备2',
|
||||
deviceID: '3',
|
||||
deviceName: '被检设备3',
|
||||
chnNum: 2,
|
||||
monitorIdx: 1,
|
||||
label:'240003',
|
||||
prop: 'Result3',
|
||||
},
|
||||
{
|
||||
deviceID: '2',
|
||||
deviceName: '被检设备2',
|
||||
deviceID: '4',
|
||||
deviceName: '被检设备4',
|
||||
chnNum: 4,
|
||||
monitorIdx: 2,
|
||||
label:'240004',
|
||||
prop: 'Result4',
|
||||
}
|
||||
])
|
||||
|
||||
// 最大通道数
|
||||
const MAX_CHN_SUM = 10
|
||||
|
||||
|
||||
// 总通道数
|
||||
const chnSum = computed(() => {
|
||||
let sum = 0
|
||||
monitorList.forEach((item) => {
|
||||
sum += item.chnNum
|
||||
})
|
||||
console.log(sum)
|
||||
return sum
|
||||
})
|
||||
|
||||
|
||||
const scrollContainer = ref<HTMLElement | null>(null); // 声明 scrollContainer
|
||||
|
||||
@@ -500,7 +494,7 @@ const updateLog = () => {
|
||||
log:currentTime.value + ':闪变准确度检测不合格,用时'+getTimeDifference(FLKtime),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
testLogList.value.push({
|
||||
type: 'info',
|
||||
log:currentTime.value + ':检测结束,总用时'+getTimeDifference(timeDifference.value),
|
||||
@@ -544,7 +538,7 @@ const tableRowClassName = ({
|
||||
}) => {
|
||||
if (row.rowIndex === activeIndex.value.toString()) {
|
||||
return 'warning-row'
|
||||
}
|
||||
}
|
||||
// else if (rowIndex === 3) {
|
||||
// return 'success-row'
|
||||
// }
|
||||
@@ -557,7 +551,6 @@ const customColors = [
|
||||
//暂停检测
|
||||
const isPause = ref<boolean>(false);
|
||||
const resultDialogVisible = ref(false)
|
||||
const dataCheckSingleChannelSingleTestDialogVisable = ref(false);
|
||||
|
||||
function clear() {
|
||||
}
|
||||
@@ -641,8 +634,9 @@ const handleFinishTest = () => {
|
||||
ElMessage.success("完成检测");
|
||||
};
|
||||
|
||||
const handleClick = (row:any) => {
|
||||
dataCheckSingleChannelSingleTestDialogVisable.value = true;
|
||||
// 点击查看(设备)通道检测详情。参数1:设备信息,参数2:通道号,-1:代表查看全部通道
|
||||
const handleClick = (deviceItem:any,chnNum:number) => {
|
||||
dialogRef1.value?.open(deviceItem,chnNum);
|
||||
};
|
||||
|
||||
interface User {
|
||||
@@ -2017,7 +2011,7 @@ const startTimer = () => {
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
clearInterval(timer.value)
|
||||
timer.value = null;
|
||||
@@ -2061,6 +2055,7 @@ watch(ts, function (newValue, oldValue) {
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
:deep(.el-table .header-row) {
|
||||
// background-color:var(--el-color-warning-light-9);
|
||||
background-color:#f5f7fa;
|
||||
|
||||
Reference in New Issue
Block a user