From 2833e65f575cfdb34d9bbde3c2704e93c77005b1 Mon Sep 17 00:00:00 2001 From: GYYM <704080176@qq.com> Date: Thu, 5 Dec 2024 22:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A3=E5=BC=8F=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E9=A6=96=E5=88=97=E7=9A=84=E6=98=BE=E7=A4=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/components/dataCheckChangeErrSysPopup.vue | 12 +++++++++++- frontend/src/views/home/components/test.vue | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue b/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue index 8fb5f79..1c642ab 100644 --- a/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue +++ b/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue @@ -347,6 +347,7 @@ const handleCancel = () => { activeIndex.value = 0; qualified.value = 0; tableData.value.length = 0; + columnList.value.length = 0; tableData.value = JSON.parse(JSON.stringify(operatorTableData.value)); }; @@ -484,9 +485,16 @@ const testLogList = ref([ log: '暂无数据,等待检测开始', }, ]) - +const columnList = ref([]); const tableKey = ref(0); function tableCell ({row,columnIndex}){ + let items = columnList?.value.filter((item) => item === row.id) + +if(columnIndex === 0 && items.length > 0) +{ + // console.log(row.id,items.length,columnList?.value) + return 'warning-row' +} if(columnIndex === 0) { @@ -532,6 +540,8 @@ function traverseTableData(data: any[], id: string): void { if (getRandomInt(10) > 8 && activeIndex.value > 2) { item[field1] = "danger"; item[field2] = "×"; + columnList.value.push(activeIndex.value.toString()); + console.log(id,activeIndex.value,columnList.value) } else { item[field1] = "success"; diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 696b25a..b44f77b 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -365,7 +365,7 @@ const updateLog = () => { case 10: case 11: case 12: - updateTableData(activeIndex.value.toString()) + // updateTableData(activeIndex.value.toString()) break; } @@ -379,15 +379,15 @@ const testLogList = ref([ }, ]) const columnList = ref([]); + const tableKey = ref(0); function tableCell ({row,columnIndex}){ - let items = columnList?.value.filter((item) => item === row.id) if(columnIndex === 0 && items.length > 0) { - console.log(row.id,columnList?.value,items) + console.log(row.id,items.length,columnList?.value) return 'warning-row' } @@ -440,6 +440,7 @@ function traverseTableData(data: any[],id: string): void { item[field1] = "danger"; item[field2] = "×"; columnList.value.push(activeIndex.value.toString()); + console.log(id,activeIndex.value,columnList.value) } else { @@ -473,7 +474,6 @@ const handleReCheck = () => { let timer: any = ref(""); const handlePauseTest = () => { - if (!isPause.value) { pauseTimer() } else {