|
@@ -43,14 +43,14 @@
|
|
|
<view class="echart-box-title">实时设备数据</view>
|
|
<view class="echart-box-title">实时设备数据</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sssb-box ddflex">
|
|
<view class="sssb-box ddflex">
|
|
|
- <view class="sssb-item">
|
|
|
|
|
|
|
+ <view class="sssb-item fflex">
|
|
|
<view class="sssb-label">总数</view>
|
|
<view class="sssb-label">总数</view>
|
|
|
- <view class="sssb-data">421台</view>
|
|
|
|
|
|
|
+ <view class="sssb-data">{{statisticData.batteryCount?statisticData.batteryCount:0}}台</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sssb-line"></view>
|
|
<view class="sssb-line"></view>
|
|
|
- <view class="sssb-item">
|
|
|
|
|
|
|
+ <view class="sssb-item fflex">
|
|
|
<view class="sssb-label">使用总次数</view>
|
|
<view class="sssb-label">使用总次数</view>
|
|
|
- <view class="sssb-data">63889次</view>
|
|
|
|
|
|
|
+ <view class="sssb-data">{{statisticData.useCount?statisticData.useCount:0}}次</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <view class="sssb-box ddflex">
|
|
<!-- <view class="sssb-box ddflex">
|
|
@@ -73,23 +73,23 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sssb-box ddflex">
|
|
<view class="sssb-box ddflex">
|
|
|
<view class="sssb-item fflex">
|
|
<view class="sssb-item fflex">
|
|
|
- <view class="sssb-data sssb-color">867.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{statisticData.totalTurnover?statisticData.totalTurnover:0}}</view>
|
|
|
<view class="sssb-label">营业总额</view>
|
|
<view class="sssb-label">营业总额</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sssb-line"></view>
|
|
<view class="sssb-line"></view>
|
|
|
<view class="sssb-item fflex">
|
|
<view class="sssb-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
- <view class="sssb-label">收益总额</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{statisticData.totalRefund?statisticData.totalRefund:0}}</view>
|
|
|
|
|
+ <view class="sssb-label">累计退款</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sssb-box ddflex">
|
|
<view class="sssb-box ddflex">
|
|
|
<view class="sssb-item fflex">
|
|
<view class="sssb-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{statisticData.totalProfit?statisticData.totalProfit:0}}</view>
|
|
|
<view class="sssb-label">收益总额</view>
|
|
<view class="sssb-label">收益总额</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sssb-line"></view>
|
|
<view class="sssb-line"></view>
|
|
|
<view class="sssb-item fflex">
|
|
<view class="sssb-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{statisticData.useProfit?statisticData.useProfit:0}}</view>
|
|
|
<view class="sssb-label">可分账金额</view>
|
|
<view class="sssb-label">可分账金额</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -110,41 +110,41 @@
|
|
|
<view>
|
|
<view>
|
|
|
<view class="search-box ddflex">
|
|
<view class="search-box ddflex">
|
|
|
<image class="search-icon" src="../../static/images/ssico.png"></image>
|
|
<image class="search-icon" src="../../static/images/ssico.png"></image>
|
|
|
- <input class="fflex" placeholder="请输入商家名称或电话"/>
|
|
|
|
|
- <view class="search-btn">搜索</view>
|
|
|
|
|
|
|
+ <input class="fflex" v-model="searchValue" confirm-type="search" @confirm="searchFn" placeholder="请输入商家名称或电话"/>
|
|
|
|
|
+ <view class="search-btn" @click="searchFn">搜索</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 数据 -->
|
|
<!-- 数据 -->
|
|
|
<view>
|
|
<view>
|
|
|
- <view class="sjyy-item" v-for="item,index in 10">
|
|
|
|
|
|
|
+ <view class="sjyy-item" v-for="item,index in groupList" :key="index">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view class="sjyy-header">
|
|
<view class="sjyy-header">
|
|
|
<image src="../../static/pages/images/wdsj.png"></image>
|
|
<image src="../../static/pages/images/wdsj.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="fflex">
|
|
<view class="fflex">
|
|
|
- <view class="sjyy-name">宋秀兰</view>
|
|
|
|
|
- <view class="sjyy-phone">13815141671</view>
|
|
|
|
|
|
|
+ <view class="sjyy-name">{{item.name}}</view>
|
|
|
|
|
+ <view class="sjyy-phone">{{item.phone}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="sjyy-btn" @click="jumpUrl('/pages/operationDataPersonal/operationDataPersonal')">运营情况</view>
|
|
|
|
|
|
|
+ <view class="sjyy-btn" @click="jumpUrl('/pages/operationDataPersonal/operationDataPersonal?merchantId='+item.id+'&totalTurnover='+item.totalTurnover+'&totalRefund='+item.totalRefund+'&totalProfit='+item.totalProfit+'&useProfit='+item.useProfit)">运营情况</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data">
|
|
<view class="sjyy-data">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">10242.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.totalTurnover?item.totalTurnover:0}}</view>
|
|
|
<view class="sssb-label">营业总额</view>
|
|
<view class="sssb-label">营业总额</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1242.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.totalRefund?item.totalRefund:0}}</view>
|
|
|
<view class="sssb-label">累计退款</view>
|
|
<view class="sssb-label">累计退款</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ddflex" style="margin-top: 40rpx;">
|
|
<view class="ddflex" style="margin-top: 40rpx;">
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.totalProfit?item.totalProfit:0}}</view>
|
|
|
<view class="sssb-label">收益总额</view>
|
|
<view class="sssb-label">收益总额</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.useProfit?item.useProfit:0}}</view>
|
|
|
<view class="sssb-label">可分账金额</view>
|
|
<view class="sssb-label">可分账金额</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -159,45 +159,47 @@
|
|
|
<view>
|
|
<view>
|
|
|
<view class="search-box ddflex">
|
|
<view class="search-box ddflex">
|
|
|
<image class="search-icon" src="../../static/images/ssico.png"></image>
|
|
<image class="search-icon" src="../../static/images/ssico.png"></image>
|
|
|
- <input class="fflex" placeholder="请输入门店名称或电话"/>
|
|
|
|
|
- <view class="search-btn">搜索</view>
|
|
|
|
|
|
|
+ <input class="fflex" v-model="searchValue" confirm-type="search" @confirm="searchFn" placeholder="请输入门店名称或电话"/>
|
|
|
|
|
+ <view class="search-btn" @click="searchFn">搜索</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 数据 -->
|
|
<!-- 数据 -->
|
|
|
<view>
|
|
<view>
|
|
|
- <view class="sjyy-item" v-for="item,index in 10">
|
|
|
|
|
|
|
+ <view class="sjyy-item" v-for="item,index in groupList" :key="index">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view class="sjyy-header">
|
|
<view class="sjyy-header">
|
|
|
<image src="../../static/pages/images/wdmd.png"></image>
|
|
<image src="../../static/pages/images/wdmd.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="fflex">
|
|
<view class="fflex">
|
|
|
- <view class="sjyy-name">白云科技门店</view>
|
|
|
|
|
- <view class="sjyy-phone">顾勇(13815141671)</view>
|
|
|
|
|
|
|
+ <view class="sjyy-name">{{item.name}}</view>
|
|
|
|
|
+ <view class="sjyy-phone">{{item.linkman}}({{item.phone}})</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="sjyy-btn" @click="jumpUrl('/pages/operationDataPersonal/operationDataPersonal')">运营情况</view>
|
|
|
|
|
|
|
+ <view class="sjyy-btn"
|
|
|
|
|
+ @click="jumpUrl('/pages/operationDataPersonal/operationDataPersonal?storeId='+item.id+'&totalTurnover='+item.totalTurnover+'&totalRefund='+item.totalRefund+'&totalProfit='+item.totalProfit+'&useProfit='+item.useProfit)">
|
|
|
|
|
+ 运营情况</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data ddflex" style="padding: 20rpx;">
|
|
<view class="sjyy-data ddflex" style="padding: 20rpx;">
|
|
|
<image style="width: 26rpx;height: 26rpx;margin-right: 10rpx;" src="../../static/pages/images/address-icon.png"></image>
|
|
<image style="width: 26rpx;height: 26rpx;margin-right: 10rpx;" src="../../static/pages/images/address-icon.png"></image>
|
|
|
- <view class="tover fflex" style="font-size: 24rpx;line-height: 36rpx;color: #A8A5A5;">朝阳区金台路道家园1号</view>
|
|
|
|
|
|
|
+ <view class="tover fflex" style="font-size: 24rpx;line-height: 36rpx;color: #A8A5A5;">{{item.address}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data">
|
|
<view class="sjyy-data">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">10242.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.totalTurnover?item.totalTurnover:0}}</view>
|
|
|
<view class="sssb-label">营业总额</view>
|
|
<view class="sssb-label">营业总额</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1242.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.totalRefund?item.totalRefund:0}}</view>
|
|
|
<view class="sssb-label">累计退款</view>
|
|
<view class="sssb-label">累计退款</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ddflex" style="margin-top: 40rpx;">
|
|
<view class="ddflex" style="margin-top: 40rpx;">
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.totalProfit?item.totalProfit:0}}</view>
|
|
|
<view class="sssb-label">收益总额</view>
|
|
<view class="sssb-label">收益总额</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="sjyy-data-item fflex">
|
|
<view class="sjyy-data-item fflex">
|
|
|
- <view class="sssb-data sssb-color">1915.00</view>
|
|
|
|
|
|
|
+ <view class="sssb-data sssb-color">{{item.useProfit?item.useProfit:0}}</view>
|
|
|
<view class="sssb-label">可分账金额</view>
|
|
<view class="sssb-label">可分账金额</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -227,9 +229,21 @@
|
|
|
pxToRpxScale: 0,
|
|
pxToRpxScale: 0,
|
|
|
rpxTopxScale: 0,
|
|
rpxTopxScale: 0,
|
|
|
|
|
|
|
|
|
|
+ merchantId:null,
|
|
|
|
|
+ storeId:null,
|
|
|
|
|
|
|
|
queryType: 1,
|
|
queryType: 1,
|
|
|
timeType: 1, //统计时间 1.按日 2.按月 3.按季度
|
|
timeType: 1, //统计时间 1.按日 2.按月 3.按季度
|
|
|
|
|
+
|
|
|
|
|
+ groupList: [],
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ limit: 10,
|
|
|
|
|
+ searchValue:'',
|
|
|
|
|
+ isQuerying:false,//正在查询数据
|
|
|
|
|
+
|
|
|
|
|
+ echartData:{},//交易趋势图表
|
|
|
|
|
+ statisticData:{},
|
|
|
|
|
+ barEchartData:{},
|
|
|
|
|
|
|
|
// 交易趋势图表数据
|
|
// 交易趋势图表数据
|
|
|
option: {
|
|
option: {
|
|
@@ -240,11 +254,17 @@
|
|
|
},
|
|
},
|
|
|
confine: true
|
|
confine: true
|
|
|
},
|
|
},
|
|
|
|
|
+ legend: {
|
|
|
|
|
+ data: ['订单数', '订单金额','收益金额'],
|
|
|
|
|
+ x: 'center', //可设定图例在左、右、居中
|
|
|
|
|
+ y: 'top', //可设定图例在上、下、居中
|
|
|
|
|
+ padding: [15, 0, 0, 0]
|
|
|
|
|
+ },
|
|
|
grid: {
|
|
grid: {
|
|
|
left: 0,
|
|
left: 0,
|
|
|
right: 8,
|
|
right: 8,
|
|
|
- bottom: 10,
|
|
|
|
|
- top: 10,
|
|
|
|
|
|
|
+ bottom: 5,
|
|
|
|
|
+ top: 45,
|
|
|
containLabel: true
|
|
containLabel: true
|
|
|
},
|
|
},
|
|
|
xAxis: [{
|
|
xAxis: [{
|
|
@@ -258,7 +278,7 @@
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
color: '#666666',
|
|
color: '#666666',
|
|
|
// interval: 0,
|
|
// interval: 0,
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
yAxis: [{
|
|
yAxis: [{
|
|
@@ -276,17 +296,45 @@
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
series: [{
|
|
series: [{
|
|
|
- name: '订单',
|
|
|
|
|
- type: 'line',
|
|
|
|
|
- data: [],
|
|
|
|
|
- barWidth: 10,
|
|
|
|
|
- itemStyle: {
|
|
|
|
|
- // 颜色
|
|
|
|
|
- color: '#FF7D00',
|
|
|
|
|
- // 给bar设置倒角
|
|
|
|
|
- barBorderRadius: [15, 15, 0, 0]
|
|
|
|
|
- }
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+ name: '订单数',
|
|
|
|
|
+ type: 'line',
|
|
|
|
|
+ data: [300, 270, 340, 344, 300, 320, 310],
|
|
|
|
|
+ showSymbol: false,
|
|
|
|
|
+ smooth: true,
|
|
|
|
|
+ itemStyle: {
|
|
|
|
|
+ // 颜色
|
|
|
|
|
+ color: '#5F50E6',
|
|
|
|
|
+ // 给bar设置倒角
|
|
|
|
|
+ barBorderRadius: [15, 15, 0, 0]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '订单金额',
|
|
|
|
|
+ type: 'line',
|
|
|
|
|
+ data: [120, 102, 141, 174, 190, 250, 220],
|
|
|
|
|
+ showSymbol: false,
|
|
|
|
|
+ smooth: true,
|
|
|
|
|
+ itemStyle: {
|
|
|
|
|
+ // 颜色
|
|
|
|
|
+ color: '#FF7D00',
|
|
|
|
|
+ // 给bar设置倒角
|
|
|
|
|
+ barBorderRadius: [15, 15, 0, 0]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '收益金额',
|
|
|
|
|
+ type: 'line',
|
|
|
|
|
+ data: [120, 102, 141, 174, 190, 250, 120],
|
|
|
|
|
+ showSymbol: false,
|
|
|
|
|
+ smooth: true,
|
|
|
|
|
+ itemStyle: {
|
|
|
|
|
+ // 颜色
|
|
|
|
|
+ color: '#FFDC0F',
|
|
|
|
|
+ // 给bar设置倒角
|
|
|
|
|
+ barBorderRadius: [15, 15, 0, 0]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 近一周营业额度(元)图表数据
|
|
// 近一周营业额度(元)图表数据
|
|
@@ -342,7 +390,10 @@
|
|
|
show: true,
|
|
show: true,
|
|
|
position: 'top',
|
|
position: 'top',
|
|
|
color: '#FF770F',
|
|
color: '#FF770F',
|
|
|
- formatter: '¥{c}',
|
|
|
|
|
|
|
+ formatter: (res)=>{
|
|
|
|
|
+ if(res.value>0) return '¥'+res.value
|
|
|
|
|
+ else return ''
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
data: [285, 200, 285, 300, 285, 285, 320],
|
|
data: [285, 200, 285, 300, 285, 285, 320],
|
|
@@ -409,7 +460,10 @@
|
|
|
show: true,
|
|
show: true,
|
|
|
position: 'top',
|
|
position: 'top',
|
|
|
color: '#FF770F',
|
|
color: '#FF770F',
|
|
|
- formatter: '¥{c}',
|
|
|
|
|
|
|
+ formatter: (res)=>{
|
|
|
|
|
+ if(res.value>0) return '¥'+res.value
|
|
|
|
|
+ else return ''
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
data: [285, 200, 285, 300, 285, 285, 320],
|
|
data: [285, 200, 285, 300, 285, 285, 320],
|
|
@@ -426,7 +480,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
-
|
|
|
|
|
|
|
+ this.getStatisticData()
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
|
|
@@ -442,30 +496,38 @@
|
|
|
queryTypeChange(val) {
|
|
queryTypeChange(val) {
|
|
|
if (this.queryType == val) return false
|
|
if (this.queryType == val) return false
|
|
|
this.queryType = val
|
|
this.queryType = val
|
|
|
|
|
+ if(this.queryType==1){
|
|
|
|
|
+ this.getStatisticData()
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.queryType==2||this.queryType==3){
|
|
|
|
|
+ this.getDataList()
|
|
|
|
|
+ this.searchValue = ''
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
// 统计时间切换
|
|
// 统计时间切换
|
|
|
timeTypeChange(val) {
|
|
timeTypeChange(val) {
|
|
|
if (this.timeType == val) return false
|
|
if (this.timeType == val) return false
|
|
|
this.timeType = val
|
|
this.timeType = val
|
|
|
|
|
+ this.getStatisticData()
|
|
|
},
|
|
},
|
|
|
init() {
|
|
init() {
|
|
|
this.$refs.chart.init(echarts, async chart => {
|
|
this.$refs.chart.init(echarts, async chart => {
|
|
|
// let echartData = await this.getEchartData()
|
|
// let echartData = await this.getEchartData()
|
|
|
- this.option.xAxis[0].data = ['04-04', '04-05', '04-06', '04-07', '04-08', '04-09', '04-10']
|
|
|
|
|
- this.option.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
|
|
- this.option.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
|
|
- this.option.series[0].data = [100, 270, 340, 344, 300, 320, 310]
|
|
|
|
|
|
|
+ this.option.legend.itemHeight = 10 * this.rpxTopxScale
|
|
|
|
|
+ this.option.legend.itemWidth = 40 * this.rpxTopxScale
|
|
|
|
|
+ this.option.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
|
|
|
|
|
+ this.option.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
|
|
|
|
|
+ this.option.series[1].data = this.echartData.profitList.map(item=>{return item.profit})
|
|
|
|
|
+ this.option.series[2].data = this.echartData.turnoverList.map(item=>{return item.turnover})
|
|
|
chart.setOption(this.option);
|
|
chart.setOption(this.option);
|
|
|
});
|
|
});
|
|
|
if (this.$refs.chart2) {
|
|
if (this.$refs.chart2) {
|
|
|
this.$refs.chart2.init(echarts, async chart => {
|
|
this.$refs.chart2.init(echarts, async chart => {
|
|
|
// let echartData = await this.getEchartData()
|
|
// let echartData = await this.getEchartData()
|
|
|
- this.option2.xAxis[0].data = ['04-04', '04-05', '04-06', '04-07', '04-08', '04-09',
|
|
|
|
|
- '04-10'
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ this.option2.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
|
|
|
this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
- this.option2.series[0].data = [300, 270, 340, 344, 300, 320, 310]
|
|
|
|
|
|
|
+ this.option2.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
|
|
|
this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
|
|
this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
|
|
|
chart.setOption(this.option2);
|
|
chart.setOption(this.option2);
|
|
|
});
|
|
});
|
|
@@ -473,17 +535,104 @@
|
|
|
if (this.$refs.chart3) {
|
|
if (this.$refs.chart3) {
|
|
|
this.$refs.chart3.init(echarts, async chart => {
|
|
this.$refs.chart3.init(echarts, async chart => {
|
|
|
// let echartData = await this.getEchartData()
|
|
// let echartData = await this.getEchartData()
|
|
|
- this.option3.xAxis[0].data = ['04-04', '04-05', '04-06', '04-07', '04-08', '04-09',
|
|
|
|
|
- '04-10'
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ this.option3.xAxis[0].data = this.echartData.profitList.map(item=>{return item.showTime})
|
|
|
this.option3.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
this.option3.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
this.option3.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
this.option3.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
|
|
|
- this.option3.series[0].data = [300, 270, 340, 344, 300, 320, 310]
|
|
|
|
|
|
|
+ this.option3.series[0].data = this.echartData.profitList.map(item=>{return item.profit})
|
|
|
this.option3.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
|
|
this.option3.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
|
|
|
chart.setOption(this.option3);
|
|
chart.setOption(this.option3);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ getDataList(isPage) {
|
|
|
|
|
+ if(this.isQuerying) return
|
|
|
|
|
+ else this.isQuerying = true
|
|
|
|
|
+ if (!isPage) {
|
|
|
|
|
+ this.page = 1
|
|
|
|
|
+ }
|
|
|
|
|
+ let queryParams = {
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ limit: this.limit,
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.searchValue){
|
|
|
|
|
+ queryParams.name=this.searchValue
|
|
|
|
|
+ }
|
|
|
|
|
+ let api = '/admin/v2/merchant/pageDate'
|
|
|
|
|
+ if(this.queryType==2){
|
|
|
|
|
+ api = '/admin/v2/merchant/pageDate'
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.queryType==3){
|
|
|
|
|
+ api = '/admin/v2/store/pageData'
|
|
|
|
|
+ }
|
|
|
|
|
+ req.getRequest(
|
|
|
|
|
+ api,
|
|
|
|
|
+ queryParams,
|
|
|
|
|
+ data => {
|
|
|
|
|
+ if (data != null && data.list.length > 0) {
|
|
|
|
|
+ if (!isPage) {
|
|
|
|
|
+ this.groupList = data.list
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.groupList = this.groupList.concat(data.list)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.page++
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (!isPage)
|
|
|
|
|
+ this.groupList = data.list
|
|
|
|
|
+ else {}
|
|
|
|
|
+ }
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ this.isQuerying = false
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ },
|
|
|
|
|
+ searchFn(){
|
|
|
|
|
+ this.getDataList()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 获取运营数据-交易趋势
|
|
|
|
|
+ async getStatisticData(){
|
|
|
|
|
+ await this.getEchartData()
|
|
|
|
|
+ await this.getTopData()
|
|
|
|
|
+ await this.getBarEchartData()
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
|
|
+ getEchartData() {
|
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
|
+ req.getRequest('/admin/v2/statistic/chart', {type: this.timeType}, res => {
|
|
|
|
|
+ this.echartData = res
|
|
|
|
|
+ console.log('statistic chart', res)
|
|
|
|
|
+ r(res)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取统计数据
|
|
|
|
|
+ getTopData() {
|
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
|
+ req.getRequest('/admin/v2/statistic/top', {}, res => {
|
|
|
|
|
+ console.log('statistic top', res)
|
|
|
|
|
+ this.statisticData = res
|
|
|
|
|
+ r(res)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getBarEchartData() {
|
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
|
+ let merchantId = this.merchantId?this.merchantId:req.getStorage('userInfo').merchantId?req.getStorage('userInfo').merchantId:''
|
|
|
|
|
+ let storeId = this.storeId?this.storeId:req.getStorage('userInfo').storeId?req.getStorage('userInfo').storeId:''
|
|
|
|
|
+ let pData = {
|
|
|
|
|
+ merchantId:merchantId,
|
|
|
|
|
+ storeId:storeId
|
|
|
|
|
+ }
|
|
|
|
|
+ req.getRequest('/admin/v2/statistic/histogram', pData, res => {
|
|
|
|
|
+ this.barEchartData = res
|
|
|
|
|
+ console.log('statistic chart', res)
|
|
|
|
|
+ r(res)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
const systemInfo = uni.getSystemInfoSync();
|
|
const systemInfo = uni.getSystemInfoSync();
|