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

@@ -118,7 +118,7 @@ export default {
this.flag = true
this.$http
.post(`/app/appvisitvondolence/addOrUpdate`, {
.post(`/app/appmarriagefuneralinfo/addOrUpdate`, {
type: this.forms.typeValue,
name: this.forms.name,
modeType: this.forms.modeTypeValue,
@@ -129,7 +129,7 @@ export default {
createUserId: this.user.id,
personType: this.forms.personType,
fileIds: imgs || [],
files: imgs || [],
})
.then((res) => {
if (res.code == 0) {

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()

View File

@@ -2,7 +2,7 @@
<div class="AppMarryAndDie">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<div v-if="currentTabs == 0" class="msg">
<div v-show="currentTabs == 0" class="msg">
<div class="box">
<div class="card" @click="toList(0)">
<div class="imgleft">
@@ -158,30 +158,10 @@ export default {
})
},
toDetele(item) {
this.deletShow = true
this.deletId = item.id
},
delet() {
this.$http.post(`/app/appmarriagefuneralinfo/queryDetailById?ids=${this.deletId}`).then((res) => {
if (res.code == 0) {
this.$u.toast('删除成功!')
this.getList()
}
})
},
change(index) {
this.currentTabs = index
this.getList()
this.getEchart()
},
getEchart() {
this.$http.post(`/app/appmarriagefuneralinfo/queryDataStatistics`).then((res) => {
if (res.code === 0) {
this.initEchart(res.data)
this.initEchart(res.data.slice(0, 4))
}
})
},
@@ -233,6 +213,20 @@ export default {
option && this.Echart.setOption(option)
},
toDetele(item) {
this.deletShow = true
this.deletId = item.id
},
delet() {
this.$http.post(`/app/appmarriagefuneralinfo/delete?ids=${this.deletId}`).then((res) => {
if (res.code == 0) {
this.$u.toast('删除成功!')
this.getList()
}
})
},
toAdd() {
uni.navigateTo({ url: `./Add` })
},
@@ -255,6 +249,13 @@ export default {
uni.navigateTo({ url: `./FuneralList` })
}
},
change(index) {
this.currentTabs = index
// this.Echart = echarts.init(document.getElementById('yearStatistic'))
this.getList()
this.getEchart()
},
},
onReachBottom() {
this.current = this.current + 1

View File

@@ -4,12 +4,12 @@
<AiCard>
<template #custom>
<div class="left">
<span class="nums"> {{ total }} </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>
@@ -70,6 +70,8 @@ export default {
deletId: '',
current: 1,
total: '',
allNums: '',
addNums: '',
}
},
computed: {},
@@ -89,6 +91,8 @@ export default {
this.$http.post('/app/appmarriagefuneralinfo/queryDataStatistics').then((res) => {
if (res.code == 0) {
this.data = res.data
this.allNums = res.data[1].v1
this.addNums = res.data[5].v1
uni.hideLoading()
}
})
@@ -103,7 +107,7 @@ export default {
params: {
size: 6,
current: this.current,
type: 2,
modeType: 0,
},
})
.then((res) => {
@@ -121,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()
@@ -129,6 +133,10 @@ export default {
})
},
},
onReachBottom() {
this.current = this.current + 1
this.getList()
},
}
</script>

View File

@@ -4,12 +4,12 @@
<AiCard>
<template #custom>
<div class="left">
<span class="nums"> {{ total }} </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>
@@ -70,6 +70,8 @@ export default {
deletId: '',
current: 1,
total: '',
allNums: '',
addNums: '',
}
},
computed: {},
@@ -89,6 +91,8 @@ export default {
this.$http.post('/app/appmarriagefuneralinfo/queryDataStatistics').then((res) => {
if (res.code == 0) {
this.data = res.data
this.allNums = res.data[3].v1
this.addNums = res.data[7].v1
uni.hideLoading()
}
})
@@ -121,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()

View File

@@ -4,12 +4,12 @@
<AiCard>
<template #custom>
<div class="left">
<span class="nums"> {{ total }} </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>
@@ -70,6 +70,8 @@ export default {
deletId: '',
current: 1,
total: '',
addNums: '',
allNums: '',
}
},
computed: {},
@@ -89,6 +91,8 @@ export default {
this.$http.post('/app/appmarriagefuneralinfo/queryDataStatistics').then((res) => {
if (res.code == 0) {
this.data = res.data
this.allNums = res.data[2].v1
this.addNums = res.data[6].v1
uni.hideLoading()
}
})
@@ -121,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()