From ab17f44cc4aa2b15c36d6f523fa3844a338101ce Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 24 十月 2023 21:31:52 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
---
cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/platformIncome.html | 444 ++++++++++++++++++++++++++++--------------------------
1 files changed, 230 insertions(+), 214 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/platformIncome.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/platformIncome.html
index b600121..a22080e 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/platformIncome.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/platformIncome.html
@@ -67,7 +67,7 @@
<div class="col-sm-11">
<div class="form-group">
<div class="col-sm-10">
- <h2>营收数据</h2>
+ <h2>营收数据1</h2>
</br>
<div id = "money1" style="width: 1500px" >
<span id="totalIncome">总营收:</span>
@@ -177,7 +177,7 @@
<h2>运营数据</h2>
</br>
</br>
- <span>运营时长:0小时</span>
+ <span>运营时长:<span id="allHour"></span>小时</span>
</br>
</br>
<div style="height: 25px;box-sizing: border-box;background:#f3f3f4;line-height: 25px;border:1px solid;margin-bottom: 20px;width: 500px">
@@ -211,7 +211,7 @@
<h2>学员数据</h2>
</br>
</br>
- <span>累计学员数:0人</span>
+ <span>累计学员数:<span id="allUser"></span>人</span>
</br>
</br>
<div id="teach" style="width: 1280px;height:500px;"></div>
@@ -258,132 +258,6 @@
<script src="${ctxPath}/modular/system/dataStatistics/echarts.min.js"></script>
<script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script>
<script>
- function search1(){
- var time = $("#beginTime").val()
- var ajax = new $ax(Feng.ctxPath + "/data/type1", function (data) {
-
- $("#fee1").text(data.fee1)
- $("#fee2").text(data.fee2)
- $("#fee3").text(data.fee3)
- $("#fee4").text(data.fee4)
- $("#fee5").text(data.fee5)
- $("#fee7").text(data.fee7)
- $("#day").val(data.dayone)
- $("#month").val(data.monthone)
- $("#quarter").val(data.quarterone)
- $("#year").val(data.yearone)
-
-
-
-
-
- var chartDom = document.getElementById('cookieTicket');
- var myChart = echarts.init(chartDom);
- var option;
- option = {
- title: {
- text: '门票收入',
- subtext: '',
- left: 'center'
- },
- tooltip: {
- trigger: 'item'
- },
-
- series: [
- {
- name: 'Access From',
- type: 'pie',
- radius: '50%',
- data: [
- { value: data.dayone, name: '日卡' },
- { value: data.monthone, name: '月卡' },
- { value: data.quarterone, name: '季卡' },
- { value: data.yearone, name: '年卡' },
-
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- };
- myChart.setOption(option);
-
- var chartDom = document.getElementById('cookieCourse');
- var myChart = echarts.init(chartDom);
- var option;
- option = {
- title: {
- text: '课程收入',
- subtext: '',
- left: 'center'
- },
- tooltip: {
- trigger: 'item'
- },
-
- series: [
- {
- name: 'Access From',
- type: 'pie',
- radius: '50%',
- data: data.courseData,
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- };
- myChart.setOption(option);
-
-
- var chartDom = document.getElementById('cookieBooking');
- var myChart = echarts.init(chartDom);
- var option;
- option = {
- title: {
- text: '订场收入',
- subtext: '',
- left: 'center'
- },
- tooltip: {
- trigger: 'item'
- },
-
- series: [
- {
- name: 'Access From',
- type: 'pie',
- radius: '50%',
- data: data.siteData,
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- };
- myChart.setOption(option);
-
-
- }, function (data) {
-
- });
- ajax.set("time",time);
- ajax.start();
- }
var ans = [];
var weekX = ["1周","2周","3周","4周"];
var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];
@@ -413,15 +287,20 @@
for (var i = 1; i <= daysInMonth; i++) {
timeX.push(String(i));
}
- laydate.render({
- elem: '#beginTime'
- , trigger: 'click'
- , range: true
- });
+
+ function getYears() {
+ var ajax2 = new $ax(Feng.ctxPath + "/data/getYears", function(data){
+ yearX=data
+ });
+ ajax2.start()
+ }
$(function(){
getContent(1);
getContent1(1);
getContent2(1);
+
+
+
var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){
yearX=resp.year
@@ -486,7 +365,7 @@
name: '年度营收',
type: 'line',
stack: 'Total',
- data: [year[0].amount,year[1].amount,year[2].amount,year[3].amount,year[4].amount,year[5].amount]
+ data: [year[0],year[1],year[2],year[3],year[4],year[5],year[6],year[7],year[8],year[9],year[10]]
},
{
name: '月度营收',
@@ -521,9 +400,6 @@
var myChart = echarts.init(document.getElementById('main'));
var myChart1 = echarts.init(document.getElementById('refund'));
-
-
- var myChart6 = echarts.init(document.getElementById('teach'));
var myChart7 = echarts.init(document.getElementById('courseData'));
@@ -532,7 +408,7 @@
$("#back2").text(data.thisMonth);
$("#back3").text(data.thisWeek);
$("#back4").text(data.thisDay);
- option1 = {
+ optionBack = {
tooltip: {
trigger: 'axis'
@@ -673,61 +549,6 @@
- option6 = {
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['年度学员数', '月度学员数', '周度学员数', '日度学员数']
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- feature: {
- saveAsImage: {}
- }
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- name: '年度学员数',
- type: 'line',
- stack: 'Total',
- data: [120, 132, 101, 134, 90, 230, 160, 190, 410, 330, 210, 330]
- },
- {
- name: '月度学员数',
- type: 'line',
- stack: 'Total',
- data: [220, 182, 191, 234, 290, 330, 310, 190, 210, 330, 410, 160]
- },
- {
- name: '周度学员数',
- type: 'line',
- stack: 'Total',
- data: [150, 232, 201, 154, 190, 330, 410, 160, 210, 195, 210, 188]
- },
- {
- name: '日度学员数',
- type: 'line',
- stack: 'Total',
- data: [320, 332, 301, 334, 390, 330, 320, 10, 195, 145, 188, 160]
- }
- ]
- };
-
-
option7 = {
tooltip: {
@@ -814,13 +635,11 @@
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
- myChart1.setOption(option1);
+ myChart1.setOption(optionBack);
- myChart6.setOption(option6);
myChart7.setOption(option7);
});
-
- function ptUser() {
+ function ptUser() {
var myChart2 = echarts.init(document.getElementById('user'));
var myChart3 = echarts.init(document.getElementById('vip'));
myChart2.on('legendselectchanged', obj => {
@@ -1015,12 +834,22 @@
var ajax2 = new $ax(Feng.ctxPath + "/data/actPt", function(data){
console.log(data)
+ $("#allHour").text(data.allHour)
+
option4 = {
tooltip: {
trigger: 'axis'
},
legend: {
- data: ['年度次数', '月度次数']
+ data: ['年度次数', '月度次数'],
+ icon: 'stack',
+ selectedMode: 'single', // 单选
+ selected: {
+ 年度次数: true,
+ 月度次数: false,
+ },
+
+
},
grid: {
left: '3%',
@@ -1036,7 +865,7 @@
xAxis: {
type: 'category',
boundaryGap: false,
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
+ data: yearX
},
yAxis: {
type: 'value'
@@ -1046,13 +875,13 @@
name: '年度次数',
type: 'line',
stack: 'Total',
- data: [1220, 1532, 101, 1394, 980, 2380, 1680, 1190, 1410, 1330, 2110, 1330]
+ data: data.yearData
},
{
name: '月度次数',
type: 'line',
stack: 'Total',
- data: [1220, 1182, 2191, 3234, 1290, 1330, 2310, 2190, 2210, 1330, 2410, 1650]
+ data: data.monthData
}
]
@@ -1062,7 +891,14 @@
trigger: 'axis'
},
legend: {
- data: ['年度次数', '月度次数']
+ data: ['年度次数', '月度次数'],
+ icon: 'stack',
+ selectedMode: 'single', // 单选
+ selected: {
+ 年度次数: true,
+ 月度次数: false,
+ },
+
},
grid: {
left: '3%',
@@ -1078,7 +914,7 @@
xAxis: {
type: 'category',
boundaryGap: false,
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
+ data: yearX
},
yAxis: {
type: 'value'
@@ -1088,13 +924,13 @@
name: '年度次数',
type: 'line',
stack: 'Total',
- data: [120, 132, 101, 394, 980, 2380, 1680, 1190, 1410, 1330, 2110, 1330]
+ data: data.yearsUser
},
{
name: '月度次数',
type: 'line',
stack: 'Total',
- data: [120, 182, 211, 324, 120, 130, 310, 290, 220, 130, 240, 150]
+ data: data.monthsUser
}
]
};
@@ -1103,6 +939,188 @@
ajax2.start()
myChart4.setOption(option4);
myChart5.setOption(option5);
+ }
+
+
+ function ptStu() {
+ var myChart6 = echarts.init(document.getElementById('teach'));
+ myChart6.on('legendselectchanged', obj => {
+ var options = myChart6.getOption()
+ //这里是选择切换什么样的x轴,那么他会进行对Y值的切换
+ if (obj.name == '年度学员数') {
+ options.xAxis[0].data = yearX
+ } else if (obj.name == '月度学员数') {
+ options.xAxis[0].data = monthX
+ }else if (obj.name == '周度学员数') {
+ options.xAxis[0].data = ["1周","2周","3周","4周"]
+ }else if (obj.name == '日度学员数') {
+ options.xAxis[0].data = dataX
+ }
+ myChart6.setOption(options, true)
+ });
+
+
+ var ajax2 = new $ax(Feng.ctxPath + "/data/stuPt", function(data){
+ console.log(data)
+
+ $("#allUser").text(data.allUser)
+
+ option6 = {
+ tooltip: {
+ trigger: 'axis'
+ },
+ legend: {
+ data: ['年度学员数', '月度学员数', '周度学员数', '日度学员数'],
+
+ icon: 'stack',
+ selectedMode: 'single', // 单选
+ selected: {
+ 年度学员数: true,
+ 月度学员数: false,
+ 周度学员数: false,
+ 日度学员数: false
+ },
+ },
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ toolbox: {
+ feature: {
+ saveAsImage: {}
+ }
+ },
+ xAxis: {
+ type: 'category',
+ boundaryGap: false,
+ data: yearX
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ name: '年度学员数',
+ type: 'line',
+ stack: 'Total',
+ data: data.yearData
+ },
+ {
+ name: '月度学员数',
+ type: 'line',
+ stack: 'Total',
+ data: data.monthData
+ },
+ {
+ name: '周度学员数',
+ type: 'line',
+ stack: 'Total',
+ data: [data.count,data.count1,data.count2,data.count3]
+ },
+ {
+ name: '日度学员数',
+ type: 'line',
+ stack: 'Total',
+ data: data.dayData
+ }
+ ]
+ };
+ });
+ ajax2.start()
+ myChart6.setOption(option6);
+ }
+
+
+ function ptCourse() {
+ var myChart7 = echarts.init(document.getElementById('courseData'));
+ myChart7.on('legendselectchanged', obj => {
+ var options = myChart7.getOption()
+ //这里是选择切换什么样的x轴,那么他会进行对Y值的切换
+ if (obj.name == '年度耗课数') {
+ options.xAxis[0].data = yearX
+ } else if (obj.name == '月度耗课数') {
+ options.xAxis[0].data = monthX
+ }else if (obj.name == '周度耗课数') {
+ options.xAxis[0].data = ["1周","2周","3周","4周"]
+ }else if (obj.name == '日度耗课数') {
+ options.xAxis[0].data = dataX
+ }
+ myChart7.setOption(options, true)
+ });
+
+
+ var ajax2 = new $ax(Feng.ctxPath + "/data/coursePt", function(data){
+ console.log(data)
+
+ $("#allHour").text(data.allHour)
+
+ option7 = {
+ tooltip: {
+ trigger: 'axis'
+ },
+ legend: {
+ data: ['年度耗课数', '月度耗课数', '周度耗课数', '日度耗课数'],
+
+ icon: 'stack',
+ selectedMode: 'single', // 单选
+ selected: {
+ 年度耗课数: true,
+ 月度耗课数: false,
+ 周度耗课数: false,
+ 日度耗课数: false
+ },
+ },
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ toolbox: {
+ feature: {
+ saveAsImage: {}
+ }
+ },
+ xAxis: {
+ type: 'category',
+ boundaryGap: false,
+ data: yearX
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ name: '年度耗课数',
+ type: 'line',
+ stack: 'Total',
+ data: data.yearData
+ },
+ {
+ name: '月度耗课数',
+ type: 'line',
+ stack: 'Total',
+ data: data.monthData
+ },
+ {
+ name: '周度耗课数',
+ type: 'line',
+ stack: 'Total',
+ data: [data.count,data.count1,data.count2,data.count3]
+ },
+ {
+ name: '日度耗课数',
+ type: 'line',
+ stack: 'Total',
+ data: data.dayData
+ }
+ ]
+ };
+ });
+ ajax2.start()
+ myChart7.setOption(option7);
}
function getContent(type){
@@ -1245,7 +1263,6 @@
if(type==3){
var ajax = new $ax(Feng.ctxPath + "/data/stuCourseData", function (data) {
-
console.log(data.data1)
var chartDom = document.getElementById('cookieTeachCourse');
var myChart = echarts.init(chartDom);
@@ -1271,8 +1288,7 @@
});
ajax.start();
-
- ptActivity()
+ ptStu()
}
@@ -1361,11 +1377,11 @@
for (let j = 0; j <courseData.length; j++) {
if(j<courseData.length-1){
var d = courseData[j].replace("{","").replace("}","").split(",")
- let obj ={
- name:d[0].split("=")[1],
- value:d[1].split("=")[1]
- }
- a.push(obj)
+ let obj ={
+ name:d[0].split("=")[1],
+ value:d[1].split("=")[1]
+ }
+ a.push(obj)
}
}
var chartDom = document.getElementById('cookieCourse');
--
Gitblit v1.7.1