|
@@ -138,7 +138,103 @@
|
|
|
<el-table-column align="center" prop="studentId" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <auth
|
|
|
+ <el-dropdown trigger="click" placement="bottom">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="permission('imLiveBroadcastRoom/roomDestroy')"
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="closeRoom(scope.row)"
|
|
|
+ >观看学员</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="
|
|
|
+ permission('imLiveBroadcastRoom/opsPopularize') &&
|
|
|
+ scope.row.liveState != 2
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="popularizeRoom(scope.row)"
|
|
|
+ >{{
|
|
|
+ scope.row.popularize == 1 ? "取消推广" : "首页推广"
|
|
|
+ }}</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="
|
|
|
+ permission('imLiveBroadcastRoom/roomDestroy') &&
|
|
|
+ scope.row.liveState == 1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="closeRoom(scope.row)"
|
|
|
+ >关闭直播</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+
|
|
|
+ <el-dropdown-item v-if="scope.row.liveState == 2">
|
|
|
+ <el-button type="text" @click="gotoDetail(scope.row)"
|
|
|
+ >直播详情</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ <auth auths="/liveBlackList">
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button type="text" @click="gotoBuylist(scope.row)"
|
|
|
+ >订单详情</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ </auth>
|
|
|
+ <el-dropdown-item v-if="permission('liveGoodsMapper/page')">
|
|
|
+ <el-button type="text" @click="setShop(scope.row)"
|
|
|
+ >商品设置</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ <auth
|
|
|
+ auths="imLiveBroadcastRoom/queryLiveRoomGoodsOrderList"
|
|
|
+ >
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button type="text" @click="gotoBlacklist(scope.row)"
|
|
|
+ >黑名单</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ </auth>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="permission('imLiveBroadcastRoom/shareGroup')"
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="shareLive(scope.row)"
|
|
|
+ >分享</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="
|
|
|
+ permission('imLiveBroadcastRoom/update') &&
|
|
|
+ scope.row.liveState == 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="resetLive(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+
|
|
|
+ <auth
|
|
|
+ auths="imLiveBroadcastRoom/delete"
|
|
|
+ v-if="scope.row.liveState == 0"
|
|
|
+ >
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button type="text" @click="deteleLive(scope.row)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ </auth>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
+ <!-- <auth
|
|
|
auths="imLiveBroadcastRoom/opsPopularize"
|
|
|
v-if="scope.row.liveState != 2"
|
|
|
>
|
|
@@ -197,7 +293,7 @@
|
|
|
<el-button type="text" @click="gotoBuylist(scope.row)"
|
|
|
>订单详情</el-button
|
|
|
>
|
|
|
- </auth>
|
|
|
+ </auth> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -236,7 +332,8 @@ import shareDetail from "./modals/shareDetail.vue";
|
|
|
import load from "@/utils/loading";
|
|
|
import popularizeRoom from "./modals/popularizeRoom.vue";
|
|
|
import reservationDetail from "./modals/reservationDetail.vue";
|
|
|
-import sellShopList from './modals/sellShopList'
|
|
|
+import sellShopList from "./modals/sellShopList";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
import {
|
|
|
getLiveBroadcastList,
|
|
|
delLiveBroadcast,
|
|
@@ -244,7 +341,13 @@ import {
|
|
|
opsPopularize,
|
|
|
} from "./api";
|
|
|
export default {
|
|
|
- components: { pagination, shareDetail, popularizeRoom, reservationDetail,sellShopList },
|
|
|
+ components: {
|
|
|
+ pagination,
|
|
|
+ shareDetail,
|
|
|
+ popularizeRoom,
|
|
|
+ reservationDetail,
|
|
|
+ sellShopList,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
@@ -276,6 +379,7 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ permission,
|
|
|
init() {
|
|
|
this.getList();
|
|
|
},
|
|
@@ -326,7 +430,7 @@ export default {
|
|
|
resetLive(row) {
|
|
|
let params = {
|
|
|
path: "/business/createLiveClass",
|
|
|
- query: { ...row},
|
|
|
+ query: { ...row },
|
|
|
};
|
|
|
// query: { id:row.id,roomUid:row.roomUid},
|
|
|
this.$router.push(params, (route) => {
|
|
@@ -367,30 +471,29 @@ export default {
|
|
|
if (row.popularize) {
|
|
|
popularize = 0;
|
|
|
str = "取消推广";
|
|
|
-
|
|
|
} else {
|
|
|
popularize = 1;
|
|
|
str = "推广";
|
|
|
// this.$refs.popularizeRoom.openDioag(row);
|
|
|
}
|
|
|
- this.$confirm(`您是否${str}直播间"${row.roomTitle}"`, "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ this.$confirm(`您是否${str}直播间"${row.roomTitle}"`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ try {
|
|
|
+ const res = await opsPopularize({
|
|
|
+ popularize,
|
|
|
+ id: row.id,
|
|
|
+ });
|
|
|
+ this.$message.success(`${str}成功`);
|
|
|
+ this.getList();
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
})
|
|
|
- .then(async () => {
|
|
|
- try {
|
|
|
- const res = await opsPopularize({
|
|
|
- popularize,
|
|
|
- id: row.id,
|
|
|
- });
|
|
|
- this.$message.success(`${str}成功`);
|
|
|
- this.getList();
|
|
|
- } catch (e) {
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
setShop(row) {
|
|
|
this.$router.push({
|
|
@@ -408,12 +511,19 @@ export default {
|
|
|
query: { roomUid: row.roomUid, name: row.roomTitle },
|
|
|
});
|
|
|
},
|
|
|
- gotoBuylist(row){
|
|
|
- this.$refs.sellShopList.openDioag(row)
|
|
|
- }
|
|
|
+ gotoBuylist(row) {
|
|
|
+ this.$refs.sellShopList.openDioag(row);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
|
+/deep/.el-dropdown-link {
|
|
|
+ cursor: pointer;
|
|
|
+ color: var(--color-primary);
|
|
|
+}
|
|
|
+/deep/.el-icon-arrow-down {
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
</style>
|
|
|
|