| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ page import="com.runzhixing.bean.CityPlace" %>
- <%@ page import="com.runzhixing.bean.CountryPlace" %>
- <%@ page import="com.runzhixing.bean.Station" %>
- <%@ page import="com.runzhixing.bean.AuthorityRegionPlace" %>
- <%@ page import="com.runzhixing.bean.User" %>
- <%@ page import="com.runzhixing.constant.Constant" %>
- <%@ page import="com.runzhixing.tool.Util" %>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- User user = (User)session.getAttribute(Constant.userMark);
- List<AuthorityRegionPlace> arplist = user.getPrivilegePlaces1();
- List<CityPlace> cplist = new ArrayList<CityPlace>();
- List<CountryPlace> cyplist = new ArrayList<CountryPlace>();
- List<Station> slist = new ArrayList<Station>();
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <base href="<%=basePath%>">
-
- <title>查看公告信息</title>
-
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="This is my page">
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta http-equiv="X-UA-Compatible" content="IE=10"/>
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
- <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
- <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
- <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
- <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
- <style type="text/css">
- a:HOVER{
- color: red;
- text-decoration: none;
- }
- a{
- color: #f08300;
- text-decoration: none;
- }
- </style>
- <script type="text/javascript">
- var i = 1;//第几页
- var sum;//总条数
- var totalpage;//总页数
- var pageSize =10;
- var hiddenID="";
- $(document).ready(function(){
- fLoadTable();
- //fLoadData(1,10);
- selectCountry();
- selectCountry21();
- });
- function fLoadTable(){
- $('#tt').datagrid({
- fit: true,//自动大小
- title: '',
- width: '100%',
- height: 580,
- toolbar: '#toolbar',
- fitColumns: true,
- loadMsg:'正在加载, 请稍等 …',
- nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取
- striped : true,//设置为true将交替显示行背景
- collapsible : true,//显示可折叠按钮
- fitColumns:true,//允许表格自动缩放,以适应父容器
- rownumbers:true,
- pagination:true,//分页控件
- columns:[[
- {field:'title',title:'标题',width:100},
- {field:'id',title:'ID',width:100,formatter: function(value, row, index){
- hiddenID = value;
- return value;
- }},
- {field:'none',title:'内容',width:100,formatter: function(value, row, index){
- return '<a href="Detailbyid?hiddenID='+hiddenID+'" target="_blank">'+"详情"+'</a>';
- }},
- {field:'publishTime1',title:'发布时间',width:100},
- {field:'publisher',title:'发布人',width:100},
- {field:'publishStation',title:'发布站点',width:100},
- {field:'recordOperatorName',title:'记录人',width:100},
- {field:'acceptDistrictName',title:'接收区域',width:100},
- {field:'acceptTypeName',title:'接收类型',width:100},
- {field:'stateName',title:'信息状态',width:100}
- ]]
- });
- }
- function fLoadData(page,rows){
- $.messager.progress({
- title: '请等待',
- msg: '正在加载数据...',
- text: '查询中.......'
- });
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- data:$('#checkAnnounform').serialize(),
- url:"ajax/checkAnnounformment?page="+page+"&psize="+rows,
- success:function (data){
- $.messager.progress('close');
- var vData = $.parseJSON(data);
- sum = vData.total;
- if(sum==0){
- show("没有查询到相关信息!!!");
- }
- totalpage = Math.ceil(sum/rows);
- $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
- var p = $('#tt').datagrid('getPager');
- $(p).pagination({
- pageList: [10,20,30,100,200,400],//可以设置每页记录条数的列表
- beforePageText: '第',//页数文本框前显示的汉字
- afterPageText: '页 共 {pages} 页',
- displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
- onSelectPage: function (pageNumber, pageSize) {
- fLoadData(pageNumber, pageSize);
- }
-
- });
- }
- });
-
-
- }
-
-
- function selectCountry(){
- var id=document.getElementById("city").value;
- var select = document.getElementById("country");
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- url:"ajax/hiddenCity?cityId="+id,
- success:function (data){
- var obj=eval("(" + data + ")");
- $.each(obj.rows, function(i,item){
- select.options.add(new Option(item.name, item.id));
- });
-
-
- }
- });
- }
- function selectCountry21(){
- var id=document.getElementById("cityNop").value;
- var select = document.getElementById("pubstationno");
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- url:"ajax/hiddenCity?cityId="+id,
- success:function (data){
- var obj=eval("(" + data + ")");
- $.each(obj.rows, function(i,item){
- select.options.add(new Option(item.name, item.id));
- });
-
-
- }
- });
- }
- function show(message) {
- $.messager.show({
- title: '提示信息',
- msg: message,
- timeout: 2000,
- showType: 'slide'
- });
- }
- function selectCountry1(){
- selectCountry();
- //changeSize();
- }
- function selectCountry11(){
- selectCountry21();
- //changeSize();
- }
- function changeSize(){
- fLoadData(1,10);
- }
- </script>
- </head>
-
- <body>
- <!-- 查询结果:数据表格 -->
- <table id="tt" cellspacing="0" cellpadding="0" >
- </table>
- <div id="toolbar" style="padding-top: 0px;height: auto;">
-
- <form id="checkAnnounform" action="ajax/checkAnnounformment" method="post">
- <table style="border-collapse:separate; border-spacing:10px;">
- <tr>
- <td>
-
- </td>
- <td>
- <select name="province" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select">
- <%for(AuthorityRegionPlace arp:arplist){
- cplist = arp.getCityPlace();
- %>
- <option value="<%=arp.getId() %>">
- <%=arp.getName() %>
- </option>
- <%} %>
- </select>
- </td>
- <td>
-
- </td>
- <td>
- <select name="city" id="city" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select" onchange="selectCountry1();">
-
- <%
-
- for(CityPlace cp:cplist){
- cyplist = cp.getSubPlaceList();
- %>
-
- <option value="<%=cp.getId() %>">
- <%=cp.getName() %>
- </option>
-
-
- <%} %>
- </select>
- </td>
- <td>
-
- </td>
- <td>
- <select name="country" id = "country" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select" onchange="changeSize();" >
- </select>
- </td>
- </tr>
- <tr>
- <td>
- <span style="cursor: default"><span class="hzbspan" style="font-size: 16px;" >发送省:</span></span>
-
- </td>
- <td>
- <select name="sendprovince" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan">
- <%for(AuthorityRegionPlace arp:arplist){
- cplist = arp.getCityPlace();
- %>
- <option value="<%=arp.getId() %>">
- <%=arp.getName() %>
- </option>
- <%} %>
- </select>
- </td>
- <td>
- <span style="cursor: default;"><span class="hzbspan" style="font-size: 16px;" >发送市:</span></span>
- </td>
- <td>
- <select name="cityNop" id="cityNop" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" onchange="selectCountry11();">
-
- <%
-
- for(CityPlace cp:cplist){
- cyplist = cp.getSubPlaceList();
- %>
-
- <option value="<%=cp.getId() %>">
- <%=cp.getName() %>
- </option>
-
-
- <%} %>
- </select>
- </td>
- <td>
- <span style="cursor: default;"><span class="hzbspan" style="font-size: 16px;" >发送县:</span></span>
- </td>
- <td>
- <select name="pubstationno" id = "pubstationno" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
- </select>
- </td>
- <td>
- <select name="acceptType" id = "acceptType" style="width: 150px;height: 34px;min-width: 100px;display: none;" class="hzbspan select">
- <option value="02" selected="selected">
- 检验机构
- </option>
- </select>
- </td>
- </tr>
- <tr>
- <td>
- <span style="cursor: default"><span class="hzbspan">开始时间:</span></span>
- </td>
- <td>
- <input type="text" id="startTime" name="startTime" class="easyui-datebox" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
- </td>
- <td>
- <span style="cursor: default"><span class="hzbspan">结束时间:</span></span>
- </td>
- <td>
- <input type="text" class="easyui-datebox" id="endTime" name="endTime" style="width: 150px;height: 34px;" class="hzbspan" data-options="prompt:'- - - - - - -'">
- </td>
- <td>
- <span style="cursor: default;"><span class="hzbspan" style="font-size: 16px;" >排序方式:</span></span>
- </td>
- <td>
- <select name="direct" id = "direct" style="width: 150px;height: 34px;min-width: 100px;" class="hzbspan select" >
- <option value="0" selected="selected">
- 升序
- </option>
- <option value="1">
- 降序
- </option>
- </select>
- </td>
- <td>
- <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>
- </td>
- </tr>
- </table>
-
-
-
-
-
- </form>
-
-
- </div>
- </body>
- </html>
|