2022-12-11 16:21:17 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="AppDataStatistics">
|
|
|
|
|
<AiTopFixed>
|
|
|
|
|
<div class="area-content">
|
2022-12-21 14:08:31 +08:00
|
|
|
<AiAreaPicker v-model="areaId" :name.sync="areaName" :area-id="user.areaId" @select="areaSelect">
|
2022-12-11 16:21:17 +08:00
|
|
|
<div flex>
|
2022-12-11 17:46:29 +08:00
|
|
|
<img src="./img/location.png" alt="" class="icon-img">
|
2022-12-11 16:21:17 +08:00
|
|
|
<AiMore v-model="areaName" icon="arrow-down"/>
|
|
|
|
|
</div>
|
|
|
|
|
</AiAreaPicker>
|
|
|
|
|
</div>
|
|
|
|
|
</AiTopFixed>
|
|
|
|
|
<div class="tab-list">
|
|
|
|
|
<div :class="index == tabIndex ? 'tab-item active' : 'tab-item'" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item.text }}<span></span></div>
|
|
|
|
|
</div>
|
2022-12-22 11:49:47 +08:00
|
|
|
<component ref='list' :is="tabList[tabIndex].component" :areaId="areaId" class="component" />
|
2022-12-11 16:21:17 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import resident from './components/resident.vue'
|
|
|
|
|
import update from './components/update'
|
|
|
|
|
import wechat from './components/wechat'
|
|
|
|
|
import message from './components/message'
|
2022-12-21 14:08:31 +08:00
|
|
|
import { mapState } from 'vuex'
|
2022-12-11 16:21:17 +08:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "AppDataStatistics",
|
|
|
|
|
appName: "数据统计",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tabList: [
|
|
|
|
|
{
|
|
|
|
|
text: '居民统计',
|
|
|
|
|
component: resident
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '更新统计',
|
|
|
|
|
component: update
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '微信统计',
|
|
|
|
|
component: wechat
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '会话统计',
|
|
|
|
|
component: message
|
|
|
|
|
},
|
|
|
|
|
],
|
2022-12-20 10:21:22 +08:00
|
|
|
tabIndex: 0,
|
2022-12-11 16:21:17 +08:00
|
|
|
areaId: '',
|
|
|
|
|
areaName: '',
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-12-21 14:08:31 +08:00
|
|
|
computed: {
|
|
|
|
|
...mapState(['user'])
|
|
|
|
|
},
|
2022-12-11 16:21:17 +08:00
|
|
|
components: {resident, update, wechat, message},
|
|
|
|
|
methods: {
|
|
|
|
|
tabClick(index) {
|
|
|
|
|
this.tabIndex = index
|
|
|
|
|
},
|
2022-12-26 11:02:06 +08:00
|
|
|
toOverData() {
|
|
|
|
|
uni.navigateTo({url:'./AppDataOverview'})
|
|
|
|
|
},
|
2022-12-21 14:08:31 +08:00
|
|
|
areaSelect(e) {
|
|
|
|
|
this.areaId = e
|
|
|
|
|
this.refreshList()
|
|
|
|
|
},
|
|
|
|
|
refreshList() {
|
2022-12-22 11:49:47 +08:00
|
|
|
this.$nextTick(() => this.$refs.list.getData())
|
2022-12-27 08:52:44 +08:00
|
|
|
},
|
|
|
|
|
refreshTally() {
|
|
|
|
|
this.$http.post('/app/appwxcpopenstatistics/tally').then(res=> {
|
|
|
|
|
if(res.code == 0) {
|
|
|
|
|
console.log('手动触发成功');
|
|
|
|
|
}
|
|
|
|
|
})
|
2022-12-21 14:08:31 +08:00
|
|
|
}
|
2022-12-27 08:52:44 +08:00
|
|
|
|
2022-12-21 14:08:31 +08:00
|
|
|
},
|
|
|
|
|
onLoad() {
|
2022-12-27 08:52:44 +08:00
|
|
|
this.refreshTally()
|
2022-12-11 16:21:17 +08:00
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
document.title = "数据统计"
|
2022-12-23 10:48:07 +08:00
|
|
|
this.areaId = this.user.areaId
|
|
|
|
|
this.areaName = this.user.areaName
|
2022-12-11 16:21:17 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.AppDataStatistics {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background-color: #F5F6F7;
|
|
|
|
|
padding-bottom: 112px;
|
|
|
|
|
::v-deep .AiTopFixed {
|
|
|
|
|
.content {
|
|
|
|
|
background-color: #3975C6;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.icon-img{
|
|
|
|
|
width: 48px;
|
|
|
|
|
height: 48px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
::v-deep .AiMore{
|
|
|
|
|
span{
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.tab-list {
|
|
|
|
|
width: 100%;
|
|
|
|
|
line-height: 88px;
|
|
|
|
|
display: flex;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 9;
|
|
|
|
|
|
|
|
|
|
.tab-item {
|
|
|
|
|
flex: 1;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
|
color: #666;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.active {
|
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #000;
|
|
|
|
|
span {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 50%;
|
|
|
|
|
margin-left: -25px;
|
|
|
|
|
width: 50px;
|
|
|
|
|
height: 6px;
|
|
|
|
|
background: #3399FF;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.component{
|
|
|
|
|
padding-top: 88px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|