|
|
|
@@ -45,17 +45,17 @@
|
|
|
|
|
<el-table v-loading="loading" :data="bannedList">
|
|
|
|
|
<el-table-column v-if="queryParams.type == 1" label="笔记名称" align="center" prop="contentId">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="primary" link>{{ scope.row.contentName }}</el-button>
|
|
|
|
|
<el-button type="primary" link :disabled="scope.row.handlingStatus == 1">{{ scope.row.contentName }}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column v-if="queryParams.type == 2" label="活动名称" align="center" prop="contentId">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="primary" link>{{ scope.row.contentName }}</el-button>
|
|
|
|
|
<el-button type="primary" link :disabled="scope.row.handlingStatus == 1">{{ scope.row.contentName }}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column v-if="queryParams.type == 3" label="评论内容" align="center" prop="contentId">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="primary" link>{{ scope.row.contentName }}</el-button>
|
|
|
|
|
<el-button type="primary" link :disabled="scope.row.handlingStatus == 1">{{ scope.row.contentName }}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="用户ID" align="center" prop="reportUserId" />
|
|
|
|
@@ -71,12 +71,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="头像" align="center" prop="avatar" />
|
|
|
|
|
<el-table-column label="举报理由" align="center" prop="reportReason" width="200px" show-overflow-tooltip />
|
|
|
|
|
<el-table-column label="举报理由" align="center" prop="reportReason" width="150px" show-overflow-tooltip />
|
|
|
|
|
<el-table-column label="举报人" align="center" prop="informerUserName" />
|
|
|
|
|
<el-table-column label="举报时间" align="center" prop="createTime" width="200px" />
|
|
|
|
|
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
|
|
|
|
|
<el-table-column label="操作人" align="center" prop="updateName" width="150px" />
|
|
|
|
|
<el-table-column label="用户状态" align="center" prop="status" width="150px" >
|
|
|
|
|
<el-table-column label="用户状态" align="center" prop="status" width="150px">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag v-if="scope.row.status == 1" type="info">禁言</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.status == 2" type="warning">封禁</el-tag>
|
|
|
|
@@ -89,15 +89,17 @@
|
|
|
|
|
<el-tag v-if="scope.row.handlingStatus == 1" type="warning">已处理</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button v-hasPermi="['manage:report:edit']" link type="primary" @click="handleUpdate(scope.row)">封禁</el-button>
|
|
|
|
|
<el-button v-hasPermi="['manage:report:edit']" link type="primary" :disabled="scope.row.status != 0" @click="handleUpdate(scope.row)"
|
|
|
|
|
>封禁</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="queryParams.type == 1"
|
|
|
|
|
v-hasPermi="['manage:report:remove']"
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="scope.row.status == 1"
|
|
|
|
|
:disabled="scope.row.handlingStatus == 1"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
>删除笔记</el-button
|
|
|
|
|
>
|
|
|
|
@@ -106,7 +108,7 @@
|
|
|
|
|
v-hasPermi="['manage:report:remove']"
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="scope.row.status == 1"
|
|
|
|
|
:disabled="scope.row.handlingStatus == 1"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
>删除活动</el-button
|
|
|
|
|
>
|
|
|
|
@@ -115,7 +117,7 @@
|
|
|
|
|
v-hasPermi="['manage:report:remove']"
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="scope.row.status == 1"
|
|
|
|
|
:disabled="scope.row.handlingStatus == 1"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
>删除评论</el-button
|
|
|
|
|
>
|
|
|
|
@@ -128,13 +130,13 @@
|
|
|
|
|
<!-- 添加或修改举报对话框 -->
|
|
|
|
|
<el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="bannedFormRef" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form-item label="封禁原因" prop="banReason">
|
|
|
|
|
<el-form-item label="封禁原因" prop="reason">
|
|
|
|
|
<el-select v-model="form.reason" placeholder="请选择封禁理由" clearable>
|
|
|
|
|
<el-option v-for="dict in dy_banned_ban_reason" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="处理方式" prop="handlingMethod">
|
|
|
|
|
<el-radio-group v-model="form.handlingMethod">
|
|
|
|
|
<el-form-item label="处理方式" prop="status">
|
|
|
|
|
<el-radio-group v-model="form.status">
|
|
|
|
|
<el-radio value="1" size="large">禁言</el-radio>
|
|
|
|
|
<el-radio value="2" size="large">封禁</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
@@ -223,13 +225,13 @@ const data = reactive<PageData<BannedForm, BannedQuery>>({
|
|
|
|
|
id: [{ required: true, message: '唯一标识ID不能为空', trigger: 'blur' }],
|
|
|
|
|
contentId: [{ required: true, message: '被举报内容id不能为空', trigger: 'blur' }],
|
|
|
|
|
reportUserId: [{ required: true, message: '被举报用户ID不能为空', trigger: 'blur' }],
|
|
|
|
|
reportReason: [{ required: true, message: '举报理由不能为空', trigger: 'blur' }],
|
|
|
|
|
reason: [{ required: true, message: '封禁理由不能为空', trigger: 'blur' }],
|
|
|
|
|
reportDetails: [{ required: true, message: '举报详细信息不能为空', trigger: 'blur' }],
|
|
|
|
|
informerUserId: [{ required: true, message: '举报人id不能为空', trigger: 'blur' }],
|
|
|
|
|
banReason: [{ required: true, message: '封禁理由不能为空', trigger: 'blur' }],
|
|
|
|
|
banDays: [{ required: true, message: '封禁天数不能为空', trigger: 'blur' }],
|
|
|
|
|
handlingMethod: [{ required: true, message: '处理方式(0=未处理,1=已下架)不能为空', trigger: 'change' }],
|
|
|
|
|
handlingStatus: [{ required: true, message: '状态(0=已发布,1=已下架)不能为空', trigger: 'change' }]
|
|
|
|
|
status: [{ required: true, message: '处理方式不能为空', trigger: 'change' }]
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@@ -290,22 +292,23 @@ const handleAdd = () => {
|
|
|
|
|
const handleUpdate = async (row?: BannedVO) => {
|
|
|
|
|
reset();
|
|
|
|
|
const _id = row?.id || ids.value[0];
|
|
|
|
|
const res = await getBanned(_id);
|
|
|
|
|
Object.assign(form.value, res.data);
|
|
|
|
|
// const res = await getBanned(_id);
|
|
|
|
|
// Object.assign(form.value, res.data);
|
|
|
|
|
dialog.visible = true;
|
|
|
|
|
dialog.title = `封禁【${row.nickname}】`;
|
|
|
|
|
dialog.title = `封禁【${row.nickName}】`;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
const submitForm = () => {
|
|
|
|
|
bannedFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
const arr = {
|
|
|
|
|
...form.value,
|
|
|
|
|
type: queryParams.value.type,
|
|
|
|
|
message: 0
|
|
|
|
|
}
|
|
|
|
|
if (valid) {
|
|
|
|
|
buttonLoading.value = true;
|
|
|
|
|
if (form.value.id) {
|
|
|
|
|
await updateBanned(form.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
} else {
|
|
|
|
|
await addBanned(form.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
}
|
|
|
|
|
await updatemanage(form.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
dialog.visible = false;
|
|
|
|
|
await getList();
|
|
|
|
@@ -320,7 +323,8 @@ const handleDelete = async (row?: BannedVO) => {
|
|
|
|
|
const arr = {
|
|
|
|
|
id: row?.contentId,
|
|
|
|
|
type: queryParams.value.type,
|
|
|
|
|
handlingStatus: 1
|
|
|
|
|
handlingStatus: 1,
|
|
|
|
|
message: 1
|
|
|
|
|
};
|
|
|
|
|
const text = queryParams.value.type == 1 ? '笔记名称为“' : queryParams.value.type == 2 ? '活动名称为“' : '评论内容为“';
|
|
|
|
|
await proxy?.$modal.confirm('是否确认删除' + text + _idsname + '"的数据项?').finally(() => (loading.value = false));
|
|
|
|
|