This commit is contained in:
yanran200730
2022-02-18 13:43:37 +08:00
parent 2a8c3cd45f
commit fd76ce7ac1
7 changed files with 159 additions and 148 deletions

View File

@@ -3,8 +3,20 @@
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<ai-select placeholder="请选择状态" v-model="search.type" clearable @change="search.current = 1, getList()" :selectList="dict.getDict('discussType')"></ai-select>
<ai-select placeholder="请选择话题" v-model="search.status" clearable @change="search.current = 1, getList()" :selectList="dict.getDict('discussStatus')"></ai-select>
<ai-select
placeholder="请选择状态"
v-model="search.status"
clearable
@change="search.current = 1, getList()"
:selectList="dict.getDict('auditStatus')">
</ai-select>
<ai-select
placeholder="请选择话题"
v-model="search.topic"
clearable
@change="search.current = 1, getList()"
:selectList="dict.getDict('villagerCircleTopic')">
</ai-select>
</template>
<template #right>
<el-input
@@ -27,7 +39,7 @@
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="160px" 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" title="详情" @click="toDetail(row.id)">详情</el-button>
@@ -47,7 +59,8 @@
props: {
instance: Function,
dict: Object
dict: Object,
areaId: String
},
data() {
@@ -56,19 +69,18 @@
current: 1,
size: 10,
status: '',
type: '',
title: '',
areaId: ''
topic: '',
title: ''
},
total: 0,
colConfigs: [
{ prop: 'content', label: '议事主题', align: 'left', width: '200px' },
{ prop: 'type', label: '议事类型', align: 'center', formart: v => this.dict.getLabel('discussType', v) },
{ prop: 'createUserName', label: '话事人', align: 'center' },
{ prop: 'msgCountTotal', label: '观点数量', align: 'center', formart: v => v === 0 ? '-' : v },
{ prop: 'voteCount', label: '投票数量', align: 'center', formart: v => v === 0 ? '-' : v },
{ prop: 'status', label: '发布状态', align: 'center', formart: v => this.dict.getLabel('discussStatus', v) },
{ prop: 'createUserName', label: '发布人', align: 'left' },
{ prop: 'createTime', label: '发布时间', align: 'center' },
{ prop: 'content', label: '发布内容', align: 'center' },
{ prop: 'topic', label: '话题类型', align: 'center', formart: v => this.dict.getLabel('villagerCircleTopic', v) },
{ prop: 'status', label: '状态', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
{ prop: 'auditUserName', label: '审核人', align: 'center' },
{ prop: 'auditTime', label: '审核时间', align: 'center' },
{ slot: 'options', label: '操作', align: 'center' }
],
tableData: []
@@ -81,7 +93,7 @@
created () {
this.search.areaId = this.user.info.areaId
this.dict.load(['discussType', 'discussStatus']).then(() => {
this.dict.load(['villagerCircleTopic', 'auditStatus']).then(() => {
this.getList()
})
},
@@ -90,8 +102,8 @@
getList() {
this.instance.post(`/app/appvillagercirclecomment/list`, null, {
params: {
type: 0,
...this.search
...this.search,
areaId: this.areaId
}
}).then(res => {
if (res.code == 0) {