From aa52778e998e4ec340ff5ab373c1fecb6dd4dc60 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 31 Dec 2024 19:54:27 +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 | 129 ++++++++++-------- 1 file changed, 73 insertions(+), 56 deletions(-) diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index fbb201b..0ba81a5 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -35,9 +35,18 @@
+ :data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick" + class="custom-tree"> + + + :data="treeDataAll" :props="defaultProps" @node-click="handleNodeClick" class="custom-tree"> + +
@@ -184,58 +193,60 @@ const handleSwitchChange = async (data: any) => { } else { // 发起请求,查询该测试项的检测结果 // const result = await getTreeData({checkStore.scriptId,deviceId, formContent.chnNum+'', scriptType,1}) - treeDataAll = [{ - "id": "1", - "scriptName": "频率准确度检测", - "children": [ - { - "id": "1-1", - "scriptName": "额定工作条件下的检测", - "children": [ - { - "id": "1-1-1", - "scriptName": "输入:频率 42.5Hz..." - }, - { - "id": "1-1-2", - "scriptName": "输入:频率 50.0Hz..." - }, - { - "id": "1-1-3", - "scriptName": "输入:频率 50.05Hz...." - } - ] - }, - { - "id": "1-2", - "scriptName": "电压对频率测量的影响", - "children": [ - { - "id": "1-2-1", - "scriptName": "输入:频率 50.05Hz Ua =10%Un..." - }, - { - "id": "1-2-2", - "scriptName": "输入:频率 51.05Hz Ua =10%Un..." - }, - { - "id": "1-2-3", - "scriptName": "输入:频率 52.05Hz Ua =10%Un..." - } - ] - }, - { - "id": "1-3", - "scriptName": "谐波对频率测量的影响", - "children": [ - { - "id": "1-3-1", - "scriptName": "输入:频率 50.05Hz Ua =100%Un..." - } - ] - } - ] - }] + treeDataAll = [ + { + "id": "1", + "scriptName": "频率准确度检测", + "children": [ + { + "id": "1-1", + "scriptName": "额定工作条件下的检测", + "children": [ + { + "id": "1-1-1", + "scriptName": "输入:频率 42.5Hz..." + }, + { + "id": "1-1-2", + "scriptName": "输入:频率 50.0Hz..." + }, + { + "id": "1-1-3", + "scriptName": "输入:频率 50.05Hz...." + } + ] + }, + { + "id": "1-2", + "scriptName": "电压对频率测量的影响", + "children": [ + { + "id": "1-2-1", + "scriptName": "输入:频率 50.05Hz Ua =10%Un..." + }, + { + "id": "1-2-2", + "scriptName": "输入:频率 51.05Hz Ua =10%Un..." + }, + { + "id": "1-2-3", + "scriptName": "输入:频率 52.05Hz Ua =10%Un..." + } + ] + }, + { + "id": "1-3", + "scriptName": "谐波对频率测量的影响", + "children": [ + { + "id": "1-3-1", + "scriptName": "输入:频率 50.05Hz Ua =100%Un..." + } + ] + } + ] + }, + ] } @@ -505,13 +516,19 @@ defineExpose({ padding: 10px 0; border: 1px solid #ccc; - overflow: auto; + overflow-y: auto; .content-tree { - min-width: 100%; + width: 100%; height: 100%; max-height: 100%; margin-top: 10px; + + .custom-tree-node { + overflow-x: hidden !important; // 溢出部分隐藏 + white-space: nowrap !important; //禁止自动换行 + text-overflow: ellipsis !important; // 使溢出部分以省略号显示 + } } }