From b0feb81719df24680d508c5af4012041a18aaead Mon Sep 17 00:00:00 2001
From: mnisummer <495305122@qq.com>
Date: Tue, 31 May 2022 10:53:29 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=BB=84=E5=90=88=E8=A1=A8?=
=?UTF-8?q?=E5=A4=B4=E4=BE=8B=E5=AD=90=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=90=88?=
=?UTF-8?q?=E5=B9=B6=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../templates/demo/table/groupHeader.html | 107 ++++++++++--------
1 file changed, 58 insertions(+), 49 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/groupHeader.html b/ruoyi-admin/src/main/resources/templates/demo/table/groupHeader.html
index 27d2b8d60..6c7c2e666 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/table/groupHeader.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/table/groupHeader.html
@@ -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('编辑 ');
+ actions.push('删除');
+ 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('编辑 ');
+ actions.push('删除');
+ 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('编辑 ');
- actions.push('删除');
- return actions.join('');
- }
- }
- ]
- ]
+ columns : columns_2
};
$.table.init(options);
});