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