页面刷新
2015-05-30 11:28
134 查看
//初始化
$(document).ready(function () {
doTurn(1,1);
});
function doTurn(page,issue_tag) {
var pager = new Pager();
page = (page <= 1 ? 1 : page);
pager.PageSize = 3;
pager.curpage = page;
var param = {
curpage:page,
limit: 3
};
param.issue_tag = issue_tag;
$.post('/busi/indexAction.ered?reqCode=query', param, function(data) {
var result = eval("("+data+")");
pager.TotalRows = result.TOTALCOUNT;
pager.refresh();
var resultData = result.ROOT, html = [];
for(var i=0; i<resultData.length; i++) {
html.push('<tr>');
html.push('<td>'+(i+1)+'</td>');
if(!isEmpty(resultData[i].issue_projectname)){
html.push('<td>'+resultData[i].issue_projectname+'</td>');
}else{
html.push('<td></td>');
}
if(!isEmpty(resultData[i].issue_issuename)){
html.push('<td>'+resultData[i].issue_issuename+'</td>');
}else{
html.push('<td></td>');
}
if(!isEmpty(resultData[i].issue_starttime)){
html.push('<td>'+resultData[i].issue_starttime+'</td>');
}else{
html.push('<td></td>');
}
if(!isEmpty(resultData[i].issue_funding)){
html.push('<td>'+resultData[i].issue_funding+'</td>');
}else{
html.push('<td></td>');
}
html.push('</tr>');
}
$("#showList").html(html.join(""));
});
}
<div id="tabcontent1" name="divNumber" class="tabdiv">
<table class="djsq_content" style="width:98%;margin:0px auto;">
<tbody>
<tr>
<th width="5%">序号</th>
<th width="35%">项目</th>
<th width="30%">课题</th>
<th width="15%">时间</th>
<th width="15%">经费/万</th>
</tr>
</tbody>
<tbody id="showList">
</tbody>
</table>
<div class="pagenav_pers" style="margin: 20px 0 40px;">
<div class="paginator_pers" id="pager"></div>
</div>
/**
* 列表
*/
public void query(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
CommonActionForm aForm=(CommonActionForm) form;
Dto dto=aForm.getParamAsDto(request);
Integer totalCount=(Integer)appReader.queryForObject("Issue.queryIssueCount",dto);
List list=new ArrayList();
if(totalCount.intValue()>0){
list=appReader.queryForPage("Issue.queryIssue", dto);
}
String jsonString= JsonHelper.encodeList2PageJson(list, totalCount, null);
this.write(jsonString, response);
}
$(document).ready(function () {
doTurn(1,1);
});
function doTurn(page,issue_tag) {
var pager = new Pager();
page = (page <= 1 ? 1 : page);
pager.PageSize = 3;
pager.curpage = page;
var param = {
curpage:page,
limit: 3
};
param.issue_tag = issue_tag;
$.post('/busi/indexAction.ered?reqCode=query', param, function(data) {
var result = eval("("+data+")");
pager.TotalRows = result.TOTALCOUNT;
pager.refresh();
var resultData = result.ROOT, html = [];
for(var i=0; i<resultData.length; i++) {
html.push('<tr>');
html.push('<td>'+(i+1)+'</td>');
if(!isEmpty(resultData[i].issue_projectname)){
html.push('<td>'+resultData[i].issue_projectname+'</td>');
}else{
html.push('<td></td>');
}
if(!isEmpty(resultData[i].issue_issuename)){
html.push('<td>'+resultData[i].issue_issuename+'</td>');
}else{
html.push('<td></td>');
}
if(!isEmpty(resultData[i].issue_starttime)){
html.push('<td>'+resultData[i].issue_starttime+'</td>');
}else{
html.push('<td></td>');
}
if(!isEmpty(resultData[i].issue_funding)){
html.push('<td>'+resultData[i].issue_funding+'</td>');
}else{
html.push('<td></td>');
}
html.push('</tr>');
}
$("#showList").html(html.join(""));
});
}
<div id="tabcontent1" name="divNumber" class="tabdiv">
<table class="djsq_content" style="width:98%;margin:0px auto;">
<tbody>
<tr>
<th width="5%">序号</th>
<th width="35%">项目</th>
<th width="30%">课题</th>
<th width="15%">时间</th>
<th width="15%">经费/万</th>
</tr>
</tbody>
<tbody id="showList">
</tbody>
</table>
<div class="pagenav_pers" style="margin: 20px 0 40px;">
<div class="paginator_pers" id="pager"></div>
</div>
/**
* 列表
*/
public void query(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
CommonActionForm aForm=(CommonActionForm) form;
Dto dto=aForm.getParamAsDto(request);
Integer totalCount=(Integer)appReader.queryForObject("Issue.queryIssueCount",dto);
List list=new ArrayList();
if(totalCount.intValue()>0){
list=appReader.queryForPage("Issue.queryIssue", dto);
}
String jsonString= JsonHelper.encodeList2PageJson(list, totalCount, null);
this.write(jsonString, response);
}
相关文章推荐
- HDOJ今年暑假不AC
- Android 开发服务类 02_NewsListServlet
- linux安装nginx
- CentOS 7做流程图软件
- js判断是否在微信浏览器中打开
- 爱迪生的第一项专利
- 第十三周阅读程序二
- 利用try-catch判断变量是已声明未声明还是未赋值
- 几种常用递归查询
- JAVA wait(), notify(),sleep使用
- selenium ide 自动化测试
- 利用typedef定义函数指针
- Maven安装
- 如何撰写SCI论文的讨论部分?——经典结构 – 俗称“倒漏斗型。
- 公司常用几种请求
- Linux&Android 的文件权限和进程权限
- xls读取
- 【玩转前端开发】jQuery中选择器详细介绍-01
- 区间完全覆盖问题----挤牛奶
- 凯瑟琳皇后和亨利国王的那些事[转]