| | |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%; margin-bottom: 20px" |
| | | row-key="name" |
| | | row-key="id" |
| | | border |
| | | height="calc(100vh - 250px)" |
| | | default-expand-all |
| | |
| | | // 自定义 |
| | | if (this.isAllSelect) { |
| | | val.forEach((i) => { |
| | | let isExist = false; |
| | | this.deleteList.findIndex((c) => { |
| | | if (c === i.id) { |
| | | isExist = true; |
| | | } |
| | | }); |
| | | if (!isExist && i.id !== undefined) { |
| | | if (i.id !== undefined) { |
| | | this.deleteList.push(i.id); |
| | | } else { |
| | | i.children.forEach((c) => { |
| | | this.deleteList.push(c.id); |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.deleteList.splice(0, this.deleteList.length); |
| | | } |
| | | // 自定义结束 |
| | | }, |
| | | //选择某行 |
| | | selectTr(selection, row) { |