村民圈

This commit is contained in:
花有清香月有阴
2022-02-18 11:05:14 +08:00
parent 047b4d6972
commit f448a9a12a
3 changed files with 114 additions and 48 deletions

View File

@@ -4,7 +4,9 @@
<div class="top"> <div class="top">
<div class="tabIndex012" v-if="tabIndex0 != 3"> <div class="tabIndex012" v-if="tabIndex0 != 3">
<div class="tags" v-for="(items, i) in $dict.getDict('villagerCircleTopic')" :key="i">{{ items.dictName }}</div> <div class="tags" @click="show = true">{{ TopicName }}</div>
<u-select v-model="show" :list="$dict.getDict('villagerCircleTopic')" value-name="dictValue" label-name="dictName" @confirm="conTopic"></u-select>
</div> </div>
<u-tabs class="u-tabs2" :list="tabList" :is-scroll="false" :current="tabCurrent1" @change="changetabIndex" bg-color="#fff" active-color="#333;" inactive-color="#999" v-if="tabIndex0 == 3"></u-tabs> <u-tabs class="u-tabs2" :list="tabList" :is-scroll="false" :current="tabCurrent1" @change="changetabIndex" bg-color="#fff" active-color="#333;" inactive-color="#999" v-if="tabIndex0 == 3"></u-tabs>
@@ -16,20 +18,19 @@
<div class="middle"> <div class="middle">
<div class="datas" v-if="data.length"> <div class="datas" v-if="data.length">
<div class="card" v-for="(item, index) in 3" :key="index" @click="toDetail(item)"> <div class="card" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
<div class="cardTop"> <div class="cardTop">
<img src="../../static/workOnline/icon3@2x.png" alt="" /> <img :src="item.avatarUrl" alt="" />
<div class="rightTop"> <div class="rightTop">
<div class="leftStaus"> <div class="leftStaus">
<span class="names">雷洋</span> <span class="names">{{ item.createUserName }}</span>
<span class="titless">美丽庭院 | 2020-10-28 12</span> <span class="titless">{{ $dict.getLabel('villagerCircleTopic', item.topic) }} | {{ item.createTime }}</span>
</div> </div>
<!-- :style="{ class: item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2' }" -->
<div class="statusDele"> <div class="statusDele">
<div class="status status0" v-if="tabIndex0 == 3">审核中</div> <div class="status status0" :class="item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2'" v-if="tabIndex0 == 3">{{ $dict.getLabel('auditStatus', item.status) }}</div>
<div class="dels" @click.stop="toAdd(item)">编辑</div> <div class="dels" @click.stop="toAdd(item)">编辑</div>
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div> <div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
@@ -38,17 +39,17 @@
</div> </div>
</div> </div>
<div class="tabCurrent0" v-if="tabIndex0 != 3 || tabCurrent1 == 0"> <div class="tabCurrent0" v-if="tabIndex0 != 3">
<div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div> <div class="cardConts">{{ item.content }}</div>
<div class="cardImg"> <div class="cardImg" v-if="item.pictures">
<img src="../../static/workOnline/icon3@2x.png" alt="" v-for="(items, i) in 4" :key="i" /> <img :src="item.url" alt="" v-for="(items, i) in item.pictures" :key="i" @click.stop="previewImage(item.pictures, item.url)" />
</div> </div>
<div class="cardBot"> <div class="cardBot">
<div class="icons"> <div class="icons">
<u-icon name="map-fill"></u-icon> <u-icon name="map-fill"></u-icon>
<span>东湖生态旅游风景区听涛景区</span> <span>{{ item.gpsDesc }}</span>
</div> </div>
<div class="icones" v-if="tabIndex0 != 3"> <div class="icones" v-if="tabIndex0 != 3">
@@ -79,7 +80,8 @@
</div> </div>
</div> </div>
</div> </div>
<AiEmpty description="暂无数据" class="emptyWrap"></AiEmpty>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div> </div>
<!-- <AiFixedBtn v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()"> <!-- <AiFixedBtn v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()">
@@ -92,6 +94,8 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
name: 'AppVillager', name: 'AppVillager',
appName: '村民圈', appName: '村民圈',
@@ -145,13 +149,16 @@ export default {
indexTab2: 0, indexTab2: 0,
delShow: false, delShow: false,
current: 1, current: 1,
show: false,
TopicValue: '0',
TopicName: '美丽庭院',
} }
}, },
computed: {}, computed: { ...mapState(['user']) },
watch: {}, watch: {},
onLoad() { onLoad() {
this.$dict.load('villagerCircleTopic').then(() => { this.$dict.load('villagerCircleTopic', 'auditStatus').then(() => {
// this.getList() this.getList()
}) })
}, },
onShow() { onShow() {
@@ -162,11 +169,14 @@ export default {
methods: { methods: {
getList() { getList() {
this.$instance this.$instance
.post('/app/appvillagerintegraldeclare/list', null, { .post(this.tabIndex0 == 3 ? '/app/appvillagercircleinfo/list-xcxme' : '/app/appvillagercircleinfo/list-xcx', null, {
params: { params: {
size: 6, size: 6,
current: this.current, current: this.current,
residentId: this.user.residentId, topic: this.tabIndex0 != 3 ? this.TopicValue : '',
areaId: this.tabIndex0 != 3 ? this.user.areaId : '',
residentId: this.tabIndex0 != 3 ? this.user.residentId : '',
listType: this.tabIndex0 == 3 && this.tabCurrent1 == 0 ? '0' : this.tabIndex0 == 3 && this.tabCurrent1 == 1 ? '1' : this.tabIndex0 == 0 ? '0' : this.tabIndex0 == 1 ? '1' : this.tabIndex0 == 2 ? '2' : '',
}, },
}) })
.then((res) => { .then((res) => {
@@ -177,10 +187,10 @@ export default {
}, },
change(index) { change(index) {
// this.data = [] this.data = []
this.tabIndex0 = index this.tabIndex0 = index
this.current = 1 this.current = 1
// this.getList() this.getList()
}, },
changetabIndex(e) { changetabIndex(e) {
@@ -192,7 +202,7 @@ export default {
}, },
toDetail(item) { toDetail(item) {
this.$linkTo(`./detail?id=${item.id}`) this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl}`)
}, },
toAdd(item) { toAdd(item) {
@@ -219,6 +229,18 @@ export default {
this.$u.toast(e) this.$u.toast(e)
}) })
}, },
conTopic(e) {
this.TopicValue = e[0].value
this.TopicName = e[0].label
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
}, },
onReachBottom() { onReachBottom() {
this.current = this.current + 1 this.current = this.current + 1
@@ -229,6 +251,8 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.Page { .Page {
height: 100%;
background: #fff;
.active { .active {
color: #4181ff !important; color: #4181ff !important;
border: 1px solid #4181ff !important; border: 1px solid #4181ff !important;

View File

@@ -53,11 +53,14 @@ export default {
}, },
showStstus: false, showStstus: false,
flag: false, flag: false,
id: '',
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
onLoad() { onLoad(o) {
this.$dict.load('villagerCircleTopic').then(() => {}) this.$dict.load('villagerCircleTopic').then(() => {
this.id = o.id
})
}, },
onShow() {}, onShow() {},
methods: { methods: {
@@ -115,6 +118,16 @@ export default {
}) })
}, },
getDetail() {
if (this.id) {
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
// this.forms = res.data
}
})
}
},
selectStatus(e) { selectStatus(e) {
this.forms.topic = e[0].label this.forms.topic = e[0].label
this.forms.topicValue = e[0].value this.forms.topicValue = e[0].value

View File

@@ -1,36 +1,39 @@
<template> <template>
<div class="Page"> <div class="Page">
<div class="top"> <div class="top" v-if="detail.status == 2">
<div class="tops">未通过原因请勿带情绪进行评论请勿带情绪进行评论请勿带情绪进行评论</div> <div class="tops">{{ detail.auditOpinion }}</div>
</div> </div>
<div class="middle"> <div class="middle">
<div class="cardTop"> <div class="cardTop">
<img src="../../static/workOnline/icon3@2x.png" alt="" /> <img :src="avatarUrl" alt="" />
<div class="rightTop"> <div class="rightTop">
<div class="leftStaus"> <div class="leftStaus">
<span class="names">雷洋</span> <span class="names">{{ detail.createUserName }}</span>
<span class="titless">美丽庭院 | 2020-10-28 12</span> <span class="titless">{{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.status }}</span>
</div> </div>
<!-- :style="{ class: item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2' }" --> <div class="statusDele">
<div class="status status0" :class="detail.auditStatus == 0 ? 'status0' : detail.auditStatus == 1 ? 'status1' : 'status2'">{{ $dict.getLabel('auditStatus', detail.status) }}</div>
<div class="status status0">审核中</div> <div class="dels" @click.stop=";(modalShow = true), (deleId = detail.id)">删除</div>
<!-- <img src="../../static/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
</div>
</div> </div>
</div> </div>
<div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div> <div class="cardConts">{{ detail.content }}</div>
<div class="cardImg"> <div class="cardImg">
<img src="../../static/workOnline/icon3@2x.png" alt="" v-for="(items, i) in 4" :key="i" /> <img :src="item.url" alt="" v-for="(items, i) in detail.pictures" :key="i" @click.stop="previewImage(detail.pictures, item.url)" />
</div> </div>
<div class="cardBot"> <div class="cardBot">
<div class="icons"> <div class="icons">
<u-icon name="map-fill"></u-icon> <u-icon name="map-fill"></u-icon>
<span>东湖生态旅游风景区听涛景区</span> <span>{{ detail.gpsDesc }}</span>
</div> </div>
<div class="icones"> <div class="icones">
@@ -96,7 +99,8 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
id: '888', id: '',
avatarUrl: '',
data: {}, data: {},
poupShow: false, poupShow: false,
content: '', content: '',
@@ -110,8 +114,9 @@ export default {
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
watch: {}, watch: {},
onLoad(o) { onLoad(o) {
this.$dict.load('atWillReportType').then(() => { this.$dict.load('villagerCircleTopic').then(() => {
// this.id = o.id this.id = o.id
this.avatarUrl = o.avatarUrl
this.getDetail() this.getDetail()
}) })
}, },
@@ -121,6 +126,15 @@ export default {
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => { this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.detail = res.data this.detail = res.data
this.getReplyList()
}
})
},
getReplyList() {
this.$instance.post(`/app/appvillagercirclecomment/list?id=${detail.id}&size=999`).then((res) => {
if (res.code == 0) {
this.replylist = res.data.records
} }
}) })
}, },
@@ -188,6 +202,13 @@ export default {
this.deleId = '999' this.deleId = '999'
this.deleShow = true this.deleShow = true
}, },
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
@@ -243,9 +264,11 @@ export default {
} }
} }
.statusDele {
display: flex;
align-items: center;
.status { .status {
font-size: 28px; font-size: 28px;
margin-right: 10px;
} }
.status0 { .status0 {
color: #42d784; color: #42d784;
@@ -256,6 +279,12 @@ export default {
.status2 { .status2 {
color: #ff883c; color: #ff883c;
} }
.dels {
margin-left: 20px;
width: 68px;
height: 68px;
}
}
} }
} }