function delBlueRow() {
const table = document.querySelector(
"#app > div > div > div.right > div.main > div > div > div:nth-child(2) > div > div.el-table__body-wrapper.is-scrolling-none > table"
);
const rows = table.querySelectorAll("tbody .el-table__row");
for (const row of rows) {
const tds = row.querySelectorAll("td");
const tagTd = tds[6];
const delTd = tds[10];
const text = tagTd.querySelector("span").textContent;
if (text && text.startsWith("蓝色")) {
const delParent = delTd.querySelector(".cell");
const delBtn = delParent.lastChild;
delBtn.click();
setTimeout(() => {
const confirmBtn = document.querySelector(
"body > div.el-message-box__wrapper > div > div.el-message-box__btns > button.el-button.el-button--primary"
);
confirmBtn.click();
}, 0);
break;
}
}
}
setInterval(delBlueRow, 2000);
网友评论