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

直播列表改造

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