From bf823ddff0286df0015fbed00d5dee9537f011ea Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Sat, 4 Jan 2025 16:33:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataCheckSingleChannelSingleTestPopup.vue | 415 +++++------------- frontend/src/views/home/components/test.vue | 32 +- .../src/views/home/components/testPopup.vue | 16 + 3 files changed, 152 insertions(+), 311 deletions(-) diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index 43a2473..0546cf3 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -35,8 +35,7 @@
+ :data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick" class="custom-tree"> @@ -53,7 +52,7 @@
当前检测项目 -
+
{{ currentDesc ? currentDesc : "无" }}
@@ -112,10 +111,13 @@ let scriptType: string | null = null let chnList: any[] = [] // 不符合测试项、全部测试项切换 -const switchItem = ref(0) +let switchItem = 0 + // 左侧树数据 let treeDataUnqualified: CheckData.TreeItem[] = [] let treeDataAll: CheckData.TreeItem[] = [] +// const treeDataUnqualified=reactive([]) +// const treeDataAll=reactive([]) // 左侧树被选中的叶子节点id const checkIndex = ref('') @@ -129,7 +131,6 @@ const checkResultTableData = reactive([]) // 原始数据表格数据 const rawTableData = reactive([]) - // 左侧树默认展开节点id let defaultExpandedKeys: string[] = [] @@ -154,298 +155,112 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => { scriptId: checkStore.scriptId, devId: deviceId, devNum: formContent.chnNum + '', - scriptType, + scriptType: null, code: checkStore.planCode }) treeDataAll = resTreeDataTemp - treeDataAll = [ - { - scriptTypeName: "频率准确度检测", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "额定条件下频率准确度测试", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "频率=42.5Hz", - sourceDesc: "频率=42.5Hz", - harmNum: null, - index: 11, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=50Hz", - sourceDesc: "频率=50Hz", - harmNum: null, - index: 12, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=50.05Hz", - sourceDesc: "频率=50.05Hz", - harmNum: null, - index: 13, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=57.5Hz", - sourceDesc: "频率=57.5Hz", - harmNum: null, - index: 14, - fly: 1, - children: null - } - ] - }, - { - scriptTypeName: "单影响量下频率准确度测试", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "电压幅值对频率测量的影响", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "10%Un对频率=50.05Hz的影响", - sourceDesc: "10%Un对频率=50.05Hz的影响", - harmNum: null, - index: null, - fly: 1, - children: null - } - ] - }, - { - scriptTypeName: "谐波对频率测量的影响", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响", - sourceDesc: "叠加多次谐波对频率=50.05Hz的影响", - harmNum: null, - index: null, - fly: 1, - children: null - } - ] - } - ] - }, - ] - }, - { - scriptTypeName: "频率准确度检测", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "额定条件下频率准确度测试", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "频率=42.5Hz", - sourceDesc: "频率=42.5Hz", - harmNum: null, - index: 11, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=50Hz", - sourceDesc: "频率=50Hz", - harmNum: null, - index: 12, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=50.05Hz", - sourceDesc: "频率=50.05Hz", - harmNum: null, - index: 13, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=57.5Hz", - sourceDesc: "频率=57.5Hz", - harmNum: null, - index: 14, - fly: 1, - children: null - } - ] - }, - { - scriptTypeName: "单影响量下频率准确度测试", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "电压幅值对频率测量的影响", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "10%Un对频率=50.05Hz的影响", - sourceDesc: "10%Un对频率=50.05Hz的影响", - harmNum: null, - index: null, - fly: 1, - children: null - } - ] - }, - { - scriptTypeName: "谐波对频率测量的影响", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响", - sourceDesc: "叠加多次谐波对频率=50.05Hz的影响", - harmNum: null, - index: null, - fly: 1, - children: null - } - ] - } - ] - }, - ] - }, - { - scriptTypeName: "频率准确度检测", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "额定条件下频率准确度测试", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "频率=42.5Hz", - sourceDesc: "频率=42.5Hz", - harmNum: null, - index: 11, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=50Hz", - sourceDesc: "频率=50Hz", - harmNum: null, - index: 12, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=50.05Hz", - sourceDesc: "频率=50.05Hz", - harmNum: null, - index: 13, - fly: 1, - children: null - }, - { - scriptTypeName: "频率=57.5Hz", - sourceDesc: "频率=57.5Hz", - harmNum: null, - index: 14, - fly: 1, - children: null - } - ] - }, - { - scriptTypeName: "单影响量下频率准确度测试", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "电压幅值对频率测量的影响", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "10%Un对频率=50.05Hz的影响", - sourceDesc: "10%Un对频率=50.05Hz的影响", - harmNum: null, - index: null, - fly: 1, - children: null - } - ] - }, - { - scriptTypeName: "谐波对频率测量的影响", - sourceDesc: null, - harmNum: null, - index: null, - fly: null, - children: [ - { - scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响", - sourceDesc: "叠加多次谐波对频率=50.05Hz的影响", - harmNum: null, - index: null, - fly: 1, - children: null - } - ] - } - ] - }, - ] - } - ] + // treeDataAll = [ + // { + // scriptTypeName: "频率准确度检测", + // sourceDesc: null, + // harmNum: null, + // index: null, + // fly: null, + // children: [ + // { + // scriptTypeName: "额定条件下频率准确度测试", + // sourceDesc: null, + // harmNum: null, + // index: null, + // fly: null, + // children: [ + // { + // scriptTypeName: "频率=42.5Hz", + // sourceDesc: "频率=42.5Hz", + // harmNum: null, + // index: 11, + // fly: 1, + // children: null + // }, + // { + // scriptTypeName: "频率=50Hz", + // sourceDesc: "频率=50Hz", + // harmNum: null, + // index: 12, + // fly: 1, + // children: null + // }, + // { + // scriptTypeName: "频率=50.05Hz", + // sourceDesc: "频率=50.05Hz", + // harmNum: null, + // index: 13, + // fly: 1, + // children: null + // }, + // { + // scriptTypeName: "频率=57.5Hz", + // sourceDesc: "频率=57.5Hz", + // harmNum: null, + // index: 14, + // fly: 1, + // children: null + // } + // ] + // }, + // { + // scriptTypeName: "单影响量下频率准确度测试", + // sourceDesc: null, + // harmNum: null, + // index: null, + // fly: null, + // children: [ + // { + // scriptTypeName: "电压幅值对频率测量的影响", + // sourceDesc: null, + // harmNum: null, + // index: null, + // fly: null, + // children: [ + // { + // scriptTypeName: "10%Un对频率=50.05Hz的影响", + // sourceDesc: "10%Un对频率=50.05Hz的影响", + // harmNum: null, + // index: 15, + // fly: 2, + // children: null + // } + // ] + // }, + // { + // scriptTypeName: "谐波对频率测量的影响", + // sourceDesc: null, + // harmNum: null, + // index: null, + // fly: null, + // children: [ + // { + // scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响", + // sourceDesc: "叠加多次谐波对频率=50.05Hz的影响", + // harmNum: null, + // index: 16, + // fly: 1, + // children: null + // } + // ] + // } + // ] + // }, + // ] + // } + // ] let treeDataTemp = JSON.parse(JSON.stringify(treeDataAll)) filterTree(treeDataTemp, 2) treeDataUnqualified = treeDataTemp - switchItem.value = 0 + switchItem = 0 await handleSwitchChange(0) } }) @@ -460,7 +275,7 @@ const handleSwitchChange = async (data: any) => { // 默认操作 const defaultOperate = () => { let node = null - if (switchItem.value === 0) { + if (switchItem === 0) { node = getDefaultNode(treeDataUnqualified) } else { node = getDefaultNode(treeDataAll) @@ -674,10 +489,13 @@ const close = () => { }) treeDataUnqualified = [] treeDataAll = [] + Object.assign(treeDataUnqualified, []) + Object.assign(treeDataAll, []) + defaultExpandedKeys = [] checkIndex.value = '' activeTab.value = 'resultTab' currentDesc.value = '' - switchItem.value = 0 + switchItem = 0 visible.value = false; }; @@ -788,6 +606,7 @@ defineExpose({ .data-check-dialog { display: flex; flex-direction: column; + overflow-y: hidden; .data-check-head { display: flex; @@ -796,7 +615,7 @@ defineExpose({ } .data-check-body { - height:500px; + height: 500px; width: 100%; display: flex; flex-direction: row; @@ -832,13 +651,17 @@ defineExpose({ flex: 1; .content-right-title { - .el-divider--horizontal{ - margin-bottom: 0px; + .el-divider--horizontal { + //margin-top: 0px; + margin-bottom: 5px; + height: 20px; } - div { + + .content-right-title-desc { font-size: 16px; - height: 16px; - line-height: 16px; + height: 48px; + max-height: 48px; + overflow-y: auto; } } diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 415c82d..6d5a840 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -8,13 +8,13 @@ 停止检测 预检测中 @@ -32,11 +32,11 @@ - 检测完成 + 检测完成 继续检测 @@ -83,8 +83,7 @@