{
SearchFu();
};
-
+const PackSearchFu=()=>{
+ if (PackInpiut.value) {
+ scrollToElementWithinTableRow(PackInpiut.value);
+ } else {
+ document.querySelectorAll('[id]').forEach(function (el) {
+ el.style.backgroundColor = ''; // 移除背景颜色
+ el.style.color = ''; // 移除文字颜色
+ });
+ }
+}
function scrollToElementWithinTableRow(partialIdString) {
+ console.log(partialIdString,'partialIdString');
+
// 清空之前的样式
const tableRows = document.querySelectorAll('tr');
tableRows.forEach(function(row) {
@@ -2326,8 +2350,9 @@ function scrollToElementWithinTableRow(partialIdString) {
let allIdsFound = partialIds.every(partialId => {
return Array.from(row.querySelectorAll('[id]')).some(cell => cell.id.includes(partialId));
});
-
- if (allIdsFound) {
+ if (allIdsFound) {
+ console.log(row,'row');
+
// 行包含所有partialIds, 则高亮显示并滚动到该行
const cells = row.querySelectorAll('[id]');
cells.forEach(function(cell) {
@@ -2344,7 +2369,6 @@ function scrollToElementWithinTableRow(partialIdString) {
// 编辑多功能搜索
const SearchFu = () => {
console.log(multifunctional.value, '搜索的参数值');
-
if (multifunctional.value) {
scrollToElementWithinTableRow(multifunctional.value);
} else {
@@ -2353,9 +2377,7 @@ const SearchFu = () => {
el.style.color = ''; // 移除文字颜色
});
}
-
return;
-
// console.log(dataInfo.value, '搜索结果');
};
@@ -3844,6 +3866,8 @@ sjInput.value=''
color: #fff;
}
.el_package {
+ display: flex;
+ justify-content: flex-end;
:deep(.el-form) {
justify-content: flex-start !important;
}