liveClassDetail.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <el-page-header @back="onCancel" content="直播详情"></el-page-header>
  5. </h2>
  6. <div class="m-core">
  7. <div class="titleWrap">
  8. <h2 class="squrtTitle">
  9. <div class="squrt"></div>
  10. 直播数据
  11. </h2>
  12. <el-row class="row">
  13. <p class="teacherName">主讲人:<span>唐老师</span></p>
  14. <p class="teacherName sub">主题:<span>2022大师直播第五期</span></p>
  15. <el-button type="text" class="fontBtn">直播回放 <i class="el-icon-video-play"></i></el-button>
  16. </el-row>
  17. <p class="liveRemark">
  18. 直播内容:<span>如何在校管乐团中锻炼孩子的自我管理及团队协作意识</span>
  19. </p>
  20. </div>
  21. <div class="infoWrap">
  22. <statistic class="statistic" :cols="0">
  23. <statistic-item>
  24. <span> 参与学员 </span>
  25. <span>1736</span>
  26. </statistic-item>
  27. <statistic-item>
  28. <span> 累计点赞 </span>
  29. <span>1736</span>
  30. </statistic-item>
  31. <statistic-item>
  32. <span> 直播时长(分钟) </span>
  33. <span>60</span>
  34. </statistic-item>
  35. </statistic>
  36. </div>
  37. <save-form
  38. :inline="true"
  39. :model="searchForm"
  40. @submit="search"
  41. @reset="onReSet"
  42. >
  43. <el-form-item>
  44. <el-input
  45. v-model.trim="searchForm.search"
  46. clearable
  47. @keyup.enter.native="search"
  48. placeholder="直播间编号/标题"
  49. ></el-input>
  50. </el-form-item>
  51. <el-form-item>
  52. <el-button native-type="submit" type="primary">搜索</el-button>
  53. <el-button native-type="reset" type="danger">重置</el-button>
  54. </el-form-item>
  55. </save-form>
  56. <div class="tableWrap">
  57. <el-table
  58. style="width: 100%"
  59. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  60. :data="tableList"
  61. >
  62. <el-table-column
  63. align="center"
  64. prop="studentId"
  65. label="学员编号"
  66. ></el-table-column>
  67. <el-table-column
  68. align="center"
  69. prop="studentId"
  70. label="学员姓名"
  71. ></el-table-column>
  72. <el-table-column
  73. align="center"
  74. prop="studentId"
  75. label="手机号"
  76. ></el-table-column>
  77. <el-table-column
  78. align="center"
  79. prop="studentId"
  80. label="声部"
  81. ></el-table-column>
  82. <el-table-column
  83. align="center"
  84. prop="studentId"
  85. label="进入时间"
  86. ></el-table-column>
  87. <el-table-column
  88. align="center"
  89. prop="studentId"
  90. label="观看时长"
  91. ></el-table-column>
  92. </el-table>
  93. <pagination
  94. sync
  95. :total.sync="rules.total"
  96. :page.sync="rules.page"
  97. :limit.sync="rules.limit"
  98. :page-sizes="rules.page_size"
  99. @pagination="getList"
  100. />
  101. </div>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. import pagination from "@/components/Pagination/index";
  107. import {getLiveBroadcastRoomList} from './api'
  108. export default {
  109. components: { pagination },
  110. data() {
  111. return {
  112. searchForm: {},
  113. tableList: [],
  114. rules: {
  115. // 分页规则
  116. limit: 10, // 限制显示条数
  117. page: 1, // 当前页
  118. total: 0, // 总条数
  119. page_size: [10, 20, 40, 50], // 选择限制显示条数
  120. },
  121. };
  122. },
  123. mounted() {
  124. this.getList()
  125. },
  126. methods: {
  127. onCancel() {
  128. this.$router.push('/liveClassManager')
  129. this.$store.dispatch("delVisitedViews", this.$route);
  130. },
  131. search() {},
  132. onReSet() {},
  133. async getList() {
  134. try{
  135. let obj = {rows:this.rules.limit,page:this.rules.page,roomUid:this.$route.query.roomUid,}
  136. console.log(obj)
  137. const res = await getLiveBroadcastRoomList(obj)
  138. this.tableList = res.data.rows
  139. this.rules.total = res.data.total;
  140. }catch(e){
  141. console.log(e)
  142. }
  143. },
  144. },
  145. };
  146. </script>
  147. <style lang="scss" scoped>
  148. .infoWrap {
  149. // width: 500px;
  150. }
  151. .sub.teacherName {
  152. margin-right: 10px;
  153. }
  154. .fontBtn {
  155. font-size: 18px;
  156. }
  157. .teacherName,
  158. .liveRemark {
  159. font-size: 16px;
  160. color: #222325;
  161. line-height: 30px;
  162. font-weight: 600;
  163. margin-right: 60px;
  164. span {
  165. color: #666666;
  166. font-weight: 400;
  167. }
  168. }
  169. .titleWrap {
  170. position: relative;
  171. // display: flex;
  172. // flex-direction: row;
  173. // align-items: center;
  174. padding: 5px;
  175. h2 {
  176. margin-right: 10px;
  177. }
  178. .squrtTitle {
  179. position: relative;
  180. font-size: 18px;
  181. font-family: PingFangSC-Medium, PingFang SC;
  182. font-weight: 600;
  183. color: #222325;
  184. line-height: 25px;
  185. margin-bottom: 25px;
  186. .squrt {
  187. position: absolute;
  188. left: -12px;
  189. top: 5px;
  190. width: 3px;
  191. height: 16px;
  192. background-color: var(--color-primary);
  193. }
  194. }
  195. .row {
  196. display: flex;
  197. flex-direction: row;
  198. align-items: center;
  199. }
  200. }
  201. .statistic .statistic-content > span {
  202. font-size: 16px;
  203. }
  204. </style>