|
|
|
@ -45,11 +45,11 @@ |
|
|
|
<view class="home_2" v-if="userType=='background'"> |
|
|
|
<view class=""> |
|
|
|
<view class="title"> |
|
|
|
待办<text style="color: #999;font-size: 12px;">(更新于:2023/08/30 19:00)</text> |
|
|
|
待办<text style="color: #999;font-size: 12px;">(更新于:{{needInfo.update_time}})</text> |
|
|
|
</view> |
|
|
|
<view class="card"> |
|
|
|
<view class="">待下分额度</view> |
|
|
|
<view class="t2">10000.00</view> |
|
|
|
<view class="">{{needInfo.down_scores_quota.title}}</view> |
|
|
|
<view class="t2">{{needInfo.down_scores_quota.quota}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
@ -64,16 +64,16 @@ |
|
|
|
<view class="right1"> |
|
|
|
<view class=""> |
|
|
|
<view class="label" style="font-size: 12px;">代理人数</view> |
|
|
|
<view class="" style="font-weight: bold;padding-left: 20px;">1200</view> |
|
|
|
<view class="" style="font-weight: bold;padding-left: 20px;">{{userStatistics.agent.num}}</view> |
|
|
|
</view> |
|
|
|
<view class="" style="font-weight: bold;">20%</view> |
|
|
|
<view class="" style="font-weight: bold;">{{userStatistics.agent.rate}}</view> |
|
|
|
</view> |
|
|
|
<view class="right1"> |
|
|
|
<view class=""> |
|
|
|
<view class="label" style="font-size: 12px;">用户人数</view> |
|
|
|
<view class="" style="font-weight: bold;padding-left: 20px;">120000</view> |
|
|
|
<view class="" style="font-weight: bold;padding-left: 20px;">{{userStatistics.user.num}}</view> |
|
|
|
</view> |
|
|
|
<view class="" style="font-weight: bold;">80%</view> |
|
|
|
<view class="" style="font-weight: bold;">{{userStatistics.user.rate}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -83,13 +83,13 @@ |
|
|
|
上下分数据 |
|
|
|
</view> |
|
|
|
<view class="chart_tab"> |
|
|
|
<view class="item" @click="changeChartIndex(0)" :class="chartIndex==0?'active':''">上分统计</view> |
|
|
|
<view class="item" @click="changeChartIndex(1)" :class="chartIndex==1?'active':''">下分数据</view> |
|
|
|
<view class="item" @click="changeChartIndex(1)" :class="chartIndex==1?'active':''">上分统计</view> |
|
|
|
<view class="item" @click="changeChartIndex(2)" :class="chartIndex==2?'active':''">下分数据</view> |
|
|
|
</view> |
|
|
|
<view class="chart_area"> |
|
|
|
<view class="chart"> |
|
|
|
<view class="" style="color: #999;font-size: 14px;"> |
|
|
|
{{ chartIndex==0?'上分总数':'下分总数' }}:<text style="color: #101010;">{{ chartIndex==0?'1200':'12000' }}</text> |
|
|
|
{{ chartIndex==1?'上分总数':'下分总数' }}:<text style="color: #101010;">{{ UpDownSta.sum_value }}</text> |
|
|
|
</view> |
|
|
|
<view class="" id="mychart" style="width: 670rpx;height: 250px;"></view> |
|
|
|
</view> |
|
|
|
@ -110,13 +110,43 @@ |
|
|
|
bannerList: [], |
|
|
|
goodsList: [], |
|
|
|
recordsList: [1,2,3,4,5,6], |
|
|
|
chartIndex: 0, |
|
|
|
chartIndex: 1,//1上分2下分 |
|
|
|
myChart: null, |
|
|
|
pieChart: null, |
|
|
|
innerAudioContext: null, |
|
|
|
isPlay: false, |
|
|
|
nomore: false, |
|
|
|
page: 1 |
|
|
|
page: 1, |
|
|
|
needInfo: { |
|
|
|
update_time: '2023/08/30 19:00', |
|
|
|
down_scores_quota: { |
|
|
|
title: '待下分额度', |
|
|
|
quota: '10010.00' |
|
|
|
} |
|
|
|
}, |
|
|
|
userStatistics: { |
|
|
|
agent: { |
|
|
|
num: '7', |
|
|
|
rate: '36.84%' |
|
|
|
}, |
|
|
|
user: { |
|
|
|
num: '12', |
|
|
|
rate: '63.16%' |
|
|
|
}, |
|
|
|
sum: { |
|
|
|
num: "19人" //总人数 |
|
|
|
} |
|
|
|
}, |
|
|
|
UpDownSta: { |
|
|
|
"histogram": [ |
|
|
|
{"date": "09", //月份 |
|
|
|
"value": "20.00" //数据 |
|
|
|
}, |
|
|
|
], //柱状图 |
|
|
|
"sum_value": "20.00" ,//总数据, |
|
|
|
xData: ['1月', '2月', '3月', '4月', '5月'], |
|
|
|
data: [155, 250, 360, 100, 180, 204] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -130,9 +160,16 @@ |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.userType = uni.getStorageSync('userType'); |
|
|
|
this.getRotationChart(); |
|
|
|
this.getZoneList(); |
|
|
|
|
|
|
|
if(this.userType=='user'){ |
|
|
|
this.getZoneList(); |
|
|
|
this.getRotationChart(); |
|
|
|
} |
|
|
|
if(this.userType=='background'){ |
|
|
|
this.getNeedSta(); |
|
|
|
this.getUserSta(); |
|
|
|
this.getUpDownSta(); |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
if(this.userType=='user'){ |
|
|
|
@ -180,12 +217,16 @@ |
|
|
|
}, |
|
|
|
changeChartIndex(type){ |
|
|
|
this.chartIndex = type; |
|
|
|
this.myChart.clear(); |
|
|
|
this.renderChart(); |
|
|
|
this.getUpDownSta(type); |
|
|
|
setTimeout(()=>{ |
|
|
|
this.myChart.clear(); |
|
|
|
this.renderChart(); |
|
|
|
}, 200) |
|
|
|
}, |
|
|
|
renderChart(){ |
|
|
|
let yMax = 450; |
|
|
|
let yMax = ([...this.UpDownSta.data].sort())[this.UpDownSta.data.length-1]; |
|
|
|
let interval = yMax / 5; |
|
|
|
// yMax = interval*6; |
|
|
|
let option = { |
|
|
|
color: ['#5087EC','#74C0C8'], |
|
|
|
// title: { |
|
|
|
@ -202,7 +243,7 @@ |
|
|
|
}, |
|
|
|
tooltip: {}, |
|
|
|
xAxis: { |
|
|
|
data: ['1月', '2月', '3月', '4月', '5月'], |
|
|
|
data: this.UpDownSta.xData, |
|
|
|
|
|
|
|
}, |
|
|
|
yAxis: [{ |
|
|
|
@ -220,12 +261,13 @@ |
|
|
|
name: '', |
|
|
|
type: 'bar', |
|
|
|
barMaxWidth: 30, |
|
|
|
data: [155, 250, 360, 100, 180, 204] |
|
|
|
data: this.UpDownSta.data |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '', |
|
|
|
type: 'line', |
|
|
|
data: [175, 180, 410, 208, 195, 330], |
|
|
|
// data: [175, 180, 410, 208, 195, 330], |
|
|
|
data: this.UpDownSta.data, |
|
|
|
yAxisIndex: 1 |
|
|
|
} |
|
|
|
] |
|
|
|
@ -262,8 +304,8 @@ |
|
|
|
show: false |
|
|
|
}, |
|
|
|
data: [ |
|
|
|
{ value: 1200, name: 'Search Engine' }, |
|
|
|
{ value: 12000, name: 'Direct' } |
|
|
|
{ value: this.userStatistics.agent.num, name: 'Search Engine' }, |
|
|
|
{ value: this.userStatistics.user.num, name: 'Direct' } |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
@ -306,7 +348,33 @@ |
|
|
|
this.nomore = true; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
/*总后台待办*/ |
|
|
|
getNeedSta(){ |
|
|
|
API.request('/adminStatistics/needStatistics', {}, res=>{ |
|
|
|
this.needInfo = res.data; |
|
|
|
}) |
|
|
|
}, |
|
|
|
/*总后台用户统计*/ |
|
|
|
getUserSta(){ |
|
|
|
API.request('/adminStatistics/userStatistics', {}, res=>{ |
|
|
|
this.userStatistics = res.data; |
|
|
|
}) |
|
|
|
}, |
|
|
|
/*总后台上下分统计数据*/ |
|
|
|
getUpDownSta(type=1){ |
|
|
|
API.request('/adminStatistics/upAndDownStatistics', {type: type}, res=>{ |
|
|
|
this.UpDownSta = res.data; |
|
|
|
this.UpDownSta.xData = this.UpDownSta.histogram.map(item=>{ |
|
|
|
return item.date; |
|
|
|
}) |
|
|
|
this.UpDownSta.data = this.UpDownSta.histogram.map(item=>{ |
|
|
|
return item.value; |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if(!this.nomore){ |
|
|
|
|