BugList.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <div class="content">
  3. <button @click="showRightForm">from test</button>
  4. <div></div>
  5. <List
  6. :listData="bugData"
  7. :total="300"
  8. :is-show-checkbox="isShowCheckbox" @current-change="handleCurrentChange">
  9. </List>
  10. <RightForm ref="rightForm">
  11. </RightForm>
  12. </div>
  13. </template>
  14. <script>
  15. import RightForm from '../../components/RightForm.vue';
  16. import List from '../../components/List.vue';
  17. export default {
  18. components: { RightForm, List },
  19. data() {
  20. return {
  21. bugData: [
  22. {
  23. projectCode: 'EXAMPLE-123',
  24. title: 'bug1',
  25. assignment: '经办人1',
  26. status: '进行中',
  27. },
  28. {
  29. projectCode: 'EXAMPLE-124',
  30. title: 'bug2',
  31. assignment: '经办人2',
  32. status: '进行中',
  33. },
  34. {
  35. projectCode: 'EXAMPLE-123',
  36. title: 'bug1',
  37. assignment: '经办人1',
  38. status: '进行中',
  39. },
  40. {
  41. projectCode: 'EXAMPLE-124',
  42. title: 'bug2',
  43. assignment: '经办人2',
  44. status: '进行中',
  45. },
  46. {
  47. projectCode: 'EXAMPLE-123',
  48. title: 'bug1',
  49. assignment: '经办人1',
  50. status: '进行中',
  51. },
  52. {
  53. projectCode: 'EXAMPLE-124',
  54. title: 'bug2',
  55. assignment: '经办人2',
  56. status: '进行中',
  57. },
  58. {
  59. projectCode: 'EXAMPLE-123',
  60. title: 'bug1',
  61. assignment: '经办人1',
  62. status: '进行中',
  63. },
  64. {
  65. projectCode: 'EXAMPLE-124',
  66. title: 'bug2',
  67. assignment: '经办人2',
  68. status: '进行中',
  69. }],
  70. isShowCheckbox: true,
  71. };
  72. },
  73. methods: {
  74. /**
  75. * @param filterObject 用于数据获取请求的参数对象
  76. * @param currentPage 当前页数
  77. */
  78. getBugData(filterObject, currentPage) {
  79. console.log('getBugData');
  80. },
  81. showRightForm() {
  82. console.log(this.$refs.rightForm);
  83. this.$refs.rightForm.showForm();
  84. },
  85. handleCurrentChange(currentPage) {
  86. this.getBugData({}, currentPage);
  87. },
  88. },
  89. };
  90. </script>
  91. <style scoped>
  92. </style>