村民圈需求变更

This commit is contained in:
shijingjing
2022-02-18 14:33:36 +08:00
parent 869611d1bc
commit 78face1204
7 changed files with 726 additions and 192 deletions

View File

@@ -1,34 +1,8 @@
<template>
<div class="AppVillagersCircle">
<!-- tab栏 -->
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
</div>
<!-- 全部 -->
<div>
<div class="search-box" v-if="tabIndex==0">
<div class="integral-types" @click="showType = true">{{ topicType? topicType:'话题类型' }}<u-icon name="arrow-down"></u-icon></div>
<u-search placeholder="请输入关键字" v-model="content" :show-action="false" @search="getList()" @clear="getList()"></u-search>
</div>
<div class="card-list" v-if="villagerList.length">
<div class="card-item" v-for="(item,index) in villagerList" :key="index" @click="toDetail(item)">
<div class="card-title">{{ item.content }}</div>
<div class="card-name">
<div class="name">发布信息</div>
<div class="name">{{$dict.getLabel('villagerCircleTopic',item.topic)}}</div>
<div class="time">{{ item.createTime }}</div>
</div>
<div class="card-type">
<div class="type">{{$dict.getLabel('auditStatus',item.auditType)}}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
<u-select v-model="showType" :list="$dict.getDict('villagerCircleTopic')" label-name="dictName" value-name="dictValue"
@confirm="confirmTypeSelect"/>
<div class="banner" v-for="(item, index) in bannerList" :key="index" @click="linkTo(item.linkUrl)">
<img :src="item.img" alt="">
<p>{{item.title}}</p>
</div>
</div>
</template>
@@ -36,176 +10,59 @@
<script>
export default {
name: 'AppVillagersCircle',
appName: '村民圈',
data () {
appName: '村民圈审核',
data() {
return {
tabs: ['全部', '待处理', '已处理'],
tabIndex: '',
showType: false,
content: '',
typeList: [],
villagerList: [],
current: 1,
topic: '',
topicType: '',
}
},
onLoad() {
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
this.current = 1
this.getList()
})
},
methods: {
tabClick(index) {
this.tabIndex = index
this.current = 1,
this.topic = '',
this.topicType = '',
this.villagerList = [],
this.getList()
},
getList() {
this.$http.post('app/appvillagercircleinfo/list',null,{
params: {
current: 1,
size: 10,
auditType: this.tabIndex == 0 ? '': this.tabIndex == 1 ? 0 : 1,
topic: this.topic,
content: this.content
bannerList: [
{
img: require('./img/blue.png'),
title: '发布信息审核',
linkUrl: './infoList'
},
{
img: require('./img/green.png'),
title: '评论审核',
linkUrl: './commentList'
}
}).then(res=>{
if(res?.data) {
this.villagerList = this.current >1 ? [...this.villagerList,...res.data.records] : res.data.records
}
})
},
confirmTypeSelect(e) {
this.topic = e[0].value,
this.topicType = e[0].label
this.current = 1,
this.villagerList = []
this.getList()
},
toDetail(item) {
uni.navigateTo({url: `./detail?id=${item.id}`})
]
}
},
onShow() {
document.title = '村民圈'
document.title = '村民圈审核'
},
methods: {
linkTo(url) {
uni.navigateTo({url})
}
},
}
</script>
<style lang="scss" scoped>
.AppVillagersCircle {
.tab-select {
width: 100%;
height: 96px;
line-height: 96px;
background: #3975C6;
display: flex;
.item{
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
uni-page-body {
height: 100%!important;
background-color: #fff!important;
}
.AppVillagersCircle{
height: 100%;
padding-top: 16px;
.banner{
padding: 32px 40px 0;
position: relative;
img{
width: 100%;
height: 228px;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span{
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.search-box {
display: flex;
width: 100%;
height: 112px;
line-height: 112px;
background-color: #FFFFFF;
padding: 0 32px;
box-sizing: border-box;
.integral-types {
width: 30%;
}
}
.card-list {
width: 100%;
padding: 0 32px;
box-sizing: border-box;
.card-item {
margin-top: 24px;
background-color: #FFFFFF;
box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.02);
border-radius: 16px;
padding: 30px 32px 20px 32px;
.card-title {
height: 60px;
line-height: 60px;
font-size: 36px;
color: #333333;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.card-name {
margin-top: 30px;
display: flex;
height: 50px;
line-height: 50px;
font-size: 28px;
color: #999999;
.name {
padding: 0 15px;
background: #EEEEEE;
border-radius: 24px;
margin-right: 20px;
}
}
.card-type {
margin-top: 30px;
font-size: 28px;
.num {
font-size: 34px;
color: #E6736E;
}
.status0 {
color: #FF9B2B;
}
.status1 {
color: #4181FF;
}
}
p{
position: absolute;
top: 120px;
left: 88px;
font-size: 44px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #FFF;
line-height: 60px;
}
}
}
</style>
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="detail">
<div class="commentDetail">
<div class="avatar-info">
<div class="avatar-img">
<img src="./img/tx@2x.png" alt="">
@@ -64,7 +64,7 @@
<script>
export default {
name: 'detail',
name: 'commentDetail',
data() {
return {
files: [],
@@ -113,13 +113,13 @@ export default {
}
},
onShow() {
document.title = "村民圈审核"
document.title = "评论审核"
},
}
</script>
<style lang="scss" scoped>
.detail {
.commentDetail {
.avatar-info {
display: flex;
padding: 0 32px;

View File

@@ -0,0 +1,209 @@
<template>
<div class="commentList">
<!-- tab栏 -->
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
</div>
<!-- 全部 -->
<div>
<div class="search-box" v-if="tabIndex==0">
<div class="integral-types" @click="showType = true">{{ topicType? topicType:'话题类型' }}<u-icon name="arrow-down"></u-icon></div>
<u-search placeholder="请输入关键字" v-model="content" :show-action="false" @search="getList()" @clear="getList()"></u-search>
</div>
<div class="card-list" v-if="villagerList.length">
<div class="card-item" v-for="(item,index) in villagerList" :key="index" @click="toDetail(item)">
<div class="card-title">{{ item.content }}</div>
<div class="card-name">
<div class="name">发布信息</div>
<div class="name">{{$dict.getLabel('villagerCircleTopic',item.topic)}}</div>
<div class="time">{{ item.createTime }}</div>
</div>
<div class="card-type">
<div class="type">{{$dict.getLabel('auditStatus',item.auditType)}}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
<u-select v-model="showType" :list="$dict.getDict('villagerCircleTopic')" label-name="dictName" value-name="dictValue"
@confirm="confirmTypeSelect"/>
</div>
</div>
</template>
<script>
export default {
name: 'commentList',
data () {
return {
tabs: ['全部', '待处理', '已处理'],
tabIndex: '',
showType: false,
content: '',
typeList: [],
villagerList: [],
current: 1,
topic: '',
topicType: '',
}
},
onLoad() {
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
this.current = 1
this.getList()
})
},
methods: {
tabClick(index) {
this.tabIndex = index
this.current = 1,
this.topic = '',
this.topicType = '',
this.villagerList = [],
this.getList()
},
getList() {
this.$http.post('app/appvillagercircleinfo/list',null,{
params: {
current: 1,
size: 10,
auditType: this.tabIndex == 0 ? '': this.tabIndex == 1 ? 0 : 1,
topic: this.topic,
content: this.content
}
}).then(res=>{
if(res?.data) {
this.villagerList = this.current >1 ? [...this.villagerList,...res.data.records] : res.data.records
}
})
},
confirmTypeSelect(e) {
this.topic = e[0].value,
this.topicType = e[0].label
this.current = 1,
this.villagerList = []
this.getList()
},
toDetail(item) {
uni.navigateTo({url: `./infoDetail?id=${item.id}`})
}
},
onShow() {
document.title = '发布信息审核'
},
}
</script>
<style lang="scss" scoped>
.commentList {
.tab-select {
width: 100%;
height: 96px;
line-height: 96px;
background: #3975C6;
display: flex;
.item{
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span{
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.search-box {
display: flex;
width: 100%;
height: 112px;
line-height: 112px;
background-color: #FFFFFF;
padding: 0 32px;
box-sizing: border-box;
.integral-types {
width: 30%;
}
}
.card-list {
width: 100%;
padding: 0 32px;
box-sizing: border-box;
.card-item {
margin-top: 24px;
background-color: #FFFFFF;
box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.02);
border-radius: 16px;
padding: 30px 32px 20px 32px;
.card-title {
height: 60px;
line-height: 60px;
font-size: 36px;
color: #333333;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.card-name {
margin-top: 30px;
display: flex;
height: 50px;
line-height: 50px;
font-size: 28px;
color: #999999;
.name {
padding: 0 15px;
background: #EEEEEE;
border-radius: 24px;
margin-right: 20px;
}
}
.card-type {
margin-top: 30px;
font-size: 28px;
.num {
font-size: 34px;
color: #E6736E;
}
.status0 {
color: #FF9B2B;
}
.status1 {
color: #4181FF;
}
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,258 @@
<template>
<div class="infoDetail">
<div class="avatar-info">
<div class="avatar-img">
<img src="./img/tx@2x.png" alt="">
</div>
<div class="avatar-title">
<div class="name">
{{ data.createUserName }}
</div>
<div class="time">
<span>{{ $dict.getLabel('villagerCircleTopic',data.topic) }}</span>
<span>{{ data.createTime }}</span>
</div>
</div>
</div>
<div class="textarea">{{ data.content }}</div>
<div style="background: #FFFFFF; padding:0 30px; box-sizing: border-box;padding-bottom: 20px;">
<img :src="item.url" alt="" v-for="(item, i) in data.pictures" :key="i" @click="previewImage(data.pictures, item.url)" class="upLoadPic"/>
</div>
<div class="address" v-if="data.gpsDesc">
<span class="addr-bg">
<img src="./img/address.png" alt="">
<span>{{ data.gpsDesc }}</span>
</span>
</div>
<!-- <div class="comment" v-if="data.comments">
<div class="comment-list">
<div class="title">评论:</div>
<div class="item">
<span class="avatar">桃白白:</span>为什么不带上我
</div>
</div>
</div> -->
<div class="readOnly" v-if="data.status != 0">
<div class="item">
<div>审核结果</div>
<div>不通过</div>
</div>
<div class="item nopass">
<div>不通过理由</div>
<div class="textarea">{{ data.auditOpinion }}</div>
</div>
<div class="item">
<div>审核人</div>
<div>{{ data.auditUserName }}</div>
</div>
<div class="item last">
<div>审核时间</div>
<div>{{ data.auditTime }}</div>
</div>
</div>
<div style="height: 56px;"></div>
<div class="btn" v-if="data.status == 0">
<div class="reject" @click="toReject">驳回发布</div>
<div class="agree" @click="agree">同意发布</div>
</div>
</div>
</template>
<script>
export default {
name: 'infoDetail',
data() {
return {
files: [],
status: 0,
id: '',
data: {},
}
},
onLoad(o) {
this.$dict.load('villagerCircleTopic').then(()=>{
this.id = o.id
this.getDetail()
// this.getComment()
})
},
methods: {
previewImage(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
getDetail() {
this.$http.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then(res => {
if(res.code==0){
this.data = res.data
}
})
},
toReject() {
uni.navigateTo({url: `./Reject?id=${this.data.id}&pass=0`})
},
agree() {
this.$http.post('/app/appvillagercircleinfo/examine',null, {
params: {
id: this.id,
pass: 1,
}
}).then(() => {
this.$u.toast('发布成功')
uni.$emit('update')
setTimeout(()=>{
uni.navigateBack()
})
})
}
},
onShow() {
document.title = "发布信息审核"
},
}
</script>
<style lang="scss" scoped>
.infoDetail {
.avatar-info {
display: flex;
padding: 0 32px;
box-sizing: border-box;
background: #FFFFFF;
.avatar-img {
margin-right: 20px;
img {
margin-top: 30px;
width: 88px;
height: 88px;
border-radius: 50%;
}
}
.avatar-title {
padding: 30px 32px;
box-sizing: border-box;
.name {
font-size: 32px;
color: #333333;
font-weight: 600;
margin-bottom: 12px;
}
.time {
font-size: 26px;
color: #999999;
}
}
}
.textarea {
padding: 0 32px;
box-sizing: border-box;
font-size: 32px;
background: #FFFFFF;
padding-bottom: 40px;
}
.address {
background: #FFFFFF;
padding: 20px 32px;
box-sizing: border-box;
.addr-bg {
display: inline-block;
border-radius: 28px;
padding: 6px 20px;
background: #EFF1F3;
img {
padding-top: 5px;
width: 32px;
height: 32px;
}
span {
vertical-align: top;
}
}
}
.comment {
padding: 0 32px 30px 32px;
box-sizing: border-box;
background: #FFFFFF;
.comment-list {
padding: 20px 30px;
background: #F7F8F9;
border-radius: 16px;
.title {
color: #333333;
font-weight: 600;
}
.item {
font-size: 28px;
.avatar {
color: #576a91;
}
}
}
}
.readOnly {
font-size: 32px;
.item {
display: flex;
justify-content: space-between;
background: #FFFFFF;
border-bottom: 1px solid #D8DDE6;
padding: 30px 30px;
box-sizing: border-box;
.textarea {
width: 100%;
padding: 30px 0 0 0 ;
color: #999999;
margin-bottom: 20px;
}
}
.nopass {
flex-direction: column;
border-bottom: 1px solid #D8DDE6;
}
.last {
border-bottom: none;
}
}
.upLoadPic {
width: 220px;
height:220px;
margin-right: 8px;
}
.upLoadPic:nth-child(3n) {
margin-right: 0;
}
.btn {
display: flex;
position: fixed;
bottom: 0;
width: 100%;
height: 112px;
line-height: 112px;
.reject {
width: 50%;
color: #FF4466;
background: #FFFFFF;
text-align: center;
}
.agree {
width: 50%;
color: #FFFFFF;
background: #3975C6;
text-align: center;
}
}
}
</style>

View File

@@ -0,0 +1,210 @@
<template>
<div class="infoList">
<!-- tab栏 -->
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
</div>
<!-- 全部 -->
<div>
<div class="search-box" v-if="tabIndex==0">
<div class="integral-types" @click="showType = true">{{ topicType? topicType:'话题类型' }}<u-icon name="arrow-down"></u-icon></div>
<u-search placeholder="请输入关键字" v-model="content" :show-action="false" @search="getList()" @clear="getList()"></u-search>
</div>
<div class="card-list" v-if="villagerList.length">
<div class="card-item" v-for="(item,index) in villagerList" :key="index" @click="toDetail(item)">
<div class="card-title">{{ item.content }}</div>
<div class="card-name">
<!-- <div class="name">发布信息</div> -->
<div class="name">{{$dict.getLabel('villagerCircleTopic',item.topic)}}</div>
<div class="time">{{ item.createTime }}</div>
</div>
<div class="card-type">
<div class="type" :style="{color: item.status==0? '#4181FF':item.status==1? '#07c160' : '#dd5347'}">{{$dict.getLabel('auditStatus',item.status)}}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
<u-select v-model="showType" :list="$dict.getDict('villagerCircleTopic')" label-name="dictName" value-name="dictValue"
@confirm="confirmTypeSelect"/>
</div>
</div>
</template>
<script>
export default {
name: 'infoList',
data () {
return {
tabs: ['全部', '待处理', '已处理'],
tabIndex: '',
showType: false,
content: '',
typeList: [],
villagerList: [],
current: 1,
topic: '',
topicType: '',
}
},
onLoad() {
this.$dict.load('villagerCircleTopic','auditStatus').then(()=>{
this.current = 1
this.getList()
})
},
methods: {
tabClick(index) {
this.tabIndex = index
this.current = 1,
this.topic = '',
this.topicType = '',
this.villagerList = [],
this.getList()
},
getList() {
this.$http.post('app/appvillagercircleinfo/list',null,{
params: {
current: 1,
size: 10,
auditStatus: this.tabIndex == 0 ? '': this.tabIndex == 1 ? 0 : 1,
topic: this.topic,
content: this.content
}
}).then(res=>{
if(res?.data) {
this.villagerList = this.current >1 ? [...this.villagerList,...res.data.records] : res.data.records
}
})
},
confirmTypeSelect(e) {
this.topic = e[0].value,
this.topicType = e[0].label
this.current = 1,
this.villagerList = []
this.getList()
},
toDetail(item) {
uni.navigateTo({url: `./infoDetail?id=${item.id}`})
}
},
onShow() {
document.title = '发布信息审核'
},
}
</script>
<style lang="scss" scoped>
.infoList {
.tab-select {
width: 100%;
height: 96px;
line-height: 96px;
background: #3975C6;
display: flex;
.item{
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span{
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.search-box {
display: flex;
width: 100%;
height: 112px;
line-height: 112px;
background-color: #FFFFFF;
padding: 0 32px;
box-sizing: border-box;
.integral-types {
width: 30%;
}
}
.card-list {
width: 100%;
padding: 0 32px;
box-sizing: border-box;
.card-item {
margin-top: 24px;
background-color: #FFFFFF;
box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.02);
border-radius: 16px;
padding: 30px 32px 20px 32px;
.card-title {
height: 60px;
line-height: 60px;
font-size: 36px;
color: #333333;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.card-name {
margin-top: 30px;
display: flex;
height: 50px;
line-height: 50px;
font-size: 28px;
color: #999999;
.name {
padding: 0 15px;
background: #EEEEEE;
border-radius: 24px;
margin-right: 20px;
}
}
.card-type {
margin-top: 30px;
font-size: 28px;
.num {
font-size: 34px;
color: #E6736E;
}
.status0 {
color: #FF9B2B;
}
.status1 {
color: #4181FF;
}
}
}
}
}
</style>