| | |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="superviseColumnData" :handleSelectionChange="handleSelectionChange" |
| | | :height="'calc(100vh - 19em)'" :isSelection="true" :table-data="superviseTableData" |
| | | :height="'calc(100vh - 20em)'" :isSelection="true" :table-data="superviseTableData" |
| | | :table-loading="superviseLoading" rowKey="id" style="margin-top: 18px; padding: 0 15px;" |
| | | :page="page" @pagination="pagination"> |
| | | <div slot="action" slot-scope="scope"> |
| | |
| | | loading: false, |
| | | page: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | // 监督记录 |
| | |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.pageSize = limit; |
| | | this.page.size = limit; |
| | | this.getTableData(); |
| | | }, |
| | | // 获取监督记录 |
| | |
| | | departLimsId: this.isDepartment ? this.departId : null, |
| | | userId: this.isDepartment ? null : this.departId, |
| | | current: this.page.current, |
| | | size: this.page.pageSize |
| | | size: this.page.size |
| | | }) |
| | | if (code == 200) { |
| | | this.superviseTableData = data.records |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | .then(async () => { |
| | | console.log(this.multipleSelection) |
| | | let ids = this.multipleSelection.map((item) => item.id) |
| | | const code = this.delTableData(ids) |
| | | let ids = this.multipleSelection.map((item) => item.id).join(',') |
| | | const code = await this.delTableData(ids) |
| | | this.$message({ |
| | | type: code == 200 ? 'success' : 'error', |
| | | message: code == 200 ? '删除成功!' : '删除失败!' |
| | |
| | | }, |
| | | // 删除api |
| | | async delTableData(ids) { |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: deletePersonSupervisionRecord, |
| | | data: ids |
| | | }) |
| | | const { code } = await deletePersonSupervisionRecord({ ids }) |
| | | return code |
| | | }, |
| | | // 行背景色 |