selectPeople.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div>
  3. <el-drawer :visible.sync="visible" append-to-body size="50%">
  4. </el-drawer>
  5. <slot name="input"></slot>
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. data () {
  11. return {
  12. visible:false,
  13. param:{
  14. "id": 20230206091703,
  15. "version":1,
  16. "content": {
  17. "where":{
  18. "condition":""
  19. }
  20. }
  21. },
  22. tableData: [],
  23. total:0,
  24. currentPage:0
  25. }
  26. },
  27. methods:{
  28. async listData () {
  29. const res = await this.$api.requested(this.param)
  30. this.tableData = res.data
  31. this.total = res.total
  32. this.currentPage = res.pageNumber
  33. console.log(this.tableData);
  34. },
  35. handleSizeChange(val) {
  36. // console.log(`每页 ${val} 条`);
  37. this.param.content.pageSize = val
  38. this.listData()
  39. },
  40. handleCurrentChange(val) {
  41. // console.log(`当前页: ${val}`);
  42. this.param.content.pageNumber = val
  43. this.listData()
  44. },
  45. selectRow (row) {
  46. this.$emit('selectRow',row)
  47. }
  48. },
  49. created () {
  50. },
  51. }
  52. </script>
  53. <style>
  54. </style>