This commit is contained in:
caozehui
2025-09-29 14:49:29 +08:00
parent a4a64ef0f9
commit 7c0ec5844a
2 changed files with 170 additions and 196 deletions

View File

@@ -226,21 +226,20 @@ watch(webMsgSend, function (newValue, oldValue) {
} }
switch (newValue.requestId) { switch (newValue.requestId) {
case 'yjc_sbtxjy': case 'yjc_sbtxjy':
switch (newValue.operateCode) {
case 'INIT_GATHER$02':
if (newValue.code == 10200) { if (newValue.code == 10200) {
step1InitLog.value.push({ step1InitLog.value.push({
type: 'info', type: 'info',
log: newValue.data, log: newValue.data,
}) })
}
} else if (newValue.code == 10201) { if (newValue.code == 10201) {
step1.value = 'process' step1.value = 'process'
step1InitLog.value = [{ step1InitLog.value = [{
type: 'wait', type: 'wait',
log: '正在进行设备通讯校验.....', log: '正在进行设备通讯校验.....',
}]; }];
} else if (newValue.code == 10551) { }
if (newValue.code == 10551) {
step1InitLog.value.push({ step1InitLog.value.push({
type: 'error', type: 'error',
log: newValue.data + '设备触发报告异常!', log: newValue.data + '设备触发报告异常!',
@@ -248,7 +247,8 @@ watch(webMsgSend, function (newValue, oldValue) {
step1.value = 'error' step1.value = 'error'
ts.value = 'error' ts.value = 'error'
step5.value = 'error' step5.value = 'error'
} else if (newValue.code == 10552) { }
if (newValue.code == 10552) {
step1InitLog.value = [{ step1InitLog.value = [{
type: 'error', type: 'error',
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!', log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
@@ -256,110 +256,89 @@ watch(webMsgSend, function (newValue, oldValue) {
step1.value = 'error' step1.value = 'error'
ts.value = 'error' ts.value = 'error'
step5.value = 'error' step5.value = 'error'
} else if (newValue.code == 25001) {
activeIndex.value = 1
step1.value = 'success'
step2.value = 'process'
} }
break;
case 'INIT_GATHER$03':
if (newValue.code == 10200) {
step1InitLog.value.push({
type: 'info',
log: newValue.data,
})
}else if (newValue.code == 25001) {
step1InitLog.value.push({
type: 'info',
log: newValue.data,
})
activeIndex.value = 1
step1.value = 'success'
step2.value = 'process'
}
break;
case 'DATA_REQUEST$03':
if (newValue.code == 25001) { if (newValue.code == 25001) {
step1InitLog.value.push({
type: 'info',
log: newValue.data,
})
activeIndex.value = 1 activeIndex.value = 1
step1.value = 'success' step1.value = 'success'
step2.value = 'process' step2.value = 'process'
} }
break; break;
}
break;
case 'record_wave_step1': case 'record_wave_step1':
switch (newValue.operateCode) {
case 'DATA_REQUEST$03':
if (newValue.code == 25002) { //某一路录波校验失败 if (newValue.code == 25002) { //某一路录波校验失败
step1InitLog.value.push({ step1InitLog.value.push({
type: 'error', type: 'error',
log: newValue.data , log: newValue.data,
}) })
}else if (newValue.code == 25003) { //最终失败 } else if (newValue.code == 25003) { //最终失败
step1.value = 'error' step1.value = 'error'
ts.value = 'error' ts.value = 'error'
step5.value = 'error' step5.value = 'error'
} }
}
break; break;
case 'yjc_mxyzxjy': case 'yjc_mxyzxjy':
switch (newValue.operateCode){
case 'DATA_REQUEST$02':
if (newValue.code == 10200) { //单个监测点成功 if (newValue.code == 10200) { //单个监测点成功
step2InitLog.value.push({ step2InitLog.value.push({
type: 'info', type: 'info',
log: newValue.data + '模型一致性检验成功!', log: newValue.data + '模型一致性检验成功!',
}) })
}else if (newValue.code == 10201) { }
if (newValue.code == 10201) {
step2.value = 'process' step2.value = 'process'
step2InitLog.value = [{ step2InitLog.value = [{
type: 'wait', type: 'wait',
log: '正在进行模型一致性校验.....', log: '正在进行模型一致性校验.....',
}]; }];
} else if (newValue.code == 25002) { //单个监测点失败 }
if (newValue.code == 25002) { //单个监测点失败
step2InitLog.value.push({ step2InitLog.value.push({
type: 'error', type: 'error',
log: newValue.data +'模型一致性检验失败!', log: newValue.data + '模型一致性检验失败!',
}) })
}else if (newValue.code == 25001) { //最终成功 }
if (newValue.code == 25001) { //最终成功
step2.value = 'success' step2.value = 'success'
step3.value = 'process' step3.value = 'process'
activeIndex.value = 2 activeIndex.value = 2
}else if (newValue.code == 25003) { //最终失败 }
if (newValue.code == 25003) { //最终失败
step2.value = 'error' step2.value = 'error'
ts.value = 'error' ts.value = 'error'
step5.value = 'error' step5.value = 'error'
} }
break; break;
}
break;
case 'yjc_align': case 'yjc_align':
switch (newValue.operateCode){
case 'DATA_REQUEST$02':
if (newValue.code == 10200) { //单个监测点成功 if (newValue.code == 10200) { //单个监测点成功
step3InitLog.value.push({ step3InitLog.value.push({
type: 'info', type: 'info',
log: newValue.data +'实时数据对齐检验成功!', log: newValue.data + '数据对齐检验成功!',
}) })
}else if (newValue.code == 10201) { }
if (newValue.code == 10201) {
step3.value = 'process' step3.value = 'process'
step3InitLog.value = [{ step3InitLog.value = [{
type: 'wait', type: 'wait',
log: '正在进行实时数据对齐检验.....', log: '正在进行数据对齐检验.....',
}]; }];
}else if (newValue.code == 25002) { //单个监测点失败 }
if (newValue.code == 25002) { //单个监测点失败
step3InitLog.value.push({ step3InitLog.value.push({
type: 'error', type: 'error',
log: newValue.data + '实时数据对齐检验失败!', log: newValue.data + '数据对齐检验失败!',
}) })
}else if (newValue.code == 25001 && newValue.data) { //最终成功 }
if (newValue.code == 25001 && newValue.data) { //最终成功
isShowDialog.value = true isShowDialog.value = true
step3.value = 'success' step3.value = 'success'
step4.value = 'process' step4.value = 'process'
activeIndex.value = 3 activeIndex.value = 3
testDataStructure.value = newValue.data testDataStructure.value = newValue.data
}else if (newValue.code == 25003) { //最终失败 }
if (newValue.code == 25003) { //最终失败
isShowDialog.value = true isShowDialog.value = true
step3.value = 'error' step3.value = 'error'
@@ -368,28 +347,27 @@ watch(webMsgSend, function (newValue, oldValue) {
testDataStructure.value = newValue.data testDataStructure.value = newValue.data
} }
break; break;
}
break;
case 'YJC_xujy': case 'YJC_xujy':
switch (newValue.operateCode) {
case 'DATA_REQUEST$02':
if (newValue.code == 10200) { if (newValue.code == 10200) {
step4InitLog.value.push({ step4InitLog.value.push({
type: 'info', type: 'info',
log: newValue.data, log: newValue.data,
}) })
}else if (newValue.code == 10201) { }
if (newValue.code == 10201) {
step4.value = 'process' step4.value = 'process'
step4InitLog.value = [{ step4InitLog.value = [{
type: 'wait', type: 'wait',
log: '正在进行相序性检.....', log: '正在进行相序性检.....',
}]; }];
} else if(newValue.code == 25002){ }
if (newValue.code == 25002) {
step4InitLog.value.push({ step4InitLog.value.push({
type: 'error', type: 'error',
log: newValue.data, log: newValue.data,
}) })
} else if (newValue.code == 25003) { }
if (newValue.code == 25003) {
step4InitLog.value.push({ step4InitLog.value.push({
type: 'error', type: 'error',
log: newValue.data, log: newValue.data,
@@ -397,14 +375,13 @@ watch(webMsgSend, function (newValue, oldValue) {
step4.value = 'error' step4.value = 'error'
ts.value = 'error' ts.value = 'error'
step5.value = 'error' step5.value = 'error'
} else if (newValue.code == 25001) { }
if (newValue.code == 25001) {
step4.value = 'success' step4.value = 'success'
step5.value = 'success' step5.value = 'success'
ts.value = 'success' ts.value = 'success'
activeIndex.value = 4 activeIndex.value = 4
} }
break
}
break; break;
case 'quit': case 'quit':
break; break;

View File

@@ -395,9 +395,6 @@ watch(
stopTimeCount() stopTimeCount()
break break
case 'yjc_xyjy' : case 'yjc_xyjy' :
switch (newValue.operateCode) {
case 'INIT_GATHER$03':
if (newValue.code == 10552) { if (newValue.code == 10552) {
ElMessageBox.alert('重复的初始化操作!', '检测失败', { ElMessageBox.alert('重复的初始化操作!', '检测失败', {
confirmButtonText: '确定', confirmButtonText: '确定',
@@ -406,18 +403,14 @@ watch(
setLogList('error', '重复的初始化操作!') setLogList('error', '重复的初始化操作!')
stopTimeCount() stopTimeCount()
} }
}
break; break;
case 'yjc_sbtxjy' : case 'yjc_sbtxjy' :
switch (newValue.operateCode) {
case 'INIT_GATHER$02':
ElMessageBox.alert('重复的初始化操作!', '检测失败', { ElMessageBox.alert('重复的初始化操作!', '检测失败', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: 'error', type: 'error',
}) })
setLogList('error', '重复的初始化操作!') setLogList('error', '重复的初始化操作!')
stopTimeCount() stopTimeCount()
}
break; break;
} }
if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') { if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') {
@@ -431,7 +424,7 @@ watch(
: newValue.requestId == 'yjc_mxyzxjy' : newValue.requestId == 'yjc_mxyzxjy'
? '模型一致性检验' ? '模型一致性检验'
: newValue.requestId == 'yjc_align' : newValue.requestId == 'yjc_align'
? '实时数据对齐检验' ? '数据对齐检验'
: newValue.requestId == 'YJC_xujy' : newValue.requestId == 'YJC_xujy'
? '相序校验' ? '相序校验'
: '' : ''
@@ -462,12 +455,13 @@ watch(
switch (newValue.code) { switch (newValue.code) {
case 25001: case 25001:
case 25005: case 25005:
case 25006:
{ {
let result: CheckData.ScriptChnItem[] = [] let result: CheckData.ScriptChnItem[] = []
let message = JSON.parse(newValue.data) let message = JSON.parse(newValue.data)
// 当收到 25005 消息时录波项目开始loading // 当收到 25005/25006 消息时录波项目开始loading
if (newValue.code == 25005) { if (newValue.code == 25005 || newValue.code == 25006) {
// 设置录波项目为LOADING状态 // 设置录波项目为LOADING状态
const waveResultItem = checkResult.find(item => item.code === 'wave_data') const waveResultItem = checkResult.find(item => item.code === 'wave_data')
@@ -487,7 +481,7 @@ watch(
} }
// 特殊处理录波项目 - 如果是25005消息且当前项目是录波项目则使用已设置的状态 // 特殊处理录波项目 - 如果是25005消息且当前项目是录波项目则使用已设置的状态
if (newValue.code == 25005 && item.code === 'wave_data') { if ((newValue.code == 25005||newValue.code == 25006) && item.code === 'wave_data') {
const existingWaveItem = checkResult.find(checkItem => checkItem.scriptType === 'wave_data') const existingWaveItem = checkResult.find(checkItem => checkItem.scriptType === 'wave_data')
if (existingWaveItem) { if (existingWaveItem) {
temp.devices = [...existingWaveItem.devices] // 保留已设置的devices temp.devices = [...existingWaveItem.devices] // 保留已设置的devices
@@ -536,6 +530,9 @@ watch(
if(newValue.code == 25005){ if(newValue.code == 25005){
setLogList("error", '实时数据校验失败!开始录波校验...') setLogList("error", '实时数据校验失败!开始录波校验...')
} }
if(newValue.code == 25006){
setLogList("error", '统计数据校验失败!开始录波校验...')
}
break break
} }