首页数据看板处理

This commit is contained in:
2023-07-24 15:17:01 +08:00
parent 13d8bd350f
commit 51b729a9b1
2 changed files with 14 additions and 10 deletions

View File

@@ -40,9 +40,16 @@ export default {
}
},
created () {
console.log('created....')
this.getInfo()
// 监听是否切换了日,周,月,年
this.eventBus.$on('updateHomeDataByType', (type) => {
console.log(type)
this.getInfo()
})
},
mounted () {
destroyed () {
this.eventBus.$off('updateHomeDataByType')
},
methods: {
getInfo () {

View File

@@ -104,19 +104,19 @@
</template>
<a-row>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="用户总数量(人)" :value="info.check.first+''" :bordered="true" />
<info title="用户总数量(人)" value="1" :bordered="true" />
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="新增代理数(人)" :value="info.check.recheck+''" :bordered="true" />
<info title="新增代理数(人)" value="2" :bordered="true" />
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="新增创客数(人)" :value="info.check.unsign+''" />
<info title="新增创客数(人)" value="2" />
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="新增VIP数(人)" :value="info.check.unsign+''" :bordered="true"/>
<info title="新增VIP数(人)" value="2" :bordered="true"/>
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="新增游客数量(人)" :value="info.check.unsign+''"/>
<info title="新增游客数量(人)" value="2"/>
</a-col>
</a-row>
</a-card>
@@ -228,15 +228,12 @@ export default {
{ key: 'year', title: '本年' }
]
}),
beforeCreate () {
console.log('beforeCreate.......')
},
methods: {
handleMenuClick (e) {
this.typeIndex = this.searchs.findIndex(item => item.key === e.key)
console.log(e.key)
this.visible = false
this.type = e.key
this.eventBus.$emit('updateHomeDataByType', { type: e.key })
}
}
}