1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>线路跳闸统计表</title>
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="/nwyj/page/cockpit/context.js"></script>
- <!--框架必需start-->
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
- <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="/nwyj/scripts/qui/" scrollerY="false"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <!--框架必需end-->
- <!--grid组件start-->
- <script src="/nwyj/scripts/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
- <!--grid组件end-->
- <script type="text/javascript" src="/nwyj/page/cockpit/webgis/util.js"></script>
- <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/gisgrid.css">
- </head>
-
- <body>
- <div id="head" class="_head"><h2 class="_center"></h2></div>
- <div id="gridContent"></div>
- <script type="text/javascript">
- var grid=null;
- var params=eval("("+resolveUrl().params+")");
- console.log("aaa=="+JSON.stringify(params));
- function getColumns(param){
- var columns=[];
- var column= { display:"本地应急车辆", name:"CAR_BD", align: 'center', width: "50%"}
- columns.push(column);
- column= { display:"跨区应急车辆" , name:"CAR_KQ", align: 'center', width:"50%"}
- columns.push(column);
- return columns
- }
- var options={
- columns:getColumns(params.level),
- data:[],
- pageSize:20,
- usePager:false,
- /* checkbox:true, */
- percentWidthMode:true,
- height: 'auto',
- width:"100%",
- rowAttrRender: function(rowdata, rowindex, rowid){
- return rowdata["__index"] % 2 == 0 ? "style='background-color:#212749;'" : "style='background-color:#2C3A54;'" ;
- }
- };
-
- function getData(grid){
- $.post(path+"ws/ChartDaoServiceImpl/ChartDaoServiceImpl/getChartInfo",{
- comId:params.comId,childId:params.childId,typeId:params.typeId,date:params.date
- },function(result){
- var data={"pager.pageNo":1,"pager.totalRows":1,rows:changeDataType(result)};
-
- grid.setOptions({ data :data });
- grid.loadData();
- },"json");
- }
-
- function changeDataType(param){
- var data=[];
- for(var index in param){
- var jsonItem={};
- jsonItem["CAR_BD"]=parseInt(param[index]["CAR_BD"]);
- jsonItem["CAR_KQ"]=parseInt(param[index]["CAR_KQ"]);
- data.push(jsonItem);
-
- }
- console.log("========"+JSON.stringify({data:data}));
- return data;
- }
-
-
- $(function(){
- $("#head").find("h2").text(params["deptName"]+"汇总明细");
- grid=$("#gridContent").quiGrid(options);
- /* alert(JSON.stringify({columns:getColumns(params.level)}));
- alert("===1");
- alert("=="+JSON.stringify({
- comId:params.comId,childId:params.childId,typeId:params.typeId,date:params.date
- })); */
- getData(grid);
-
- });
-
- </script>
- </body>
- </html>
|