Commit 7bd5af46 authored by 黄奎's avatar 黄奎

统计修改

parent fdaf046f
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
</style> </style>
<template> <template>
<div class="mallIndex"> <div class="mallIndex" v-loading="loading">
<div class="zanTotalTop">数据概况</div> <div class="zanTotalTop">数据概况</div>
<div class="mallIndex_Second"> <div class="mallIndex_Second">
<div class="searchDiv"> <div class="searchDiv">
...@@ -517,6 +517,8 @@ ...@@ -517,6 +517,8 @@
export default { export default {
data() { data() {
return { return {
//加载
loading: false,
//基础数据 //基础数据
activeName: '', activeName: '',
//销售情况 //销售情况
...@@ -557,9 +559,6 @@ ...@@ -557,9 +559,6 @@
//数据改变 //数据改变
getChange() { getChange() {
this.getBasicData(); this.getBasicData();
this.getMallIndexSalesStatistics();
this.GetMallIndesSalesIncomeStatistics();
this.GetMallIndesSalesUserStatistics();
}, },
//基础数据日期切换 //基础数据日期切换
handleClick(tab, event) { handleClick(tab, event) {
...@@ -577,6 +576,7 @@ ...@@ -577,6 +576,7 @@
}, },
//获取基础数据 //获取基础数据
getBasicData() { getBasicData() {
this.loading = true;
if (this.dateStr && this.dateStr.length > 0) { if (this.dateStr && this.dateStr.length > 0) {
this.basicQMsg.StartDate = this.dateStr[0]; this.basicQMsg.StartDate = this.dateStr[0];
this.basicQMsg.EndDate = this.dateStr[1]; this.basicQMsg.EndDate = this.dateStr[1];
...@@ -585,53 +585,31 @@ ...@@ -585,53 +585,31 @@
this.basicQMsg.EndDate = ''; this.basicQMsg.EndDate = '';
} }
this.apipost("/api/Tenant/MallIndexStatistics", this.basicQMsg, res => { this.apipost("/api/Tenant/MallIndexStatistics", this.basicQMsg, res => {
this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.basicData = res.data.data; //基础数据统计
} else { this.basicData = res.data.data.basicData;
this.Info(res.data.message);
}
})
},
//销售情况统计 //销售情况统计
getMallIndexSalesStatistics() { this.salesData = res.data.data.salesData;
this.apipost("/api/Tenant/MallIndexSalesStatistics", this.basicQMsg, res => {
if (res.data.resultCode == 1) {
this.salesData = res.data.data;
this.initMap()
} else {
this.Info(res.data.message);
}
})
},
//商品购买力TOP排行 //商品购买力TOP排行
GetMallIndesSalesIncomeStatistics() { var saleGoodsArray = res.data.data.saleIncomeData;
this.apipost("/api/Tenant/MallIndesSalesIncomeStatistics", this.basicQMsg, res => { if (saleGoodsArray) {
if (res.data.resultCode == 1) { if (saleGoodsArray.length <= 2) {
var array = res.data.data; this.saleIncomeData = saleGoodsArray;
if (array) {
if (array.length <= 2) {
this.saleIncomeData = array;
} else { } else {
this.saleIncomeData = array.slice(0, 10); this.saleIncomeData = saleGoodsArray.slice(0, 10);
}
} }
} else {
this.Info(res.data.message);
} }
})
},
//用户购买力TOP排行 //用户购买力TOP排行
GetMallIndesSalesUserStatistics() { var saleUserArray = res.data.data.saleUserData;
this.apipost("/api/Tenant/MallIndesSalesUserStatistics", this.basicQMsg, res => { if (saleUserArray) {
if (res.data.resultCode == 1) { if (saleUserArray.length <= 2) {
var array = res.data.data; this.saleUserData = saleUserArray;
if (array) {
if (array.length <= 2) {
this.saleUserData = array;
} else { } else {
this.saleUserData = array.slice(0, 10); this.saleUserData = saleUserArray.slice(0, 10);
} }
} }
this.initMap();
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment