|
|
|
@ -320,7 +320,7 @@
|
|
|
|
|
align="center" |
|
|
|
|
> |
|
|
|
|
<template #default="props"> |
|
|
|
|
<span :id="props.row[item.prop]" :class="props.row[item.prop] == multifunctional && props.row[item.prop]? 'static-class' : ''">{{ |
|
|
|
|
<span :id="props.row[item.prop]" :class="(props.row[item.prop] == multifunctional && props.row[item.prop]) ? 'static-class' : ''">{{ |
|
|
|
|
props.row[item.prop] ? props.row[item.prop] : '/' |
|
|
|
|
}}</span> |
|
|
|
|
</template> |
|
|
|
@ -1912,13 +1912,14 @@ function scrollToElementWithinTableRow(partialIdString) {
|
|
|
|
|
tableRows.forEach(function(row) { |
|
|
|
|
const cells = row.querySelectorAll('[id]'); |
|
|
|
|
cells.forEach(function(cell) { |
|
|
|
|
cell.style.backgroundColor = '#ffffff'; // 移除背景颜色 |
|
|
|
|
cell.style.color = '#000'; // 移除文字颜色 |
|
|
|
|
cell.style.backgroundColor = ''; // 移除背景颜色 |
|
|
|
|
cell.style.color = ''; // 移除文字颜色 |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 将输入的逗号分隔的字符串拆分成数组 |
|
|
|
|
const partialIds = partialIdString.split(',').map(id => id.trim()); |
|
|
|
|
|
|
|
|
|
// 通过遍历每一行来检查是否每一个partialId都存在 |
|
|
|
|
for (let row of tableRows) { |
|
|
|
|
// 检查这一行是否包含所有的partialIds |
|
|
|
@ -1926,9 +1927,10 @@ function scrollToElementWithinTableRow(partialIdString) {
|
|
|
|
|
// 如果匹配,设置背景颜色和文字颜色 |
|
|
|
|
const cells = row.querySelectorAll('[id]'); |
|
|
|
|
cells.forEach(function(cell) { |
|
|
|
|
cell.style.backgroundColor = ''; // 设置背景颜色为红色 |
|
|
|
|
cell.style.color = ''; // 设置文字颜色为白色 |
|
|
|
|
cell.style.backgroundColor = '#ff0000'; // 设置背景颜色为红色 |
|
|
|
|
cell.style.color = '#fff'; // 设置文字颜色为白色 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 将这一行滚动到视野区域 |
|
|
|
|
row.scrollIntoView(); |
|
|
|
|
break; // 匹配到了就跳出循环 |
|
|
|
|