123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <!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=[];
- for(var index in param){
- var column= { display:param[index].name ,columns: [
- { display: '已恢复',name:"PLON_DAOTA_"+param[index].column, align: 'center', width: 50/param.length+"%"} ,
- { display: '未恢复', name:"UNRECOVER_"+param[index].column, align: 'center', width: 50/param.length+"%"}]
- }
- /* var column= { display:param[index].name , name:"PLON_DAOTA_"+param[index].column, align: 'center', width: 50/param.length+"%"}
- columns.push(column);
- column= { display:param[index].name , name:"UNRECOVER_"+param[index].column, align: 'center', width: 50/param.length+"%"} */
- columns.push(column);
- }
- return columns
- }
- var options={
- columns:getColumns(params.level),
- data:[],
- pageSize:20,
- /* rownumbers:true, */
- 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={};
- for(var i in params.level){
- jsonItem["PLON_DAOTA_"+params.level[i].column]=parseInt(param[index]["PLON_DAOTA_"+params.level[i].column])+parseInt(param[index]["PLON_BIANXING_"+params.level[i].column])-parseInt(param[index]["UNRECOVER_"+params.level[i].column]);
- jsonItem["UNRECOVER_"+params.level[i].column]=parseInt(param[index]["UNRECOVER_"+params.level[i].column]);
- }
- 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>
|