Files
dvcp_v2_wxcp_app/library/project/saas/AppDataStatistics/components/update.vue

95 lines
2.0 KiB
Vue
Raw Normal View History

2022-12-11 16:21:17 +08:00
<template>
2022-12-11 17:46:29 +08:00
<div class="update">
2022-12-12 15:55:27 +08:00
<h3>更新统计</h3>
<div class="information">
2022-12-22 13:43:56 +08:00
<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
2022-12-19 15:34:34 +08:00
<div class="card_list">
2022-12-22 13:43:56 +08:00
<div class="card" v-for="(item,index) in dataArray" :key="index">
<div class="card_name">{{ item }}</div>
<div class="card_num">{{ Number(data[item]).toLocaleString('en-US') }}</div>
2022-12-20 10:21:22 +08:00
</div>
2022-12-19 15:34:34 +08:00
</div>
2022-12-12 15:55:27 +08:00
</div>
2022-12-11 17:46:29 +08:00
</div>
2022-12-11 16:21:17 +08:00
</template>
<script>
export default {
2022-12-12 15:55:27 +08:00
name: "update",
2022-12-22 13:43:56 +08:00
props: ['areaId'],
2022-12-12 15:55:27 +08:00
data() {
return {
list: [
2022-12-22 13:43:56 +08:00
{ name: '本日' },
{ name: '本周' },
{ name: '本月' },
{ name: '本年' }
2022-12-12 15:55:27 +08:00
],
2022-12-22 11:49:47 +08:00
current: 0,
2022-12-22 13:43:56 +08:00
data: {},
2022-12-26 11:27:49 +08:00
dataArray: ['新增居民档案','居民档案更新','新增网格员','新增走访记录','新增矛盾调解','新增宣发记录'],
2022-12-12 15:55:27 +08:00
}
},
created() {
2022-12-22 13:43:56 +08:00
this.getData()
2022-12-12 15:55:27 +08:00
},
2022-12-22 11:49:47 +08:00
methods: {
2022-12-22 13:43:56 +08:00
sectionChange(e) {
this.current = e
this.getData()
},
2022-12-22 11:49:47 +08:00
getData() {
2022-12-22 13:43:56 +08:00
this.$http.post(`/app/wxgroupstatistic/updateStatistics`,null,{
params: {
areaId: this.areaId,
type: this.current
}
}).then(res=> {
if(res?.data) {
this.data = res.data
}
})
2022-12-22 11:49:47 +08:00
}
},
2022-12-11 16:21:17 +08:00
}
</script>
<style lang="scss" scoped>
.update {
2022-12-12 15:55:27 +08:00
padding: 0 30px;
box-sizing: border-box;
h3 {
margin: 32px 0 24px 0;
}
.information {
width: 100%;
background: #FFFFFF;
border-radius: 16px;
padding: 32px;
box-sizing: border-box;
2022-12-19 15:34:34 +08:00
.card_list {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.card {
width: 50%;
height: 160px;
text-align: center;
.card_name {
margin-top: 32px;
color: #666666;
}
.card_num {
font-size: 36px;
color: #000000;
2022-12-20 10:21:22 +08:00
font-weight: 600;
2022-12-19 15:34:34 +08:00
margin-top: 12px;
}
}
}
2022-12-12 15:55:27 +08:00
}
2022-12-11 16:21:17 +08:00
}
</style>