Files
dvcp_v2_wxcp_app/src/apps/AppGridManagement/Statistics.vue

236 lines
5.8 KiB
Vue
Raw Normal View History

2022-01-13 10:12:49 +08:00
<template>
<div class="Statistics">
<div class="top">
2022-01-14 10:56:52 +08:00
<div class="left" @click="linkTo('./SelectGird')">
2022-01-13 10:12:49 +08:00
<img src="./components/img/gird-icon.png" alt="" />
2022-01-13 11:04:45 +08:00
<div class="girdNmae">{{ girdMsgList.girdName || '' }}</div>
2022-01-13 10:12:49 +08:00
<u-icon name="arrow-down" color="#666"></u-icon>
</div>
2022-01-14 10:56:52 +08:00
<div class="right" @click="linkTo('./SetGird')" v-if="checkType == 2">网格配置</div>
2022-01-13 10:12:49 +08:00
</div>
<div class="middle">
<div class="girdPeople">网格内人员情况</div>
<div class="card">
<div class="box">
2022-01-14 13:54:17 +08:00
<span class="count" v-if="peopleList && peopleList['网格长']">{{ peopleList['网格长']}}</span>
<span class="count" v-else>0</span>
2022-01-13 10:12:49 +08:00
<span class="girdCount">网格长</span>
</div>
<div class="box">
2022-01-14 13:54:17 +08:00
<span class="count" v-if="peopleList && peopleList['网格员'] ">{{ peopleList['网格员']}}</span>
<span class="count" v-else>0</span>
2022-01-13 10:12:49 +08:00
<span class="girdCount">网格员</span>
</div>
<div class="box">
2022-01-14 13:54:17 +08:00
<span class="count" v-if="peopleList && peopleList['责任家庭数']">{{ peopleList['责任家庭数'] }}</span>
<span class="count" v-else>0</span>
2022-01-13 10:12:49 +08:00
<span class="girdCount">责任家庭数</span>
</div>
</div>
</div>
<div class="bottom">
<div class="girdMsg">网格信息</div>
<div class="girdCont">
<div class="boxes">
<span class="boxesLeft">网格名称</span>
2022-01-13 11:04:45 +08:00
<span class="boxesRight">{{ girdMsgList.girdName || '' }}</span>
<!-- <span class="boxesRight">{{ girdUser.appGirdInfo.girdName }}</span> -->
2022-01-13 10:12:49 +08:00
</div>
<div class="boxes">
<span class="boxesLeft">网格类型</span>
2022-01-13 11:04:45 +08:00
<span class="boxesRight">
{{ $dict.getLabel('girdType', girdMsgList.girdType) || '' }}
</span>
2022-01-13 10:12:49 +08:00
</div>
<div class="boxes">
<span class="boxesLeft">网格层级</span>
2022-01-14 14:29:41 +08:00
<span class="boxesRight">{{ $dict.getLabel('girdLevel', girdMsgList.girdLevel) || '' }}</span>
2022-01-13 10:12:49 +08:00
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Statistics',
components: {},
props: {
dict: Object,
instance: Function,
params: Object,
},
data() {
2022-01-13 11:04:45 +08:00
return {
girdUser: [],
peopleList: {},
girdMsgList: {},
2022-01-14 10:56:52 +08:00
checkType: ''
2022-01-13 11:04:45 +08:00
}
2022-01-13 10:12:49 +08:00
},
computed: {},
watch: {},
onLoad() {},
2022-01-13 11:04:45 +08:00
mounted() {
this.$dict.load('girdType', 'girdLevel').then(() => {})
this.isGirdUser()
2022-01-14 10:56:52 +08:00
uni.$on('goback', (res) => {
this.girdMsgList = res
2022-01-14 11:03:51 +08:00
this.getList()
2022-01-14 14:29:41 +08:00
})
2022-01-13 11:04:45 +08:00
},
methods: {
isGirdUser() {
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
if (res.code == 0) {
this.girdUser = res.data
2022-01-14 10:56:52 +08:00
this.checkType = res.data.checkType
2022-01-13 11:04:45 +08:00
if (this.girdUser.checkType != '0') {
this.getList()
if (this.girdUser.appGirdInfo) {
this.girdMsgList = this.girdUser.appGirdInfo
}
} else {
this.$u.toast('当前人员不是网格员或网格管理员')
}
}
})
},
getList() {
2022-01-14 11:03:51 +08:00
this.$http.post(`/app/appgirdmemberinfo/girdMemberAndResidentStatistic?girdId=${this.girdMsgList.girdId}`).then((res) => {
2022-01-13 11:04:45 +08:00
if (res.code == 0) {
this.peopleList = res.data
}
})
},
2022-01-14 10:56:52 +08:00
linkTo(url) {
uni.navigateTo({url})
}
2022-01-13 11:04:45 +08:00
},
2022-01-13 10:12:49 +08:00
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
}
.Statistics {
height: 100%;
background: #f3f7f8;
padding: 0 30px;
padding-top: 30px;
box-sizing: border-box;
.top {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 32px;
background: #fff;
border-radius: 16px;
.left {
display: flex;
align-items: center;
img {
width: 32px;
height: 32px;
}
.girdNmae {
margin-left: 20px;
font-size: 34px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.u-icon {
margin-left: 8px;
}
}
.right {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3f8df5;
}
}
.middle {
background: #ffffff;
border-radius: 16px;
margin-top: 32px;
padding: 32px 0 60px 0;
.girdPeople {
padding: 0 0 56px 24px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333333;
}
.card {
display: flex;
justify-content: space-around;
.box {
display: flex;
flex-direction: column;
align-items: center;
.count {
font-size: 64px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #3b424a;
}
.girdCount {
margin-top: 8px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
}
.bottom {
background: #ffffff;
border-radius: 16px;
margin-top: 32px;
padding: 0 24px 64px 24px;
.girdMsg {
padding: 32px 0;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333333;
}
.girdCont {
.boxes {
padding: 24px 0 30px 0;
box-shadow: inset 0px -1px 0px 0px #d8dde6;
.boxesLeft {
font-size: 30px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333333;
}
.boxesRight {
margin-left: 40px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666666;
}
}
}
}
}
</style>