微调
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ (-0.1 * props.curV).toFixed(4) + '~' + (0.1 * props.curV).toFixed(4)}}<br/>
|
||||
误差值:{{ scope.row.aV }}
|
||||
误差范围: {{ (-0.001 * props.curV).toFixed(4) + 'V~' + (0.001 * props.curV).toFixed(4)+ 'V'}}<br/>
|
||||
误差值:{{ scope.row.aV + 'V'}}
|
||||
</template>
|
||||
<el-tag type="danger" class="tooltip-content">
|
||||
{{ scope.row.aVuXi }}
|
||||
@@ -43,8 +43,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ (-0.1 * props.curV).toFixed(4) + '~' + (0.1 * props.curV).toFixed(4)}}<br/>
|
||||
误差值:{{ scope.row.aV }}
|
||||
误差范围: {{ (-0.001 * props.curV).toFixed(4) + 'V~' + (0.001 * props.curV).toFixed(4)+ 'V'}}<br/>
|
||||
误差值:{{ scope.row.aV + 'V'}}
|
||||
</template>
|
||||
<el-tag type="success" class="tooltip-content">{{ scope.row.aVuXi }}</el-tag>
|
||||
</el-tooltip>
|
||||
@@ -80,8 +80,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ (-0.1 * props.curV).toFixed(4) + '~' + (0.1 * props.curV).toFixed(4)}}<br/>
|
||||
误差值:{{ scope.row.bV }}
|
||||
误差范围: {{ (-0.001 * props.curV).toFixed(4) + 'V~' + (0.001 * props.curV).toFixed(4)+ 'V'}}<br/>
|
||||
误差值:{{ scope.row.bV + 'V'}}
|
||||
</template>
|
||||
<el-tag type="danger" class="tooltip-content">
|
||||
{{ scope.row.bVuXi }}
|
||||
@@ -94,8 +94,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ (-0.1 * props.curV).toFixed(4) + '~' + (0.1 * props.curV).toFixed(4)}}<br/>
|
||||
误差值:{{ scope.row.bV }}
|
||||
误差范围: {{ (-0.001 * props.curV).toFixed(4) + 'V~' + (0.001 * props.curV).toFixed(4)+ 'V'}}<br/>
|
||||
误差值:{{ scope.row.bV + 'V'}}
|
||||
</template>
|
||||
<el-tag type="success" class="tooltip-content">{{ scope.row.bVuXi }}</el-tag>
|
||||
</el-tooltip>
|
||||
@@ -125,8 +125,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ (-0.1 * props.curV).toFixed(4) + '~' + (0.1 * props.curV).toFixed(4)}}<br/>
|
||||
误差值:{{ scope.row.cV }}
|
||||
误差范围: {{ (-0.001 * props.curV).toFixed(4) + 'V~' + (0.001 * props.curV).toFixed(4)+ 'V'}}<br/>
|
||||
误差值:{{ scope.row.cV + 'V'}}
|
||||
</template>
|
||||
<el-tag type="danger" class="tooltip-content">
|
||||
{{ scope.row.cVuXi }}
|
||||
@@ -139,8 +139,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ (-0.1 * props.curV).toFixed(4) + '~' + (0.1 * props.curV).toFixed(4)}}<br/>
|
||||
误差值:{{ scope.row.cV }}
|
||||
误差范围: {{ (-0.001 * props.curV).toFixed(4) + 'V~' + (0.001 * props.curV).toFixed(4) + 'V'}}<br/>
|
||||
误差值:{{ scope.row.cV + 'V'}}
|
||||
</template>
|
||||
<el-tag type="success" class="tooltip-content">{{ scope.row.cVuXi }}</el-tag>
|
||||
</el-tooltip>
|
||||
@@ -172,8 +172,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ -0.5 + "~" +0.5 }}<br/>
|
||||
误差值:{{ scope.row.aI }}
|
||||
误差范围: {{-0.5 + "%~" +0.5 + "%" }}<br/>
|
||||
误差值:{{ scope.row.aI + '%'}}
|
||||
</template>
|
||||
<el-tag type="danger" class="tooltip-content">
|
||||
{{ scope.row.aIeXi }}
|
||||
@@ -186,8 +186,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ -0.5 + "~" +0.5 }}<br/>
|
||||
误差值:{{ scope.row.aI }}
|
||||
误差范围: {{ -0.5 + "%~" +0.5 + "%" }}<br/>
|
||||
误差值:{{ scope.row.aI + '%'}}
|
||||
</template>
|
||||
<el-tag type="success" class="tooltip-content">{{ scope.row.aIeXi }}</el-tag>
|
||||
</el-tooltip>
|
||||
@@ -217,8 +217,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ -0.5 + "~" +0.5 }}<br/>
|
||||
误差值:{{ scope.row.bI }}
|
||||
误差范围: {{ -0.5 + "%~" +0.5 + "%" }}<br/>
|
||||
误差值:{{ scope.row.bI + '%'}}
|
||||
</template>
|
||||
<el-tag type="danger" class="tooltip-content">
|
||||
{{ scope.row.bIeXi }}
|
||||
@@ -231,8 +231,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ -0.5 + "~" +0.5 }}<br/>
|
||||
误差值:{{ scope.row.bI }}
|
||||
误差范围: {{ -0.5 + "%~" +0.5 + "%" }}<br/>
|
||||
误差值:{{ scope.row.bI + '%'}}
|
||||
</template>
|
||||
<el-tag type="success" class="tooltip-content">{{ scope.row.bIeXi }}</el-tag>
|
||||
</el-tooltip>
|
||||
@@ -262,8 +262,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ -0.5 + "~" +0.5 }}<br/>
|
||||
误差值:{{ scope.row.cI }}
|
||||
误差范围: {{ -0.5 + "%~" +0.5 + "%" }}<br/>
|
||||
误差值:{{ scope.row.cI + '%'}}
|
||||
</template>
|
||||
<el-tag type="danger" class="tooltip-content">
|
||||
{{ scope.row.cIeXi }}
|
||||
@@ -276,8 +276,8 @@
|
||||
placement="bottom-start"
|
||||
>
|
||||
<template #content>
|
||||
误差范围: {{ -0.5 + "~" +0.5 }}<br/>
|
||||
误差值:{{ scope.row.cI }}
|
||||
误差范围: {{ -0.5 + "%~" +0.5 + "%" }}<br/>
|
||||
误差值:{{ scope.row.cI + '%'}}
|
||||
</template>
|
||||
<el-tag type="success" class="tooltip-content">{{ scope.row.cIeXi }}</el-tag>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -756,6 +756,7 @@ function tableHeaderInit(val: number) {
|
||||
break;
|
||||
}
|
||||
//console.log("test",columns);
|
||||
handleRefresh()
|
||||
}
|
||||
|
||||
function refreshStatusList(){
|
||||
@@ -968,7 +969,7 @@ const handleTest = async (val:string) => {
|
||||
const data = reactive({
|
||||
socketServe: socketClient.Instance,
|
||||
});
|
||||
const url = 'ws://localhost:7777/hello?name=cdf';
|
||||
const url = 'ws://192.168.1.127:7777/hello?name=cdf';
|
||||
socketClient.Instance.connect(url);
|
||||
data.socketServe = socketClient.Instance;
|
||||
data.socketServe.registerCallBack('aaa', (res: { code: number; }) => {
|
||||
@@ -1092,9 +1093,9 @@ function formatDate(date : Date) {
|
||||
watch(
|
||||
() => props.id,
|
||||
(newId) => {
|
||||
|
||||
handleRefresh()
|
||||
// 调用获取数据的方法
|
||||
handleSearch();
|
||||
//handleSearch();
|
||||
},
|
||||
{ immediate: true } // 立即执行一次
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user