From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 05 二月 2024 11:56:52 +0800
Subject: [PATCH] 更新bug修改

---
 cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/operatorIncome.html | 1525 +++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 1,284 insertions(+), 241 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/operatorIncome.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/operatorIncome.html
index ca25adc..3c11853 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/operatorIncome.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/operatorIncome.html
@@ -41,6 +41,8 @@
 <div class="ibox float-e-margins">
     <div class="ibox-content">
         <div class="form-horizontal">
+            <input id="objectId" value="${objectId}" hidden>
+            <input id="objectType" value="${objectType}" hidden>
             <div class="row">
                 <br class="col-sm-10">
                     @if(objectType==1){
@@ -48,32 +50,20 @@
                         <div class="input-group">
                             <div class="input-group-btn open">
                                 <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true">
-                                    选择城市
+                                    选择运营商
                                 </button>
                             </div>
-                            <select class="form-control" id="cCode" onchange="TSite.oneChangeNext(1)">
+                            <select class="form-control" id="cCode" >
                                 <option value="">请选择</option>
                                 @for(obj in list){
-                                <option value="${obj.cityCode}">${obj.city}</option>
+                                <option value="${obj.id}">${obj.name}</option>
                                 @}
                             </select>
                         </div>
                     </div>
                     @}
                     @if(objectType==1){
-                    <div class="col-sm-3">
-                        <div class="input-group">
-                            <div class="input-group-btn open">
-                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true">
-                                    选择账号
-                                </button>
-                            </div>
-                            <select class="form-control" id="account" >
-                                <option value="">请选择账号</option>
-                            </select>
-                        </div>
-                    </div>
-                <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/>
+                <#button name="搜索" icon="fa-search" clickFun="search()"/>
                     @}
                 </br>
                 </br>
@@ -90,11 +80,11 @@
                                     <h2>营收数据</h2>
                                     </br>
                                         <div id = "money1" style="width: 1500px" >
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>总营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                            <span>本年度营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                            <span>本月度营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                            <span>本周营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                            <span>本日营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="totalIncome">总营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                            <span id="yearIncome">本年度营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                            <span id="monthIncome">本月度营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                            <span id="weekIncome">本周营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                            <span id="todayIncome">本日营收:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                             </br>
                                             </br>
                                         </div>
@@ -106,21 +96,18 @@
                                     </br>
                                     <div class="col-sm-3" style="width: 400px;display: flex">
                                         <#TimeCon id="beginTime" name="时间段:" isTime="false"/>
-                                        <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/>
+                                        <#button name="搜索" icon="fa-search" clickFun="search()"/>
                                     </div>
                                 </div>
 
                                 <div class="col-sm-10" style="width: 1500px" >
                                     </br>
                                     </br>
-                                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>会员费收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>玩湃币充值收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>课程收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>活动收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>订场收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>赛事收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>商品收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>其他收入:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span>课程收入:<label id="fee3">0.0</label></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span>活动/赛事收入:<label id="fee4">0.0</label></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span>订场收入:<label id="fee5">0.0</label></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span>门票收入:<label id="fee7">0.0</label></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                     </br>
                                     </br>
                                     </br>
@@ -137,10 +124,10 @@
                                 <div class="col-sm-10" style="width: 1500px" >
                                     </br>
                                     </br>
-                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>本年退费额度:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>本月退费额度:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>本周退费额度:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                    <span>本日退费额度:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="yearRefund">本年退费额度:<span id="back1"></span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span id="monthRefund">本月退费额度:<span id="back2"></span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span id="weekRefund">本周退费额度:<span id="back3"></span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                    <span id="todayRefund">本日退费额度:<span id="back4"></span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                     </br>
                                     </br>
                                     <div id="refund" style="width: 1280px;height:500px;"></div>
@@ -199,7 +186,7 @@
                                     <h2>运营数据</h2>
                                     </br>
                                     </br>
-                                    <span>运营时长:0小时</span>
+                                    <span id="allHours">运营时长:0小时</span>
                                     </br>
                                     </br>
                                     <div style="height: 25px;box-sizing: border-box;background:#f3f3f4;line-height: 25px;border:1px solid;margin-bottom: 20px;width: 500px">
@@ -279,130 +266,212 @@
 <script src="${ctxPath}/modular/system/dataStatistics/tSite.js"></script>
 <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script>
 <script>
+
+    var weekX = ["1周","2周","3周","4周"];
+    var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];
+    function oneChangeNext(e){
+        var oneId=$(e).val();
+        var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){
+            if(data!=null){
+                if(language==1){
+                    var content='<option value="">选择市</option>';
+                }else if(language==2){
+                    var content='<option value="">Choose your franchisee</option>';
+                }else {
+                    var content='<option value="">Pilih franchisee Anda</option>';
+                }
+                $.each(data, function(k,v) {
+                    content += "<option value='"+v.code+"'>"+v.name+"</option>";
+                });
+                $("#cCode").empty().append(content);
+            }
+        });
+        ajax.set("oneId",oneId);
+        ajax.start();
+    }
+
+
+
+    function search(){
+        income();
+        ptCourse()
+
+        ptStu()
+        if(cutType==1){
+            srtj()
+            tuifei()
+        }
+
+        if(cutType==2){
+            yytj()
+            ptUser()
+            ptActivity()
+
+
+        }
+        if(cutType==3){
+            jxtj()
+
+
+        }
+    }
+    function income(){
+        var id = $("#cCode").val()
+        var beginTime = $("#beginTime").val()
+        console.log(id)
+        if(id==""){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){
+            yearX=resp.year
+            var list = resp.yearMount;
+            console.log(list);
+            var t1 = document.getElementById("totalIncome");
+            var t2 = document.getElementById("yearIncome");
+            var t3 = document.getElementById("monthIncome");
+            var t4 = document.getElementById("weekIncome");
+            var t5 = document.getElementById("todayIncome");
+            t1.innerText = "总营收:"+list[0]+"         ";
+            t2.innerText = "年度营收:"+list[1]+"         ";
+            t3.innerText = "月度营收:"+list[2]+"         ";
+            t4.innerText = "周度营收:"+list[3]+"         ";
+            t5.innerText = "日度营收:"+list[4]+"         ";
+            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;
+            var day =  resp.dayIncome;
+            option  = {
+                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: [year[0],year[1],year[2],year[3],year[4],year[5],year[6],year[7],year[8],year[9],year[10]]
+                    },
+                    {
+                        name: '月度营收',
+                        type: 'line',
+                        stack: 'Total',
+                        data: [month[0][0],month[0][1], month[0][2], month[0][3], month[0][4],
+                            month[0][5], month[0][6], month[0][7], month[0][8], month[0][9], month[0][10], month[0][11]]
+                    },
+                    {
+                        name: '周度营收',
+                        type: 'line',
+                        stack: 'Total',
+                        data: [
+                            week[0][0], week[0][1], week[0][2], week[0][3], week[0][4]
+                        ]
+                    },
+                    {
+                        name: '日度营收',
+                        type: 'line',
+                        stack: 'Total',
+                        data: [
+                            day[0][0], day[0][1],day[0][2], day[0][3], day[0][4], day[0][5], day[0][6]
+                        ]
+                    }
+                ]
+            };
+
+        });
+        ajax.set("type",1);
+        ajax.set("operatorId",id);
+        ajax.start();
+        // 营收
+        var income  = echarts.init(document.getElementById('income'));
+        income.on('legendselectchanged', obj => {
+            var options = income.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 = weekX
+            } else if (obj.name == '日度营收') {
+                options.xAxis[0].data = dataX
+            }
+            income.setOption(options, true)
+        })
+        // 使用刚指定的配置项和数据显示图表。
+        income.setOption(option);
+    }
+
+
+    let cutType=1;
+
+
     laydate.render({
         elem: '#beginTime'
         , trigger: 'click'
         , range: true
     });
     $(function(){
+        ptCourse();
+        var ajax2 = new $ax(Feng.ctxPath + "/data/getYears", function(data){
+            yearX=data
+        });
+        ajax2.start()
+
         getContent(1);
         getContent1(1);
         getContent2(1);
+
+
+
         // 基于准备好的dom,初始化echarts实例
         var myChart  = echarts.init(document.getElementById('income'));
-        var myChart1 = echarts.init(document.getElementById('refund'));
+
         var myChart2 = echarts.init(document.getElementById('user'));
         var myChart3 = echarts.init(document.getElementById('vip'));
         var myChart4 = echarts.init(document.getElementById('activity'));
         var myChart5 = echarts.init(document.getElementById('prepare'));
         var myChart6 = echarts.init(document.getElementById('teach'));
         var myChart7 = echarts.init(document.getElementById('courseData'));
-        option  = {
-            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]
-                }
-            ]
-        };
-        option1 = {
-            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]
-                }
-            ]
-        };
+        tuifei()
+        income()
+
+
         option2 = {
             tooltip: {
                 trigger: 'axis'
@@ -699,8 +768,6 @@
             ]
         };
         // 使用刚指定的配置项和数据显示图表。
-        myChart.setOption(option);
-        myChart1.setOption(option1);
         myChart2.setOption(option2);
         myChart3.setOption(option3);
         myChart4.setOption(option4);
@@ -709,6 +776,7 @@
         myChart7.setOption(option7);
     });
     function getContent(type){
+        cutType=type
         //设置点击字体颜色效果
         for(var i=1;i<4;i++){
             document.getElementById("div"+i).style.color="#888888";//
@@ -727,7 +795,1032 @@
             $("#ensure").show();
             $("#nextB").hide();
         }
+
+
+        if(type==1){
+            srtj()
+            tuifei()
+        }
+
+
+
+        if(type==2){
+            yytj()
+            ptUser()
+            ptActivity()
+        }
+
+        if(type==3){
+            jxtj()
+            ptStu()
+        }
+
+
+
+
     }
+    function srtj() {
+        var id = $("#cCode").val()
+        var beginTime = $("#beginTime").val()
+        console.log(id)
+        if(id==""){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        var ajax = new $ax(Feng.ctxPath + "/data/selectYys", function (data) {
+
+            $("#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) {
+
+        });
+        if($("#objectType").val()==2){
+            ajax.set("id",$("#objectId").val())
+        }else {
+            ajax.set("id", id)
+        }
+        ajax.set("time",beginTime);
+        ajax.start();
+
+    }
+
+    function jxtj()     {
+        var id = $("#cCode").val()
+        console.log(id,333)
+        if(id==""){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        var ajax = new $ax(Feng.ctxPath + "/data/selectYysJx", function (data) {
+            console.log(data)
+
+            var chartDom = document.getElementById('cookieTeachAge');
+            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.age1, name: '0-7岁' },
+                            { value: data.age2, name: '8-10岁' },
+                            { value:data.age3, name: '11-12岁' },
+                            { value: data.age4, name: '13岁以上' },
+                        ],
+                        emphasis: {
+                            itemStyle: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            }
+                        }
+                    }
+                ]
+            };
+            myChart.setOption(option);
+
+
+
+            var chartDom = document.getElementById('cookieTeachGender');
+            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.boy, name: '男' },
+                            { value: data.girl, name: '女' },
+
+                        ],
+                        emphasis: {
+                            itemStyle: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            }
+                        }
+                    }
+                ]
+            };
+            myChart.setOption(option);
+
+
+
+            var chartDom = document.getElementById('cookieTeachCourse');
+            var myChart = echarts.init(chartDom);
+            var option;
+
+            option = {
+                xAxis: {
+                    type: 'category',
+                    data: data.data1
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: [
+                    {
+                        data: data.data2,
+                        type: 'bar'
+                    }
+                ]
+            };
+            myChart.setOption(option);
+
+
+
+
+
+        }, function (data) {
+
+        });
+        if($("#objectType").val()==2){
+            ajax.set("id",$("#objectId").val())
+        }else {
+            ajax.set("id", id)
+        }
+        ajax.start();
+
+    }
+    function ptCourse() {
+        console.log("调用耗课")
+        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)
+        });
+
+        if($("#objectType").val()==2){
+        }else {
+            let cCode = $("#cCode").val();
+            if(null == cCode || '' == cCode){
+                Feng.info("请选择运营商");
+                return
+            }
+        }
+
+        var ajax2 = new $ax(Feng.ctxPath + "/data/courseYys", function(data){
+            console.log(data)
+            $("#allCourse").text("现有课时总量:"+data.allCourse+"小时")
+            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.weekData
+                    },
+                    {
+                        name: '日度耗课数',
+                        type: 'line',
+                        stack: 'Total',
+                        data: data.dayData
+                    }
+                ]
+            };
+        });
+        if($("#objectType").val()==2){
+            ajax2.set("id",$("#objectId").val())
+        }else {
+            ajax2.set("id", $("#cCode").val())
+        }
+        ajax2.start()
+        myChart7.setOption(option7);
+    }
+    function yytj() {
+        let id  = $("#cCode").val()
+        console.log(id)
+        if(id==''){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        var ajax = new $ax(Feng.ctxPath + "/data/stuUserDataYys", function (data) {
+            console.log(data,323232)
+            var chartDom = document.getElementById('cookieAge');
+            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.age1, name: '0-12岁' },
+                            { value: data.age2, name: '13-18岁' },
+                            { value: data.age3, name: '19-25岁' },
+                            { value: data.age4, name: '12-35岁' },
+                            { value: data.age5, name: '36-50岁' },
+                            { value: data.age6, name: '51岁以上' },
+
+                        ],
+                        emphasis: {
+                            itemStyle: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            }
+                        }
+                    }
+                ]
+            };
+            myChart.setOption(option);
+
+
+
+            var chartDom = document.getElementById('cookieGender');
+            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.boy, name: '男' },
+                            { value: data.girl, name: '女' },
+
+                        ],
+                        emphasis: {
+                            itemStyle: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            }
+                        }
+                    }
+                ]
+            };
+            myChart.setOption(option);
+
+
+
+
+            var chartDom = document.getElementById('city');
+            var myChart = echarts.init(chartDom);
+            var option;
+
+            option = {
+                xAxis: {
+                    type: 'category',
+                    data: data.cityData
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: [
+                    {
+                        data: data.cityNum,
+                        type: 'bar'
+                    }
+                ]
+            };
+            myChart.setOption(option);
+
+
+
+        }, function (data) {
+
+        });
+        if($("#objectType").val()==2){
+            ajax.set("id",$("#objectId").val())
+        }else{
+            ajax.set("id",id)
+        }
+        ajax.start();
+    }
+
+    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/stuYys", 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
+                    }
+                ]
+            };
+        });
+        if($("#objectType").val()==2){
+            ajax2.set("id",$("#objectId").val())
+        }else{
+            ajax2.set("id",$("#cCode").val())
+        }
+        // ajax2.set("id",$("#cCode").val());
+        ajax2.start()
+
+        myChart6.setOption(option6);
+    }
+    function tuifei() {
+        var myChart1 = echarts.init(document.getElementById('refund'));
+        let id  = $("#cCode").val()
+        console.log(id)
+        if(id==''){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        var ajax3 = new $ax(Feng.ctxPath + "/data/backYys", function(data){
+            $("#back1").text(data.thisYear);
+            $("#back2").text(data.thisMonth);
+            $("#back3").text(data.thisWeek);
+            $("#back4").text(data.thisDay);
+            option1 = {
+                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.weekData
+                    },
+                    {
+                        name: '日度退费',
+                        type: 'line',
+                        stack: 'Total',
+                        data: data.dayData
+                    }
+                ]
+
+            };
+        });
+        if($("#objectType").val()==2){
+            ajax3.set("id",$("#objectId").val())
+        }else{
+            ajax3.set("id",id)
+        }
+        ajax3.start();
+
+        myChart1.on('legendselectchanged', obj => {
+            var options = myChart1.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
+            }
+            myChart1.setOption(options, true)
+        })
+        myChart1.setOption(option1);
+    }
+
+
+    function ptUser() {
+        var myChart2 = echarts.init(document.getElementById('user'));
+        var myChart3 = echarts.init(document.getElementById('vip'));
+        myChart2.on('legendselectchanged', obj => {
+            var options = myChart2.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
+            }
+            myChart2.setOption(options, true)
+        });
+        let id  = $("#cCode").val()
+        console.log(id)
+        if(id==''){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        myChart3.on('legendselectchanged', obj => {
+            var options = myChart3.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
+            }
+            myChart3.setOption(options, true)
+        });
+        var ajax2 = new $ax(Feng.ctxPath + "/data/userAndVipYys", function(data){
+            $("#d1").text("用户总数:"+data.allUser+"人")
+            $("#d2").text("年费会员数量"+data.allVip+"人")
+            console.log(data)
+            option2  = {
+                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
+                    }
+                ]
+            };
+            option3  = {
+                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.yearsVip
+                    },
+                    {
+                        name: '月度会员数',
+                        type: 'line',
+                        stack: 'Total',
+                        data:  data.monthsVip
+                    },
+                    {
+                        name: '周度会员数',
+                        type: 'line',
+                        stack: 'Total',
+                        data:[data.countVip,data.countVip1,data.countVip2,data.countVip3]
+                    },
+                    {
+                        name: '日度会员数',
+                        type: 'line',
+                        stack: 'Total',
+                        data: data.daysVip
+                    }
+                ]
+            };
+        });
+        if($("#objectType").val()==2){
+            ajax2.set("id",$("#objectId").val())
+        }else{
+            ajax2.set("id",id)
+        }
+
+
+        ajax2.start()
+        myChart2.setOption(option2);
+        myChart3.setOption(option3);
+    }
+
+    function ptActivity() {
+        var myChart4 = echarts.init(document.getElementById('activity'));
+        var myChart5 = echarts.init(document.getElementById('prepare'));
+        myChart4.on('legendselectchanged', obj => {
+            var options = myChart4.getOption()
+            //这里是选择切换什么样的x轴,那么他会进行对Y值的切换
+            if (obj.name == '年度次数') {
+                options.xAxis[0].data = yearX
+            } else if (obj.name == '月度次数') {
+                options.xAxis[0].data = monthX
+            }
+            myChart4.setOption(options, true)
+        });
+
+        myChart5.on('legendselectchanged', obj => {
+            var options = myChart5.getOption()
+            //这里是选择切换什么样的x轴,那么他会进行对Y值的切换
+            if (obj.name == '年度次数') {
+                options.xAxis[0].data = yearX
+            } else if (obj.name == '月度次数') {
+                options.xAxis[0].data = monthX
+            }
+            myChart5.setOption(options, true)
+        });
+        let id  = $("#cCode").val()
+        console.log(id)
+        if(id==''){
+            Feng.info("请先选择运营商");
+            return;
+        }
+        var ajax2 = new $ax(Feng.ctxPath + "/data/actYys", function(data){
+
+            $("#allHours").text("运营时长"+data.allHour+"小时")
+
+            option4 = {
+                tooltip: {
+                    trigger: 'axis'
+                },
+                legend: {
+                    data: ['年度次数', '月度次数'],
+                    icon: 'stack',
+                    selectedMode: 'single', // 单选
+                    selected: {
+                        年度次数: true,
+                        月度次数: 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
+                    }
+
+                ]
+            };
+            option5 = {
+                tooltip: {
+                    trigger: 'axis'
+                },
+                legend: {
+                    data: ['年度次数', '月度次数'],
+                    icon: 'stack',
+                    selectedMode: 'single', // 单选
+                    selected: {
+                        年度次数: true,
+                        月度次数: 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.yearsUser
+                    },
+                    {
+                        name: '月度次数',
+                        type: 'line',
+                        stack: 'Total',
+                        data: data.monthsUser
+                    }
+                ]
+            };
+        });
+        if($("#objectType").val()==2){
+            ajax2.set("id",$("#objectId").val())
+        }else {
+            ajax2.set("id", id)
+        }
+        ajax2.start()
+        myChart4.setOption(option4);
+        myChart5.setOption(option5);
+    }
+    
     function getContent1(type){
         //设置点击字体颜色效果
         for(var i=1;i<3;i++){
@@ -762,7 +1855,49 @@
     }
 </script>
 <script>
+    var ans = [];
+    var weekX = ["1周","2周","3周","4周"];
+    var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];
+    var yearX = [];
+    var timeX = [];
+    var dataX = [];
+    // 创建一个日期对象
+    var currentDate = new Date();
+    // 获取当前日期的号数
+    let currentDay = currentDate.getDate();
+    // 循环添加号数到数组
+    for (let i = 0; i < 7; i++) {
+        dataX.push(currentDay - 6+i);
+    }
+    // 获取当前月份
+    var currentMonth = currentDate.getMonth();
+    // 获取当前年份
+    var currentYear = currentDate.getFullYear();
+    // 计算指定年份和月份的天数
+    function getDaysInMonth(year, month) {
+        // month 参数范围是 0-11,所以需要加 1
+        return new Date(year, month + 1, 0).getDate();
+    }
+    // 获取当前月份的天数
+    var daysInMonth = getDaysInMonth(currentYear, currentMonth);
+    // 将天数按字符串格式添加到 timeX 数组中
+    for (var i = 1; i <= daysInMonth; i++) {
+        timeX.push(String(i));
+    }
     $(function(){
+
+        var roleType = $("#objectType").val();
+        if (roleType==2){
+            ptActivity()
+            ptUser()
+            tuifei()
+            ptStu()
+            yytj()
+            ptCourse()
+            jxtj()
+            srtj()
+            income()
+        }
         var chartDom = document.getElementById('cookieTicket');
         var myChart = echarts.init(chartDom);
         var option;
@@ -782,8 +1917,10 @@
                     type: 'pie',
                     radius: '50%',
                     data: [
-                        { value: 1048, name: '年票' },
-                        { value: 735, name: '亲子票' },
+                        { value: 1048, name: '日卡' },
+                        { value: 735, name: '月卡' },
+                        { value: 735, name: '季卡' },
+                        { value: 735, name: '年卡' },
 
                     ],
                     emphasis: {
@@ -892,43 +2029,7 @@
                     type: 'pie',
                     radius: '50%',
                     data: [
-                        { value: 1048, name: '30-35' },
-                        { value: 735, name: '12-18' },
-
-                    ],
-                    emphasis: {
-                        itemStyle: {
-                            shadowBlur: 10,
-                            shadowOffsetX: 0,
-                            shadowColor: 'rgba(0, 0, 0, 0.5)'
-                        }
-                    }
-                }
-            ]
-        };
-        myChart.setOption(option);
-    });
-    $(function(){
-        var chartDom = document.getElementById('cookieTeachAge');
-        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: 1048, name: '30-35' },
+                        { value: 1048, name: '30-351' },
                         { value: 735, name: '12-18' },
 
                     ],
@@ -975,64 +2076,6 @@
                             shadowColor: 'rgba(0, 0, 0, 0.5)'
                         }
                     }
-                }
-            ]
-        };
-        myChart.setOption(option);
-    });
-    $(function(){
-        var chartDom = document.getElementById('cookieTeachGender');
-        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: 1048, name: '男' },
-                        { value: 735, name: '女' },
-
-                    ],
-                    emphasis: {
-                        itemStyle: {
-                            shadowBlur: 10,
-                            shadowOffsetX: 0,
-                            shadowColor: 'rgba(0, 0, 0, 0.5)'
-                        }
-                    }
-                }
-            ]
-        };
-        myChart.setOption(option);
-    });
-    $(function(){
-        var chartDom = document.getElementById('city');
-        var myChart = echarts.init(chartDom);
-        var option;
-
-        option = {
-            xAxis: {
-                type: 'category',
-                data: ['北京', '上海', '广东', '深圳', '成都', '曹县', '奥里给']
-            },
-            yAxis: {
-                type: 'value'
-            },
-            series: [
-                {
-                    data: [120, 200, 150, 80, 70, 110, 130],
-                    type: 'bar'
                 }
             ]
         };

--
Gitblit v1.7.1