Pre Merge pull request !389 from mnisummer/feature_groupHeader_update

pull/389/MERGE
mnisummer 2022-12-13 05:18:02 +00:00 committed by Gitee
commit 7977f44153
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 58 additions and 49 deletions

View File

@ -17,61 +17,70 @@
var datas = [[${@dict.getType('sys_normal_disable')}]];
$(function() {
//合并列
let columns_1 = [
[
{ title : '基本信息', align : 'center', colspan : 6 },
{ title : '其他信息', align : 'center', colspan : 3 }
],
[
{ checkbox : true },
{ field : 'userId', title : '用户ID' },
{ field : 'userCode', title : '用户编号' },
{ field : 'userName', title : '用户姓名' },
{ field : 'userPhone', title : '用户手机' },
{ field : 'userEmail', title : '用户邮箱' },
{ field : 'userBalance', title : '用户余额' },
{ field : 'status', title : '用户状态', formatter : function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{ title : '操作', align : 'center',
formatter : function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}
]
];
//合并行 & 合并列
let columns_2 = [
[
{ checkbox : true, rowspan : 2 },
{ title : '基本信息', align : 'center', colspan : 5 },
{ title : '其他信息', align : 'center', colspan : 3 }
],
[
{ field : 'userId', title : '用户ID' },
{ field : 'userCode', title : '用户编号' },
{ field : 'userName', title : '用户姓名' },
{ field : 'userPhone', title : '用户手机' },
{ field : 'userEmail', title : '用户邮箱' },
{ field : 'userBalance', title : '用户余额' },
{ field : 'status', title : '用户状态', formatter : function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{ title : '操作', align : 'center', formatter : function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}
]
];
var options = {
url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns : [
[{
title : '基本信息',
align : 'center',
colspan : 6
}, {
title : '其他信息',
align : 'center',
colspan : 3
}
],
[{
checkbox : true
}, {
field : 'userId',
title : '用户ID'
}, {
field : 'userCode',
title : '用户编号'
}, {
field : 'userName',
title : '用户姓名'
}, {
field : 'userPhone',
title : '用户手机'
}, {
field : 'userEmail',
title : '用户邮箱'
}, {
field : 'userBalance',
title : '用户余额'
}, {
field : 'status',
title : '用户状态',
formatter : function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
}, {
title : '操作',
align : 'center',
formatter : function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}
]
]
columns : columns_2
};
$.table.init(options);
});