Systemwarninglog.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page import="com.runzhixing.bean.PreferEntry" %>
  3. <%@ page import="com.runzhixing.bean.User" %>
  4. <%@ page import="com.runzhixing.constant.Constant" %>
  5. <%
  6. String path = request.getContextPath();
  7. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  8. User user = (User)session.getAttribute(Constant.userMark);
  9. User user1 = (User)session.getAttribute(Constant.cylinderSum);
  10. PreferEntry pe = user.getPrefer(Constant.CylinderPreWarningTime);
  11. %>
  12. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  13. <html>
  14. <head>
  15. <base href="<%=basePath%>">
  16. <title>外地车充装比例情况</title>
  17. <meta http-equiv="pragma" content="no-cache">
  18. <meta http-equiv="cache-control" content="no-cache">
  19. <meta http-equiv="expires" content="0">
  20. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  21. <meta http-equiv="description" content="This is my page">
  22. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  23. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  24. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  25. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  26. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  27. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  28. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  29. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
  30. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  31. <script type="text/javascript">
  32. var i = 1;//第几页
  33. var sum;//总条数
  34. var totalpage;//总页数
  35. var overbili;
  36. var fillingbili;
  37. var seriesName;
  38. $(document).ready(function(){
  39. fLoadTable();
  40. fLoadData(1,10);
  41. });
  42. function fLoadTable(){
  43. $('#tt').datagrid({
  44. fit: true,//自动大小
  45. title: '今日各站点外地车充装比例情况',
  46. width: '100%',
  47. height: 'auto',
  48. fitColumns: true,
  49. loadMsg:'正在加载, 请稍等 …',
  50. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  51. striped : true,//设置为true将交替显示行背景
  52. collapsible : false,//显示可折叠按钮
  53. fitColumns:true,//允许表格自动缩放,以适应父容器
  54. rownumbers:true,
  55. columns:[[
  56. {field:'seriesName',title:'站点',width:'34%',formatter: function(value, row, index){
  57. seriesName = value;
  58. return '<font style="color:black;font-size:14px;" class="hzbspan">'+seriesName+'<font style="color:red;font-size:12px;" class="hzbspan">(双击查看详情)</font></font>';
  59. }},
  60. {field:'value',title:'外地车充装比例',width:'33%',formatter: function(value, row, index){
  61. if(value>=0){
  62. fillingbili = value.toFixed(2);
  63. return '<font style="color:green;" class="hzbspan">'+value.toFixed(2)+'%</font>';
  64. }else{
  65. fillingbili = value;
  66. return '<font style="color:red;font-weight: bold;" class="hzbspan">'+value+'</font>';
  67. }
  68. }},
  69. {field:'overWarn',title:'超出警戒值',width:'33%',formatter: function(value, row, index){
  70. if(value>0){
  71. overbili = value.toFixed(2);
  72. return '<img src="images/rzx/caution.png"/>&nbsp;<font style="color:red;font-weight: bold;" class="hzbspan">'+value.toFixed(2)+'个百分点</font>';}else{
  73. overbili = value;
  74. return '<font style="color:green;"></font>';
  75. }
  76. }}
  77. ]],
  78. onDblClickRow: function (rowIndex, rowData) {
  79. var myDate = new Date();
  80. var cylinderTime = myDate.getTime();
  81. var cylinderpName = "images/createImg/"+cylinderTime+".png";
  82. var inputpName = $('#inputpName').val();
  83. $.messager.progress({
  84. title: '请等待',
  85. msg: '正在加载数据...',
  86. text: '查询中.......'
  87. });
  88. $.ajax({
  89. type:"POST",
  90. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  91. url:"ajax/makeChart?overWarn="+overbili+"&seriesName="+rowData.seriesName+"&stationNo="+rowData.cateName+"&value="+fillingbili+"&systempName="+cylinderTime,
  92. success:function (data){
  93. $("#infoaddstreetwindows").panel({title:rowData.seriesName});
  94. document.getElementById("pnamecenter").innerHTML='<img src='+cylinderpName+' height="400" width="800" />';
  95. $('#infoaddstreetwindows').window('open');
  96. $.messager.progress('close');
  97. }
  98. });
  99. }
  100. });
  101. }
  102. function fLoadData(page,rows){
  103. $.messager.progress({
  104. title: '请等待',
  105. msg: '正在加载数据...',
  106. text: '查询中.......'
  107. });
  108. $.ajax({
  109. type:"POST",
  110. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  111. url:"ajax/systemWarninglog",
  112. success:function (data){
  113. $.messager.progress('close');
  114. var vData = $.parseJSON(data);
  115. sum = vData.total;
  116. totalpage = Math.ceil(sum/rows);
  117. $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
  118. $('#pp').pagination({
  119. total:sum,
  120. pageList: [2,10,50,100],
  121. beforePageText: '第',//页数文本框前显示的汉字
  122. afterPageText: '页 共 {pages} 页',
  123. displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
  124. onSelectPage:function(pageNumber, pageSize){
  125. fLoadData();
  126. }
  127. });
  128. }
  129. });
  130. }
  131. function detail1(){
  132. var row = $('#tt').datagrid('getSelected');
  133. $.ajax({
  134. type:"POST",
  135. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  136. url:"ajax/makeChart?fillingbili="+fillingbili+"&fillingName="+fillingName,
  137. success:function (data){
  138. $('#infoaddstreetwindows').window('open');
  139. }
  140. });
  141. }
  142. function detail11(){
  143. var row = $('#tt').datagrid('getSelected');
  144. if(!row){
  145. $.messager.alert('提示', "请选择一条数据信息", 'info');
  146. return;
  147. }
  148. var inputpName = $('#inputpName').val();
  149. if (row){
  150. $.messager.progress({
  151. title: '请等待',
  152. msg: '正在加载数据...',
  153. text: '查询中.......'
  154. });
  155. $.ajax({
  156. type:"POST",
  157. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  158. url:"ajax/makeChart?overWarn="+overbili+"&seriesName="+row.seriesName+"&stationNo="+row.cateName+"&value="+fillingbili,
  159. success:function (data){
  160. $.messager.progress('close');
  161. document.getElementById("infoaddstreetwindows").title='';
  162. document.getElementById("pnamecenter").innerHTML='<img src='+inputpName+' height="400" width="800" />';
  163. $('#infoaddstreetwindows').window('open');
  164. }
  165. });
  166. }
  167. }
  168. function detail111(overbili,seriesName,cateName,fillingbili){
  169. var inputpName = $('#inputpName').val();
  170. if (row){
  171. $.messager.progress({
  172. title: '请等待',
  173. msg: '正在加载数据...',
  174. text: '查询中.......'
  175. });
  176. $.ajax({
  177. type:"POST",
  178. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  179. url:"ajax/makeChart?overWarn="+overbili+"&seriesName="+seriesName+"&stationNo="+cateName+"&value="+fillingbili,
  180. success:function (data){
  181. $.messager.progress('close');
  182. document.getElementById("infoaddstreetwindows").title='';
  183. document.getElementById("pnamecenter").innerHTML='<img src='+inputpName+' height="400" width="800" />';
  184. $('#infoaddstreetwindows').window('open');
  185. }
  186. });
  187. }
  188. }
  189. function detail2(){
  190. $('#infoaddstreetwindows1').window('open');
  191. }
  192. function infoaddstreetcancel(){
  193. $('#infoaddstreetwindows').window('close');
  194. }
  195. function infoaddstreetcancel1(){
  196. $('#infoaddstreetwindows1').window('close');
  197. }
  198. </script>
  199. </head>
  200. <body>
  201. <center><span class="hzbspan" style="color: #f08300;font-weight: bold;"><%=pe.getValue()+pe.getUnit() %></span><span class="hzbspan">后将要检验的气瓶数量:</span><span class="hzbspan" style="color: #f08300;font-weight: bold;"><%=user1.getCylinderSum1dm() %></span>&nbsp;&nbsp;<span class="hzbspan"><a href="jsp/rzx/dataQuery/SylogReCylinderdataQuery.jsp" style="cursor: pointer;">详情..</a></span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hzbspan">迄今仍未检验的气瓶数量:</span><span class="hzbspan" style="color: #f08300;font-weight: bold;"><%=user1.getCylinderSum() %></span>&nbsp;&nbsp;<span class="hzbspan"><a
  202. href="jsp/rzx/dataQuery/SylogCylinderdataQuery.jsp" style="cursor: pointer;">详情..</a></span></center>
  203. <!-- 查询结果:数据表格 -->
  204. <table id="tt" cellspacing="0" cellpadding="0" >
  205. </table>
  206. <div id="infoaddstreetwindows" modal="true" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" icon="icon-add" style="width:900px;height: 500px;;padding:5px;background:#fafafa;" >
  207. <div class="easyui-layout" fit="true">
  208. <div region="center" id="pnamecenter" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
  209. <!--<img alt="车辆充装情况饼状图" src="images/createImg/20150922101249.png">
  210. --></div>
  211. <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
  212. <a id="infoaddstreetcancel" class="easyui-linkbutton" icon="icon-cancel" onclick="infoaddstreetcancel()">返回</a>
  213. </div>
  214. </div>
  215. </div>
  216. <div id="toolbar" style="padding-top: 10px;height: 30px;">
  217. <a onclick="detail11()" class="easyui-linkbutton easyui-tooltip" title="Alter" data-options="iconCls:'icon-tip',plain:true">详情</a>
  218. </div>
  219. <form action="makeChart" id="makeChart" method="post"></form>
  220. </body>
  221. </html>