修改正式检测首列的显示样式

This commit is contained in:
GYYM
2024-12-05 22:15:12 +08:00
parent 5a29403636
commit 2833e65f57
2 changed files with 15 additions and 5 deletions

View File

@@ -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";

View File

@@ -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 {