From b614767b2d56bf01883f5b825dd7414d985c008f Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Fri, 10 Jan 2025 11:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=A3=85=E7=BD=AE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/home/components/testPopup.vue | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/frontend/src/views/home/components/testPopup.vue b/frontend/src/views/home/components/testPopup.vue index 2e630ed..f320577 100644 --- a/frontend/src/views/home/components/testPopup.vue +++ b/frontend/src/views/home/components/testPopup.vue @@ -240,7 +240,7 @@ const handleSubmit = () => { switch (stepsActiveIndex.value) { case 0: - preTestStatus.value = 'start' + // preTestStatus.value = 'start' /* loading = ElLoading.service({ @@ -254,8 +254,16 @@ const handleSubmit = () => { planId: planId, operateType: '1' // '1'为预检测、‘2‘为正式检测 }).then(res => { - - + if (res.code === 'A001014') { + ElMessageBox.alert('装置配置异常', '检测失败', { + confirmButtonText: '确定', + type: 'error', + }) + TestStatus.value = 'error' + } + if (res.code === 'A0000') { + preTestStatus.value = 'start' + } }) break; case 1: @@ -273,6 +281,16 @@ const handleSubmit = () => { operateType: '2' // '1'为预检测、‘2‘为正式检测 }).then(res => { console.log(res) + if (res.code === 'A001014') { + ElMessageBox.alert('装置配置异常', '初始化失败', { + confirmButtonText: '确定', + type: 'error', + }) + TestStatus.value = 'test_init_fail' + } + if (res.code === 'A0000') { + TestStatus.value = 'start' + } /* if (res.code === 20000) { TestStatus.value = 'start' webMsgSend.value = '' @@ -280,7 +298,6 @@ const handleSubmit = () => { ElMessage.error(res.message) }*/ }) - TestStatus.value = 'start' } else // if (TestStatus.value == 'process') { // // 发送暂停指令 @@ -408,14 +425,17 @@ const sendReCheck = () => { operateType: '2' // 0:'系数校验','1'为预检测、‘2‘为正式检测 }).then(res => { console.log(res) - /* if (res.code === 20000) { - TestStatus.value = 'start' - webMsgSend.value = '' - } else { - ElMessage.error(res.message) - }*/ + if (res.code === 'A001014') { + ElMessageBox.alert('装置配置异常', '初始化失败', { + confirmButtonText: '确定', + type: 'error', + }) + TestStatus.value = 'test_init_fail' + } + if (res.code === 'A0000') { + TestStatus.value = 'start' + } }) - TestStatus.value = 'start' } const getIcon = (index: number) => {