| | |
| | | |
| | | ], |
| | | selectedRowKeys: [], |
| | | selectedRows: [], |
| | | selectionRowsNotClear: [], |
| | | oldSelectRows: [], |
| | | scrollTrigger: {}, |
| | |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectedRows |
| | | this.selectionRowsNotClear.push(selectedRows) |
| | | }, |
| | | onSelect: (record, selected, selectedRows) => { |
| | | if (selected) { |
| | | this.selectionRowsNotClear.push(record); |
| | | } |
| | | if (!selected) { |
| | | let delIndex = this.selectionRowsNotClear.findIndex(val => { |
| | | return val.id === record.id |
| | | }) |
| | | this.selectionRowsNotClear.splice(delIndex, 1); |
| | | } |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | |
| | | } |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | selectedRows: this.selectionRows |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | onSelectionChange(selectedRowKeys, selectedRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRows = selectedRows; |
| | | }, |
| | | |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | } |