This commit is contained in:
caozehui
2025-02-25 14:13:59 +08:00
parent da58ffb621
commit 6300eb2f43
2 changed files with 73 additions and 64 deletions

View File

@@ -473,25 +473,25 @@ watch(webMsgSend, function (newValue, oldValue) {
break;
}
break;
// case 'connect':
// switch (newValue.operateCode) {
// case "Source":
// ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', {
// confirmButtonText: '确定',
// type: 'error',
// })
// testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`})
// break;
// case "Dev":
// ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', {
// confirmButtonText: '确定',
// type: 'error',
// })
// testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`})
// break;
// }
// emit('update:testStatus', 'test_init_fail')
// break;
case 'connect':
switch (newValue.operateCode) {
case "Source":
ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', {
confirmButtonText: '确定',
type: 'error',
})
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`})
break;
case "Dev":
ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', {
confirmButtonText: '确定',
type: 'error',
})
testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`})
break;
}
emit('update:testStatus', 'test_init_fail')
break;
case 'yjc_ytxjy':
switch (newValue.operateCode) {
case 'INIT_GATHER':
@@ -914,6 +914,11 @@ const setErrorCheckItem = (scriptType: string, devices: CheckData.DeviceCheckRes
type: 'warning',
log: `${new Date().toLocaleString()} ${devices[i].deviceName}连接超时`,
})
ElMessageBox.alert('连接超时!', '连接超时', {
confirmButtonText: '确定',
type: 'error',
})
emit('update:testStatus', 'connect_timeout')
}
}
}
@@ -933,28 +938,28 @@ function getErrorCheckItem(scriptType: string) {
const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: CheckData.DeviceCheckResult[] = []) => {
let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id
devices = [
{
chnResult: [1, 1, 1, 1],
deviceId: "3250a0ff180845cc8885da4ff628261e",
deviceName: "测试装置-0122-02"
},
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "df23a4178d194467a432ddf45e835e48",
// deviceName: "240003"
// },
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "ae5a7628260349c0a5e7c86c81fbd417",
// deviceName: "240004"
// }
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "461813a4f30f4a34a1a273ecd0379458",
// deviceName: "25011407"
// }
]
// devices = [
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "3250a0ff180845cc8885da4ff628261e",
// deviceName: "测试装置-0122-02"
// },
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "df23a4178d194467a432ddf45e835e48",
// deviceName: "240003"
// },
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "ae5a7628260349c0a5e7c86c81fbd417",
// deviceName: "240004"
// },
// {
// chnResult: [1, 1, 1, 1],
// deviceId: "461813a4f30f4a34a1a273ecd0379458",
// deviceName: "25011407"
// }
// ]
let temp = null
if (isStart) {
temp = getLoadingResult(scriptType)
@@ -1335,7 +1340,7 @@ const handleResumeTest = () => {
type: 'info',
log: `${new Date().toLocaleString()}:继续检测`,
})
startTimer()
//startTimer()
resumeTimeCount()
console.log('开始继续检测')
};