微调
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;
|
||||
@@ -833,12 +652,16 @@ defineExpose({
|
||||
|
||||
.content-right-title {
|
||||
.el-divider--horizontal {
|
||||
margin-bottom: 0px;
|
||||
//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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="testStatus=='process' && activeIndex < checkTotal"
|
||||
v-if="testStatus=='process' && percentage < 100"
|
||||
:icon="VideoPause"
|
||||
@click="emit('sendPause')">停止检测
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="testStatus=='preTest_process' && activeIndex < checkTotal"
|
||||
v-if="testStatus=='preTest_process'"
|
||||
:icon="VideoPause"
|
||||
disabled>预检测中
|
||||
</el-button>
|
||||
@@ -32,11 +32,11 @@
|
||||
</el-button>
|
||||
|
||||
|
||||
<el-button type="success" v-if="activeIndex >= checkTotal" :icon="Check" disabled>检测完成</el-button>
|
||||
<el-button type="success" v-if="percentage >= 100" :icon="Check" disabled>检测完成</el-button>
|
||||
|
||||
<el-button
|
||||
type="warning"
|
||||
v-if="testStatus=='paused' && activeIndex < checkTotal"
|
||||
v-if="testStatus=='paused' && percentage < 100"
|
||||
:icon="Refresh"
|
||||
@click="emit('sendResume')"
|
||||
>继续检测
|
||||
@@ -83,8 +83,7 @@
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<el-table-column v-for="(item,index1) in deviceList" :key="item.deviceId" :label="item.deviceName"
|
||||
:min-width="110" align="center">
|
||||
<el-table-column v-for="(item,index1) in deviceList" :key="item.deviceId" :label="item.deviceName" :min-width="110" align="center">
|
||||
<template #default="{row}">
|
||||
<el-tooltip
|
||||
:content="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"
|
||||
@@ -540,8 +539,8 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
}
|
||||
break;
|
||||
case 'Quit':
|
||||
updatePercentage()
|
||||
updateLog(false)
|
||||
//updatePercentage()
|
||||
//updateLog(false)
|
||||
console.log('检测结束')
|
||||
break;
|
||||
}
|
||||
@@ -603,7 +602,7 @@ const initScriptData = async () => {
|
||||
})
|
||||
|
||||
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,14 +726,17 @@ const updateLog = (isStart: boolean) => {
|
||||
log: currentTime.value + ` :${scriptData[activeIndex - 1].scriptName}准确度检测结束:符合,用时` + getTimeDifference(timeDifferenceItem),
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if(activeIndex === checkTotal){
|
||||
testLogList.push({
|
||||
type: 'info',
|
||||
log: currentTime.value + ' :检测结束,总用时' + getTimeDifference(timeDifference.value),
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user