diff --git a/src/views/cai/report/index.vue b/src/views/cai/report/index.vue
index 94e1dd4..0842bc6 100644
--- a/src/views/cai/report/index.vue
+++ b/src/views/cai/report/index.vue
@@ -74,6 +74,14 @@
+
+
+ 正常
+ 禁言
+ 封禁
+ 封禁+禁言
+
+
@@ -106,6 +114,15 @@
v-hasPermi="['cai:report:remove']"
>删除
+ handleCommand(command, scope.row)">
+ 更多
+
+ 封禁IM
+ 解封IM
+ 禁言
+ 解封禁言
+
+
@@ -126,6 +143,7 @@
import { delReport, listReport, updateReport } from '@/api/cai/report'
import { reportStatusList, reportTypeList } from '@/constant/statusMap'
import UserForbidDialog from "@/views/cai/user/user-forbid-dialog";
+import {enSpeckIm, lockIm, noSpeckIm, unLockIm, userLogout} from "@/api/cai/user";
export default {
name: 'Report',
@@ -230,6 +248,76 @@ export default {
this.$refs.userForbid.init(row.reportUid)
})
},
+ handleLockIm(row){
+ this.$modal.confirm('是否确认封禁用户"' + row.reportNickname + '"的IM?').then(() => {
+ this.loading = true;
+ return lockIm(row.reportUid);
+ }).then(() => {
+ this.loading = false;
+ this.getList();
+ this.$modal.msgSuccess("操作成功");
+ }).catch(() => {
+ }).finally(() => {
+ this.loading = false;
+ });
+ },
+ handleUnlockIm(row){
+ this.$modal.confirm('是否确认解封用户"' + row.reportNickname + '"的IM?').then(() => {
+ this.loading = true;
+ return unLockIm(row.reportUid);
+ }).then(() => {
+ this.loading = false;
+ this.getList();
+ this.$modal.msgSuccess("操作成功");
+ }).catch(() => {
+ }).finally(() => {
+ this.loading = false;
+ });
+ },
+ handleNoSpeckIm(row){
+ this.$modal.confirm('是否确认封禁用户"' + row.reportNickname + '"的IM聊天功能?').then(() => {
+ this.loading = true;
+ return noSpeckIm(row.reportUid);
+ }).then(() => {
+ this.loading = false;
+ this.getList();
+ this.$modal.msgSuccess("操作成功");
+ }).catch(() => {
+ }).finally(() => {
+ this.loading = false;
+ });
+ },
+ handleEnSpeckIm(row){
+ this.$modal.confirm('是否确认解封用户"' + row.reportNickname + '"的IM聊天功能?').then(() => {
+ this.loading = true;
+ return enSpeckIm(row.reportUid);
+ }).then(() => {
+ this.loading = false;
+ this.getList();
+ this.$modal.msgSuccess("操作成功");
+ }).catch(() => {
+ }).finally(() => {
+ this.loading = false;
+ });
+ },
+ handleCommand(command, row) {
+ switch (command) {
+ case "handleLockIm":
+ this.handleLockIm(row);
+ break;
+ case "handleUnlockIm":
+ this.handleUnlockIm(row);
+ break;
+ case "handleNoSpeckIm":
+ this.handleNoSpeckIm(row);
+ break;
+ case "handleEnSpeckIm":
+ this.handleEnSpeckIm(row);
+ break;
+ default:
+ break;
+ }
+ },
}
}