| | |
| | | <selectProduct ref="selectProduct" @success="handlePageChange" @result="search"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | |
| | | this.getcategory() |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(e) { |
| | | let arr = e.map(item => item.id) |
| | | this.ids = arr.join(',') |
| | | console.log(this.ids) |
| | | }, |
| | | // handleSelectionChange(e) { |
| | | // let arr = e.map(item => item.id) |
| | | // this.ids = arr.join(',') |
| | | // console.log(this.ids) |
| | | // }, |
| | | // 批量上下架 |
| | | bulkOperation(type) { |
| | | if (!this.ids) { |
| | | if (this.tableData.selectedRows.length === 0) { |
| | | // if (!this.ids) { |
| | | this.$message.warning({ message: '至少选择一项内容' }) |
| | | return |
| | | } |
| | | const idList = this.tableData.selectedRows.map(item => item.id) |
| | | batchUpdateDisableById({ |
| | | ids: this.ids, |
| | | ids: idList.join(','), |
| | | status: type |
| | | }).then(res => { |
| | | this.$message.success({ message: res }) |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |