From 19035f2dc966dfc1ef7e77debbda58488788e3d8 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 25 Feb 2025 15:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/home/components/test.vue | 60 +++++++++---------- .../src/views/home/components/testPopup.vue | 4 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 399f325..7e8b44b 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -333,7 +333,7 @@ watch(testStatus, function (newValue, oldValue) { handleReCheck() } emit('update:testStatus', 'test_init') - //startTimer() // todo 可移除 + startTimer() // todo 可移除 startData.value = new Date(); timeDifference.value = 0; testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`}) @@ -473,25 +473,25 @@ watch(webMsgSend, function (newValue, oldValue) { break; } break; - case 'connect': - switch (newValue.operateCode) { - case "Source": - ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', { - confirmButtonText: '确定', - type: 'error', - }) - testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`}) - break; - case "Dev": - ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', { - confirmButtonText: '确定', - type: 'error', - }) - testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`}) - break; - } - emit('update:testStatus', 'test_init_fail') - break; + // case 'connect': + // switch (newValue.operateCode) { + // case "Source": + // ElMessageBox.alert('源通讯失败,请检查源连接情况!', '初始化失败', { + // confirmButtonText: '确定', + // type: 'error', + // }) + // testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:源通讯失败!`}) + // break; + // case "Dev": + // ElMessageBox.alert('设备通讯失败,请检查设备连接情况!', '初始化失败', { + // confirmButtonText: '确定', + // type: 'error', + // }) + // testLogList.push({type: 'error', log: `${new Date().toLocaleString()}:设备通讯失败!`}) + // break; + // } + // emit('update:testStatus', 'test_init_fail') + // break; case 'yjc_ytxjy': switch (newValue.operateCode) { case 'INIT_GATHER': @@ -532,7 +532,7 @@ watch(webMsgSend, function (newValue, oldValue) { activeIndex = getNextActiveIndex() + 2 - //startTimer() + startTimer() emit('update:testStatus', 'process') } @@ -657,7 +657,7 @@ const handleEndItem = (code: string, desc: string | undefined, devices: CheckDat updateLog(false) if (testStatus.value != 'paused') { activeIndex = getNextActiveIndex(code) - //startTimer() + startTimer() } } else { let result = getResult(devices) @@ -938,12 +938,12 @@ function getErrorCheckItem(scriptType: string) { const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: CheckData.DeviceCheckResult[] = []) => { let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id - // devices = [ - // { - // chnResult: [1, 1, 1, 1], - // deviceId: "3250a0ff180845cc8885da4ff628261e", - // deviceName: "测试装置-0122-02" - // }, + devices = [ + { + chnResult: [1, 1, 1, 1], + deviceId: "3250a0ff180845cc8885da4ff628261e", + deviceName: "测试装置-0122-02" + }, // { // chnResult: [1, 1, 1, 1], // deviceId: "df23a4178d194467a432ddf45e835e48", @@ -959,7 +959,7 @@ const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: Ch // deviceId: "461813a4f30f4a34a1a273ecd0379458", // deviceName: "25011407" // } - // ] + ] let temp = null if (isStart) { temp = getLoadingResult(scriptType) @@ -1340,7 +1340,7 @@ const handleResumeTest = () => { type: 'info', log: `${new Date().toLocaleString()}:继续检测`, }) - //startTimer() + startTimer() resumeTimeCount() console.log('开始继续检测') }; diff --git a/frontend/src/views/home/components/testPopup.vue b/frontend/src/views/home/components/testPopup.vue index c64b777..8d8a8c1 100644 --- a/frontend/src/views/home/components/testPopup.vue +++ b/frontend/src/views/home/components/testPopup.vue @@ -20,7 +20,7 @@