当前检测项目
-
+
{{ 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 @@
-
+
{
})
scriptData.push(...temp)
- checkTotal = scriptData.length + 1
+ checkTotal = scriptData.length
}
// 初始化设备列表
const initDeviceList = () => {
@@ -704,7 +703,7 @@ const updateLog = (isStart: boolean) => {
//testLogList.length = 0; // 清空数组
}
// debugger
- if (activeIndex < checkTotal) {
+ if (activeIndex <= checkTotal) {
if (isStart) {
startData.value = new Date();
testLogList.push({
@@ -727,12 +726,15 @@ const updateLog = (isStart: boolean) => {
log: currentTime.value + ` :${scriptData[activeIndex - 1].scriptName}准确度检测结束:符合,用时` + getTimeDifference(timeDifferenceItem),
})
}
+
+ if(activeIndex === checkTotal){
+ testLogList.push({
+ type: 'info',
+ log: currentTime.value + ' :检测结束,总用时' + getTimeDifference(timeDifference.value),
+ })
+ }
+
}
- } else {
- testLogList.push({
- type: 'info',
- log: currentTime.value + ' :检测结束,总用时' + getTimeDifference(timeDifference.value),
- })
}
scrollToBottom();
diff --git a/frontend/src/views/home/components/testPopup.vue b/frontend/src/views/home/components/testPopup.vue
index d83b4ab..3d59906 100644
--- a/frontend/src/views/home/components/testPopup.vue
+++ b/frontend/src/views/home/components/testPopup.vue
@@ -371,6 +371,22 @@ const detectionOptions = ref([
const sendReCheck = () => {
console.log('发送重新检测指令')
+ // startPreTest({
+ // userPageId: "cdf",
+ // devIds:deviceIds,
+ // planId:planId,
+ // errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',
+ // scriptId:"a303b2224845fcc6f60198b8ca23dca9",
+ // operateType:'1' // '0'为预检测、‘1‘为正式检测
+ // }).then(res => {
+ // console.log(res)
+ /* if (res.code === 20000) {
+ TestStatus.value = 'start'
+ webMsgSend.value = ''
+ } else {
+ ElMessage.error(res.message)
+ }*/
+ // })
TestStatus.value = 'start'
}