| | |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :rowSelection='rowSelection' |
| | | :loading='loading' |
| | | @change='handleTableChange' |
| | | :rowSelection='rowSelection' |
| | | > |
| | | |
| | | </a-table> |
| | |
| | | |
| | | ], |
| | | selectedRowKeys: [], |
| | | selectionRowsNotClear: [], |
| | | oldSelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | this.selectionRows = selectedRows |
| | | this.selectionRowsNotClear.push(selectedRows) |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | } |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | selectedRows: this.selectionRows |
| | | } |
| | | } |
| | | }, |
| | |
| | | |
| | | showModals(oldSelectRows) { |
| | | this.selectionRows = [] |
| | | this.selectedRowKeys = [] |
| | | this.selectionRowsNotClear = [] |
| | | this.oldSelectRows = oldSelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO 筛选 |
| | | |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | this.$bus.$emit('selectionRows', this.selectionRows) |
| | | this.$bus.$emit('selectionRows', this.selectionRowsNotClear) |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |