diff --git a/src/views/weightManage/index.vue b/src/views/weightManage/index.vue index 2858395..3bfb918 100644 --- a/src/views/weightManage/index.vue +++ b/src/views/weightManage/index.vue @@ -762,7 +762,7 @@ const handleNext = async () => { Message.error('请先扫描物料编码') return } - + // 调用后端接口获取比对结果 vmSend(materialCode).then((res) => { if (res.code === '0') { @@ -782,17 +782,12 @@ const handleNext = async () => { Message.error('比对失败,请重试') } } else { - activeStep.value++ - // 进入称重页面时建立WebSocket连接 - if (activeStep.value === 2) { - establishWebSocket() - // 离开扫码核验页面时,清除图片刷新定时器 - if (imageRefreshTimer) { - clearInterval(imageRefreshTimer) - imageRefreshTimer = null - } - } - } + activeStep.value++ + // 进入称重页面时建立WebSocket连接 + if (activeStep.value === 2) { + establishWebSocket() + } + } } } @@ -806,10 +801,6 @@ const handlePrevious = () => { if (activeStep.value !== 2) { closeWebSocket() } - // 进入扫码核验页面时,启动图片自动刷新 - if (activeStep.value === 1) { - startImageRefresh() - } } } @@ -1054,10 +1045,10 @@ const closeWebSocket = () => { onUnmounted(() => { closeWebSocket() // 清除图片刷新定时器 - if (imageRefreshTimer) { - clearInterval(imageRefreshTimer) - imageRefreshTimer = null - } + // if (imageRefreshTimer) { + // clearInterval(imageRefreshTimer) + // imageRefreshTimer = null + // } })