Files
dvcp_v2_wxcp_app/library/project/saas/AppDataStatistics/components/update.vue
2024-10-31 14:34:57 +08:00

95 lines
2.0 KiB
Vue

<template>
<div class="update">
<h3>更新统计</h3>
<div class="information">
<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
<div class="card_list">
<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>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "update",
props: ['areaId'],
data() {
return {
list: [
{ name: '本日' },
{ name: '本周' },
{ name: '本月' },
{ name: '本年' }
],
current: 0,
data: {},
dataArray: ['新增居民档案','居民档案更新','新增网格员','新增走访记录','新增矛盾调解','新增宣发记录'],
}
},
created() {
this.getData()
},
methods: {
sectionChange(e) {
this.current = e
this.getData()
},
getData() {
this.$http.post(`/app/wxgroupstatistic/updateStatistics`,null,{
params: {
areaId: this.areaId,
type: this.current
}
}).then(res=> {
if(res?.data) {
this.data = res.data
}
})
}
},
}
</script>
<style lang="scss" scoped>
.update {
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;
.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;
font-weight: 600;
margin-top: 12px;
}
}
}
}
}
</style>