bug
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
<el-table-column slot="options" width="100px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="remove(row.id)">解除禁言</el-button>
|
||||
<el-button type="text" @click="remove(row.createUserId)">解除禁言</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -58,9 +58,9 @@
|
||||
},
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'commentCount', label: '用户昵称', align: 'left' },
|
||||
{ prop: 'commentCount', label: '所属地区', align: 'center' },
|
||||
{ prop: 'commentCount', label: '被禁言时间', align: 'center' }
|
||||
{ prop: 'createUserName', label: '用户昵称', align: 'left' },
|
||||
{ prop: 'areaName', label: '所属地区', align: 'center' },
|
||||
{ prop: 'createTime', label: '被禁言时间', align: 'center' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
@@ -72,12 +72,9 @@
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
this.instance.post(`/app/appneighborhoodassistance/blacklist`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
createUserAreaId: this.search.areaId,
|
||||
beginDate: this.dateList[0] || '',
|
||||
endDate: this.dateList[1] || '',
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -88,10 +85,10 @@
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该帖子?').then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||
this.$confirm('确定对该用户解除禁言?').then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/addBlacklist?userId=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.$message.success('解除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
<el-button type="text" @click="gag(row.id)">禁言</el-button>
|
||||
<el-button type="text" @click="gag(row.createUserId, row.blacklist)">{{ row.blacklist ? '解除禁言' : '禁言' }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -77,13 +77,14 @@
|
||||
},
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'content', label: '内容', align: 'left', 'show-overflow-tooltip': true },
|
||||
{ prop: 'content', label: '内容', align: 'left' },
|
||||
{ prop: 'createUserName', label: '发帖人', align: 'center', width: '120' },
|
||||
{ prop: 'createUserAreaName', label: '所属地区', align: 'center' },
|
||||
{ prop: 'createTime', label: '创建时间', align: 'center' },
|
||||
{ prop: 'commentCount', label: '评论数', align: 'center', width: '120' },
|
||||
{ prop: 'appreciateCount', label: '点赞数', align: 'center', width: '120' },
|
||||
{ prop: 'sharedCount', label: '分享数', align: 'center', width: '120' },
|
||||
{ prop: 'createUserName', label: '发帖人', align: 'center', width: '120' },
|
||||
{ prop: 'createUserAreaName', label: '所在地区', align: 'center', width: '120' },
|
||||
{ prop: 'createTime', label: '创建时间', align: 'center', width: '180' },
|
||||
{ prop: 'blacklist', label: '状态', align: 'center', format: v => v ? '禁言' : '正常' },
|
||||
{ slot: 'options'},
|
||||
],
|
||||
tableData: [],
|
||||
@@ -133,11 +134,11 @@
|
||||
})
|
||||
},
|
||||
|
||||
gag (id) {
|
||||
this.$confirm('确定禁言该用户?').then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||
gag (id, status) {
|
||||
this.$confirm(`确定${status ? '解除禁言' : '禁言'}该用户?`).then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/addBlacklist?userId=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('禁言成功!')
|
||||
this.$message.success(`${status ? '解除禁言' : '禁言'}成功!`)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user