提交 136999f7 编写于 作者: kai.wang's avatar kai.wang

Merge branch 'dev-yqLive-20200611' of...

Merge branch 'dev-yqLive-20200611' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-yqLive-20200611
...@@ -3,7 +3,13 @@ ...@@ -3,7 +3,13 @@
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="yqrange-index-content screenSet" id="screenSet"> <div class="yqrange-index-content screenSet" id="screenSet">
<div class="header-title">直播管理</div> <div class="header-title">直播管理</div>
<el-form ref="searchForm" :model="searchForm" label-width="75px" label-suffix=":" :inline="true"> <el-form
ref="searchForm"
:model="searchForm"
label-width="75px"
label-suffix=":"
:inline="true"
>
<el-row :gutter="30" type="flex" style="margin-top: 10px"> <el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="直播名称"> <el-form-item label="直播名称">
...@@ -12,13 +18,18 @@ ...@@ -12,13 +18,18 @@
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="直播状态"> <el-form-item label="直播状态">
<el-select v-model="searchForm.liveStatus" placeholder="请选择发布状态" clearable style="margin-left:20px;"> <el-select
v-model="searchForm.liveStatus"
placeholder="请选择发布状态"
clearable
style="margin-left:20px;"
>
<el-option <el-option
v-for="item in statusList" v-for="item in statusList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.label"> :value="item.label"
</el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -45,7 +56,7 @@ ...@@ -45,7 +56,7 @@
<el-table-column prop="endTime" label="结束时间" min-width="100" align="center"></el-table-column> <el-table-column prop="endTime" label="结束时间" min-width="100" align="center"></el-table-column>
<el-table-column label="操作" min-width="300" align="center"> <el-table-column label="操作" min-width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="reviewLive(scope.row)" type="text" size="small">设置回放</el-button> <!-- <el-button @click="reviewLive(scope.row)" type="text" size="small">设置回放</el-button> -->
<el-button @click="liveLink(scope.row)" type="text" size="small">直播链接</el-button> <el-button @click="liveLink(scope.row)" type="text" size="small">直播链接</el-button>
<el-button @click="countLive(scope.row)" type="text" size="small">数据统计</el-button> <el-button @click="countLive(scope.row)" type="text" size="small">数据统计</el-button>
<el-button @click="editLive(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="editLive(scope.row)" type="text" size="small">编辑</el-button>
...@@ -55,88 +66,175 @@ ...@@ -55,88 +66,175 @@
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleNumChange" @current-change="handleNumChange"
:current-page="searchForm.pageNo" :current-page="searchForm.pageNo"
:page-sizes="[10, 30, 50, 100]" :page-sizes="[10, 30, 50, 100]"
:page-size="searchForm.pageSize" :page-size="searchForm.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="totalRows" :total="totalRows"
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog
title="数据统计"
:visible.sync="dialogStatisticsVisible"
width="500px"
:close-on-click-modal="false"
@close="handleTypeClose"
center
>
<!-- <el-table-column prop="peopleNum" label="观看人次" min-width="50" align="center"></el-table-column>
<el-table-column prop="liveDuration" label="直播时长" min-width="50" align="center"></el-table-column>-->
<el-table :data="dialogStatisticsData" align="center">
<el-table-column property="peopleNum" label="观看人次" align="center"></el-table-column>
<el-table-column property="liveDuration" label="直播时长" align="center"></el-table-column>
</el-table>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import BreadCrumb from "@/components/breadcrumb.vue"; let vm = null;
export default { import BreadCrumb from "@/components/breadcrumb.vue";
components: { export default {
BreadCrumb components: {
}, BreadCrumb
data(){ },
return{ data() {
curmbFirst: '云鹊小圈', return {
curmbSecond: '直播管理', curmbFirst: "云鹊小圈",
searchForm: { curmbSecond: "直播管理",
liveName: '', dialogStatisticsVisible: false,
liveStatus: '', searchForm: {
pageNo: 1, liveName: "",
pageSize: 10, liveStatus: "",
pageNo: 1,
pageSize: 10
},
totalRows: 0,
statusList: [
{
value: "1",
label: "预告"
}, },
totalRows: 0, {
statusList: [{ value: "2",
value: '1', label: "直播中"
label: '预告' },
}, { {
value: '2', value: "3",
label: '直播中' label: "已结束"
}, { }
value: '3', ],
label: '已结束' tableData: [
}], {
tableData: [ liveName: "浙江医学大会第二场",
{ liveStatus: 3,
liveName: '浙江医学大会第二场', createTime: "",
liveStatus: 1, startTime: "",
createTime: '', endTime: "",
startTime: '', rtcId: 0,
endTime: '', }
} ],
], dialogStatisticsData: [
} {
peopleNum: 234,
liveDuration: "38分钟"
}
],
circleId: null
};
},
created() {
vm = this;
this.circleId = this.$route.query.id;
vm.getLiveList("", "");
},
methods: {
searchList() {
console.log("查询");
this.getLiveList(this.searchForm.liveName, this.searchForm.liveStatus);
}, },
methods: { resetForm() {
searchList() { console.log("重置");
console.log('查询') },
}, //新建直播
resetForm() { createLive() {
console.log('重置') this.$router.push({
}, path: "/create-live"
//新建直播 });
createLive() { },
this.$router.push({ //直播链接
path: '/create-live', liveLink(row) {},
}) //回放
}, reviewLive(row) {},
//直播链接 //数据统计
liveLink(row) {}, countLive(row) {
//回放 this.dialogStatisticsVisible = true;
reviewLive(row) {}, this.getStatisticsData();
//数据统计 },
countLive(row) { getStatisticsData() {
this.$msgbox({ console.log("getStatisticsData() : this.circleId = " + this.circleId);
title: '直播链接', let req = {
message: '这是一段内容', rtcId: this.circleId
showCancelButton: true };
// confirmButtonText: '确定', vm.GET("liveAdmin/data", req).then(res => {
// cancelButtonText: '取消' if (res.code == "000000") {
}).then(action => { let listData = [];
this.$message({ let obj = {
type: 'info', peopleNum: res.data.viewedPersonTime,
message: 'action: ' + action liveDuration: res.data.liveDuration
};
listData.push(obj);
this.dialogStatisticsData = listData;
} else {
this.dialogStatisticsData = [];
}
});
},
//编辑直播
editLive(row) {
this.$router.push({
path: "/create-live",
query: {
// rtcId: "1"
rtcId: row.id
}
});
},
//删除直播
deleteLive(row) {
this.$confirm(`确定删除“${row.liveName}”吗?`, "", {
confirmButtonText: "删除",
cancelButtonText: "取消",
type: "warning"
// customClass: 'range-make-box',
})
.then(() => {
// confirm
let req = {
rtcId: row.rtcId,
};
vm.DELETE("liveAdmin", req).then(res => {
if (res.code == "000000") {
vm.$message({
type: "success",
message: "删除成功"
});
this.getLiveList("", "")
} else {
vm.$message({
type: "success",
message: "删除失败"
});
}
}); });
}) })
.catch(() => {
})
}, },
//编辑直播 //编辑直播
editLive(row) { editLive(row) {
...@@ -160,51 +258,81 @@ ...@@ -160,51 +258,81 @@
}).catch(() => { }).catch(() => {
// cancel // cancel
}); });
},
handleSizeChange(val) {
this.searchForm.pageSize = val;
this.searchForm.pageNo = 1;
this.searchList();
},
handleNumChange(val) {
this.searchForm.pageNo = val;
this.searchList();
},
}, },
handleSizeChange(val) {
this.searchForm.pageSize = val;
this.searchForm.pageNo = 1;
this.searchList();
},
handleNumChange(val) {
this.searchForm.pageNo = val;
this.searchList();
},
getLiveList(name, status) {
let req = {
circleId: this.circleId,
name: name,
liveStatus: status,
pageNo: 1,
pageSize: 30
};
console.log("alex name = " + name + ", status = " + status);
vm.GET("liveAdmin/list", req).then(res => {
if (res.code == "000000") {
// console.log(res);
let listData = [];
for (let i = 0; i < data.length; i++) {
let obj = {
liveName: res.data.pageContents[i].name,
liveStatus: res.data.pageContents[i].liveStatus,
createTime: res.data.pageContents[i].createdTime,
startTime: res.data.pageContents[i].openTime,
endTime: res.data.pageContents[i].endTime,
rtcId: res.data.pageContents[i].rtcIntroduces[0].rtcId,
};
listData.push(obj);
}
this.tableData = listData;
} else {
this.tableData = [];
}
});
}
} }
};
</script> </script>
<style lang="scss"> <style lang="scss">
.yqrange-index-wrapper{ .yqrange-index-wrapper {
.yqrange-index-content{ .yqrange-index-content {
background: #fff; background: #fff;
padding: 10px; padding: 10px;
.header-title{ .header-title {
padding: 10px 12px; padding: 10px 12px;
font-size: 12px; font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
}
.el-button--text{
color: #449284; color: #449284;
font-size: 14px; border-bottom: 1px solid #efefef;
&::after{ }
content: ''; }
.el-button--text {
color: #449284;
font-size: 14px;
&::after {
content: "";
position: relative;
height: 14px;
/*border-right: 1px solid #EBEEF5;*/
border-right: 1px solid #aaaaaa;
padding-right: 10px;
}
&:last-of-type {
&::after {
content: "";
position: relative; position: relative;
width: 1px;
height: 14px; height: 14px;
/*border-right: 1px solid #EBEEF5;*/ border-right: none;
border-right: 1px solid #aaaaaa;
padding-right: 10px;
}
&:last-of-type{
&::after{
content: '';
position: relative;
width: 1px;
height: 14px;
border-right: none;
}
} }
} }
} }
}
</style> </style>
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
//直播管理 //直播管理
liveManage(row) { liveManage(row) {
this.$router.push({ this.$router.push({
path: '/live-manage', path: '/live-manage?id=' + row.id,
}) })
}, },
//成员管理 //成员管理
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册