bug
This commit is contained in:
111
project/fengdu/app/AppHelp/components/GagList.vue
Normal file
111
project/fengdu/app/AppHelp/components/GagList.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title title="禁言列表" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.createUserName"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入用户昵称"
|
||||
clearable
|
||||
@clear="search.current = 1, search.createUserName = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'GagList',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
createUserName: ''
|
||||
},
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'commentCount', label: '用户昵称', align: 'left' },
|
||||
{ prop: 'commentCount', label: '所属地区', align: 'center' },
|
||||
{ prop: 'commentCount', label: '被禁言时间', align: 'center' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
createUserAreaId: this.search.areaId,
|
||||
beginDate: this.dateList[0] || '',
|
||||
endDate: this.dateList[1] || '',
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该帖子?').then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'List'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -2,6 +2,9 @@
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title title="邻里互助" isShowBottomBorder isShowArea :hideLevel="hideLevel-1" v-model="search.areaId" @change="changeArea">
|
||||
<template #rightBtn>
|
||||
<el-button size="small" type="primary" @click="toGagList">禁言名单</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
@@ -45,6 +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>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -71,7 +75,7 @@
|
||||
createUserName: '',
|
||||
areaId: ''
|
||||
},
|
||||
total: 10,
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'content', label: '内容', align: 'left', 'show-overflow-tooltip': true },
|
||||
{ prop: 'commentCount', label: '评论数', align: 'center', width: '120' },
|
||||
@@ -123,6 +127,23 @@
|
||||
})
|
||||
},
|
||||
|
||||
toGagList () {
|
||||
this.$emit('change', {
|
||||
type: 'GagList'
|
||||
})
|
||||
},
|
||||
|
||||
gag (id) {
|
||||
this.$confirm('确定禁言该用户?').then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('禁言成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该帖子?').then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user