icd校验
This commit is contained in:
@@ -304,6 +304,20 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'yjc_xyjy':
|
||||
switch (newValue.operateCode) {
|
||||
case 'VERIFY_MAPPING$01':
|
||||
if (newValue.code == 10200) {
|
||||
let data = JSON.parse(newValue.data)
|
||||
ElMessageBox.alert(`脚本与icd检验失败! icd名称:${data['icdType']} -> 校验项:${data['dataType']}`, '初始化失败', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
TableInit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'Coefficient_Check':
|
||||
console.log("Coefficient_Checkactive", active.value);
|
||||
switch (newValue.operateCode) {
|
||||
|
||||
@@ -189,6 +189,7 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
watch(webMsgSend, function (newValue, oldValue) {
|
||||
console.log('webMsgSend---code', newValue.code)
|
||||
console.log('webMsgSend---requestId', newValue.requestId)
|
||||
if (testStatus.value !== 'waiting') {
|
||||
if (newValue.code == 10520) {
|
||||
ElMessageBox.alert('报文解析异常!', '初始化失败', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -344,6 +345,20 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'yjc_xyjy':
|
||||
switch (newValue.operateCode) {
|
||||
case 'VERIFY_MAPPING$01':
|
||||
if (newValue.code == 10200) {
|
||||
let data = JSON.parse(newValue.data)
|
||||
ElMessageBox.alert(`脚本与icd校验失败!icd名称:${data['icdType']} -> 校验项:${data['dataType']}`, '初始化失败', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
TableInit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'Coefficient_Check':
|
||||
console.log("Coefficient_Checkactive", active.value);
|
||||
switch (newValue.operateCode) {
|
||||
@@ -406,7 +421,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
switch (newValue.operateCode) {
|
||||
case 'DATA_CHNFACTOR$02'://表格
|
||||
// 输出 key 为 0 的数组中的第一条 ChannelsTest.CoefficientVO 对象
|
||||
console.log('表格',name.value)
|
||||
console.log('表格', name.value)
|
||||
for (let i = 0; i < name.value.length; i++) {
|
||||
const targetArrayRef = tableDataMap.get(i);
|
||||
if (targetArrayRef) {
|
||||
@@ -474,13 +489,13 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
console.log(newValue.data.devName + '对象:', firstCoefficientVO);
|
||||
activeIndex.value++;
|
||||
} else {
|
||||
console.log('未找到匹配的'+ newValue.data.devName+'对象');
|
||||
console.log('未找到匹配的' + newValue.data.devName + '对象');
|
||||
}
|
||||
} else {
|
||||
console.log(newValue.data.devName + '数组为空');
|
||||
}
|
||||
} else {
|
||||
console.log('未找到'+newValue.data.devName+'对应的数组');
|
||||
console.log('未找到' + newValue.data.devName + '对应的数组');
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -518,6 +533,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
//出错系数检测初始化
|
||||
|
||||
@@ -233,8 +233,7 @@ const webMsgSend = toRef(props, 'webMsgSend');
|
||||
const ts = ref('');
|
||||
|
||||
watch(webMsgSend, function (newValue, oldValue) {
|
||||
// console.log(newValue)
|
||||
|
||||
if (testStatus.value !== 'waiting') {
|
||||
switch (newValue.requestId) {
|
||||
case 'yjc_ytxjy':
|
||||
switch (newValue.operateCode) {
|
||||
@@ -446,14 +445,25 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
}];
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
} else if (newValue.code == 25001) {
|
||||
}
|
||||
break;
|
||||
case 'VERIFY_MAPPING$01':
|
||||
if (newValue.code == 25001) {
|
||||
activeIndex.value = 3
|
||||
step3.value = 'success'
|
||||
step4.value = 'process'
|
||||
} else if (newValue.code == 10200) {
|
||||
let data = JSON.parse(newValue.data)
|
||||
step3InitLog.value.push({
|
||||
type: 'error',
|
||||
log: `脚本与icd检验失败! icd名称:${data['icdType']} -> 校验项:${data['dataType']}`,
|
||||
})
|
||||
step3.value = 'error'
|
||||
ts.value = 'error'
|
||||
step5.value = 'error'
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'YJC_xujy':
|
||||
switch (newValue.operateCode) {
|
||||
@@ -496,7 +506,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
newValue.data.split('<br/>')
|
||||
step4InitLog.value.push({
|
||||
type: type,
|
||||
log:newValue.data,
|
||||
log: newValue.data,
|
||||
})
|
||||
|
||||
} else if (newValue.code == 10201) {
|
||||
@@ -523,7 +533,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
}
|
||||
activeIndex.value = 5
|
||||
ts.value = 'success'
|
||||
console.log("@@@@",ts.value)
|
||||
console.log("@@@@", ts.value)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -564,7 +574,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
step5.value = 'error'
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
watch(activeIndex, function (newValue, oldValue) {
|
||||
|
||||
@@ -355,6 +355,7 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
let count = 0
|
||||
|
||||
watch(webMsgSend, function (newValue, oldValue) {
|
||||
if (testStatus.value !== 'waiting') {
|
||||
if (props.stepsActive === 4) {
|
||||
if (newValue.code == 10520) {
|
||||
ElMessageBox.alert('报文解析异常!', '初始化失败', {
|
||||
@@ -535,7 +536,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
break;
|
||||
case 'yjc_xyjy':
|
||||
switch (newValue.operateCode) {
|
||||
case 'INIT_GATHER$03':
|
||||
case 'VERIFY_MAPPING$01':
|
||||
if (newValue.code == 25001) {
|
||||
ElMessage.success('初始化成功!')
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:协议校验成功!`})
|
||||
@@ -543,11 +544,21 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化成功!`})
|
||||
percentage.value = 3
|
||||
|
||||
|
||||
activeIndex = getNextActiveIndex() + 2
|
||||
//startTimer()
|
||||
|
||||
emit('update:testStatus', 'process')
|
||||
} else if (newValue.code == 10200) {
|
||||
let data = JSON.parse(newValue.data)
|
||||
ElMessageBox.alert(`脚本与icd校验失败!icd名称:${data['icdType']} -> 校验项:${data['dataType']}`, '初始化失败', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
testLogList.push({
|
||||
type: 'error',
|
||||
log: `${new Date().toLocaleString()}:脚本与icd校验失败!icd名称:${newValue.data.icdType} -> 校验项:${newValue.data.dataType}`
|
||||
})
|
||||
emit('update:testStatus', 'test_init_fail')
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -648,6 +659,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {deep: true})
|
||||
|
||||
const handleStartItem = (code: string, desc: string | undefined) => {
|
||||
|
||||
Reference in New Issue
Block a user