5c9eb93488875dba18c3edca0495ef8fc3aa541d.svn-base 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>台区停电统计表</title>
  5. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <script type="text/javascript" src="/nwyj/page/cockpit/context.js"></script>
  8. <!--框架必需start-->
  9. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  10. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  11. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  12. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  13. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  14. <link rel="stylesheet" type="text/css" id="skin" prePath="/nwyj/scripts/qui/" scrollerY="false"/>
  15. <link rel="stylesheet" type="text/css" id="customSkin"/>
  16. <!--框架必需end-->
  17. <!--grid组件start-->
  18. <script src="/nwyj/scripts/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
  19. <!--grid组件end-->
  20. <script type="text/javascript" src="/nwyj/scripts/highcharts/highcharts.js"></script>
  21. <script type="text/javascript" src="/nwyj/page/cockpit/chart_line.js"></script>
  22. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/chartPage.css">
  23. <script type="text/javascript" src="/nwyj/page/cockpit/grouped_categories-master/grouped-categories.js"></script>
  24. <script type="text/javascript" src="/nwyj/page/cockpit/laydate/laydate.js"></script>
  25. <script type="text/javascript" src="/nwyj/page/cockpit/webgis/util.js"></script>
  26. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/gisgrid.css">
  27. </head>
  28. <body>
  29. <div id="head" class="_head"><h2 class="_center"></h2></div>
  30. <div id="gridContent"></div>
  31. <script type="text/javascript">
  32. var grid=null;
  33. var params=eval("("+resolveUrl().params+")");
  34. function getColumns(){
  35. var columns=[];
  36. var column= { display:"已恢复", name:"TQ_TD_COUNT", align: 'center', width: "50%"}
  37. columns.push(column);
  38. column= { display:"未恢复" , name:"TQ_UNRECOVERED", align: 'center', width:"50%"}
  39. columns.push(column);
  40. return columns
  41. }
  42. var options={
  43. columns:getColumns(),
  44. data:[],
  45. pageSize:20,
  46. usePager:false,
  47. percentWidthMode:true,
  48. height: 'auto',
  49. width:"100%",
  50. rowAttrRender: function(rowdata, rowindex, rowid){
  51. return rowdata["__index"] % 2 == 0 ? "style='background-color:#212749;'" : "style='background-color:#2C3A54;'" ;
  52. }
  53. };
  54. function getData(grid){
  55. $.post(path+"ws/ChartDaoServiceImpl/ChartDaoServiceImpl/getChartInfo",{
  56. comId:params.comId,childId:params.childId,typeId:params.typeId,date:params.date
  57. },function(result){
  58. var data={"pager.pageNo":1,"pager.totalRows":1,rows:changeDataType(result)};
  59. grid.setOptions({ data :data });
  60. grid.loadData();
  61. },"json");
  62. }
  63. function changeDataType(param){
  64. var data=[];
  65. for(var index in param){
  66. var jsonItem={};
  67. jsonItem["TQ_TD_COUNT"]=parseInt(param[index]["TQ_TD_COUNT"])-parseInt(param[index]["TQ_UNRECOVERED"])
  68. jsonItem["TQ_UNRECOVERED"]=parseInt(param[index]["TQ_UNRECOVERED"]);
  69. data.push(jsonItem);
  70. }
  71. return data;
  72. }
  73. $(function(){
  74. $("#head").find("h2").text(params["deptName"]+"汇总明细");
  75. grid=$("#gridContent").quiGrid(options);
  76. getData(grid);
  77. });
  78. </script>
  79. </body>
  80. </html>