评论管理
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="90px" fixed="right" label="操作" align="center">
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toAdd(row.id)">显示</el-button>
|
||||
<el-button type="text" @click="show(row.id, row.isShow)">{{ row.isShow === '1' ? '隐藏' : '显示' }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -36,7 +36,8 @@
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
@@ -49,23 +50,21 @@
|
||||
},
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{ prop: 'title', label: '微信昵称', align: 'left' },
|
||||
{ prop: 'createUserName', label: '评论', align: 'center' },
|
||||
{ prop: 'beginTime', label: '状态', align: 'center' },
|
||||
{ prop: 'endTime', label: '已学习人数', align: 'center' },
|
||||
{ prop: 'createTime', label: '评论数', align: 'center' }
|
||||
{ prop: 'name', label: '微信昵称', align: 'left' },
|
||||
{ prop: 'content', label: '评论', align: 'center' },
|
||||
{ prop: 'commentTime', label: '评论时间', align: 'center' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
created () {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appmarketingactivityinfo/list`, null, {
|
||||
this.instance.post(`/app/appcoursecomment/list?courseId=${this.params.id}`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
@@ -83,11 +82,11 @@
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该活动?').then(() => {
|
||||
this.instance.post(`/app/appmarketingactivityinfo/delete?id=${id}`).then(res => {
|
||||
show (id, isShow) {
|
||||
this.$confirm(isShow === '1' ? '确定隐藏该留言?' : '确定隐藏该留言').then(() => {
|
||||
this.instance.post(`/app/appcoursecomment/configCommentById?id=${id}&status=${isShow === '1' ? '0' : '1'}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user