Merge branch 'qr_branch'

# Conflicts:
#	frontend/src/views/home/components/preTest.vue
#	frontend/src/views/home/components/test.vue
#	frontend/src/views/machine/device/components/devicePopup.vue
#	frontend/src/views/machine/testScript/components/testScriptFlickerTab.vue
This commit is contained in:
caozehui
2025-12-26 13:27:26 +08:00
4 changed files with 54 additions and 19 deletions

View File

@@ -260,7 +260,7 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
temp.devices.push({
deviceId: device.deviceId,
deviceName: device.deviceName,
chnResult: tempChnBtnResult,
chnResult: tempChnBtnResult
})
})
return temp
@@ -401,6 +401,16 @@ watch(webMsgSend, function(newValue, oldValue) {
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`,
})
emit('update:testStatus', 'test_init_fail')
} else if (newValue.code == -1) {
ElMessageBox.alert('源未知异常!', '检测失败!', {
confirmButtonText: '确定',
type: 'error',
})
testLogList.push({
type: 'error',
log: `${new Date().toLocaleString()}:源未知异常!`
})
emit('update:testStatus', 'error')
} else {
// ========== 根据请求ID处理不同类型的消息 ==========
switch (newValue.requestId) {
@@ -637,7 +647,7 @@ watch(webMsgSend, function(newValue, oldValue) {
break
// 检测结束
case 'Quit':
break
}
}
@@ -1121,7 +1131,7 @@ const handleResumeTest = () => {
startData.value = new Date()
testLogList.push({ type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!` })
resumeTimeCount()
}
// ========== 测试项索引管理函数 ==========
@@ -1196,13 +1206,13 @@ onBeforeUnmount(() => {
clearInterval(timer)
timer = null
}
// 清理响应式数组引用,防止内存泄漏
deviceList.splice(0)
checkResult.splice(0)
testLogList.splice(0)
errorCheckItem.splice(0)
// 重置其他状态
scriptData.splice(0)
activeIndex = 0