From d0724cb7f6d495483f7d13e4da64b94ef411fc82 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 6 Aug 2025 15:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/device/interface/device.ts | 1 - .../views/home/components/comparePreTest.vue | 135 ++++--- .../src/views/home/components/compareTest.vue | 237 +++++++++++ .../home/components/compareTestPopup.vue | 6 +- .../home/components/deviceConnectionPopup.vue | 22 + .../home/components/realTimeDataAlign.vue | 375 ++++++++++++++---- frontend/src/views/home/components/table.vue | 19 +- frontend/src/views/home/components/tree.vue | 75 +++- frontend/src/views/home/tabs/dashboard.vue | 19 +- frontend/src/views/machine/device/index.vue | 2 +- .../plan/planList/components/childrenPlan.vue | 10 +- .../plan/planList/components/planPopup.vue | 2 +- 12 files changed, 739 insertions(+), 164 deletions(-) create mode 100644 frontend/src/views/home/components/compareTest.vue diff --git a/frontend/src/api/device/interface/device.ts b/frontend/src/api/device/interface/device.ts index f5bf32e..7d3132e 100644 --- a/frontend/src/api/device/interface/device.ts +++ b/frontend/src/api/device/interface/device.ts @@ -1,4 +1,3 @@ -import { getPqDevById } from './../device/index'; import type {ReqPage, ResPage} from '@/api/interface' import type { Monitor } from './monitor'; diff --git a/frontend/src/views/home/components/comparePreTest.vue b/frontend/src/views/home/components/comparePreTest.vue index 81cdf77..005743d 100644 --- a/frontend/src/views/home/components/comparePreTest.vue +++ b/frontend/src/views/home/components/comparePreTest.vue @@ -195,7 +195,6 @@ watch(webMsgSend, function (newValue, oldValue) { if (testStatus.value !== 'waiting') { switch (newValue.requestId) { case 'yjc_sbtxjy': - switch (newValue.operateCode) { case 'INIT_GATHER$01': if (newValue.code == 10200) { @@ -238,11 +237,10 @@ watch(webMsgSend, function (newValue, oldValue) { } else if (newValue.code == 25001) { activeIndex.value = 1 step1.value = 'success' - step3.value = 'process' + step2.value = 'process' } break; } - break; case 'yjc_xyjy': switch (newValue.operateCode) { @@ -268,75 +266,75 @@ watch(webMsgSend, function (newValue, oldValue) { // ts.value = 'error' // step5.value = 'error' } else if (newValue.code == 10551) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: newValue.data + '设备触发报告异常!', }) - step3.value = 'error' + step2.value = 'error' ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } else if (newValue.code == 10552) { - step3.value = 'error' + step2.value = 'error' //ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!") - step3InitLog.value = [{ + step2InitLog.value = [{ type: 'wait', log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!', }]; ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } break; case 'INIT_GATHER$02': if (newValue.code == 10200) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'info', log: '实时数据协议校验:' + newValue.data + '通讯协议校验成功!', }) } else if (newValue.code == 10201) { - step3.value = 'process' - step3InitLog.value = [{ + step2.value = 'process' + step2InitLog.value = [{ type: 'wait', log: '正在进行通讯协议校验.....', }]; } else if (newValue.code == 10550) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: newValue.data + '设备连接异常!', }) - step3.value = 'error' + step2.value = 'error' // ts.value = 'error' // step5.value = 'error' } else if (newValue.code == 10551) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: newValue.data + '设备触发报告异常!', }) - step3.value = 'error' + step2.value = 'error' ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } else if (newValue.code == 10552) { - step3.value = 'error' + step2.value = 'error' //ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!") - step3InitLog.value = [{ + step2InitLog.value = [{ type: 'wait', log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!', }]; ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } break; case 'INIT_GATHER$03': if (newValue.code == 10200) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'info', log: '暂态数据协议校验:' + newValue.data + '通讯协议校验成功!', }) } else if (newValue.code == 10201) { - step3.value = 'process' + step2.value = 'process' } else if (newValue.code == 10550) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: newValue.data + '设备连接异常!', }) @@ -344,122 +342,143 @@ watch(webMsgSend, function (newValue, oldValue) { // ts.value = 'error' // step5.value = 'error' } else if (newValue.code == 10551) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: newValue.data + '设备触发报告异常!', }) - step3.value = 'error' + step2.value = 'error' ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } else if (newValue.code == 10552) { //ElMessage.error("当前步骤已经初始化,执行自动关闭,请重新发起检测!") - step3.value = 'error' - step3InitLog.value = [{ + step2.value = 'error' + step2InitLog.value = [{ type: 'wait', log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!', }]; ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } break; case 'VERIFY_MAPPING$01': if (newValue.code == 25001) { - activeIndex.value = 3 - step3.value = 'success' - step4.value = 'process' + activeIndex.value = 2 + step2.value = 'success' + step3.value = 'process' } else if (newValue.code == 10200) { let data = JSON.parse(newValue.data) - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: `脚本与icd检验失败! icd名称:${data['icdType']} -> 校验项:${data['dataType']}`, }) - step3.value = 'error' + step2.value = 'error' ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } else if (newValue.code == 10500) { - step3InitLog.value.push({ + step2InitLog.value.push({ type: 'error', log: `装置中未找到该icd!`, }) - step3.value = 'error' + step2.value = 'error' ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } break; } break; + case 'YJC_mxyzxjy': + switch (newValue.operateCode){ + case 'DATA_REQUEST$02': + if (newValue.code == 10200) { + step3InitLog.value.push({ + type: 'info', + log: '模型一致性检验成功!', + }) + } + if (newValue.code == 25001) { + step3.value = 'success' + step4.value = 'process' + activeIndex.value = 3 + }else if (newValue.code == 25004) { + step3.value = 'error' + } + break; + } + break; + case 'YJC_sssjdqjy': + switch (newValue.operateCode){ + case 'OPER_GATHER': + break; + } + break; case 'YJC_xujy': switch (newValue.operateCode) { case 'OPER_GATHER': if (newValue.code == 10200) { - step4InitLog.value.push({ + step5InitLog.value.push({ type: 'info', log: '源参数下发成功,等待校验中.....', }) } else if (newValue.code == 10201) { - step4.value = 'process' - step4InitLog.value = [{ + step5.value = 'process' + step5InitLog.value = [{ type: 'wait', log: '源参数下发中.....', }]; } else if (newValue.code == 10552) { ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!") - step4.value = 'error' - ts.value = 'error' step5.value = 'error' + ts.value = 'error' + step6.value = 'error' } else if (newValue.code == 10520) { - step4.value = 'error' - step4InitLog.value.push({ + step5.value = 'error' + step5InitLog.value.push({ type: 'error', log: '解析报文异常', }) ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } break; - case 'DATA_REQUEST$02': if (newValue.code == 10200) { let type = 'info' if (newValue.data.includes('不合格')) { type = 'error' } - newValue.data.split('
') - step4InitLog.value.push({ + step5InitLog.value.push({ type: type, log: newValue.data, }) } else if (newValue.code == 10201) { - step4.value = 'process' - step4InitLog.value = [{ + step5.value = 'process' + step5InitLog.value = [{ type: 'wait', log: '获取数据相序校验数据!', }]; } else if (newValue.code == 25003) { - step4.value = 'error' - step4InitLog.value.push({ + step5.value = 'error' + step5InitLog.value.push({ type: 'error', log: '相序校验未通过!', }) ts.value = 'error' - step5.value = 'error' + step6.value = 'error' } else if (newValue.code == 25001) { - step4.value = 'success' step5.value = 'success' - step4InitLog.value.push({ + step6.value = 'success' + step5InitLog.value.push({ type: 'wait', log: '相序校验成功!', }) ts.value = 'success' } activeIndex.value = 5 - console.log("@@@@", ts.value) break } - break; case 'quit': break; diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue new file mode 100644 index 0000000..fc01889 --- /dev/null +++ b/frontend/src/views/home/components/compareTest.vue @@ -0,0 +1,237 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/src/views/home/components/compareTestPopup.vue b/frontend/src/views/home/components/compareTestPopup.vue index 2d3e745..8d87155 100644 --- a/frontend/src/views/home/components/compareTestPopup.vue +++ b/frontend/src/views/home/components/compareTestPopup.vue @@ -12,10 +12,8 @@ - -