44323
2023-10-13 a7900eee85457c085a97427b4932537dcdd6a343
cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/operatorIncome.html
@@ -41,7 +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){
@@ -49,7 +50,7 @@
                        <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">
                                    选择运营商1
                                    选择运营商
                                </button>
                            </div>
                            <select class="form-control" id="cCode" >
@@ -186,7 +187,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">
@@ -294,6 +295,8 @@
    function search(){
        income();
        ptCourse()
        ptStu()
        if(cutType==1){
            srtj()
            tuifei()
@@ -304,9 +307,12 @@
            ptUser()
            ptActivity()
        }
        if(cutType==3){
            jxtj()
        }
    }
    function income(){
@@ -806,6 +812,7 @@
        if(type==3){
            jxtj()
            ptStu()
        }
@@ -944,7 +951,11 @@
        }, function (data) {
        });
        ajax.set("id",id);
        if($("#objectType").val()==2){
            ajax.set("id",$("#objectId").val())
        }else {
            ajax.set("id", id)
        }
        ajax.set("time",beginTime);
        ajax.start();
@@ -1063,11 +1074,106 @@
        }, function (data) {
        });
        ajax.set("id",id);
        if($("#objectType").val()==2){
            ajax.set("id",$("#objectId").val())
        }else {
            ajax.set("id", id)
        }
        ajax.start();
    }
    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/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)
@@ -1182,11 +1288,110 @@
        }, function (data) {
        });
        ajax.set("id",id);
        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()
@@ -1264,7 +1469,11 @@
            };
        });
        ajax3.set("id",id)
        if($("#objectType").val()==2){
            ajax3.set("id",$("#objectId").val())
        }else{
            ajax3.set("id",id)
        }
        ajax3.start();
        myChart1.on('legendselectchanged', obj => {
@@ -1323,8 +1532,8 @@
            myChart3.setOption(options, true)
        });
        var ajax2 = new $ax(Feng.ctxPath + "/data/userAndVipYys", function(data){
            $("#userAll").text(data.allUser)
            $("#userVipAll").text(data.allVip)
            $("#d1").text("用户总数:"+data.allUser+"人")
            $("#d2").text("年费会员数量"+data.allVip+"人")
            console.log(data)
            option2  = {
                tooltip: {
@@ -1451,7 +1660,13 @@
                ]
            };
        });
        ajax2.set("id",id)
        if($("#objectType").val()==2){
            ajax2.set("id",$("#objectId").val())
        }else{
            ajax2.set("id",id)
        }
        ajax2.start()
        myChart2.setOption(option2);
        myChart3.setOption(option3);
@@ -1489,7 +1704,7 @@
        }
        var ajax2 = new $ax(Feng.ctxPath + "/data/actYys", function(data){
            $("#allHour").text(data.allHour)
            $("#allHours").text("运营时长"+data.allHour+"小时")
            option4 = {
                tooltip: {
@@ -1590,7 +1805,11 @@
                ]
            };
        });
        ajax2.set("id",id)
        if($("#objectType").val()==2){
            ajax2.set("id",$("#objectId").val())
        }else {
            ajax2.set("id", id)
        }
        ajax2.start()
        myChart4.setOption(option4);
        myChart5.setOption(option5);
@@ -1660,6 +1879,19 @@
        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;