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:
@@ -322,6 +322,12 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
})
|
||||
TableInit();
|
||||
} else if (newValue.code == -1) { //todo 10552之后还会发送消息吗?
|
||||
ElMessageBox.alert('源未知异常', '检测失败', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
TableInit();
|
||||
} else {
|
||||
// ==================== 特定业务消息处理 ====================
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ const ts = ref(''); // 内部测试状态,用于向父组件同步
|
||||
/**
|
||||
* 处理致命错误 - 会终止整个检测流程
|
||||
* @param stepRef 当前步骤状态引用
|
||||
* @param logRef 当前步骤日志引用
|
||||
* @param logRef 当前步骤日志引用
|
||||
* @param message 错误消息
|
||||
*/
|
||||
function handleFatalError(stepRef: any, logRef: any, message: string) {
|
||||
@@ -199,7 +199,7 @@ function handleWarningError(stepRef: any, logRef: any, message: string) {
|
||||
* 监听WebSocket消息,根据不同的requestId和operateCode处理各种检测状态
|
||||
* 主要消息类型:
|
||||
* - yjc_ytxjy: 源通讯校验
|
||||
* - yjc_sbtxjy: 设备通讯校验
|
||||
* - yjc_sbtxjy: 设备通讯校验
|
||||
* - yjc_xyjy: 协议校验
|
||||
* - YJC_xujy: 相序校验
|
||||
*/
|
||||
@@ -358,6 +358,14 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
handleFatalError(step4, step4InitLog, '存在已经初始化步骤,执行自动关闭,请重新发起检测!')
|
||||
} else if (newValue.code == 10520) {
|
||||
handleFatalError(step4, step4InitLog, '解析报文异常')
|
||||
}else if (newValue.code == -1) {
|
||||
step4.value = 'error'
|
||||
step4InitLog.value = [{
|
||||
type: 'error',
|
||||
log: '源未知异常!',
|
||||
}];
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
}
|
||||
break;
|
||||
case 'DATA_REQUEST$02':
|
||||
@@ -389,7 +397,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
ts.value = 'success'
|
||||
}
|
||||
activeIndex.value = 5
|
||||
|
||||
|
||||
break
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user