index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div class="white pa-3">
  3. <m-search :items="searchItems" v-model="searchValues" class="mb-3"></m-search>
  4. <m-table
  5. :items="items"
  6. :headers="headers"
  7. :loading="loading"
  8. :total="total"
  9. :page-size="pageInfo.size"
  10. :page-current="pageInfo.current"
  11. @page-change="onPageChange"
  12. ></m-table>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. name: 'salary-comparison',
  18. data () {
  19. return {
  20. searchItems: [
  21. { label: '姓名', prop: 'name', type: 'input' },
  22. { label: '部门', prop: 'department', type: 'input' },
  23. { label: '岗位', prop: 'post', type: 'input' },
  24. { label: '月份', prop: 'month', type: 'month' }
  25. ],
  26. searchValues: {},
  27. headers: [
  28. { label: '姓名', prop: 'name' },
  29. { label: '部门', prop: 'department' },
  30. { label: '岗位', prop: 'post' },
  31. { label: '月份', prop: 'month' },
  32. { label: '操作', prop: 'action', align: 'center', width: 100 }
  33. ],
  34. items: [
  35. ],
  36. loading: false,
  37. total: 0,
  38. pageInfo: {
  39. current: 1,
  40. size: 10
  41. }
  42. }
  43. },
  44. methods: {
  45. async init () {
  46. },
  47. onPageChange (page) {
  48. this.pageInfo.current = page
  49. this.init()
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. </style>