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

View File

@@ -394,31 +394,24 @@ watch(
setLogList('error', '设备主动关闭连接!') setLogList('error', '设备主动关闭连接!')
stopTimeCount() stopTimeCount()
break break
case 'yjc_xyjy' : case 'yjc_xyjy' :
switch (newValue.operateCode) { if (newValue.code == 10552) {
ElMessageBox.alert('重复的初始化操作!', '检测失败', {
case 'INIT_GATHER$03': confirmButtonText: '确定',
if (newValue.code == 10552) { type: 'error',
ElMessageBox.alert('重复的初始化操作!', '检测失败', { })
confirmButtonText: '确定', setLogList('error', '重复的初始化操作!')
type: 'error', stopTimeCount()
}) }
setLogList('error', '重复的初始化操作!') break;
stopTimeCount()
}
}
break;
case 'yjc_sbtxjy' : case 'yjc_sbtxjy' :
switch (newValue.operateCode) { ElMessageBox.alert('重复的初始化操作!', '检测失败', {
case 'INIT_GATHER$02': confirmButtonText: '确定',
ElMessageBox.alert('重复的初始化操作!', '检测失败', { type: 'error',
confirmButtonText: '确定', })
type: 'error', setLogList('error', '重复的初始化操作!')
}) stopTimeCount()
setLogList('error', '重复的初始化操作!') break;
stopTimeCount()
}
break;
} }
if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') { if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') {
if (testLogList[0].log == '正在检测,请稍等...' || testLogList[0].log == '暂无数据,等待检测开始') { if (testLogList[0].log == '正在检测,请稍等...' || testLogList[0].log == '暂无数据,等待检测开始') {
@@ -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
} }