From ed6eefdc6552cea825fafedd4c000a562865df47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?= =?UTF-8?q?=E9=98=B4?= <185154740@qq.com> Date: Mon, 20 Dec 2021 18:19:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppMarryAndDie/Add.vue | 4 +- src/apps/AppMarryAndDie/AllActiveList.vue | 20 +++++----- src/apps/AppMarryAndDie/AppMarryAndDie.vue | 45 +++++++++++----------- src/apps/AppMarryAndDie/CadreList.vue | 16 ++++++-- src/apps/AppMarryAndDie/FuneralList.vue | 10 +++-- src/apps/AppMarryAndDie/MarryList.vue | 10 +++-- 6 files changed, 62 insertions(+), 43 deletions(-) diff --git a/src/apps/AppMarryAndDie/Add.vue b/src/apps/AppMarryAndDie/Add.vue index 798386f7..0f1be0df 100644 --- a/src/apps/AppMarryAndDie/Add.vue +++ b/src/apps/AppMarryAndDie/Add.vue @@ -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) { diff --git a/src/apps/AppMarryAndDie/AllActiveList.vue b/src/apps/AppMarryAndDie/AllActiveList.vue index 4c61a416..cd0f2c96 100644 --- a/src/apps/AppMarryAndDie/AllActiveList.vue +++ b/src/apps/AppMarryAndDie/AllActiveList.vue @@ -4,12 +4,12 @@ @@ -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() diff --git a/src/apps/AppMarryAndDie/AppMarryAndDie.vue b/src/apps/AppMarryAndDie/AppMarryAndDie.vue index 56d4baf9..dad24688 100644 --- a/src/apps/AppMarryAndDie/AppMarryAndDie.vue +++ b/src/apps/AppMarryAndDie/AppMarryAndDie.vue @@ -2,7 +2,7 @@
-
+
@@ -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 diff --git a/src/apps/AppMarryAndDie/CadreList.vue b/src/apps/AppMarryAndDie/CadreList.vue index a62d50f0..6d2dfd6d 100644 --- a/src/apps/AppMarryAndDie/CadreList.vue +++ b/src/apps/AppMarryAndDie/CadreList.vue @@ -4,12 +4,12 @@ @@ -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() + }, } diff --git a/src/apps/AppMarryAndDie/FuneralList.vue b/src/apps/AppMarryAndDie/FuneralList.vue index e92da33b..00a6681d 100644 --- a/src/apps/AppMarryAndDie/FuneralList.vue +++ b/src/apps/AppMarryAndDie/FuneralList.vue @@ -4,12 +4,12 @@ @@ -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() diff --git a/src/apps/AppMarryAndDie/MarryList.vue b/src/apps/AppMarryAndDie/MarryList.vue index 45ec81c3..f82a641b 100644 --- a/src/apps/AppMarryAndDie/MarryList.vue +++ b/src/apps/AppMarryAndDie/MarryList.vue @@ -4,12 +4,12 @@ @@ -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()