| | |
| | | }, |
| | | //选中行高亮样式 |
| | | rowStyle({ row, rowIndex }) { |
| | | if (this.ids.includes(row.hmainid)) { |
| | | if (this.ids.includes(row.HItemID)) { |
| | | return { background: "#ecf5ff" }; |
| | | } |
| | | }, |
| | |
| | | } |
| | | this.handleEdit(row, this.OperationType); |
| | | }, |
| | | // 多选框选中数据 |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | // this.rowForm = {} |
| | | this.ids = selection.map((item) => item.hmainid); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | if (!this.single) { |
| | | if (this.openPage) { |
| | | //列表单选 |
| | | if (selection.length > 1) { |
| | | const del_row = selection.shift(); |
| | | this.$refs.tableData.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | } |
| | | this.rowForm = {}; |
| | | this.ids = selection.map((item) => item.HItemID); |
| | | this.rowForm = selection[0]; |
| | | } else { |
| | | this.ids = selection.map((item) => item.HItemID); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | if (!this.single) { |
| | | this.rowForm = selection[0]; |
| | | } |
| | | } |
| | | }, |
| | | //打开侧边搜索弹窗 |