This commit is contained in:
sjl
2025-01-15 20:23:05 +08:00
parent c2b63a7a3f
commit d02f85cea5
7 changed files with 92 additions and 54 deletions

View File

@@ -145,13 +145,20 @@ watch(webMsgSend,function (newValue,oldValue){
switch (newValue.requestId){
case 'yjc_ytxjy':
switch (newValue.operateCode) {
case'INIT GATHER':
case'INIT_GATHER':
if(newValue.code ==-1){
ElMessageBox.alert('源未知异常', '初始化失败', {
ElMessageBox.alert('源未知异常', '初始化失败', {
confirmButtonText: '确定',
type: 'error',
})
}
TableInit();
}else if (newValue.code == 10523) {
ElMessageBox.alert('源连接失败', '源连接失败', {
confirmButtonText: '确定',
type: 'error',
})
TableInit();
}
}
break;
case 'YJC_xujy':
@@ -162,13 +169,14 @@ watch(webMsgSend,function (newValue,oldValue){
confirmButtonText: '确定',
type: 'error',
})
TableInit();
} else if (newValue.code == 10520) {
ElMessageBox.alert('解析报文异常,执行自动关闭,请重新发起检测', '解析报文异常', {
confirmButtonText: '确定',
type: 'error',
})
TableInit();
}
TableInit();
break;
case 'DATA_REQUEST$02':
if (newValue.code == 25003) {
@@ -176,8 +184,8 @@ watch(webMsgSend,function (newValue,oldValue){
confirmButtonText: '确定',
type: 'error',
})
TableInit();
}
TableInit();
break;
}
break;
@@ -189,6 +197,7 @@ watch(webMsgSend,function (newValue,oldValue){
confirmButtonText: '确定',
type: 'error',
})
TableInit();
}else if (newValue.code == 10551) {
ElMessageBox.alert('设备触发报告异常', '设备触发报告异常', {
confirmButtonText: '确定',
@@ -200,17 +209,20 @@ watch(webMsgSend,function (newValue,oldValue){
confirmButtonText: '确定',
type: 'error',
})
TableInit();
} else if (newValue.code == 10520) {
ElMessageBox.alert('解析报文异常,执行自动关闭,请重新发起检测', '解析报文异常', {
confirmButtonText: '确定',
type: 'error',
})
TableInit();
}
TableInit();
break;
}
break;
case 'Coefficient_Check':
console.log("Coefficient_Checkactive",active.value);
switch (newValue.operateCode){
case 'big_end'://大电压,电流下装
active.value++;
@@ -363,29 +375,41 @@ watch(webMsgSend,function (newValue,oldValue){
confirmButtonText: '确定',
type: 'error',
})
TableInit();
break;
case "Dev":
ElMessageBox.alert('设备服务端连接失败', '设备服务端连接失败', {
confirmButtonText: '确定',
type: 'error',
})
TableInit();
break;
}
TableInit();
break;
}
})
//出错系数检测初始化
const TableInit = () => {
console.log("TableInitactive",active.value);
isButtonDisabled.value = false; // 恢复按钮
for (let i = 0; i < channel.value.length; i++) {
const currentTableData = initializeTableData(dataTemplates, i);
tableDataMap.set(i,currentTableData)
// const targetArrayRef = tableDataMap.get(i);
// if (targetArrayRef) {
// const targetArray = targetArrayRef.value;
// if (targetArray.length > 0) {
// targetArray.forEach(item => item.loading =false)
// }
// }
}
activeIndex.value = 0
qualified.value = 0
active.value = 0
}
//按行图标转动
@@ -679,7 +703,7 @@ const handleSubmit = async () => {
operateType:'0' // '0'为预检测、1为正式检测
})
active.value++;
console.log("handleSubmitactive",active.value);
// 初始化 loadingStates 为 true
// loadingStates.value = new Array(name.value.length).fill(true);