|
@ -48,16 +48,19 @@ |
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column> |
|
|
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column> |
|
|
<el-table-column prop="nickname" label="发言人" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="nickname" label="发言人" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="createdTime" label="时间" header-align="center" align="center" width="180"></el-table-column> |
|
|
<el-table-column prop="createdTime" label="时间" header-align="center" align="center" width="160"></el-table-column> |
|
|
<el-table-column prop="topicContent" label="话题内容" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="topicContent" label="话题内容" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="commentNum" label="评论数" header-align="center" align="center" width="70"></el-table-column> |
|
|
<el-table-column prop="commentNum" label="评论数" header-align="center" align="center" width="70"></el-table-column> |
|
|
<el-table-column prop="browseNum" label="浏览数" header-align="center" align="center" width="70"></el-table-column> |
|
|
<el-table-column prop="browseNum" label="浏览数" header-align="center" align="center" width="70"></el-table-column> |
|
|
<el-table-column prop="supportNum" label="点赞数" header-align="center" align="center" width="70"></el-table-column> |
|
|
<el-table-column prop="supportNum" label="点赞数" header-align="center" align="center" width="70"></el-table-column> |
|
|
|
|
|
<el-table-column prop="topFlag" label="置顶状态" header-align="center" align="center" width="100" :formatter="topFlagFormat"></el-table-column> |
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button> |
|
|
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button> |
|
|
<el-button v-if="scope.row.state !== 20" type="text" size="small" @click="close(scope.row.id)">{{ $t('close') }}</el-button> |
|
|
<el-button v-if="scope.row.state !== 20" type="text" size="small" @click="close(scope.row.id)">{{ $t('close') }}</el-button> |
|
|
<el-button type="text" size="small" v-if="scope.row.state ===20" :disabled="true">已关闭</el-button> |
|
|
<el-button type="text" size="small" v-if="scope.row.state ===20" :disabled="true">已关闭</el-button> |
|
|
|
|
|
<el-button v-if="scope.row.state !== 20 && scope.row.topFlag === '0'" type="text" size="small" @click="top(scope.row.id, '1')">{{ '置顶' }}</el-button> |
|
|
|
|
|
<el-button v-if="scope.row.state !== 20 && scope.row.topFlag === '1'" type="text" size="small" @click="top(scope.row.id, '0')">{{ '取消置顶' }}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -187,6 +190,39 @@ export default { |
|
|
} |
|
|
} |
|
|
this.options = res.data.options |
|
|
this.options = res.data.options |
|
|
}).catch(() => {}) |
|
|
}).catch(() => {}) |
|
|
|
|
|
}, |
|
|
|
|
|
topFlagFormat: function (row, column) { |
|
|
|
|
|
let topFlag = row.topFlag |
|
|
|
|
|
if (topFlag === '0') { |
|
|
|
|
|
return '未置顶' |
|
|
|
|
|
} else if (topFlag === '1') { |
|
|
|
|
|
return '已置顶' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
top (id, topFlag) { |
|
|
|
|
|
let title = '置顶' |
|
|
|
|
|
if (topFlag === '0') { |
|
|
|
|
|
title = '取消置顶' |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': title }), this.$t(title), { |
|
|
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.$http['post']('/partyGroup/partytopic/top', { 'topicId': id, 'topFlag': topFlag }).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: this.$t('prompt.success'), |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
}).catch(() => {}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|