feat:举报管理
This commit is contained in:
1 parent
3d5e0ab41d
commit
0745c147e0
2 files changed
+160
-1
No files matched your search
@@ -63,6 +63,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Pagination v-model:limit="queryParams.pageSize" v-model:page="queryParams.pageNo" :total="total"
|
||||
@pagination="getList" />
|
||||
<ComAuthForm ref="formRef" @success="getList" />
|
||||
</ContentWrap>
|
||||
</template>
|
||||
@@ -78,12 +80,13 @@ import ComAuthForm from './cmp/com-auth-form.vue'
|
||||
const message = useMessage()
|
||||
const { t } = useI18n()
|
||||
|
||||
const queryFormRef = ref()
|
||||
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
const list = ref([])
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
status: null
|
||||
})
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="举报用户" prop="operatorMemberNickname">
|
||||
<el-input v-model="queryParams.operatorMemberNickname" placeholder="请输入举报用户" clearable
|
||||
@keyup.enter="handleQuery" class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="被举报用户" prop="memberNickname">
|
||||
<el-input v-model="queryParams.memberNickname" placeholder="请输入被举报用户" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery">
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="举报用户" align="center" prop="icon" min-width="150">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center gap-2">
|
||||
<PreviewImage :src="row.operatorMemberAvatar" />
|
||||
<div class="flex flex-col items-start">
|
||||
<div class="table-cell">
|
||||
<span>昵称:</span>
|
||||
<span class="color-lightblue">{{ row.operatorMemberNickname }}</span>
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<span>手机号:</span>
|
||||
<span class="color-lightblue">{{ row.operatorMemberPhone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="被举报用户" align="center" prop="icon" min-width="150">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center gap-2">
|
||||
<PreviewImage :src="row.memberAvatar" />
|
||||
<div class="flex flex-col items-start">
|
||||
<div class="table-cell">
|
||||
<span>昵称:</span>
|
||||
<span style="color-red">{{ row.memberNickname }}</span>
|
||||
</div>
|
||||
<div class="table-cell">
|
||||
<span>手机号:</span>
|
||||
<span style="color-red">{{ row.memberPhone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="举报类型" align="center" prop="icon" min-width="150">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.operationType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图片" align="center" prop="icon" min-width="150">
|
||||
<template #default="{ row }">
|
||||
<PreviewImage :src="row.reportPic" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="举报内容" align="center" prop="reportDescription" min-width="150" />
|
||||
<el-table-column label="举报时间" align="center" prop="createTime" :formatter="dateFormatter" width="180" />
|
||||
</el-table>
|
||||
<Pagination v-model:limit="queryParams.pageSize" v-model:page="queryParams.pageNo" :total="total"
|
||||
@pagination="getList" />
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
import { OperationVO, OperationApi } from '@/api/member/operation'
|
||||
import * as ConfigApi from '@/api/member/config'
|
||||
|
||||
const queryFormRef = ref()
|
||||
|
||||
const loading = ref(true)
|
||||
const list = ref<any[]>([])
|
||||
const total = ref(0)
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
operatorMemberNickname: '',
|
||||
createTime: []
|
||||
})
|
||||
const memberConfig = reactive({
|
||||
|
||||
})
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await OperationApi.getOperationPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查询会员配置
|
||||
const getConfig = async () => {
|
||||
try {
|
||||
const data = await ConfigApi.getConfig()
|
||||
Object.assign(memberConfig, data)
|
||||
} catch (error) {
|
||||
console.log("|查询会员配置|,意外的错误:", error);
|
||||
}
|
||||
}
|
||||
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
getConfig()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.table-cell {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
span:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
span:last-child {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user