index.jsp 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <%@ page import="java.util.regex.Pattern" %>
  2. <%@ page import="java.util.regex.Matcher" %>
  3. <%@ page language="java" contentType="text/html; charset=UTF-8"
  4. pageEncoding="UTF-8"%>
  5. <%@ page session="true" %>
  6. <%
  7. String path = request.getContextPath();
  8. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  9. String baseUrl = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/";
  10. String t = String.valueOf(System.currentTimeMillis());
  11. String theme = request.getParameter("theme");
  12. String viewAlarmType = request.getParameter("viewAlarmType");
  13. String pieAlarmType = request.getParameter("pieAlarmType");
  14. String statusType = request.getParameter("statusType");
  15. String css_name = "ext-all-access.css";
  16. String company_code = request.getParameter("company_code");
  17. if(viewAlarmType==null)
  18. viewAlarmType="11110010";
  19. if (!myRegex(viewAlarmType)){
  20. viewAlarmType = null;
  21. }
  22. if(pieAlarmType==null)
  23. pieAlarmType="11110010";
  24. if (!myRegex(pieAlarmType)){
  25. pieAlarmType = null;
  26. }
  27. if(statusType==null)
  28. statusType="11110010";
  29. if (!myRegex(statusType)){
  30. statusType = "";
  31. }
  32. if((company_code==null)||(company_code=="null"))
  33. company_code = "";
  34. if (!myRegex(company_code)){
  35. company_code = null;
  36. }
  37. if(theme!=null){
  38. if(theme.equals("gray"))
  39. css_name = "ext-all-gray.css";
  40. else if(theme.equals("access"))
  41. css_name = "ext-all-access.css";
  42. else if(theme.equals("neptune"))
  43. css_name = "ext-neptune.css";
  44. else if(theme.equals("default"))
  45. css_name = "ext-all.css";
  46. else if(theme.equals("scoped"))
  47. css_name = "ext-all-scoped";
  48. else if(theme.equals("ie"))
  49. css_name = "ext-ie.css";
  50. else if(theme.equals("sandbox"))
  51. css_name = "ext-sandbox.css";
  52. else if(theme.equals("standard"))
  53. css_name = "ext-standard.css";
  54. else {
  55. theme = "";
  56. }
  57. }else
  58. theme = "";
  59. %>
  60. <%!
  61. public boolean myRegex (String str){
  62. Pattern pattern = Pattern.compile("^[0-9]*$");
  63. Matcher matcher = pattern.matcher(str);
  64. return matcher.matches();
  65. }
  66. %>
  67. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  68. <html>
  69. <head>
  70. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  71. <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  72. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  73. <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
  74. <link type="text/css" rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
  75. <link type="text/css" rel="stylesheet" href="<%=basePath+"res/img/myImages.css" %>"/>
  76. <link type="text/css" rel="stylesheet" href="<%=basePath+"res/extjs/resources/css/"+css_name+"?t="+t %>"/>
  77. <script type="text/javascript" src ="<%=basePath+"res/extjs/ext-all.js" %>"></script>
  78. <script type="text/javascript" src="<%=basePath+"res/jquery/jquery-3.3.1.min.js" %>"></script>
  79. <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.13&key=246349bf278f6225fa80156828d0f061&plugin=AMap.Geocoder,Map3D"></script>
  80. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/highcharts.js" %>"></script>
  81. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/highcharts-3d.js" %>"></script>
  82. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/highcharts-more.js" %>"></script>
  83. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/modules/solid-gauge.js" %>"></script>
  84. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/modules/sunburst.js" %>"></script>
  85. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/modules/exporting.js" %>"></script>
  86. <script type="text/javascript" src="<%=basePath+"res/highcharts/code/modules/export-data.js" %>"></script>
  87. <script type="text/javascript" src ="<%=basePath+"view/scripts/map.js" %>"></script>
  88. <title>Insert title here</title>
  89. <style>
  90. html, body,
  91. #container {
  92. width: 100%;
  93. height: 100%;
  94. }
  95. </style>
  96. </head>
  97. <body>
  98. <div id="container">
  99. <div id="mask_l" class="mask_left"></div>
  100. <div id="mask_r" class="mask_right"></div>
  101. <div id="fp_backbtn" class="fp_backbtn" onmouseover="btn_over();" onmouseout="btn_out();" onclick="back_all();"></div>
  102. <table id="alarm_wrapper_table" class="alarm_warpper_table" border="0" cellpadding="0" cellspacing="0">
  103. <tr style="border:none;border-collapse: collapse;">
  104. <td style="border:none;border-collapse: collapse; width:35px; height:58px; background:url(../res/img/warpper-l1.png) no-repeat; overflow:hidden;">
  105. </td>
  106. <td style="border:none;border-collapse: collapse; width:730px; height:58px; overflow:hidden; padding:0px; margin:0px;">
  107. <table id="sub_warpper_table" class="sub_wrapper_table" border="0" cellpadding="0" cellspacing="0">
  108. <tr style="border:none;border-collapse: collapse;">
  109. <td style="border:none;border-collapse: collapse; width:256px; height:58px; background:url(../res/img/warpper-l2.png) no-repeat; overflow:hidden; padding:0px; margin:0px;"></td>
  110. <td style="border:none;border-collapse: collapse; width:228px; height:58px; background:url(../res/img/warpper-mid.png) repeat-x; overflow:hidden; padding:0px; margin:0px;"></td>
  111. <td style="border:none;border-collapse: collapse; width:256px; height:58px; background:url(../res/img/warpper-r2.png) no-repeat; overflow:hidden; padding:0px; margin:0px;"></td>
  112. </tr>
  113. </table>
  114. <marquee id="alarm_wrapper" class="alarm_wrapper" behavior="scroll" scrollamount=“1” scrolldelay=“10” onmouseover="this.stop()" onmouseout="this.start()" onclick="show_alarm_list()">Loading...</marquee>
  115. </td>
  116. <td style="border:none;border-collapse: collapse; width:35px; height:58px; background:url(../res/img/warpper-r1.png) no-repeat; overflow:hidden; padding:0px; margin:0px;">
  117. </td>
  118. </tr>
  119. </table>
  120. <div id="bar5" class="search bar5">
  121. <form>
  122. <table style="border:none;" border="0" cellpadding="0" cellspacing="0"><tr style="border:none;border-collapse: collapse;">
  123. <td style="border:none;border-collapse: collapse; padding:0px; margin:0px;">
  124. <input id="search_company" name="search_company" type="text" placeholder="请输入单位名称..." autocomplete="off"><div class="bar5_clear" onclick="clear_search();" style="cursor:pointer;"></div></td>
  125. </tr></table>
  126. </form>
  127. </div>
  128. <div id="saerch_company_list" class= "search_company_list" style="position:absolute;top:80px;right:200px;z-index:1001;font-size:14px;"></div>
  129. <div id="alarm_pie_bar" class="alarm_pie_bar" style="margin: 0px; overflow: hidden; z-index: 500; position: absolute; top: 141px; left:100px; border: 0px solid #000;"></div>
  130. <div id="device_pie_bar" class="device_pie_bar" style="margin: 0px; overflow: hidden; z-index: 500; position: absolute; top: 141px; right:100px; border: 0px solid #000;"></div>
  131. <div id="border_top_left" style="background:url(../res/img/border-tl.png) no-repeat; width:117px; height:117px; z-index:500; position:absolute; top:20px; left:20px;"></div>
  132. <div id="border_top_right" style="background:url(../res/img/border-tr.png) no-repeat; width:117px; height:117px; z-index:500; position:absolute; top:20px; right:20px;"></div>
  133. <div id="border_bottom_left" style="background:url(../res/img/border-bl.png) no-repeat; width:117px; height:117px; z-index:500; position:absolute; bottom:20px; left:20px;"></div>
  134. <div id="border_bottom_right" style="background:url(../res/img/border-br.png) no-repeat; width:117px; height:117px; z-index:500; position:absolute; bottom:20px; right:20px;"></div>
  135. </div>
  136. <input type="hidden" id="theme" name="theme" value="<%=theme %>"/>
  137. <input type="hidden" id="basePath" name="basePath" value="<%=basePath %>"/>
  138. <input type="hidden" id="viewAlarmType" name="viewAlarmType" value="<%=viewAlarmType %>"/>
  139. <input type="hidden" id="pieAlarmType" name="pieAlarmType" value="<%=pieAlarmType %>"/>
  140. <input type="hidden" id="statusType" name="statusType" value="<%=statusType %>"/>
  141. <input type="hidden" id="V_LOGINNAME" name="V_LOGINNAME" value=""/>
  142. <input type="hidden" id="V_PASSWORD" name="V_PASSWORD" value=""/>
  143. <input type="hidden" id="company_code" name="company_code" value="<%=company_code %>"/>
  144. </body>
  145. </html>