| | |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | //将当前选中的记录传到子页面 |
| | | this.$bus.$emit('getToolingStorageData', record) |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | //点击当前行变色 |
| | | let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | if (oldList) { |
| | | for (let j = 0; j < oldList.length; j++) { |
| | | oldList[j].classList.remove('checked-td-of-add-table') |
| | | } |
| | | } |
| | | let children = e.target.parentNode.children |
| | | for (let i = 0; i < children.length; i++) { |
| | | children[i].classList.add('checked-td-of-add-table') |
| | | } |
| | | // let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | // if (oldList) { |
| | | // for (let j = 0; j < oldList.length; j++) { |
| | | // oldList[j].classList.remove('checked-td-of-add-table') |
| | | // } |
| | | // } |
| | | // let children = e.target.parentNode.children |
| | | // for (let i = 0; i < children.length; i++) { |
| | | // children[i].classList.add('checked-td-of-add-table') |
| | | // } |
| | | }, |
| | | }, |
| | | } |
| | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | //将当前选中的记录传到子页面 |
| | | this.$bus.$emit('getToolingStorageData', this.selectionRows[0]) |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record) |