提交 e6562cca 编写于 作者: bo.dang's avatar bo.dang

直播列表改造

上级 9ac3bdb1
......@@ -46,7 +46,7 @@
</el-row>
</el-form>
<el-table :data="tableData" class="item-table" style="width: 100%;margin-top: 10px;">
<el-table-column prop="liveName" label="直播名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="直播名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="liveStatus" label="直播状态" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.liveStatus | liveStatusFilter }}</span>
......@@ -57,8 +57,8 @@
<span>{{ scope.row.streamType | streamTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="startTime" label="开始时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="openTime" 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">
<template slot-scope="scope">
......@@ -72,7 +72,7 @@
@click="liveLink(scope.row)"
type="text"
size="small"
v-if="!((scope.row.liveStatus==4 && scope.row.liveScope==1) || (scope.row.streamType==2 && scope.row.liveScope==1))">直播链接</el-button>
v-if="!((scope.row.liveStatus==4 && scope.row.scope==1) || (scope.row.streamType==2 && scope.row.scope==1))">直播链接</el-button>
<el-button
@click="updatelive(scope.row)"
......@@ -85,6 +85,7 @@
size="small"
v-if="scope.row.liveStatus==4">数据统计</el-button>
<el-button @click="editLive(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="delLive(scope.row)" type="text" size="small">删除</el-button>
<!--<el-button @click="setPlayback(scope.row)" type="text" size="small" v-if="scope.row.playbackSetFlag == 1">设置回放</el-button>-->
<!--<el-button @click="setPlayback(scope.row)" type="text" size="small" v-if="scope.row.playbackSetFlag == 1">关闭回放</el-button>-->
......@@ -152,7 +153,7 @@
</el-col>
</div>
<div class="live_url_style" v-if="streamType == 2 || this.liveScope==2">
<div class="live_url_style" v-if="streamType == 2 || this.scope==2">
<div class="href_style">观众链接 {{audienceUrl}}</div>
<el-col class="href_outer_border">
<el-link type="primary" @click="copyTxt(3)" size="small" class="href_button_style">复制</el-link>
......@@ -354,9 +355,9 @@ export default {
liveScope: 1,
liveStatus: 1,
lecturerUrl: "https://dev.yunxin.163.com/",
guestUrl: "https://www.cnblogs.com/",
audienceUrl: "https://www.soho.com",
lecturerUrl: "",
guestUrl: "",
audienceUrl: "",
playbackForm: {
canPlayback: 0,
playbackUrls: {
......@@ -453,7 +454,7 @@ export default {
//弹出直播链接弹窗
liveLink(row) {
this.dialogLivelinkVisible = true;
this.liveScope = row.liveScope;
this.liveScope = row.scope;
this.liveStatus = row.liveStatus;
this.streamType = row.streamType;
console.log(
......@@ -463,7 +464,7 @@ export default {
this.liveStatus
);
vm.GET("rtc/liveAdmin/url/" + row.rtcId, "").then(res => {
vm.GET("rtc/liveAdmin/url/" + row.id, "").then(res => {
if (res.code == "000000") {
this.lecturerUrl = res.data.lecturerUrl;
this.guestUrl = res.data.guestUrl;
......@@ -489,7 +490,7 @@ export default {
setPlayback(row) {
vm.dialogLivePlaybackVisible = true;
const rtcId = row.rtcId;
const rtcId = row.id;
vm.streamType = row.streamType;
......@@ -887,7 +888,7 @@ export default {
// vm.submitPlayback(0);
let params = {rtcId: row.rtcId, canPlayback: 0};
let params = {rtcId: row.id, canPlayback: 0};
postPlayback(params).then((res) => {
closeLoading(this);
......@@ -925,7 +926,7 @@ export default {
.then(() => {
openLoading(this);
// confirm
let params = {rtcId: row.rtcId,liveStatus: 4};
let params = {rtcId: row.id,liveStatus: 4};
updateLiveStatus(params).then((res) => {
closeLoading(this);
......@@ -947,11 +948,11 @@ export default {
//数据统计
countLive(row) {
this.rtcId = row.rtcId;
this.rtcId = row.id;
this.isSign = row.isSign;
this.dialogStatisticsVisible = true;
console.log("getStatisticsData() : this.circleId = " + this.circleId);
vm.GET("rtc/liveAdmin/data/" + row.rtcId, "").then(res => {
vm.GET("rtc/liveAdmin/data/" + row.id, "").then(res => {
if (res.code == "000000") {
let listData = [];
let obj = {
......@@ -975,14 +976,19 @@ export default {
path: "/create-live",
query: {
// rtcId: "1"
rtcId: row.rtcId,
rtcId: row.id,
circleId: this.circleId,
circleName: this.circleName
}
});
},
//删除直播
deleteLive(row) {
delLive(row) {
if(row.st)
this.$confirm(`确定删除“${row.liveName}”吗?`, "", {
confirmButtonText: "删除",
cancelButtonText: "取消",
......@@ -992,7 +998,7 @@ export default {
.then(() => {
// confirm
let req = {
rtcId: row.rtcId
rtcId: row.id
};
vm.DELETE("rtc/liveAdmin", req).then(res => {
if (res.code == "000000") {
......@@ -1010,6 +1016,11 @@ export default {
});
})
.catch(() => {});
},
// //编辑直播
// editLive(row) {
......@@ -1047,23 +1058,23 @@ export default {
if (res.data.pageContents == null) {
return;
}
for (let i = 0; i < res.data.pageContents.length; i++) {
let obj = {
liveName: res.data.pageContents[i].name,
liveScope: res.data.pageContents[i].scope,
liveStatus: res.data.pageContents[i].liveStatus,
streamType: res.data.pageContents[i].streamType,
playbackSetFlag: res.data.pageContents[i].playbackSetFlag,
canPlayback: res.data.pageContents[i].canPlayback,
createTime: res.data.pageContents[i].createdTime,
startTime: res.data.pageContents[i].openTime,
endTime: res.data.pageContents[i].endTime,
rtcId: res.data.pageContents[i].id,
isSign: res.data.pageContents[i].isSign
};
listData.push(obj);
}
this.tableData = listData;
// for (let i = 0; i < res.data.pageContents.length; i++) {
// let obj = {
// // liveName: res.data.pageContents[i].name,
// // liveScope: res.data.pageContents[i].scope,
// // liveStatus: res.data.pageContents[i].liveStatus,
// // streamType: res.data.pageContents[i].streamType,
// // playbackSetFlag: res.data.pageContents[i].playbackSetFlag,
// // canPlayback: res.data.pageContents[i].canPlayback,
// // createTime: res.data.pageContents[i].createdTime,
// // startTime: res.data.pageContents[i].openTime,
// // endTime: res.data.pageContents[i].endTime,
// // rtcId: res.data.pageContents[i].id,
// // isSign: res.data.pageContents[i].isSign
// };
// listData.push(obj);
// }
this.tableData = res.data.pageContents;
this.totalRows = res.data.totalRows;
} else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册