微调
This commit is contained in:
@@ -35,8 +35,7 @@
|
||||
</div>
|
||||
<div class="content-tree">
|
||||
<el-tree v-if="switchItem === 0" :default-expanded-keys="defaultExpandedKeys" node-key="index"
|
||||
:data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick"
|
||||
class="custom-tree">
|
||||
:data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick" class="custom-tree">
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">{{ data.scriptTypeName }}</span>
|
||||
</template>
|
||||
@@ -53,7 +52,7 @@
|
||||
<div class="content-right">
|
||||
<div class="content-right-title">
|
||||
<el-divider>当前检测项目</el-divider>
|
||||
<div>
|
||||
<div class="content-right-title-desc">
|
||||
{{ currentDesc ? currentDesc : "无" }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,10 +111,13 @@ let scriptType: string | null = null
|
||||
let chnList: any[] = []
|
||||
|
||||
// 不符合测试项、全部测试项切换
|
||||
const switchItem = ref<number>(0)
|
||||
let switchItem = 0
|
||||
|
||||
// 左侧树数据
|
||||
let treeDataUnqualified: CheckData.TreeItem[] = []
|
||||
let treeDataAll: CheckData.TreeItem[] = []
|
||||
// const treeDataUnqualified=reactive<CheckData.TreeItem[]>([])
|
||||
// const treeDataAll=reactive<CheckData.TreeItem[]>([])
|
||||
|
||||
// 左侧树被选中的叶子节点id
|
||||
const checkIndex = ref<string>('')
|
||||
@@ -129,7 +131,6 @@ const checkResultTableData = reactive<CheckData.CheckResult[]>([])
|
||||
// 原始数据表格数据
|
||||
const rawTableData = reactive<CheckData.RawDataItem[]>([])
|
||||
|
||||
|
||||
// 左侧树默认展开节点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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user