Files
dvcp_v2_wxcp_app/src/apps/AppDataScreening/userDetail.vue

123 lines
2.9 KiB
Vue
Raw Normal View History

2022-06-22 10:24:54 +08:00
<template>
<div class="userDetail">
2022-06-24 20:18:31 +08:00
<AiTopFixed>
<div class="currentLeft-top">
2022-06-22 10:24:54 +08:00
<div class="left">
2022-06-24 20:18:31 +08:00
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="getList" :name.sync="areaName" selectRoot>
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px" />
</AiAreaPicker>
2022-06-22 10:24:54 +08:00
</div>
2022-06-24 20:18:31 +08:00
<u-search v-model="groupName" :clearabled="true" placeholder="请输入群昵称" :show-action="false" bg-color="#F5F5F5" search-icon-color="#ccc" color="#666" height="58" @search="getList" @clear="handerClear"></u-search>
2022-06-22 10:24:54 +08:00
</div>
2022-06-24 20:18:31 +08:00
</AiTopFixed>
<div class="list">
<div class="item" v-for="(item, index) in list" :key="index">
2022-06-22 10:24:54 +08:00
<div class="left">
2022-06-24 21:51:56 +08:00
<img src="./img/group-icon.jpg" alt="">
2022-06-22 10:24:54 +08:00
</div>
<div class="right">
2022-06-24 20:18:31 +08:00
<p>{{item.groupName || '群聊'}}</p>
<div>{{item.personCount}} | 群主{{item.ownerName}}</div>
2022-06-22 10:24:54 +08:00
</div>
</div>
</div>
2022-06-24 21:47:52 +08:00
<AiEmpty description="暂无数据" v-if="!list.length"/>
2022-06-22 10:24:54 +08:00
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: "userDetail",
data() {
return {
2022-06-24 20:18:31 +08:00
areaId: '',
areaName: '',
groupName: '',
list: []
2022-06-22 10:24:54 +08:00
}
},
computed: {...mapState(['user'])},
created() {
2022-06-24 20:18:31 +08:00
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
2022-06-22 10:24:54 +08:00
},
onShow() {
document.title = '居民群详情'
},
methods: {
2022-06-24 20:18:31 +08:00
handerClear() {
this.groupName = ''
this.getList()
},
getList() {
this.$http.post(`/app/wxcp/wxgroup/allGroupInfo?areaId=${this.areaId}&groupName=${this.groupName}`).then(res => {
if (res?.code == 0) {
this.list = res.data
}
})
}
2022-06-22 10:24:54 +08:00
},
}
</script>
<style lang="scss" scoped>
.userDetail {
2022-06-24 20:18:31 +08:00
.currentLeft-top {
display: flex;
align-items: center;
.left {
width: 200px;
display: flex;
align-items: center;
img {
width: 48px;
height: 48px;
}
}
}
2022-06-22 10:24:54 +08:00
.list{
background-color: #fff;
padding-left: 32px;
2022-06-24 20:18:31 +08:00
margin-top: 16px;
2022-06-22 10:24:54 +08:00
.item{
padding: 34px 32px 34px 0;
display: flex;
box-sizing: border-box;
border-bottom: 1px solid #ddd;
.left{
width: 110px;
img{
width: 88px;
height: 88px;
vertical-align: bottom;
margin-right: 22px;
2022-06-24 21:51:56 +08:00
border-radius: 8px;
2022-06-22 10:24:54 +08:00
}
}
.right{
width: calc(100% - 110px);
p{
line-height: 44px;
margin-bottom: 8px;
color: #333;
font-size: 30px;
word-break: break-all;
}
div{
font-size: 28px;
color: #999;
line-height: 34px;
}
}
}
}
}
</style>