8b069b5bd8adc8039dc572c0c13835f4df2cc5fc.svn-base 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>数据汇总</title>
  10. <!--框架必需start-->
  11. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  13. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  14. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin"/>
  17. <!--框架必需end-->
  18. <!--数据表格start-->
  19. <script src="<%=path%>/libs/js/table/quiGrid.js" type="text/javascript"></script>
  20. <!--数据表格end-->
  21. </head>
  22. <body>
  23. <div id="maingrid" style="margin: 0; padding: 0"></div>
  24. <script type="text/javascript">
  25. var testData={"rows":[
  26. {"math":10,"name":"小1","english":10,"chinese":10,"sex":"男"},
  27. {"math":10,"name":"小2","english":10,"chinese":20,"sex":"女"},
  28. {"math":30,"name":"小3","english":30,"chinese":30,"sex":"男"},
  29. {"math":40,"name":"小4","english":40,"chinese":40,"sex":"女"},
  30. {"math":50,"name":"小5","english":50,"chinese":50,"sex":"男"},
  31. {"math":60,"name":"小6","english":60,"chinese":60,"sex":"男"},
  32. {"math":70,"name":"小7","english":70,"chinese":70,"sex":"女"}]};
  33. //数据表格使用
  34. var g;
  35. function initComplete(){
  36. g = $("#maingrid").quiGrid({
  37. columns: [
  38. { display: '姓名', name: 'name', align: 'center', width: 150},
  39. { display: '性别', name: 'sex', align: 'center', width: 100},
  40. { display: '语文', name: 'chinese', align: 'center', width: 150, totalSummary: {render:function(obj){return '总数:'+obj.sum}}},
  41. { display: '数学', name: 'math', align: 'center' , width: 150, totalSummary: {render:function(obj){return '最大值:'+obj.max}}},
  42. { display: '英语', name: 'english', align: 'center' , width: 200, totalSummary: {render:function(obj){return '平均值:'+obj.avg}}}
  43. ],
  44. data:testData, usePager: false, sortName: 'id',rownumbers:true,height: '100%', width:"100%",groupColumnName: "sex", groupColumnDisplay: "性别"
  45. });
  46. }
  47. </script>
  48. </body>