ExportSpecialequipmentdata.jsp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page import="com.runzhixing.tool.Util" %>
  3. <%@ page import="com.runzhixing.bean.CityPlace" %>
  4. <%@ page import="com.runzhixing.bean.CountryPlace" %>
  5. <%@ page import="com.runzhixing.bean.Station" %>
  6. <%@ page import="com.runzhixing.bean.AuthorityRegionPlace" %>
  7. <%@ page import="com.runzhixing.bean.User" %>
  8. <%@ page import="com.runzhixing.constant.Constant" %>
  9. <%
  10. String path = request.getContextPath();
  11. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  12. User user = (User)session.getAttribute(Constant.userMark);
  13. List<AuthorityRegionPlace> arplist = user.getPrivilegePlaces1();
  14. List<CityPlace> cplist = new ArrayList<CityPlace>();
  15. List<CountryPlace> cyplist = new ArrayList<CountryPlace>();
  16. List<Station> slist = new ArrayList<Station>();
  17. %>
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  19. <html>
  20. <head>
  21. <base href="<%=basePath%>">
  22. <title>互联网+监管 特种设备基础信息</title>
  23. <meta http-equiv="pragma" content="no-cache">
  24. <meta http-equiv="cache-control" content="no-cache">
  25. <meta http-equiv="expires" content="0">
  26. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  27. <meta http-equiv="description" content="This is my page">
  28. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  29. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  30. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  31. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  32. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  33. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  34. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
  35. <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js"></script>
  36. <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
  37. <style type="text/css">
  38. a:HOVER{
  39. color: red;
  40. text-decoration: none;
  41. }
  42. a{
  43. color: #f08300;
  44. text-decoration: none;
  45. }
  46. </style>
  47. <script type="text/javascript">
  48. $(document).ready(function(){
  49. fLoadTable();
  50. selectCountry();
  51. });
  52. function changeSize(){
  53. fLoadData(1,10);
  54. }
  55. function fLoadData(page,rows){
  56. var province=document.getElementById("province").value;
  57. var city = document.getElementById("city").value;
  58. var country = document.getElementById("country").value;
  59. var startTime = $('#startTime').datetimebox('getValue');
  60. var endTime = $('#endTime').datetimebox('getValue');
  61. var params = "province="+province+"&city="+city+"&country="+country+"&startTime="+startTime+"&endTime="+endTime;
  62. location.href="servlet/exportServlet1.do?"+params;
  63. $.messager.show({
  64. title: '提示',
  65. msg: '正在按检索条件,查询并导出数据到浏览器,请等待!'
  66. });
  67. }
  68. function selectCountry(){
  69. var id=document.getElementById("city").value;
  70. var select = document.getElementById("country");
  71. for(var i=select.options.length-1;i>=0;i--) {
  72. select.options.remove(i);
  73. }
  74. $.ajax({
  75. type:"POST",
  76. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  77. url:"ajax/hiddenCity?cityId="+id,
  78. success:function (data){
  79. var obj=eval("(" + data + ")");
  80. $.each(obj.rows, function(i,item){
  81. select.options.add(new Option(item.name, item.id));
  82. });
  83. }
  84. });
  85. }
  86. function selectCountry1(){
  87. selectCountry();
  88. }
  89. function fLoadTable(){
  90. $('#tt').datagrid({
  91. fit: true,//自动大小
  92. title: '',
  93. width: '100%',
  94. height: 580,
  95. toolbar: '#toolbar',
  96. fitColumns: true,
  97. singleSelect:false,
  98. loadMsg:'正在加载, 请稍等 …',
  99. nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
  100. striped : true,//设置为true将交替显示行背景
  101. collapsible : false,//显示可折叠按钮
  102. singleSelect:true,//为true时只能选择单行
  103. fitColumns:true,//允许表格自动缩放,以适应父容器
  104. rownumbers:true,
  105. pagination:true,//分页控件
  106. columns:[[
  107. {field:'carNo',align:'left',title:'车牌号',width:'180px'},
  108. {field:'tagNo',align:'left',title:'标签编号',width:'180px'},
  109. {field:'blackLevelName',align:'left',title:'黑名单级别',width:'180px'},
  110. {field:'createTime1',align:'left',title:'创建时间',width:'180px'},
  111. {field:'createTypeName',align:'left',title:'创建类型',width:'180px'},
  112. {field:'state',align:'left',title:'状态',width:'180px',formatter:function(value,row,index){
  113. if(value==0){
  114. return "有效";
  115. }else{
  116. return "无效";
  117. }
  118. }},
  119. {field:'downArea',align:'left',title:'下载地区',width:'180px'},
  120. {field:'downTypeName',align:'left',title:'下载类型',width:'180px'}
  121. ]]
  122. });
  123. }
  124. </script>
  125. </head>
  126. <body>
  127. <table id="tt" cellspacing="0" cellpadding="0" >
  128. </table>
  129. <div id="toolbar">
  130. <form id="spmentdataform" action="ajax/spdataList" method="post">
  131. <table>
  132. <tr>
  133. <td>
  134. <span class="hzbspan">省:</span>
  135. </td>
  136. <td>
  137. <select name="province" id="province" style="width: 200px;height: 34px;min-width: 100px;" class="hzbspan select">
  138. <%for(AuthorityRegionPlace arp:arplist){
  139. cplist = arp.getCityPlace();
  140. %>
  141. <option value="<%=arp.getId() %>">
  142. <%=arp.getName() %>
  143. </option>
  144. <%} %>
  145. </select>
  146. </td>
  147. <td>
  148. <span class="hzbspan">市:</span>
  149. </td>
  150. <td>
  151. <select name="city" id="city" style="width: 200px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry1()">
  152. <%
  153. for(CityPlace cp:cplist){
  154. cyplist = cp.getSubPlaceList();
  155. %>
  156. <option value="<%=cp.getId() %>">
  157. <%=cp.getName() %>
  158. </option>
  159. <%} %>
  160. </select>
  161. </td>
  162. <td>
  163. <span class="hzbspan">县:</span>
  164. </td>
  165. <td>
  166. <select name="country" id = "country" style="width: 200px;height: 34px;min-width: 100px;" class="hzbspan select" >
  167. </select>
  168. </td>
  169. </tr>
  170. <tr>
  171. <td>
  172. <span class="hzbspan">开始时间:</span>
  173. </td>
  174. <td>
  175. <input name="startTime" id="startTime" class="easyui-datebox" style="width:200px;height:34px;padding:10px;" data-options="prompt:'开始时间',editable:true,required:true">
  176. </td>
  177. <td>
  178. <span class="hzbspan">结束时间:</span>
  179. </td>
  180. <td>
  181. <input name="endTime" id="endTime" class="easyui-datebox" style="width:200px;height:34px;padding:10px;" data-options="prompt:'结束时间',editable:true,required:true">
  182. </td>
  183. <td colspan="2">
  184. <a id="btninfosearch" onclick="changeSize();" class="easyui-linkbutton" icon="icon-search" href="javascript:void(0)" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">导出</span></a>
  185. </td>
  186. </tr>
  187. </table>
  188. </form>
  189. </div>
  190. </body>
  191. </html>