123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 |
- <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"
- @click="payVisible = true"
- v-if="videoList.length > 0"
- >直播回放 <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"
- ref="searchForm"
- >
- <el-form-item>
- <el-input
- v-model.trim="searchForm.search"
- clearable
- @keyup.enter.native="
- (e) => {
- e.target.blur();
- $refs.searchForm.save();
- 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-button
- type="primary"
- v-if="tableList.length > 0"
- v-permission="'export/liveBroadcastRoomMember'"
- @click="exportStudent"
- >导出</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="organName" label="分部"></el-table-column>
- <el-table-column align="center" prop="musicGroupName" label="乐团">
- <template slot-scope="scope">
- <tooltip :content="scope.row.musicGroupName" />
- </template>
- </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="观看时长">
- <template slot-scope="scope">
- <div>{{ scope.row.totalViewTime }}分钟</div>
- </template>
- </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>
- <el-dialog
- :visible.sync="payVisible"
- v-if="payVisible"
- width="500px"
- title="直播回放"
- >
- <div class="lineWrap">
- <div
- class="linkItem"
- v-for="(item, index) in videoList"
- :key="index"
- @click="opneVideo(item)"
- >
- <div class="linkItemWrap">
- <!-- <video width="110px" :src="item.url"></video> -->
- <img width="110px" :src="videoPlace" alt="" />
- <i class="el-icon-video-play linkIcon"></i>
- </div>
- <p :underline="false" type="text" class="lineTitle">
- {{ item.endTime | dateForMinFormat }}
- </p>
- </div>
- </div>
- <div slot="footer" class="dialog-footer">
- <!-- <el-button @click="payVisible = false">取 消</el-button> -->
- <el-button type="primary" @click="payVisible = false">确 定</el-button>
- </div></el-dialog
- >
- <el-dialog
- :title="activeVideo.endTime | dateForMinFormat"
- width="680px"
- append-to-body
- :visible.sync="videoVisible"
- v-if="videoVisible"
- >
- <!-- activeUrl -->
- <div class="activeVideoWrap">
- <vue-core-video-player
- v-if="activeVideo.os == 'mobile' && activeVideo.videoType != 'm3u8'"
- style="width: 320px"
- :src="activeVideo.url"
- ref="dialogVideo"
- >
- 您的浏览器不支持视频播放
- </vue-core-video-player>
- <vue-core-video-player
- v-if="activeVideo.os == 'mobile' && activeVideo.videoType == 'm3u8'"
- style="width: 320px"
- :src="activeVideo.url"
- ref="dialogVideo"
- :core="HLSCore"
- >
- 您的浏览器不支持视频播放
- </vue-core-video-player>
- <vue-core-video-player
- v-if="activeVideo.os == 'client'"
- style="width: 640px"
- :src="activeVideo.url"
- ref="dialogVideo"
- :core="HLSCore"
- >
- 您的浏览器不支持视频播放
- </vue-core-video-player>
- <vue-core-video-player
- v-if="activeVideo.os == 'pc'"
- style="width: 640px"
- :src="activeVideo.url"
- ref="dialogVideo"
- >
- 您的浏览器不支持视频播放
- </vue-core-video-player>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import pagination from "@/components/Pagination/index";
- import cleanDeep from "clean-deep";
- import qs from "qs";
- import { getLiveBroadcastRoomDetail, getLiveBroadcastRoomDetailList } from "./api";
- import { Export } from "@/utils/downLoadFile";
- import videoPlace from "./images/video-place.png";
- import HLSCore from "@core-player/playcore-hls";
- export default {
- components: { pagination },
- data() {
- return {
- searchForm: {
- search: "",
- },
- 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], // 选择限制显示条数
- },
- videoList: [],
- payVisible: false,
- videoVisible: false,
- activeVideo: { endTime: "" },
- HLSCore,
- videoPlace,
- };
- },
- mounted() {
- this.getDetail();
- this.getList();
- },
- methods: {
- onCancel() {
- this.$router.push("/liveClassManager");
- this.$store.dispatch("delVisitedViews", this.$route);
- },
- search() {
- this.rules.page = 1;
- this.getList();
- },
- onReSet() {
- this.searchForm.search = "";
- this.search();
- },
- 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 };
- this.videoList = res.data.videoList;
- } catch (e) {
- console.log(e);
- }
- },
- opneVideo(row) {
- console.log(row, "opneVideo");
- this.activeVideo = row;
- this.videoVisible = true;
- },
- exportStudent() {
- let obj = {
- rows: this.rules.limit,
- page: this.rules.page,
- roomUid: this.$route.query.roomUid,
- search: this.searchForm.search,
- };
- Export(
- this,
- {
- url: "/api-web/export/liveBroadcastRoomMember",
- fileName: `"${this.detail.roomTitle}"参与学员.xls`,
- method: "post",
- params: qs.stringify(cleanDeep(obj)),
- },
- `您确定导出"${this.detail.roomTitle}"参与学员?`
- );
- },
- },
- };
- </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;
- }
- .lineWrap {
- display: flex;
- flex-direction: row;
- align-items: center;
- flex-wrap: wrap;
- .linkItem {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-right: 5px;
- cursor: pointer;
- position: relative;
- &:hover {
- color: var(--color-primary);
- .lineTitle {
- color: var(--color-primary);
- font-weight: bold;
- }
- }
- .linkItemWrap {
- position: relative;
- .linkIcon {
- font-size: 25px;
- position: absolute;
- top: 50%;
- margin-top: -13px;
- left: 50%;
- margin-left: -13px;
- color: #fff;
- }
- }
- }
- .lineTitle {
- height: 40px;
- line-height: 40px;
- color: rgba(102, 102, 102, 0.9);
- padding: 0 17px;
- overflow: hidden;
- margin-bottom: 10px;
- position: relative;
- border-radius: 4px;
- }
- }
- .activeVideoWrap {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- </style>
|