From 05615e6150de3fe40caf1dd8505f7b3262f4b271 Mon Sep 17 00:00:00 2001 From: yechenhao Date: Thu, 14 May 2020 18:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/CustomerView.vue | 46 +++++++++++++++++++++---- src/services/datacenter/customerView.js | 8 +++++ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/pages/CustomerView.vue b/src/pages/CustomerView.vue index d1a7cbc..3f95d5f 100644 --- a/src/pages/CustomerView.vue +++ b/src/pages/CustomerView.vue @@ -396,6 +396,8 @@ break; } this.getMainList(); + this.getMainDateList(); + this.getMainDel(); this.getAllCount(); }, getAllCount: function(){ @@ -419,10 +421,7 @@ endTime: this.endTime }; let that = this; - //加载遮罩 - this.spinShow = true; customerView.getMainRequest(request, function (data) { - that.spinShow = false; if (data.data.code !== "0000") { that.$Message.error("系统异常"); } @@ -430,13 +429,9 @@ // that.customerViewVO = data;//数据部分没刷新 that.customerViewVO.newCustomer = data.newCustomer; that.customerViewVO.newValidCustomer = data.newValidCustomer; - that.customerViewVO.validDeleteCustomer = data.validDeleteCustomer; that.customerViewVO.allVipCount = data.allVipCount; that.customerViewVO.customerList = data.customerList; that.customerViewVO.validCustomerList = data.validCustomerList; - that.customerViewVO.orgNewCustomerList = data.orgNewCustomerList; - that.customerViewVO.shopNewCustomerList = data.shopNewCustomerList; - that.customerViewVO.zeroExtendList = data.zeroExtendList; that.chartData.rows = []; if (that.startTime && that.endTime) { let tmpStartTime = that.startTime; @@ -461,6 +456,43 @@ that.resizeWindow(); }); }, + getMainDateList: function () { + let request = { + userId: this.userId, + selectStartTime: this.selectStartTime == null ? null : this.$moment(this.selectStartTime).format("YYYY-MM-DD 00:00:00"), + selectEndTime: this.selectEndTime == null ? null : this.$moment(this.selectEndTime).format("YYYY-MM-DD HH:mm:ss") + }; + let that = this; + //加载遮罩 + this.spinShow = true; + customerView.getMainDateRequest(request, function (data) { + that.spinShow = false; + if (data.data.code !== "0000") { + that.$Message.error("系统异常"); + } + data = data.data.results; + that.customerViewVO.orgNewCustomerList = data.orgNewCustomerList; + that.customerViewVO.shopNewCustomerList = data.shopNewCustomerList; + that.customerViewVO.zeroExtendList = data.zeroExtendList; + //占比重绘 + that.percentResize(); + //页面重绘(柱状图) + that.resizeWindow(); + }); + }, + getMainDel: function () { + let request = { + userId: this.userId + }; + let that = this; + //加载遮罩 + customerView.getMainDel(request, function (data) { + if (data.data.code !== "0000") { + that.$Message.error("系统异常"); + } + that.customerViewVO.validDeleteCustomer = data.validDeleteCustomer; + }); + }, //零推广更多跳转 zeroExtendMore: function () { this.setMenuName("首页", "推广为0店铺数"); diff --git a/src/services/datacenter/customerView.js b/src/services/datacenter/customerView.js index 99e03e9..d40fe5e 100644 --- a/src/services/datacenter/customerView.js +++ b/src/services/datacenter/customerView.js @@ -10,6 +10,12 @@ import http from '../CommonHttp' export function getMainRequest(params, call) { return http.get('/customer/view/main', params).then(call) } +export function getMainDateRequest(params, call) { + return http.get('/customer/view/main/date', params).then(call) +} +export function getMainDel(params, call) { + return http.get('/customer/view/main/del', params).then(call) +} export function getAllCount(params, call) { return http.get('/customer/view/all/count', params).then(call) } @@ -27,6 +33,8 @@ export function downLoadExcel(params,filename, call) { export default { //mainList getMainRequest, + getMainDel, + getMainDateRequest, getAllCount, getAnalysisRequest, downLoadExcel,