440 lines
12 KiB
Vue
440 lines
12 KiB
Vue
<!--
|
|
* @Author: 王枫叶
|
|
* @Date: 2020-10-21 16:53:48
|
|
* @LastEditors: 王枫叶
|
|
* @LastEditTime: 2020-12-18 19:42:17
|
|
-->
|
|
<!-- -->
|
|
<template>
|
|
<div class="action-bar">
|
|
<div style="margin-bottom:20px">
|
|
<!-- <el-select
|
|
v-model="params.processingStatus"
|
|
size="small"
|
|
placeholder="请选择处理状态"
|
|
clearable
|
|
@change="getFeedbList"
|
|
>
|
|
<el-option
|
|
v-for="item in processingStatusList"
|
|
:value="item.value"
|
|
:label="item.label"
|
|
:key="item.value"
|
|
></el-option>
|
|
</el-select> -->
|
|
<el-select
|
|
v-model="params.type"
|
|
size="small"
|
|
placeholder="请选择举报类型"
|
|
clearable
|
|
@change="getFeedbList"
|
|
class="param-input"
|
|
>
|
|
<el-option
|
|
v-for="item in feedbackTypes"
|
|
:value="item.value"
|
|
:label="item.label"
|
|
:key="item.value"
|
|
></el-option>
|
|
</el-select>
|
|
<el-input
|
|
placeholder="请输用户ID "
|
|
v-model.number="params.uid"
|
|
clearable
|
|
size="small"
|
|
@change="getFeedbList"
|
|
class="param-input"
|
|
></el-input>
|
|
<el-input
|
|
placeholder="请输入裸聊ID"
|
|
v-model="params.nudeChatId"
|
|
clearable
|
|
size="small"
|
|
@change="getFeedbList"
|
|
class="param-input"
|
|
></el-input>
|
|
<!-- <el-date-picker
|
|
v-model="time"
|
|
type="datetimerange"
|
|
range-separator="至"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期"
|
|
size="small"
|
|
@change="changeTime"
|
|
></el-date-picker> -->
|
|
<el-button type="primary" size="small" @click="getFeedbList('status')" style="margin-right:10px">搜索</el-button>
|
|
</div>
|
|
|
|
<!--数据表格-->
|
|
<el-table
|
|
:data="tableData"
|
|
style="width: 100%"
|
|
border
|
|
v-loading="loading"
|
|
element-loading-text="拼命加载中"
|
|
element-loading-spinner="el-icon-loading"
|
|
ref="multipleTable"
|
|
height="600"
|
|
>
|
|
<el-table-column
|
|
prop="id"
|
|
label="ID"
|
|
align="center"
|
|
min-width="160"
|
|
fixed
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.id }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="uid" label="用户ID" align="center" min-width="100">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.uid }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="type"
|
|
label="举报类型"
|
|
align="center"
|
|
min-width="120"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.type | feedbackTypeList }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="nudeChatId"
|
|
label="楼凤id"
|
|
align="center"
|
|
min-width="160"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.nudeChatId }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="content"
|
|
label="内容"
|
|
align="center"
|
|
min-width="200"
|
|
:show-overflow-tooltip="true"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.content ? scope.row.content : "--" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="images"
|
|
label="图片"
|
|
align="center"
|
|
min-width="200"
|
|
:show-overflow-tooltip="true"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span v-if="!scope.row.images || !scope.row.images.length">未知</span>
|
|
<div
|
|
v-else
|
|
class="picturePreview"
|
|
@click="previewPicture(scope.row.images, scope.row.id)"
|
|
>
|
|
<decrypt-img
|
|
style="width: 70px; height: 70px"
|
|
:src="imgUrl + item"
|
|
fit="fill"
|
|
v-for="(item, i) in scope.row.images"
|
|
:key="i"
|
|
></decrypt-img>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="receipt"
|
|
label="回执信息"
|
|
align="center"
|
|
min-width="160"
|
|
:show-overflow-tooltip="true"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.receipt || '暂无回复!' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column
|
|
prop="processingStatus"
|
|
label="处理状态"
|
|
align="center"
|
|
min-width="120"
|
|
fixed="right"
|
|
>
|
|
<template slot-scope="scope">
|
|
<p class="stuate"
|
|
:style="
|
|
(colors =
|
|
scope.row.processingStatus === 0
|
|
? 'background:#fff'
|
|
: scope.row.processingStatus === 1
|
|
? 'background:rgba(29,211,66,1)'
|
|
: 'background:rgba(255,100,97,1)')
|
|
"
|
|
>{{ scope.row.processingStatus | processingStatusList }}</p
|
|
>
|
|
</template>
|
|
</el-table-column> -->
|
|
<el-table-column
|
|
prop="createdAt"
|
|
label="创建时间"
|
|
align="center"
|
|
min-width="160"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createdAt | changeDate }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="updatedAt"
|
|
label="修改时间"
|
|
align="center"
|
|
min-width="160"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.updatedAt | changeDate }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
label="操作"
|
|
align="center"
|
|
fixed="right"
|
|
min-width="200"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
type="success"
|
|
size="mini"
|
|
@click="toExamine(scope.row)"
|
|
:disabled="scope.row.status === 0 ? false : true"
|
|
>处理</el-button
|
|
>
|
|
<el-button
|
|
type="info"
|
|
size="mini"
|
|
@click="refuseReview(scope.row)"
|
|
:disabled="scope.row.status === 0 ? false : true"
|
|
>忽略</el-button
|
|
>
|
|
<el-button
|
|
type="danger"
|
|
size="mini"
|
|
@click="setChosen(scope.row)"
|
|
>下架</el-button>
|
|
<!-- <el-button
|
|
type="warning"
|
|
size="mini"
|
|
@click="Action(scope.row)"
|
|
>楼凤详情</el-button> -->
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--分页组件-->
|
|
<el-pagination
|
|
:page-sizes="[10, 15, 20, 30]"
|
|
:current-page="params.pageNumber"
|
|
:page-size="params.pageSize"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="total"
|
|
background
|
|
v-if="total > 5"
|
|
@size-change="changeSize"
|
|
@current-change="changeCurrent"
|
|
></el-pagination>
|
|
<!-- 背景图集预览窗口 -->
|
|
<preview-picture
|
|
ref="previewPicture"
|
|
@handlerChannelList="getFeedbList"
|
|
></preview-picture>
|
|
<!-- 添加审核检查 -->
|
|
<check ref="check" @handlerAgentList="getFeedbList" />
|
|
<!-- 楼凤详情 -->
|
|
<lf-details ref="lfDetails" ></lf-details>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import API from '@/api'
|
|
import baseConfig from '@/utils/serverUrlConfig'
|
|
import PreviewPicture from './components/previewPicture'
|
|
import Check from './components/check'
|
|
import { changeTime } from "@/utils/global";
|
|
import lfDetails from './components/lfDetails'
|
|
export default {
|
|
data() {
|
|
return {
|
|
imgUrl: baseConfig.imgUrl,
|
|
// 表格数据加载动画
|
|
loading: false,
|
|
// 列表数据
|
|
tableData: [],
|
|
time: "",
|
|
total: 0,
|
|
// 系统管理列表请求参数
|
|
params: {
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
// processingStatus:undefined,
|
|
uid:undefined,
|
|
nudeChatId:undefined,
|
|
type:undefined,
|
|
// startTime: undefined,
|
|
// endTime: undefined,
|
|
},
|
|
param: {
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
},
|
|
processingStatusList:[
|
|
{label:'全部',value:undefined},
|
|
{label:'等待处理',value:0},
|
|
{label:'处理完成',value:1},
|
|
{label:'忽略',value:2},
|
|
],
|
|
feedbackTypes:[
|
|
{label:'无效联系方式',value:1},
|
|
{label:'骗子',value:2},
|
|
{label:'重复信息',value:3},
|
|
],
|
|
|
|
}
|
|
},
|
|
components: {
|
|
Check,
|
|
PreviewPicture,
|
|
lfDetails
|
|
},
|
|
created() {
|
|
this.getFeedbList()
|
|
},
|
|
methods: {
|
|
// 请求举报信息列表
|
|
getFeedbList(type) {
|
|
this.loading = true
|
|
if (type === 'status') {
|
|
this.params.pageNumber = 1
|
|
}
|
|
API.queryFeedback(this.params)
|
|
.then((res) => {
|
|
if (res.code === 200 && res.data) {
|
|
this.tableData = res.data.data
|
|
this.total = res.data.total
|
|
} else {
|
|
this.tableData = []
|
|
}
|
|
this.loading = false
|
|
})
|
|
.catch(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
|
|
// 图集预览
|
|
previewPicture(pictureArr, id) {
|
|
const Arr = JSON.parse(JSON.stringify(pictureArr))
|
|
this.$refs.previewPicture.open(Arr, id)
|
|
},
|
|
// 审核
|
|
toExamine(data) {
|
|
this.$refs.check.open(data)
|
|
},
|
|
// 楼凤详情
|
|
Action(data) {
|
|
this.$refs.lfDetails.open(data)
|
|
},
|
|
//是否激活
|
|
setChosen(row) {
|
|
{
|
|
let params = {
|
|
id: row.id,
|
|
type: 3,
|
|
nudeChatId: row.nudeChatId,
|
|
};
|
|
API.operateFeedback(params).then((res) => {
|
|
if (res.code === 200) {
|
|
this.$message({
|
|
message:"下架操作成功!",
|
|
type: "success",
|
|
});
|
|
this.getFeedbList();
|
|
} else {
|
|
this.$message.error("下架操作失败!");
|
|
}
|
|
});
|
|
}
|
|
|
|
},
|
|
// 拒绝
|
|
refuseReview(row) {
|
|
let params = Object.assign(
|
|
{},
|
|
{
|
|
id: row.id,
|
|
type: 2,
|
|
nudeChatId: row.nudeChatId,
|
|
}
|
|
);
|
|
API.operateFeedback(params)
|
|
.then((res) => {
|
|
if (res.code === 200) {
|
|
this.$message({
|
|
message: "操作成功",
|
|
type: "success",
|
|
});
|
|
this.getFeedbList();
|
|
} else {
|
|
if (res.tip) {
|
|
this.$message.error(res.tip);
|
|
} else {
|
|
this.$message.error("操作失败");
|
|
}
|
|
}
|
|
// this.handleClose();
|
|
// this.flag = false;
|
|
})
|
|
.catch(() => {
|
|
// this.handleClose();
|
|
// this.flag = false;
|
|
});
|
|
},
|
|
// 时间触发回调
|
|
changeTime(time) {
|
|
if (time) {
|
|
this.params.startTime = changeTime(time[0]) || "";
|
|
this.params.endTime = changeTime(time[1]) || "";
|
|
} else {
|
|
this.params.startTime = "";
|
|
this.params.endTime = "";
|
|
}
|
|
this.getFeedbList("status");
|
|
},
|
|
// 分页条数改变回掉
|
|
changeSize(size) {
|
|
this.params.pageSize = size
|
|
this.getFeedbList()
|
|
},
|
|
// 分页页码改变回掉
|
|
changeCurrent(pageNumber) {
|
|
this.params.pageNumber = pageNumber
|
|
this.getFeedbList()
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.payMethod {
|
|
.stuate{
|
|
display: block;
|
|
width: 200px;
|
|
}
|
|
.add-input {
|
|
margin-left: 0 !important;
|
|
}
|
|
}
|
|
</style>
|