This commit is contained in:
caozehui
2025-01-04 16:33:23 +08:00
parent 23e72f38a6
commit bf823ddff0
3 changed files with 152 additions and 311 deletions

View File

@@ -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,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();