| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-12" >
- <form action="{:url('energyStatistics/dailyView2')}" method="POST" id='search_form' class="form-inline">
- <div class="input-group" style="width: 200px">
- <span class="input-group-addon">年份</span>
- <input class="form-control dialog-datetime" id="start" name="month" type="text" value="{$month}" placeholder="" readonly/>
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-danger" type="submit" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-warning" type="reset" onclick="empty_search()"><i class="fa fa-undo"></i></button>
- </span>
- </div>
- </form>
- </div>
- </div>
- <br>
- <div class="ibox">
- <div class="panel-group">
- <div class="panel panel-default">
- <div class="panel-heading clearfix">
- <div class="btn-group pull-left">
- 医院每月能耗数据分析
- </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>
- <div id="echarts3" style="width: 100%;height: 350px">
- </div>
- </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 () {
- laydate.render({
- elem: '#start',
- trigger: 'click',
- theme: '#1d519c',
- type: 'year',
- });
- });
- function printer(){
- $('#printer').jqprint();
- }
- function empty_search(){
- window.location.href = "{:url('energyStatistics/dailyView2')}";
- }
- var colors = [ '#d14a61','#5793f3', '#91c7ae'];
- var option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- legend: {
- data: ['{$year-3}用电量','{$year-2}用电量','{$year-1}用电量', '{$year}用电量', '月度平均最高温度','月度平均最低温度','床位数量']
- },
- xAxis: [
- {
- type: 'category',
- data: {:json_encode($date)},
- axisPointer: {
- type: 'shadow'
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '使用量',
- offset: 5,
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[0],
- }
- },
- axisLabel: {
- formatter: '{value} kWh'
- }
- },
- {
- type: 'value',
- name: '温度',
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[1],
- }
- },
- axisLabel: {
- formatter: '{value} ℃'
- }
- },
- {
- type: 'value',
- name: '床位数量',
- position: 'right',
- alignTicks: true,
- offset: 60,
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[2],
- }
- },
- axisLabel: {
- formatter: '{value} 个'
- }
- }
- ],
- series: [
- {
- name: '{$year-3}用电量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastElectricity3'])},
- },
- {
- name: '{$year-2}用电量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastElectricity2'])},
- },
- {
- name: '{$year-1}用电量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastElectricity'])},
- },
- {
- name: '{$year}用电量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['electricity'])},
- },
- {
- name: '月度平均最高温度',
- type: 'line',
- yAxisIndex: 1,
- data: {:json_encode($data['electricityTempMax'])},
- },
- {
- name: '月度平均最低温度',
- type: 'line',
- yAxisIndex: 1,
- data: {:json_encode($data['electricityTempMin'])},
- },
- {
- name: '床位数量',
- type: 'line',
- yAxisIndex: 2,
- data: {:json_encode($data['electricityBeds'])},
- },
- ]
- };
- var myChart = echarts.init(document.getElementById('echarts1'));
- myChart.setOption(option);
- var option2 = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- legend: {
- data: ['{$year-3}用水量','{$year-2}用水量','{$year-1}用水量', '{$year}用水量', '月度平均最高温度','月度平均最低温度','床位数量']
- },
- xAxis: [
- {
- type: 'category',
- data: {:json_encode($date)},
- axisPointer: {
- type: 'shadow'
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '使用量',
- offset: 5,
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[0],
- }
- },
- axisLabel: {
- formatter: '{value} m³'
- }
- },
- {
- type: 'value',
- name: '温度',
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[1],
- }
- },
- axisLabel: {
- formatter: '{value} ℃'
- }
- },
- {
- type: 'value',
- name: '床位数量',
- position: 'right',
- alignTicks: true,
- offset: 60,
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[2],
- }
- },
- axisLabel: {
- formatter: '{value} 个'
- }
- }
- ],
- series: [
- {
- name: '{$year-3}用水量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastWater3'])},
- },
- {
- name: '{$year-2}用水量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastWater2'])},
- },
- {
- name: '{$year-1}用水量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastWater'])},
- },
- {
- name: '{$year}用水量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['water'])},
- },
- {
- name: '月度平均最高温度',
- type: 'line',
- yAxisIndex: 1,
- data: {:json_encode($data['waterTempMax'])}
- },
- {
- name: '月度平均最低温度',
- type: 'line',
- yAxisIndex: 1,
- data: {:json_encode($data['waterTempMin'])}
- },
- {
- name: '床位数量',
- type: 'line',
- yAxisIndex: 2,
- data: {:json_encode($data['waterBeds'])}
- },
- ]
- };
- var myChart2 = echarts.init(document.getElementById('echarts2'));
- myChart2.setOption(option2);
- var option3 = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- legend: {
- data: ['{$year-3}燃气用量', '{$year-2}燃气用量','{$year-1}燃气用量', '{$year}燃气用量', '月度平均最高温度','月度平均最低温度','床位数量']
- },
- xAxis: [
- {
- type: 'category',
- data: {:json_encode($date)},
- axisPointer: {
- type: 'shadow'
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '使用量 ',
- offset: 5,
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[0],
- }
- },
- axisLabel: {
- formatter: '{value} m³'
- }
- },
- {
- type: 'value',
- name: '温度',
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[1],
- }
- },
- axisLabel: {
- formatter: '{value} ℃'
- }
- },
- {
- type: 'value',
- name: '床位数量',
- position: 'right',
- alignTicks: true,
- offset: 60,
- splitLine:{
- show:false
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: colors[2],
- }
- },
- axisLabel: {
- formatter: '{value} 个'
- }
- }
- ],
- series: [
- {
- name: '{$year-3}燃气用量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastGas3'])},
- },
- {
- name: '{$year-2}燃气用量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastGas2'])},
- },
- {
- name: '{$year-1}燃气用量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['lastGas'])},
- },
- {
- name: '{$year}燃气用量',
- type: 'bar',
- barWidth: 12,
- data: {:json_encode($data['gas'])},
- },
- {
- name: '月度平均最高温度',
- type: 'line',
- yAxisIndex: 1,
- data: {:json_encode($data['gasTempMax'])},
- },
- {
- name: '月度平均最低温度',
- type: 'line',
- yAxisIndex: 1,
- data: {:json_encode($data['gasTempMin'])},
- },
- {
- name: '床位数量',
- type: 'line',
- yAxisIndex: 2,
- data: {:json_encode($data['gasBeds'])},
- },
- ]
- };
- var myChart3 = echarts.init(document.getElementById('echarts3'));
- myChart3.setOption(option3);
- </script>
- {/block}
|