一、前端js
1.1 点击查询
$("#xmdCompareBtn").click(queryXmdCompare);
1.2 加载form表单数据
//查询区域任务
function queryXmdCompare(){
var params = $("#xmdCompareForm").serialize();
$("#xmdCompareContainer").jtable("load",params);
}
1.3 jtable 结构
//加载父列表
function loadXmdCompare(){
$("#xmdCompareContainer").jtable({
paging:true,
pageSize:xmdComparePageSize,
gotoPageArea:'none',
columnSelectable: false,//右击列表头显示列
pageSizeChangeArea:false,
selectingCheckboxes:true,
selecting: true, //Enable selecting
multiselect: true, //Allow multiple selecting
selectOnRowClick: false,
actions:{
listAction:contextpath+"secure/res/xmdcompare/queryXmdCompare.html"
},
fields:{
id:{
key:true,
list:false
},
/* 设置子table */
Exams:{
title:'',
width:'4%',
display: function (data) {
var $img = $('<i data-id="" class="fa fa-plus"/>').css({
"cursor":"pointer"});
var subnetRet = "subnetRet="+JSON.stringify(data.record.subnetRet);