| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 | {extend name="common/common2" /}{block name="main"}<div class="ibox-content"><div class="ibox">    <div class="panel-group">        <div class="panel panel-default">            <div class="panel-heading clearfix">                <div class="btn-group pull-left">                    近2年医废数据统计                </div>                <div class="btn-group pull-right">                    <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i>打印</a>                </div>            </div>            <div class="panel-body" id="printer">                <div id="echarts1" style="width: 100%;height: 350px">                </div>                <div id="echarts2" style="width: 100%;height: 350px">                </div>                <table class="table table-bordered">                    <thead>                    <tr>                        <th>月份</th>                        <th>{$data['qyear']}重量(kg)</th>                        <th>{$data['qyear']}环比</th>                        <th>{$data['year']}重量(kg)</th>                        <th>{$data['year']}环比</th>                        <th>同比</th>                    </tr>                    </thead>                    <tbody>                    {foreach $data['months'] as $k=>$v}                    <tr>                        <td>{$v}</td>                        <td>{$data['lists'][$k]['weight']}</td>                        <td>{$data['lists'][$k]['hb']}%</td>                        <td>{$data['lists'][$k+12]['weight']}</td>                        <td>{$data['lists'][$k+12]['hb']}%</td>                        <td>{$data['tb'][$k]}%</td>                    </tr>                    {/foreach}                    </tbody>                </table>            </div>        </div>    </div></div></div>{/block}{block name="script"}<script src="/static/browser.js"></script><script src="/static/jquery.jqprint-0.3.js"></script><script src="/static/data/js/echarts.js"></script><script>    function printer(){        $('#printer').jqprint();    }    function exportExcel() {        window.location.href = "/Statistics/wasteExport?"+$('#search_form').serialize();    }    var colors = ['#5793f3', '#d14a61', '#675bba'];    var option = {        tooltip: {            trigger: 'axis',            axisPointer: {                type: 'cross',                crossStyle: {                    color: '#999'                }            }        },        legend: {            data: ["{$data['qyear']}", "{$data['year']}", '同比']        },        xAxis: [            {                type: 'category',                data: {:json_encode($data['months'])},        axisPointer: {            type: 'shadow'        }    }    ],    yAxis: [        {            type: 'value',            name: '重量',            splitLine:{                show:false            },            axisLabel: {                formatter: '{value} kg'            }        },        {            type: 'value',            name: '同比',            splitLine:{                show:false            },            axisLabel: {                formatter: '{value}'            }        }    ],        series: [        {            name: "{$data['qyear']}",            type: 'bar',            data: {:json_encode($data['warr2'])}    },    {        name: "{$data['year']}",            type: 'bar',        data: {:json_encode($data['warr1'])}    },    {        name: '同比',            type: 'line',        yAxisIndex: 1,        data: {:json_encode($data['tb'])}    }    ]    };    var myChart = echarts.init(document.getElementById('echarts1'));    myChart.setOption(option);    var option2 = {        tooltip: {            trigger: 'axis',            axisPointer: {                type: 'cross',                crossStyle: {                    color: '#999'                }            }        },        legend: {            data: ['重量', '环比']        },        xAxis: [            {                type: 'category',                data: {:json_encode($data['tmonths'])},        axisPointer: {            type: 'shadow'        }    }    ],    yAxis: [        {            type: 'value',            name: '重量',            splitLine:{                show:false            },            axisLabel: {                formatter: '{value} kg'            }        },        {            type: 'value',            name: '环比',            splitLine:{                show:false            },            axisLabel: {                formatter: '{value}'            }        }    ],        series: [        {            name: '重量',            type: 'bar',            barWidth: 20,            data: {:json_encode($data['warr'])}    },    {        name: '环比',            type: 'line',        yAxisIndex: 1,        data: {:json_encode($data['hb'])}    }    ]    };    var myChart2 = echarts.init(document.getElementById('echarts2'));    myChart2.setOption(option2);</script>{/block}
 |