2025-01-26 21:07:26 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="module-content">
|
|
|
|
|
<h4>学员列表</h4>
|
2025-02-15 20:10:05 +08:00
|
|
|
<div class="table-area">
|
|
|
|
|
<el-form
|
|
|
|
|
:inline="true"
|
|
|
|
|
size="mini"
|
|
|
|
|
:model="formInline"
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="">
|
|
|
|
|
<el-input
|
2025-02-23 13:59:14 +08:00
|
|
|
v-model="formInline.userId"
|
|
|
|
|
placeholder="请输入id"
|
|
|
|
|
clearable
|
2025-01-26 21:07:26 +08:00
|
|
|
/>
|
2025-02-15 20:10:05 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="">
|
2025-02-23 13:59:14 +08:00
|
|
|
<el-input
|
|
|
|
|
v-model="formInline.nickName"
|
|
|
|
|
placeholder="请输入昵称"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formInline.isOnline"
|
|
|
|
|
placeholder="选择在线状态"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option label="在线" value="1" />
|
|
|
|
|
<el-option label="不在线" value="2" />
|
2025-02-15 20:10:05 +08:00
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="">
|
2025-02-23 13:59:14 +08:00
|
|
|
<el-select
|
|
|
|
|
v-model="formInline.commentBlackStatus"
|
|
|
|
|
placeholder="选择禁言状态"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(value, key) in commentBlackStatusOption"
|
|
|
|
|
:key="key"
|
|
|
|
|
:label="value"
|
|
|
|
|
:value="key"
|
|
|
|
|
/>
|
|
|
|
|
<!-- <el-option label="未禁言" value="2" /> -->
|
2025-02-15 20:10:05 +08:00
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="onSubmit">搜索</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table :data="tableData" style="width: 100%">
|
|
|
|
|
<el-table-column prop="date" label="头像" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<img
|
2025-02-23 13:59:14 +08:00
|
|
|
:src="scope.row.headPicUrl"
|
2025-02-15 20:10:05 +08:00
|
|
|
style="max-width: 50x;max-height: 50px;"
|
|
|
|
|
alt=""
|
|
|
|
|
srcset=""
|
2025-02-23 13:59:14 +08:00
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="userId" label="uid" width="180" />
|
|
|
|
|
<el-table-column prop="joinTime" label="加入时间" />
|
|
|
|
|
<el-table-column prop="expireTime" label="到期时间" />
|
|
|
|
|
<el-table-column prop="" label="状态">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ customerStatusOption[scope.row.customerStatus] }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="address" label="禁言状态">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ commentBlackStatusOption[scope.row.commentBlackStatus] }}
|
2025-02-15 20:10:05 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
2025-02-23 13:59:14 +08:00
|
|
|
<el-button type="text" size="small"> 私聊</el-button>
|
|
|
|
|
<el-button type="text" size="small">{{
|
|
|
|
|
scope.row.commentBlackStatus === 2 ? "禁言" : "取消禁言"
|
|
|
|
|
}}</el-button>
|
2025-02-15 20:10:05 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
2025-02-23 13:59:14 +08:00
|
|
|
<div class="pagination-wrap">
|
|
|
|
|
<!-- 分页器 -->
|
|
|
|
|
<el-pagination
|
|
|
|
|
style="margin-top: 50px;"
|
|
|
|
|
:current-page="formInline.current"
|
|
|
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
|
|
|
:page-size="formInline.size"
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
:total="total"
|
|
|
|
|
@size-change="sizeChange"
|
|
|
|
|
@current-change="pageChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<forbidSpeak
|
|
|
|
|
ref="forbidSpeakRef"
|
|
|
|
|
:product-type="41"
|
|
|
|
|
:product-id="groupId"
|
|
|
|
|
:scope="2"
|
|
|
|
|
@callback="forbidSpeakCallback"
|
|
|
|
|
/>
|
2025-01-26 21:07:26 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2025-02-23 13:59:14 +08:00
|
|
|
import { removeCommentBlack } from "@/api/videoLive";
|
|
|
|
|
import { getListCustomer } from "@/api/circle";
|
|
|
|
|
import forbidSpeak from "../../detail/components/forbidSpeak.vue";
|
2025-01-26 21:07:26 +08:00
|
|
|
export default {
|
2025-02-23 13:59:14 +08:00
|
|
|
components: { forbidSpeak },
|
2025-01-26 21:07:26 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
2025-02-23 13:59:14 +08:00
|
|
|
commentBlackStatusOption: {
|
|
|
|
|
1: "禁言中",
|
|
|
|
|
2: "未禁言"
|
|
|
|
|
},
|
|
|
|
|
customerStatusOption: {
|
|
|
|
|
1: "在期",
|
|
|
|
|
2: "已到期",
|
|
|
|
|
3: "即将到期",
|
|
|
|
|
4: "新学员"
|
|
|
|
|
},
|
|
|
|
|
groupId: this.$route.query.id,
|
|
|
|
|
formInline: {
|
|
|
|
|
userId: "",
|
|
|
|
|
nickName: "",
|
|
|
|
|
isOnline: "",
|
|
|
|
|
commentBlackStatus: "",
|
|
|
|
|
size: 10,
|
|
|
|
|
current: 1
|
|
|
|
|
},
|
|
|
|
|
tableData: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
clickItem: {}
|
2025-01-26 21:07:26 +08:00
|
|
|
};
|
2025-02-15 20:10:05 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2025-02-23 13:59:14 +08:00
|
|
|
onSubmit() {
|
|
|
|
|
this.formInline.current = 1;
|
|
|
|
|
this.getListCustomer();
|
|
|
|
|
},
|
|
|
|
|
// 分页器
|
|
|
|
|
sizeChange(e) {
|
|
|
|
|
this.formInline.current = 1;
|
|
|
|
|
this.size = e;
|
|
|
|
|
this.getListCustomer();
|
|
|
|
|
},
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.formInline.current = e;
|
|
|
|
|
this.getListCustomer();
|
|
|
|
|
},
|
|
|
|
|
async getListCustomer() {
|
|
|
|
|
const ret = await getListCustomer(this.formInline);
|
|
|
|
|
if (ret && ret.code === 0) {
|
|
|
|
|
this.tableData = ret.data.list;
|
|
|
|
|
this.total = ret.data.total;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
prohibition(item) {
|
|
|
|
|
if (item.commentBlackStatus === 1) {
|
|
|
|
|
this.$confirm(`您确定取消禁言?`, {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
removeCommentBlack({
|
|
|
|
|
userPhone: item.userId,
|
|
|
|
|
productId: this.groupId,
|
|
|
|
|
productType: 41
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "取消禁言成功",
|
|
|
|
|
showClose: false,
|
|
|
|
|
type: "success"
|
|
|
|
|
});
|
|
|
|
|
this.msgUserIdsObj[item.userId].forEach(item => {
|
|
|
|
|
item.isForbidden = 2;
|
|
|
|
|
});
|
|
|
|
|
this.modifyStateCallback({
|
|
|
|
|
userId: item.userId,
|
|
|
|
|
isForbidden: 2,
|
|
|
|
|
modifyType: 2
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
} else {
|
|
|
|
|
this.clickItem = item;
|
|
|
|
|
const forbidSpeakRef = this.$refs.forbidSpeakRef;
|
|
|
|
|
forbidSpeakRef.dialogFormVisible = true;
|
|
|
|
|
forbidSpeakRef.formProhibition.userName = item.nickName;
|
|
|
|
|
forbidSpeakRef.formProhibition.phone = item.userId;
|
|
|
|
|
forbidSpeakRef.formProhibition.content = "";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
forbidSpeakCallback(userId) {
|
|
|
|
|
this.clickItem[userId].forEach(item => {
|
|
|
|
|
item.commentBlackStatus = 1;
|
|
|
|
|
});
|
|
|
|
|
}
|
2025-01-26 21:07:26 +08:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
2025-02-15 20:10:05 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.module-content {
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
h4 {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.table-area {
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
2025-02-23 13:59:14 +08:00
|
|
|
.pagination-wrap {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
2025-02-15 20:10:05 +08:00
|
|
|
</style>
|