| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- <template>
- <div class="m-container">
- <h2>
- <el-page-header @back="onCancel" content="直播详情"></el-page-header>
- </h2>
- <div class="m-core">
- <div class="titleWrap">
- <h2 class="squrtTitle">
- <div class="squrt"></div>
- 直播数据
- </h2>
- <el-row class="row">
- <p class="teacherName">
- 主讲人:<span>{{ detail.speakerName }}</span>
- </p>
- <p class="teacherName sub">
- 主题:<span>{{ detail.roomTitle }}</span>
- </p>
- <el-button type="text" class="fontBtn"
- >直播回放 <i class="el-icon-video-play"></i
- ></el-button>
- </el-row>
- <p class="liveRemark">
- 直播内容:<span>{{ detail.liveRemark }}</span>
- </p>
- </div>
- <div class="infoWrap">
- <statistic class="statistic" :cols="0">
- <statistic-item>
- <span> 参与学员 </span>
- <span>{{ detail.totalLookNum }}</span>
- </statistic-item>
- <statistic-item>
- <span> 累计点赞 </span>
- <span>{{ detail.totalLikeNum }}</span>
- </statistic-item>
- <statistic-item>
- <span> 直播时长(分钟) </span>
- <span>{{ detail.totalLiveTime }}</span>
- </statistic-item>
- </statistic>
- </div>
- <save-form
- :inline="true"
- :model="searchForm"
- @submit="search"
- @reset="onReSet"
- >
- <el-form-item>
- <el-input
- v-model.trim="searchForm.search"
- clearable
- @keyup.enter.native="search"
- placeholder="直播间编号/标题"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-button native-type="submit" type="primary">搜索</el-button>
- <el-button native-type="reset" type="danger">重置</el-button>
- </el-form-item>
- </save-form>
- <div class="tableWrap">
- <el-table
- style="width: 100%"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- :data="tableList"
- >
- <el-table-column
- align="center"
- prop="studentId"
- label="学员编号"
- ></el-table-column>
- <el-table-column
- align="center"
- prop="studentName"
- label="学员姓名"
- ></el-table-column>
- <el-table-column
- align="center"
- prop="phone"
- label="手机号"
- ></el-table-column>
- <el-table-column
- align="center"
- prop="subName"
- label="声部"
- ></el-table-column>
- <el-table-column
- align="center"
- prop="joinTime"
- label="进入时间"
- ></el-table-column>
- <el-table-column
- align="center"
- prop="totalViewTime"
- label="观看时长"
- ></el-table-column>
- </el-table>
- <pagination
- sync
- :total.sync="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList"
- />
- </div>
- </div>
- </div>
- </template>
- <script>
- import pagination from "@/components/Pagination/index";
- import {
- getLiveBroadcastRoomDetail,
- getLiveBroadcastRoomDetailList,
- } from "./api";
- export default {
- components: { pagination },
- data() {
- return {
- searchForm: {},
- tableList: [],
- detail: {
- list: null,
- liveRemark: "",
- roomTitle: "",
- roomUid: "",
- speakerName: "",
- totalLikeNum: 0,
- totalLiveTime: 0,
- totalLookNum: 0,
- },
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- };
- },
- mounted() {
- this.getDetail();
- this.getList();
- },
- methods: {
- onCancel() {
- this.$router.push("/liveClassManager");
- this.$store.dispatch("delVisitedViews", this.$route);
- },
- search() {},
- onReSet() {},
- async getList() {
- try {
- let obj = {
- rows: this.rules.limit,
- page: this.rules.page,
- roomUid: this.$route.query.roomUid,
- search: this.searchForm.search,
- };
- const res = await getLiveBroadcastRoomDetailList(obj);
- this.tableList = res.data.rows;
- this.rules.total = res.data.total
- } catch (e) {
- console.log(e);
- }
- },
- async getDetail() {
- try {
- let obj = {
- roomUid: this.$route.query.roomUid,
- };
- const res = await getLiveBroadcastRoomDetail(obj);
- this.detail = {...res.data}
- } catch (e) {
- console.log(e);
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .infoWrap {
- // width: 500px;
- }
- .sub.teacherName {
- margin-right: 10px;
- }
- .fontBtn {
- font-size: 18px;
- }
- .teacherName,
- .liveRemark {
- font-size: 16px;
- color: #222325;
- line-height: 30px;
- font-weight: 600;
- margin-right: 60px;
- span {
- color: #666666;
- font-weight: 400;
- }
- }
- .titleWrap {
- position: relative;
- // display: flex;
- // flex-direction: row;
- // align-items: center;
- padding: 5px;
- h2 {
- margin-right: 10px;
- }
- .squrtTitle {
- position: relative;
- font-size: 18px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 600;
- color: #222325;
- line-height: 25px;
- margin-bottom: 25px;
- .squrt {
- position: absolute;
- left: -12px;
- top: 5px;
- width: 3px;
- height: 16px;
- background-color: var(--color-primary);
- }
- }
- .row {
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- }
- .statistic .statistic-content > span {
- font-size: 16px;
- }
- </style>
|