| | |
| | | <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> |
| | |
| | | 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 |
| | |
| | | getContent(1); |
| | | getContent1(1); |
| | | getContent2(1); |
| | | |
| | | ptCourse(); |
| | | |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){ |
| | |
| | | $("#back2").text(data.thisMonth); |
| | | $("#back3").text(data.thisWeek); |
| | | $("#back4").text(data.thisDay); |
| | | option1 = { |
| | | optionBack = { |
| | | |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | |
| | | // 使用刚指定的配置项和数据显示图表。 |
| | | myChart.setOption(option); |
| | | myChart1.setOption(option1); |
| | | myChart1.setOption(optionBack); |
| | | |
| | | myChart7.setOption(option7); |
| | | }); |
| | |
| | | myChart6.on('legendselectchanged', obj => { |
| | | var options = myChart6.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | console.log("看学员") |
| | | console.log(obj.name) |
| | | if (obj.name == '年度学员数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度学员数') { |
| | |
| | | |
| | | |
| | | function ptCourse() { |
| | | console.log("调用") |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | myChart7.on('legendselectchanged', obj => { |
| | | var options = myChart7.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度耗课数') { |
| | | console.log("看看选择") |
| | | console.log(obj.name) |
| | | if (obj.name == '年度耗课数量') { |
| | | console.log("看看年度轴") |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度耗课数') { |
| | | console.log(yearX) |
| | | } else if (obj.name == '月度耗课数量') { |
| | | console.log("看看月度轴") |
| | | options.xAxis[0].data = monthX |
| | | }else if (obj.name == '周度耗课数') { |
| | | console.log(monthX) |
| | | }else if (obj.name == '周度耗课数量') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | }else if (obj.name == '日度耗课数') { |
| | | }else if (obj.name == '日度耗课数量') { |
| | | console.log("看看日度轴") |
| | | options.xAxis[0].data = dataX |
| | | console.log(dataX) |
| | | } |
| | | myChart7.setOption(options, true) |
| | | }); |
| | | |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/coursePt", function(data){ |
| | | console.log(data) |
| | | |