This commit is contained in:
花有清香月有阴
2021-12-20 18:19:30 +08:00
parent 5c92ff8bf3
commit ed6eefdc65
6 changed files with 62 additions and 43 deletions

View File

@@ -4,12 +4,12 @@
<AiCard>
<template #custom>
<div class="left">
<span class="nums"> {{ num }} </span>
<span class="nums"> {{ allNums }} </span>
<span class="hint">全部活动</span>
</div>
<div class="right">
<span class="nums">4</span>
<span class="nums">{{ addNums }}</span>
<span class="hint">本月新增</span>
</div>
</template>
@@ -69,13 +69,12 @@ export default {
deletShow: false,
deletId: '',
current: 1,
addList: [],
allNums: '',
addNums: '',
}
},
computed: {
num() {
return this.data.filter((item) => item.v1).reduce((counts, item) => (counts += item.v1 * 1), 0)
},
},
computed: {},
watch: {},
onLoad() {
this.$dict.load('marriageType', 'modeType').then(() => {
@@ -91,7 +90,9 @@ export default {
})
this.$http.post('/app/appmarriagefuneralinfo/queryDataStatistics').then((res) => {
if (res.code == 0) {
this.data = res.data
this.data = res.data.slice(0, 4)
this.allNums = res.data[0].v1
this.addNums = res.data[4].v1
uni.hideLoading()
}
@@ -107,6 +108,7 @@ export default {
params: {
size: 6,
current: this.current,
type: 2,
},
})
.then((res) => {
@@ -123,7 +125,7 @@ export default {
},
delet() {
this.$http.post(`/app/appmarriagefuneralinfo/queryDetailById?ids=${this.deletId}`).then((res) => {
this.$http.post(`/app/appmarriagefuneralinfo/delete?ids=${this.deletId}`).then((res) => {
if (res.code == 0) {
this.$u.toast('删除成功!')
this.getList()