From aa338faea8cfe50b02a355db04da910633810a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com> Date: Thu, 13 Feb 2020 17:44:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=80=BB=E8=AE=A1=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/analysis/user/gridopening.vue | 120 ++++++++++++++++-- 1 file changed, 107 insertions(+), 13 deletions(-) diff --git a/src/views/modules/analysis/user/gridopening.vue b/src/views/modules/analysis/user/gridopening.vue index 08ef278c..a2e3ffcf 100644 --- a/src/views/modules/analysis/user/gridopening.vue +++ b/src/views/modules/analysis/user/gridopening.vue @@ -39,6 +39,10 @@ {{ $t('export') }} + + 总计 + - - @@ -120,7 +124,7 @@ width="70px" header-align="center" align="center"> - + + + + + + + + + + + + + + + + + + + + @@ -174,7 +255,9 @@ export default { onLine: { id: '', onLineState: '' - } + }, + totalList: [], + totalVisible: false } }, created () { @@ -269,14 +352,25 @@ export default { this.dataForm.startTime = this.time[0] this.dataForm.endTime = this.time[1] }, - // getListCategory () { - // this.$http.get(`/news/newscategory/category/`).then(({ data: res }) => { - // if (res.code !== 0) { - // return this.$message.error(res.msg) - // } - // this.categorys = res.data - // }).catch(() => { }) - // }, + // 获取总计 + getAllCount () { + this.$http.get(`/analysis/user/pageGridDataToal`, { + params: { + order: this.order, + orderField: this.orderField, + page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, + limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, + ...this.dataForm + } + }).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.totalList = [] + this.totalList.push(res.data) + this.totalVisible = true + }).catch(() => { }) + }, modifyOnLine (row) { this.$confirm(this.$t('prompt.info', { 'handle': '下线' }), this.$t('下线'), { confirmButtonText: this.$t('confirm'),