From b0a5329937a17b00545b4b4a669da7175665efbb Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 7 Jan 2025 17:44:25 +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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 7b8b6c2..5c91dc2 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -745,8 +745,25 @@ const updateLog = (isStart: boolean) => { // } // } +const setErrorCheckItem = (scriptType: string, devices: any) => { + let flag = true + for (let i = 0; i < devices.length; i++) { + for (let j = 0; j < devices[i].chnResult.length; j++) { + if (devices[i].chnResult[j] === CheckData.ChnCheckResultEnum.FAIL) { + flag = false + break + } + } + if (!flag) { + errorCheckItem.push({scriptType, type: 'error'}) + break + } + } +} + const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: any = null) => { let scriptType = scriptData.filter(item => item.code === scriptCode)[0]?.id + setErrorCheckItem(scriptType, devices) let temp = null if (isStart) { temp = getLoadingResult(scriptType)