| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ page import="com.runzhixing.tool.Util" %>
- <%@ page import="com.runzhixing.bean.CityPlace" %>
- <%@ page import="com.runzhixing.bean.CountryPlace" %>
- <%@ page import="com.runzhixing.bean.Station" %>
- <%@ page import="com.runzhixing.bean.AuthorityRegionPlace" %>
- <%@ page import="com.runzhixing.bean.User" %>
- <%@ page import="com.runzhixing.constant.Constant" %>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- User user = (User)session.getAttribute(Constant.userMark);
- List<AuthorityRegionPlace> arplist = user.getPrivilegePlaces1();
- List<CityPlace> cplist = new ArrayList<CityPlace>();
- List<CountryPlace> cyplist = new ArrayList<CountryPlace>();
- List<Station> slist = new ArrayList<Station>();
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <base href="<%=basePath%>">
-
- <title>加气站/机统计</title>
-
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="This is my page">
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta http-equiv="X-UA-Compatible" content="IE=10"/>
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
- <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
- <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
- <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
- <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
- <script type="text/javascript" src="js/common/area.js"></script>
- <script src="js/highcharts.js"></script>
- <script src="js/exporting.js"></script>
- <script src="http://cdn.hcharts.cn/highcharts/modules/offline-exporting.js"></script>
- <script type="text/javascript">
- var i = 1;//第几页
- var sum;//总条数
- var pageSize =10;
- var totalpage;//总页数
- $(document).ready(function(){
- fLoadTable();
-
- selectCountry();
- selectstation();
- //fLoadData(1,10);
-
- });
- function fLoadTable(){
- $('#tt').datagrid({
- fit: true,//自动大小
- title: '',
- width: '100%',
- height: 580,
- toolbar: '#toolbar',
- fitColumns: true,
- singleSelect:false,
- loadMsg:'正在加载, 请稍等 …',
- nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
- striped : true,//设置为true将交替显示行背景
- collapsible : false,//显示可折叠按钮
- singleSelect:true,//为true时只能选择单行
- fitColumns:true//允许表格自动缩放,以适应父容器
- });
- }
- function fLoadData(page,rows){
- $.messager.progress({
- title: '请等待',
- msg: '正在加载数据...',
- text: '查询中.......'
- });
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- data:$('#fillingDataStatistform').serialize(),
- url:"ajax/getStation2",
- success:function (data){
- //$("#infoaddstreetwindows").panel({title:rowData.seriesName});
-
- //document.getElementById("titleContent").innerHTML=checkText;
- //document.getElementById("cylinderImg").innerHTML='<img src='+cylinderpName+' height="auto" width="auto" />';
- //document.getElementById("cylinderImg").innerHTML='<img src='+cylinderpName+' height="70%;" width="90%"/>';
- //document.getElementById("cylinderImg").innerHTML='<img src='+inputpName+'height="auto" width="100%" />';
- $.messager.progress('close');
-
- var vData = $.parseJSON(data);
-
- var content = '<div id="container1" width="100%" height="100%"></div>'
- $("#container").append(content);
- // 构建图表
- var chart = Highcharts.chart('container1',{
- title: {
- text: '加气站统计('+vData.stationTotal+')'
- },
- tooltip: {
- pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>',
- formatter: function () {
- return ' <b> ' + this .point.name + ' </b>: ' + Highcharts.numberFormat( this .percentage, 1 ) + ' % ( ' +
- Highcharts.numberFormat( this .y, 0 , ' , ' ) + ' 个) ' ;
- }
- },
- credits: {
- enabled:false
- },//去掉地址
- plotOptions: {
- pie: {
- allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- format: '<b>{point.name}</b>: {point.percentage:.1f} % ( {point.y}个 )',
- style: {
- color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
- },
- connectorColor: 'silver'
- }
- }
- },
- series: [{
- type: 'pie',
- name: '浏览器占比',
- data:vData.pieList1
- }]
- });
-
-
-
-
- var content2 = '<div id="container2" width="100%" height="100%"></div>'
- $("#container").append(content2);
- // 构建图表
- var chart2 = Highcharts.chart('container2',{
- title: {
- text: '加气机统计('+vData.machineTotal+')'
- },
- tooltip: {
- pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>',
- formatter: function () {
- return ' <b> ' + this .point.name + ' </b>: ' + Highcharts.numberFormat( this .percentage, 1 ) + ' % ( ' +
- Highcharts.numberFormat( this .y, 0 , ' , ' ) + ' 个) ' ;
- }
- },
- credits: {
- enabled:false
- },//去掉地址
- plotOptions: {
- pie: {
- allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- format: '<b>{point.name}</b>: {point.percentage:.1f} % ( {point.y}个 )',
- style: {
- color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
- },
- connectorColor: 'silver'
- }
- }
- },
- series: [{
- type: 'pie',
- name: '浏览器占比',
- data:vData.pieList2
- }]
- });
-
-
-
- }
- });
-
-
- }
- function selectCountry(){
- var id=document.getElementById("city").value;
- var select = document.getElementById("country");
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- url:"ajax/hiddenCity?cityId="+id,
- success:function (data){
- var obj=eval("(" + data + ")");
- $.each(obj.rows, function(i,item){
- select.options.add(new Option(item.name, item.id));
- });
-
-
- }
- });
- }
-
- function selectCountry1(){
- selectCountry();
- changeType(1);
- selectstation();
- }
- function selectstation(){
- var id=document.getElementById("country").value;
- var select = document.getElementById("station");
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- data:$('#fillingDataStatistform').serialize(),
- url:"ajax/hiddenspeStation?type=2",
- success:function (data){
- var obj=eval("(" + data + ")");
- var ii=1;
- select.options.add(new Option("全部", ""));
- $.each(obj.rows, function(i,item){
- if(ii==1){
- clearType();
- var select11 = document.getElementById("searchType");
- select11.options.add(new Option("按充装设备统计", "0"));
- select11.options.add(new Option("按工作人员统计", "1"));
- select11.options.add(new Option("按应用类型统计", "3"));
- ii++;
- }
- select.options.add(new Option(item.name, item.id));
- });
-
-
- }
- });
- changeType(1);
- }
-
-
-
-
- /**
-
-
- 明天(11.12)修改充装数据统计的action部分,判断是否为充装站登陆?
-
- **/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function changeType(type){
- var select = document.getElementById("searchType");
- if(type==1){
- clearType();
- select.options.add(new Option("按加气站统计", "2"));
- select.options.add(new Option("按应用类型统计", "3"));
- }else if(type==2){
- clearType();
- select.options.add(new Option("按充装设备统计", "0"));
- select.options.add(new Option("按工作人员统计", "1"));
- select.options.add(new Option("按应用类型统计", "3"));
- }
-
- }
- function clearType(){
- var select = document.getElementById("searchType");
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- }
- function select(){
- var stationid=document.getElementById("station").value;
- if(stationid==null||stationid==""){
- changeType(1);
- }else{
- changeType(2);
- }
- //fLoadData(1,10);
-
- }
- </script>
- </head>
-
- <body>
-
- <!-- 查询结果:数据表格 -->
- <!-- <table id="tt" cellspacing="0" cellpadding="0" >
-
- </table> -->
-
- <div id="toolbar" style="padding-top: 0px;height: auto;overflow: hidden;">
-
- <form id="fillingDataStatistform" action="" method="post">
- <table>
- <tr>
- <td>
- <span class="hzbspan">省:</span>
- </td>
- <td>
- <select name="province" id="province" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select">
- <%for(AuthorityRegionPlace arp:arplist){
- cplist = arp.getCityPlace();
- %>
- <option value="<%=arp.getId() %>">
- <%=arp.getName() %>
- </option>
- <%} %>
- </select>
- </td>
- <td>
- <span class="hzbspan">市:</span>
- </td>
- <td>
- <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry1()">
-
- <%
-
- for(CityPlace cp:cplist){
- cyplist = cp.getSubPlaceList();
- %>
-
- <option value="<%=cp.getId() %>">
- <%=cp.getName() %>
- </option>
-
-
- <%} %>
- </select>
- </td>
- <td>
- <span class="hzbspan">县:</span>
- </td>
- <td>
- <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectstation();" >
- </select>
- </td>
- <td>
- <span style="cursor: default;margin-bottom: 5px;"><span class="hzbspan" >类型:</span></span>
- </td>
- <td>
- <select name="type" style="width: 150px;height: 34px;" class="hzbspan select" >
- <option value="2" selected="selected">加气站</option>
- </select>
- </td>
- <td><a id="btninfosearch" class="easyui-linkbutton" icon="icon-search" onclick="fLoadData(1,10);" style="width: 150px;height: 34px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">查询</span></a>
- </td></tr></table></form>
- </div>
- <center>
-
- </center>
- <div id="container" style="position: absolute;width: 100%; height: auto;text-align: center;overflow:auto; ">
- </div>
- </body>
- </html>
|