e9485efcdb063ab8549691b16e96bbfce8f19f0a.svn-base 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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/page/cockpit/webgis/util.js"></script>
  21. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/gisgrid.css">
  22. </head>
  23. <body>
  24. <div id="head" class="_head"><h2 class="_center"></h2></div>
  25. <div id="gridContent"></div>
  26. <script type="text/javascript">
  27. var grid=null;
  28. var params=eval("("+resolveUrl().params+")");
  29. console.log("aaa=="+JSON.stringify(params));
  30. function getColumns(param){
  31. var columns=[];
  32. var column= { display:"本地应急车辆", name:"CAR_BD", align: 'center', width: "50%"}
  33. columns.push(column);
  34. column= { display:"跨区应急车辆" , name:"CAR_KQ", align: 'center', width:"50%"}
  35. columns.push(column);
  36. return columns
  37. }
  38. var options={
  39. columns:getColumns(params.level),
  40. data:[],
  41. pageSize:20,
  42. usePager:false,
  43. /* checkbox:true, */
  44. percentWidthMode:true,
  45. height: 'auto',
  46. width:"100%",
  47. rowAttrRender: function(rowdata, rowindex, rowid){
  48. return rowdata["__index"] % 2 == 0 ? "style='background-color:#212749;'" : "style='background-color:#2C3A54;'" ;
  49. }
  50. };
  51. function getData(grid){
  52. $.post(path+"ws/ChartDaoServiceImpl/ChartDaoServiceImpl/getChartInfo",{
  53. comId:params.comId,childId:params.childId,typeId:params.typeId,date:params.date
  54. },function(result){
  55. var data={"pager.pageNo":1,"pager.totalRows":1,rows:changeDataType(result)};
  56. grid.setOptions({ data :data });
  57. grid.loadData();
  58. },"json");
  59. }
  60. function changeDataType(param){
  61. var data=[];
  62. for(var index in param){
  63. var jsonItem={};
  64. jsonItem["CAR_BD"]=parseInt(param[index]["CAR_BD"]);
  65. jsonItem["CAR_KQ"]=parseInt(param[index]["CAR_KQ"]);
  66. data.push(jsonItem);
  67. }
  68. console.log("========"+JSON.stringify({data:data}));
  69. return data;
  70. }
  71. $(function(){
  72. $("#head").find("h2").text(params["deptName"]+"汇总明细");
  73. grid=$("#gridContent").quiGrid(options);
  74. /* alert(JSON.stringify({columns:getColumns(params.level)}));
  75. alert("===1");
  76. alert("=="+JSON.stringify({
  77. comId:params.comId,childId:params.childId,typeId:params.typeId,date:params.date
  78. })); */
  79. getData(grid);
  80. });
  81. </script>
  82. </body>
  83. </html>