|
@@ -6,12 +6,14 @@
|
|
直播课管理
|
|
直播课管理
|
|
</h2>
|
|
</h2>
|
|
<div class="m-core">
|
|
<div class="m-core">
|
|
- <el-button
|
|
|
|
- @click="newLiveClass"
|
|
|
|
- type="primary"
|
|
|
|
- style="margin-bottom: 20px"
|
|
|
|
- >新建直播课</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <auth auths="imLiveBroadcastRoom/add">
|
|
|
|
+ <el-button
|
|
|
|
+ @click="newLiveClass"
|
|
|
|
+ type="primary"
|
|
|
|
+ style="margin-bottom: 20px"
|
|
|
|
+ >新建直播课</el-button
|
|
|
|
+ >
|
|
|
|
+ </auth>
|
|
<save-form
|
|
<save-form
|
|
:inline="true"
|
|
:inline="true"
|
|
:model="searchForm"
|
|
:model="searchForm"
|
|
@@ -105,27 +107,39 @@
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
- <el-button type="text" v-if="scope.row.liveState != 2"
|
|
|
|
- >关闭直播</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <auth auths="imLiveBroadcastRoom/roomDestroy">
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ v-if="scope.row.liveState == 1"
|
|
|
|
+ @click="closeRoom(scope.row)"
|
|
|
|
+ >关闭直播</el-button
|
|
|
|
+ >
|
|
|
|
+ </auth>
|
|
|
|
+
|
|
<el-button type="text" @click="gotoDetail(scope.row)"
|
|
<el-button type="text" @click="gotoDetail(scope.row)"
|
|
>直播详情</el-button
|
|
>直播详情</el-button
|
|
>
|
|
>
|
|
- <el-button type="text" @click="shareLive(scope.row)"
|
|
|
|
- >分享</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- v-if="scope.row.liveState == 0"
|
|
|
|
- @click="resetLive(scope.row)"
|
|
|
|
- >修改</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- v-if="scope.row.liveState == 0"
|
|
|
|
- @click="deteleLive(scope.row)"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <auth auths="imLiveBroadcastRoom/shareGroup">
|
|
|
|
+ <el-button type="text" @click="shareLive(scope.row)"
|
|
|
|
+ >分享</el-button
|
|
|
|
+ >
|
|
|
|
+ </auth>
|
|
|
|
+ <auth auths="imLiveBroadcastRoom/update">
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ v-if="scope.row.liveState == 0"
|
|
|
|
+ @click="resetLive(scope.row)"
|
|
|
|
+ >修改</el-button
|
|
|
|
+ >
|
|
|
|
+ </auth>
|
|
|
|
+ <auth auths="imLiveBroadcastRoom/delete">
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ v-if="scope.row.liveState == 0"
|
|
|
|
+ @click="deteleLive(scope.row)"
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
|
|
+ </auth>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -146,9 +160,8 @@
|
|
append-to-body
|
|
append-to-body
|
|
:visible.sync="shareVisible"
|
|
:visible.sync="shareVisible"
|
|
v-if="shareVisible"
|
|
v-if="shareVisible"
|
|
-
|
|
|
|
>
|
|
>
|
|
- <shareDetail @close='shareVisible=false' :row="activeRow" />
|
|
|
|
|
|
+ <shareDetail @close="shareVisible = false" :row="activeRow" />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -160,7 +173,11 @@ import { getTimes } from "@/utils";
|
|
import pagination from "@/components/Pagination/index";
|
|
import pagination from "@/components/Pagination/index";
|
|
import shareDetail from "./modals/shareDetail.vue";
|
|
import shareDetail from "./modals/shareDetail.vue";
|
|
import load from "@/utils/loading";
|
|
import load from "@/utils/loading";
|
|
-import { getLiveBroadcastList,delLiveBroadcast } from "./api";
|
|
|
|
|
|
+import {
|
|
|
|
+ getLiveBroadcastList,
|
|
|
|
+ delLiveBroadcast,
|
|
|
|
+ closeBroadcastRoomList,
|
|
|
|
+} from "./api";
|
|
export default {
|
|
export default {
|
|
components: { pagination, shareDetail },
|
|
components: { pagination, shareDetail },
|
|
data() {
|
|
data() {
|
|
@@ -230,7 +247,10 @@ export default {
|
|
//liveClassDetail
|
|
//liveClassDetail
|
|
},
|
|
},
|
|
gotoDetail(row) {
|
|
gotoDetail(row) {
|
|
- this.$router.push({path:"/business/liveClassDetail", query: { ...row },});
|
|
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/business/liveClassDetail",
|
|
|
|
+ query: { ...row },
|
|
|
|
+ });
|
|
},
|
|
},
|
|
shareLive(row) {
|
|
shareLive(row) {
|
|
this.activeRow = row;
|
|
this.activeRow = row;
|
|
@@ -252,17 +272,29 @@ export default {
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
})
|
|
})
|
|
- .then(async() => {
|
|
|
|
- try{
|
|
|
|
- const res = await delLiveBroadcast({id:row.id})
|
|
|
|
- this.$message.success('删除成功')
|
|
|
|
- this.getList()
|
|
|
|
- }catch(e){
|
|
|
|
- console.log(e)
|
|
|
|
|
|
+ .then(async () => {
|
|
|
|
+ try {
|
|
|
|
+ const res = await delLiveBroadcast({ id: row.id });
|
|
|
|
+ this.$message.success("删除成功");
|
|
|
|
+ this.getList();
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log(e);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
},
|
|
},
|
|
|
|
+ closeRoom(row) {
|
|
|
|
+ this.$confirm("您确定关闭直播间", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).then(async (res) => {
|
|
|
|
+ try {
|
|
|
|
+ const res = await closeBroadcastRoomList(row.id);
|
|
|
|
+ this.$message.success("关闭成功");
|
|
|
|
+ this.getList();
|
|
|
|
+ } catch (e) {}
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|