|
@@ -1,7 +1,7 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div>
|
|
|
- <auth auths="imLiveBroadcastRoom/add">
|
|
|
+ <auth auths="vipGroupManage/vipGroupApply">
|
|
|
<el-button @click="newLiveClass" type="primary" style="margin-bottom: 20px">新建直播课</el-button>
|
|
|
</auth>
|
|
|
<save-form :inline="true" :model="searchForm" @submit="search" @reset="onReSet" ref="searchForm">
|
|
@@ -62,11 +62,10 @@
|
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <auth auths="/liveBlackList">
|
|
|
+ <auth auths="vipGroupManage/stopVipGroup">
|
|
|
<el-button type="text" @click="onDetail(scope.row)">详情</el-button>
|
|
|
</auth>
|
|
|
- <el-popover placement="top" width="160" v-if="scope.row.status < 3 && scope.row.enableDelete != 1"
|
|
|
- :ref="scope.$index">
|
|
|
+ <el-popover placement="top" width="160" v-if="scope.row.status <= 3" :ref="scope.$index">
|
|
|
<p style="margin-bottom: 10px">确定关闭该直播课?</p>
|
|
|
<el-input v-model.trim="stopReason" placeholder="请输入关闭原因"></el-input>
|
|
|
<div style="text-align: right; margin-top: 20px">
|
|
@@ -76,9 +75,13 @@
|
|
|
<el-button type="text" slot="reference">关闭</el-button>
|
|
|
</el-popover>
|
|
|
|
|
|
- <auth auths="vipGroupManage/stopVipGroup" v-if="[0, 1, 2].includes(scope.row.status)">
|
|
|
+ <auth auths="/updateLiveCourse" v-if="[0, 1, 2].includes(scope.row.status)">
|
|
|
<el-button type="text" @click="onUpdate(scope.row)">修改</el-button>
|
|
|
</auth>
|
|
|
+
|
|
|
+ <auth auths="vipGroupManage/delLiveGroup" v-if="scope.row.status == 3">
|
|
|
+ <el-button type="text" @click="onDelete(scope.row)">删除</el-button>
|
|
|
+ </auth>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -93,6 +96,7 @@
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import { getVipList, closeVip } from "@/api/vipSeting";
|
|
|
import { getSubject } from "@/api/buildTeam";
|
|
|
+import { delLiveGroup } from './api'
|
|
|
export default {
|
|
|
components: {
|
|
|
pagination
|
|
@@ -116,11 +120,11 @@ export default {
|
|
|
statusList: [
|
|
|
{ lable: "未开始", value: "0" },
|
|
|
{ lable: "报名中", value: "1" },
|
|
|
- { lable: "报名结束", value: "5" },
|
|
|
+ // { lable: "报名结束", value: "5" },
|
|
|
{ lable: "进行中", value: "2" },
|
|
|
{ lable: "已结束", value: "4" },
|
|
|
- { lable: "关闭", value: "3" },
|
|
|
- { lable: "取消", value: "6" },
|
|
|
+ { lable: "取消", value: "3" },
|
|
|
+ // { lable: "暂停", value: "6" },
|
|
|
],
|
|
|
stopReason: "",
|
|
|
subjectList: []
|
|
@@ -148,6 +152,22 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ async onDelete(row) {
|
|
|
+ this.$confirm(`是否确认删除?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ try {
|
|
|
+ await delLiveGroup({ id: row.id })
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.getList()
|
|
|
+ } catch { }
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+ },
|
|
|
newLiveClass() {
|
|
|
let params = {
|
|
|
path: "/business/createLiveCourse"
|
|
@@ -229,10 +249,10 @@ export default {
|
|
|
"未开始",
|
|
|
"报名中",
|
|
|
"进行中",
|
|
|
- "关闭",
|
|
|
+ "取消",
|
|
|
"已结束",
|
|
|
"报名结束",
|
|
|
- "取消"
|
|
|
+ "暂停"
|
|
|
];
|
|
|
return arr[val];
|
|
|
}
|
|
@@ -240,7 +260,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-::v-deep .el-dropdown-link {
|
|
|
+::v-deep .el-dropdown-link::v-deep .el-dropdown-link {
|
|
|
cursor: pointer;
|
|
|
color: var(--color-primary);
|
|
|
}
|
|
@@ -248,4 +268,3 @@ export default {
|
|
|
::v-deep .el-icon-arrow-down {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
-</style>
|