Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-02-18 10:15:17 +08:00
5 changed files with 93 additions and 65 deletions

View File

@@ -57,8 +57,10 @@
</el-table-column>
<el-table-column label="操作" slot="options" align="center" width="150">
<template v-slot="{row}">
<el-button type="text" title="修改" @click="goPage(tab.value==0 ? 'addConfig':'guidance',row)">修改</el-button>
<el-button type="text" title="删除" @click="delInfo(row)">删除</el-button>
<div class="table-options">
<el-button type="text" title="编辑" @click="goPage(tab.value==0 ? 'addConfig':'guidance',row)">编辑</el-button>
<el-button type="text" title="删除" @click="delInfo(row)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>

View File

@@ -44,8 +44,8 @@
tabs () {
const tabList = [
{label: '村民圈列表', name: 'List', comp: List, permission: ''},
{label: '评论列表', name: 'CommentsList', comp: CommentsList, permission: ''}
{label: '信息审核', name: 'List', comp: List, permission: ''},
{label: '评论审核', name: 'CommentsList', comp: CommentsList, permission: ''}
]
return tabList

View File

@@ -1,5 +1,5 @@
<template>
<ai-list class="notice" isTabs>
<ai-list isTabs>
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
@@ -27,13 +27,6 @@
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="tags" label="标签">
<template slot-scope="{ row }">
<div class="table-tags">
<el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
@@ -67,9 +60,7 @@
title: '',
areaId: ''
},
currIndex: -1,
areaList: [],
total: 10,
total: 0,
colConfigs: [
{ prop: 'content', label: '议事主题', align: 'left', width: '200px' },
{ prop: 'type', label: '议事类型', align: 'center', formart: v => this.dict.getLabel('discussType', v) },
@@ -80,8 +71,6 @@
{ prop: 'createTime', label: '发布时间', align: 'center' },
{ slot: 'options', label: '操作', align: 'center' }
],
areaName: '',
unitName: '',
tableData: []
}
},
@@ -106,12 +95,7 @@
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records.map(v => {
return {
...v,
content: v.content || v.title
}
})
this.tableData = res.data.records
this.total = res.data.total
}
})
@@ -141,6 +125,4 @@
</script>
<style lang="scss" scoped>
.notice {
}
</style>

View File

@@ -7,37 +7,55 @@
<template slot="content">
<ai-card title="基础信息">
<ai-wrapper slot="content">
<ai-info-item label="题" :value="info.content" isLine></ai-info-item>
<ai-info-item label="发布地区" :value="info.areaName" isLine></ai-info-item>
<ai-info-item label="议事截止时间" :value="info.discussDeadline"></ai-info-item>
<ai-info-item label="公示截止时间" :value="info.publicityDeadline"></ai-info-item>
<ai-info-item label="议事类型" :value="dict.getLabel('discussType', info.type)" isLine></ai-info-item>
<ai-info-item label="是否匿名投票" v-if="info.type === '1'" :value="info.anonymous === '1' ? '是' : '否'"></ai-info-item>
<ai-info-item label="投票方式" v-if="info.type === '1'" :value="info.voteType === '0' ? '单选' : '多选'"></ai-info-item>
<ai-info-item label="题" :value="dict.getLabel('villagerCircleTopic', info.topic)" isLine></ai-info-item>
<ai-info-item label="发布" :value="info.createUserName" isLine></ai-info-item>
<ai-info-item label="发布时间" :value="info.createTime" isLine></ai-info-item>
<ai-info-item label="所在位置" :value="info.gpsDesc" isLine></ai-info-item>
<ai-info-item label="内容" :value="info.content" isLine></ai-info-item>
<ai-info-item label="图片" isLine>
<ai-uploader
:instance="instance"
disabled
v-model="info.images"
v-model="info.pictures"
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
</ai-card>
<ai-card title="处理结果" v-if="info.status > 0">
<div slot="content" style="margin-top: 16px">
<ai-wrapper
label-width="120px">
<ai-info-item label="处理结果" :value="info.status === '1' ? '通过' : '拒绝'" isLine></ai-info-item>
<ai-info-item label="原因" v-if="info.status === '2'" isLine :value="info.auditOpinion"></ai-info-item>
<ai-info-item label="审核人" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item>
</ai-wrapper>
</div>
</ai-card>
<ai-dialog
:visible.sync="isShowAdd"
width="680px"
height="580px"
title="发表意见"
:visible.sync="isShow"
width="800px"
@close="onClose"
title="审核"
@onConfirm="onConfirm">
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
<el-form-item label="发表意见" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请发表你的观点和意见', trigger: 'blur' }]">
<el-input size="small" type="textarea" :rows="5" show-word-limit :maxlength="140" placeholder="请发表你的观点和意见" v-model="form.content"></el-input>
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
<el-radio-group v-model="form.pass">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" v-if="form.pass === '0'" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template>
<template #footer >
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
</template>
</ai-detail>
</template>
@@ -60,10 +78,11 @@
current: 1,
size: 10
},
isShowAdd: false,
form: {
content: ''
opinion: '',
pass: ''
},
isShow: false,
type: ''
}
},
@@ -78,17 +97,36 @@
methods: {
getInfo (id) {
this.instance.post(`/app/appvillagediscuss/queryDetailById?id=${id}`).then(res => {
this.instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.info.images = res.data.images ? JSON.parse(res.data.images) : []
this.type = res.data.type
}
})
},
onClose () {
this.form.content = ''
this.form.pass = ''
this.form.opinion = ''
this.id = ''
},
onConfirm() {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appvillagercircleinfo/examine', null, {
params: {
...this.form,
id: this.params.id
}
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getInfo(this.params.id)
this.$message.success('审核成功!')
}
})
}
})
},
cancel (isRefresh) {

View File

@@ -1,10 +1,22 @@
<template>
<ai-list class="notice" isTabs>
<ai-list isTabs>
<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>
@@ -56,25 +68,21 @@
current: 1,
size: 10,
status: '',
type: '',
topic: '',
title: '',
areaId: ''
},
currIndex: -1,
areaList: [],
total: 10,
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' }
],
areaName: '',
unitName: '',
tableData: []
}
},
@@ -85,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()
})
},
@@ -134,6 +142,4 @@
</script>
<style lang="scss" scoped>
.notice {
}
</style>