预见测代码
This commit is contained in:
@@ -278,6 +278,20 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
type: 'wait',
|
type: 'wait',
|
||||||
log: '正在进行设备通讯校验.....',
|
log: '正在进行设备通讯校验.....',
|
||||||
}];
|
}];
|
||||||
|
} else if (newValue.code == 10550) {
|
||||||
|
step2InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备连接异常!',
|
||||||
|
})
|
||||||
|
step2.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
}else if (newValue.code == 10551) {
|
||||||
|
step2InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备触发报告异常!',
|
||||||
|
})
|
||||||
|
step2.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
step2InitLog.value = [{
|
step2InitLog.value = [{
|
||||||
@@ -310,7 +324,21 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
type: 'wait',
|
type: 'wait',
|
||||||
log: '正在进行通讯协议校验.....',
|
log: '正在进行通讯协议校验.....',
|
||||||
}];
|
}];
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10550) {
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备连接异常!',
|
||||||
|
})
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
}else if (newValue.code == 10551) {
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备触发报告异常!',
|
||||||
|
})
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
}else if (newValue.code == 10552) {
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
step3InitLog.value = [{
|
step3InitLog.value = [{
|
||||||
@@ -333,6 +361,20 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
type: 'wait',
|
type: 'wait',
|
||||||
log: '正在进行通讯协议校验.....',
|
log: '正在进行通讯协议校验.....',
|
||||||
}];
|
}];
|
||||||
|
}else if (newValue.code == 10550) {
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备连接异常!',
|
||||||
|
})
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
}else if (newValue.code == 10551) {
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备触发报告异常!',
|
||||||
|
})
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
@@ -352,6 +394,20 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
|
|
||||||
} else if (newValue.code == 10201) {
|
} else if (newValue.code == 10201) {
|
||||||
step3.value = 'process'
|
step3.value = 'process'
|
||||||
|
}else if (newValue.code == 10550) {
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备连接异常!',
|
||||||
|
})
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
}else if (newValue.code == 10551) {
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data+'设备触发报告异常!',
|
||||||
|
})
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
//ElMessage.error("当前步骤已经初始化,执行自动关闭,请重新发起检测!")
|
//ElMessage.error("当前步骤已经初始化,执行自动关闭,请重新发起检测!")
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
@@ -425,7 +481,6 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'quit':
|
case 'quit':
|
||||||
break;
|
break;
|
||||||
@@ -448,21 +503,17 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(activeIndex, function (newValue, oldValue) {
|
watch(activeIndex, function (newValue, oldValue) {
|
||||||
if (newValue <= activeTotalNum.value - 2)
|
if (newValue <= activeTotalNum.value - 2){
|
||||||
|
|
||||||
collapseActiveName.value = (newValue+1).toString()
|
collapseActiveName.value = (newValue+1).toString()
|
||||||
else
|
} else{
|
||||||
collapseActiveName.value = (newValue - 1).toString()
|
collapseActiveName.value = (newValue - 1).toString()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
//监听goods_sn的变化
|
//监听goods_sn的变化
|
||||||
|
|||||||
@@ -147,11 +147,18 @@ const detectionOptions = ref([
|
|||||||
const isTimeCheck = ref(false)
|
const isTimeCheck = ref(false)
|
||||||
const preTestRef = ref(null);
|
const preTestRef = ref(null);
|
||||||
|
|
||||||
|
const devIdArr = ref([])
|
||||||
|
const planId = ref('')
|
||||||
|
|
||||||
// 打开弹窗,可能是新增,也可能是编辑
|
// 打开弹窗,可能是新增,也可能是编辑
|
||||||
const open = (selection: Device.ResPqDev[],title: string,time:boolean) => {
|
const open = (selection: Device.ResPqDev[],title: string,time:boolean) => {
|
||||||
|
|
||||||
|
|
||||||
const checkStates = selection.map(item => item.checkState);
|
const checkStates = selection.map(item => item.checkState);
|
||||||
|
devIdArr.value = selection.map(item => item.id);
|
||||||
|
planId.value =selection[0].planId
|
||||||
|
console.log('wwwwwwwwwwwwwwwww',selection)
|
||||||
|
|
||||||
const allCheckStatesEqual = new Set(checkStates).size <= 1;
|
const allCheckStatesEqual = new Set(checkStates).size <= 1;
|
||||||
|
|
||||||
if (!allCheckStatesEqual) {
|
if (!allCheckStatesEqual) {
|
||||||
@@ -196,26 +203,6 @@ const detectionOptions = ref([
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* else if(res.code === 10200){
|
|
||||||
switch (res.operateCode){
|
|
||||||
case 'INIT_GATHER':
|
|
||||||
|
|
||||||
break
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}else if(res.code === 10201){
|
|
||||||
switch (res.operateCode){
|
|
||||||
case 'INIT_GATHER':
|
|
||||||
//开始进入源初始化检测
|
|
||||||
|
|
||||||
|
|
||||||
break
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}*/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -238,12 +225,11 @@ const detectionOptions = ref([
|
|||||||
})*/
|
})*/
|
||||||
startPreTest({
|
startPreTest({
|
||||||
userPageId: "cdf",
|
userPageId: "cdf",
|
||||||
devIds:["5eaba83670ff4d9daf892a62a5e13ea3","80b4b4f52a4c4064a18319525f8ac13c"],
|
devIds:devIdArr.value,
|
||||||
planId:"31cc203f3fa94fa39323ae7cc411cd66"
|
planId:planId.value
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user