LiveDetail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <div class="usage-record">
  3. <div class="quota-info">
  4. <span class="quota-info-item">{{ course_name }} - {{ task_name }} - {{ teacher_name }}</span>
  5. </div>
  6. <div class="usage-record-list">
  7. <div class="title">详情列表</div>
  8. <el-table :data="data_list">
  9. <el-table-column prop="live_room_id" label="直播间ID" width="115" />
  10. <el-table-column prop="live_id" label="直播ID" width="115" />
  11. <el-table-column label="类型" width="115">
  12. <template slot-scope="{ row }">
  13. {{ row.online_type === 1 || row.online_type === 0 ? onlineTypeList[row.online_type].label : '' }}
  14. </template>
  15. </el-table-column>
  16. <el-table-column prop="person_count" label="人数" width="115" />
  17. <el-table-column prop="v_duration" label="直播时长" width="115" />
  18. <el-table-column label="连线时长" width="115">
  19. <template slot-scope="{ row }"> {{ row.duration_online }}小时 </template>
  20. </el-table-column>
  21. <el-table-column label="费用" width="115">
  22. <template slot-scope="{ row }">{{ row.money_online }}元</template>
  23. </el-table-column>
  24. <el-table-column prop="begin_time" label="开始时间" width="115" />
  25. <el-table-column prop="end_time" label="结束时间" width="115" />
  26. <el-table-column label="是否分组">
  27. <template slot-scope="{ row }">
  28. {{ row.is_group === 'true' ? '是' : '否' }}
  29. </template>
  30. </el-table-column>
  31. </el-table>
  32. </div>
  33. <el-pagination
  34. background
  35. :page-sizes="[10, 20, 30, 40, 50]"
  36. :page-size="page_capacity"
  37. layout="prev, pager, next, total, sizes, jumper"
  38. :total="total_count"
  39. :current-page="cur_page"
  40. @prev-click="changePage"
  41. @next-click="changePage"
  42. @current-change="changePage"
  43. @size-change="changePageSize"
  44. />
  45. </div>
  46. </template>
  47. <script>
  48. import { onlineTypeList } from './data';
  49. import { PageQueryTaskLiveDetailList } from '@/api/list';
  50. export default {
  51. props: {
  52. orgId: {
  53. type: String,
  54. default: ''
  55. },
  56. taskId: {
  57. type: String,
  58. default: ''
  59. },
  60. orgName: {
  61. type: String,
  62. default: ''
  63. }
  64. },
  65. data() {
  66. return {
  67. teacher_name: '',
  68. course_name: '',
  69. task_name: '',
  70. onlineTypeList,
  71. data_list: [],
  72. page_capacity: 10,
  73. total_count: 0,
  74. cur_page: 1
  75. };
  76. },
  77. created() {
  78. this.pageQueryTaskLiveDetailList();
  79. },
  80. methods: {
  81. pageQueryTaskLiveDetailList() {
  82. PageQueryTaskLiveDetailList({
  83. org_id: this.orgId,
  84. task_id: this.taskId,
  85. page_capacity: this.page_capacity,
  86. cur_page: this.cur_page
  87. }).then(({ total_count, cur_page, teacher_name, course_name, task_name, data_list }) => {
  88. this.total_count = total_count;
  89. this.cur_page = cur_page;
  90. this.teacher_name = teacher_name;
  91. this.course_name = course_name;
  92. this.task_name = task_name;
  93. this.data_list = data_list;
  94. });
  95. },
  96. changePage(newPage) {
  97. this.cur_page = newPage;
  98. this.pageQueryTaskLiveDetailList();
  99. },
  100. changePageSize(pageSize) {
  101. this.page_capacity = pageSize;
  102. this.pageQueryTaskLiveDetailList();
  103. }
  104. }
  105. };
  106. </script>
  107. <style lang="scss" scoped>
  108. @import '~@/styles/mixin';
  109. .usage-record {
  110. @include container;
  111. @include pagination;
  112. .quota-info {
  113. padding-top: 26px;
  114. font-size: 18px;
  115. font-weight: bold;
  116. color: #000;
  117. &-item {
  118. margin-right: 24px;
  119. }
  120. }
  121. &-list {
  122. @include list;
  123. padding: 24px;
  124. .title {
  125. margin-bottom: 16px;
  126. font-weight: bold;
  127. color: #000;
  128. }
  129. ::v-deep .el-table th.el-table__cell {
  130. color: #000;
  131. }
  132. }
  133. }
  134. </style>