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