正式检测代码提交
This commit is contained in:
@@ -239,7 +239,7 @@ watch(webMsgSend,function (newValue,oldValue){
|
||||
if(newValue.code == 10200) {
|
||||
step1InitLog.value.push({
|
||||
type: 'info',
|
||||
log: '源校验成功!',
|
||||
log: '源初始化成功!',
|
||||
})
|
||||
activeIndex.value = 1
|
||||
step1.value = 'success'
|
||||
@@ -248,7 +248,7 @@ watch(webMsgSend,function (newValue,oldValue){
|
||||
step1.value = 'process'
|
||||
step1InitLog.value = [{
|
||||
type: 'wait',
|
||||
log: '正在进行源校验!',
|
||||
log: '正在进行源初始化!',
|
||||
}];
|
||||
}else if(newValue.code == 10552){
|
||||
ElMessage.error(newValue.code)
|
||||
|
||||
@@ -294,7 +294,7 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
ElMessage.success('预检测开始!')
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:预检测开始!`})
|
||||
emit('update:testStatus', 'preTest_process')
|
||||
startTimer() // todo 可移除
|
||||
//startTimer() // todo 可移除
|
||||
//emit('update:testStatus', 'process') // todo 可移除
|
||||
}
|
||||
// if (newValue == 'paused' && oldValue == 'process') {
|
||||
@@ -309,25 +309,25 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
watch(webMsgSend, function (newValue, oldValue) {
|
||||
if (activeIndex <= checkTotal) {
|
||||
switch (newValue.requestId) {
|
||||
// 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', 'preTest_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', 'preTest_fail')
|
||||
break;
|
||||
case 'yjc_ytxjy':
|
||||
switch (newValue.operateCode) {
|
||||
case 'INIT_GATHER':
|
||||
@@ -440,7 +440,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('HV')
|
||||
startTimer()
|
||||
// startTimer()
|
||||
}
|
||||
break;
|
||||
case 'HI_Start':
|
||||
@@ -453,7 +453,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('HI')
|
||||
startTimer()
|
||||
// startTimer()
|
||||
}
|
||||
break;
|
||||
case 'HP_Start':
|
||||
@@ -466,7 +466,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('HP')
|
||||
startTimer()
|
||||
// startTimer()
|
||||
}
|
||||
break;
|
||||
case 'HSV_Start':
|
||||
@@ -479,7 +479,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('HSV')
|
||||
startTimer()
|
||||
//startTimer()
|
||||
}
|
||||
break;
|
||||
case 'HSI_Start':
|
||||
@@ -492,7 +492,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('HSI')
|
||||
startTimer()
|
||||
//startTimer()
|
||||
}
|
||||
break;
|
||||
case 'VOLTAGE_Start':
|
||||
@@ -505,7 +505,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('VOLTAGE')
|
||||
startTimer()
|
||||
// startTimer()
|
||||
}
|
||||
break;
|
||||
case 'I_Start':
|
||||
@@ -518,7 +518,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('I')
|
||||
startTimer()
|
||||
//startTimer()
|
||||
}
|
||||
break;
|
||||
case 'IMBV_Start':
|
||||
@@ -531,7 +531,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('IMBV')
|
||||
startTimer()
|
||||
//startTimer()
|
||||
}
|
||||
break;
|
||||
case 'IMBA_Start':
|
||||
@@ -544,7 +544,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('IMBA')
|
||||
startTimer()
|
||||
//startTimer()
|
||||
}
|
||||
break;
|
||||
case 'F_Start':
|
||||
@@ -557,7 +557,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
updateLog(false)
|
||||
if (testStatus.value != 'paused') {
|
||||
activeIndex = getNextActiveIndex('F')
|
||||
startTimer()
|
||||
//startTimer()
|
||||
}
|
||||
break;
|
||||
case 'Quit':
|
||||
|
||||
@@ -253,20 +253,22 @@ const detectionOptions = ref([
|
||||
// break;
|
||||
case 2:
|
||||
if (TestStatus.value == "waiting") {
|
||||
// startTest({
|
||||
// userPageId: "cdf",
|
||||
// devIds:deviceIds,
|
||||
// planId:planId,
|
||||
// operateType:'1' // '0'为预检测、‘1‘为正式检测
|
||||
// }).then(res => {
|
||||
// console.log(res)
|
||||
// if (res.code === 20000) {
|
||||
// TestStatus.value = 'start'
|
||||
// webMsgSend.value = ''
|
||||
// } else {
|
||||
// ElMessage.error(res.message)
|
||||
// }
|
||||
// })
|
||||
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'
|
||||
} else if (TestStatus.value == 'process') {
|
||||
// 发送暂停指令
|
||||
|
||||
Reference in New Issue
Block a user