|
|
@ -45,16 +45,33 @@ function RightMenuContainer() { |
|
|
|
setEndDate(payload.endDate); |
|
|
|
setEndDate(payload.endDate); |
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
// case 'handlerSearchRs':
|
|
|
|
case 'matchingRow': |
|
|
|
// console.log(payload.filter);
|
|
|
|
handlerMatchingRow(payload.selected, payload.targetValue); |
|
|
|
// setFilter(payload.filter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return;
|
|
|
|
return; |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handlerMatchingRow = (selected, targetValue) => { |
|
|
|
|
|
|
|
setSelected([selected]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const rows = document.getElementsByClassName('ant-table-row'); |
|
|
|
|
|
|
|
const matchingRow = Array.from(rows).find(row => { |
|
|
|
|
|
|
|
const rowKey = row.getAttribute('data-row-key'); |
|
|
|
|
|
|
|
return rowKey.startsWith(targetValue); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (matchingRow) { |
|
|
|
|
|
|
|
matchingRow.scrollIntoView({ |
|
|
|
|
|
|
|
behavior: 'smooth', |
|
|
|
|
|
|
|
block: 'center', |
|
|
|
|
|
|
|
inline: 'nearest' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handlerOpnerPostMessage = (type, payload) => { |
|
|
|
const handlerOpnerPostMessage = (type, payload) => { |
|
|
|
switch (type) { |
|
|
|
switch (type) { |
|
|
|
case 'initalState': |
|
|
|
case 'initalState': |
|
|
|