<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<div class="content_wrapper">
    <div class="container-fluid">
        <aside>
            <header><i class="fa fa-fw fa-file"></i>警告</header>
            <section>
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-sm-12">
                            <a style="margin:5px;" class="btn btn-primary active" href="#debug/warning" role="button">图表</a>
                            <a style="margin:5px;" class="btn btn-primary " href="#debug/warningLine" role="button">曲线图</a>
                        </div>
                    </div>
                </div>
            </section>
        </aside>
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-inline" role="form" method="POST" action="#debug/warningLine">
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>开始时间: </label>
                                            <input type="text" class="form-control datetimepicker" value="<?php if($stime) echo $stime;?>" placeholder="开始时间" name="useranomalymoney_stime" />
                                        </div>
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>结束时间: </label>
                                            <input type="text" class="form-control datetimepicker" value="<?php if($etime) echo $etime;?>" placeholder="结束时间" name="useranomalymoney_etime" />
                                        </div>
                                        <span class="gap"></span>
                                        <button type="submit" class="btn btn-primary">查询</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>警报信息</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div id="line"></div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>

<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/modules/exporting.js"></script>
<script>
    //选择日期
    $('.datetimepicker').datepicker({
        language:'zh-CN',
        format:'yyyy-mm-dd',
        zIndexOffset:906  //控制z-index
    });

    Highcharts.chart('line', {
        chart: {
            type: 'line'
        },
        title: {
            text: '警告信息'
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: [<?php echo "'".implode("','", $date)."'";?>]
        },
        yAxis: {
            title: {
                text: '数值'
            }
        },
        plotOptions: {
            line: {
                dataLabels: {
                    enabled: true
                },
                enableMouseTracking: false
            }
        },
        series: [{
            name: '打不到默认打机器人',
            data: [<?php echo implode(",", $slot);?>]
        },{
            name: '偷不默认偷机器人',
            data: [<?php echo implode(",", $rking);?>]
        }]
    });

</script>