diff --git a/src/pages/home/CustomerView.vue b/src/pages/home/CustomerView.vue index b9d5e70..17a9ede 100644 --- a/src/pages/home/CustomerView.vue +++ b/src/pages/home/CustomerView.vue @@ -402,6 +402,7 @@ break; } this.getMainList(); + this.getMainVip(); this.getMainDateList(); this.getMainDel(); this.getAllCount(); @@ -437,7 +438,6 @@ // that.customerViewVO = data;//数据部分没刷新 that.customerViewVO.newCustomer = data.newCustomer; that.customerViewVO.newValidCustomer = data.newValidCustomer; - that.customerViewVO.allVipCount = data.allVipCount; that.customerViewVO.customerList = data.customerList; that.customerViewVO.validCustomerList = data.validCustomerList; that.chartData.rows = []; @@ -464,6 +464,23 @@ that.resizeWindow(); }); }, + getMainVip: function () { + let request = { + userId: this.userId + }; + let that = this; + customerView.getMainVipRequest(request, function (data) { + if (data.data.code !== "0000") { + that.$Message.error("系统异常"); + } + data = data.data.results; + that.customerViewVO.allVipCount = data.allVipCount; + //占比重绘 + that.percentResize(); + //页面重绘(柱状图) + that.resizeWindow(); + }); + }, getMainDateList: function () { let request = { userId: this.userId, diff --git a/src/services/datacenter/customerView.js b/src/services/datacenter/customerView.js index d40fe5e..ecd8941 100644 --- a/src/services/datacenter/customerView.js +++ b/src/services/datacenter/customerView.js @@ -10,6 +10,9 @@ import http from '../CommonHttp' export function getMainRequest(params, call) { return http.get('/customer/view/main', params).then(call) } +export function getMainVipRequest(params, call) { + return http.get('/customer/view/main/vip', params).then(call) +} export function getMainDateRequest(params, call) { return http.get('/customer/view/main/date', params).then(call) } @@ -33,6 +36,7 @@ export function downLoadExcel(params,filename, call) { export default { //mainList getMainRequest, + getMainVipRequest, getMainDel, getMainDateRequest, getAllCount,