| | |
| | | <div class="col-sm-10"> |
| | | <h2>营收数据</h2> |
| | | </br> |
| | | <div id = "money1" style="width: 1500px" > |
| | | <span id="totalIncome">总营收:</span> |
| | | <span id="yearIncome">本年度营收:</span> |
| | | <span id="monthIncome">本月度营收:</span> |
| | | <span id="weekIncome">本周营收:</span> |
| | | <span id="todayIncome">本日营收:</span> |
| | | </br> |
| | | </br> |
| | | </div> |
| | | <div id = "money1" style="width: 1500px" > |
| | | <span id="totalIncome">总营收:</span> |
| | | <span id="yearIncome">本年度营收:</span> |
| | | <span id="monthIncome">本月度营收:</span> |
| | | <span id="weekIncome">本周营收:</span> |
| | | <span id="todayIncome">本日营收:</span> |
| | | </br> |
| | | </br> |
| | | </div> |
| | | <div id="main" style="width: 1280px;height:500px;"></div> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | |
| | | <h2>课时数据</h2> |
| | | </br> |
| | | </br> |
| | | <span>现有课时总量:0小时</span> |
| | | <span id="allCourse">现有课时总量:0小时</span> |
| | | </br> |
| | | </br> |
| | | <div id="courseData" style="width: 1280px;height:500px;"></div> |
| | |
| | | getContent2(1); |
| | | |
| | | |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){ |
| | | yearX=resp.year |
| | | |
| | |
| | | var year = resp.yearIncome; |
| | | var month = resp.monthIncome; |
| | | var week = resp.weekIncome; |
| | | console.log("周度营收") |
| | | console.log(year) |
| | | console.log(week) |
| | | var days = week[0].length; |
| | | for (let i = 1; i <= days; i++) { |
| | | weekX.push(i); |
| | | } |
| | | var day = resp.dayIncome; |
| | | option = { |
| | | tooltip: { |
| | |
| | | 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: '月度营收', |
| | |
| | | stack: 'Total', |
| | | data: [ |
| | | week[0][0], week[0][1], week[0][2], week[0][3], week[0][4] |
| | | , week[0][5], week[0][6], week[0][7], week[0][8], week[0][9] |
| | | , week[0][10], week[0][11], week[0][12], week[0][13], week[0][14] |
| | | , week[0][15], week[0][16], week[0][17], week[0][18], week[0][19], week[0][20] |
| | | , week[0][21], week[0][22], week[0][23], week[0][24], week[0][25], week[0][26] |
| | | , week[0][27], week[0][28], week[0][29], week[0][30], week[0][31] |
| | | ] |
| | | }, |
| | | { |
| | |
| | | $("#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); |
| | | }); |
| | |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/coursePt", function(data){ |
| | | console.log(data) |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | |
| | | $("#allCourse").text("现有课时总量:"+data.allCourse+"小时") |
| | | option7 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | name: '周度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [data.count,data.count1,data.count2,data.count3] |
| | | data: data.weekData |
| | | }, |
| | | { |
| | | name: '日度耗课数', |
| | |
| | | }); |
| | | ajax.start(); |
| | | ptStu() |
| | | ptCourse(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | ] |
| | | }; |
| | | myChart.setOption(option); |
| | | myChart.setOption(option); |
| | | }); |
| | | $(function(){ |
| | | var courseData = "${data.courseData}" |