Browse Source

[fix]:修复固定列展示问题

dev
youjianchi 10 months ago
parent
commit
1a6cc4f245
  1. 323
      ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js
  2. 31
      ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
  3. 18
      ruoyi-admin/src/main/resources/templates/demo/table/fixedColumns.html
  4. 4
      ruoyi-admin/src/main/resources/templates/erp/material/material.html
  5. 2
      ruoyi-admin/src/main/resources/templates/include.html

323
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js

File diff suppressed because one or more lines are too long

31
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css

@ -935,7 +935,7 @@ table.rc-table-resizing thead > th > a {
/** 表格冻结列样式 **/
.left-fixed-table-columns, .left-fixed-body-columns {
/*.left-fixed-table-columns, .left-fixed-body-columns {
position: absolute;
background-color: #fff;
display: none;
@ -966,6 +966,35 @@ table.rc-table-resizing thead > th > a {
.bootstrap-table .table-hover > tbody > tr.hover > td {
background-color: #f5f5f5;
}*/
/** 表格冻结列样式 **/
.fixed-columns, .fixed-columns-right {
position: absolute;
top: 0;
height: 100%;
background-color: #fff;
box-sizing: border-box;
z-index: 1;
border-width: 0 0 0 1px;
-webkit-box-shadow: 0 0 10px rgba(0,0,0,.12);
box-shadow: 0 0 10px rgba(0,0,0,.12);
}
.fixed-columns {
left: 0;
}
.fixed-columns .fixed-table-body {
overflow: hidden !important;
}
.fixed-columns-right {
right: 0;
}
.fixed-columns-right .fixed-table-body {
overflow-x: hidden !important;
}
/** 表格树样式 **/

18
ruoyi-admin/src/main/resources/templates/demo/table/fixedColumns.html

@ -34,10 +34,9 @@
showRefresh: false,
showToggle: false,
showColumns: false,
// fixedColumns: true, // 启用冻结左列
// fixedNumber: 3, // 冻结左列个数
rightFixedColumns: true, // 启用冻结右列
rightFixedNumber: 1, // 冻结右列个数
fixedColumns: true,
fixedNumber: 0,
fixedRightNumber: 1,
columns: [{
checkbox: true
},
@ -136,6 +135,17 @@
{
field : 'userBalance',
title : '测试16'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit()"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="showdetails()"><i class="fa fa-eye"></i>详情</a> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showMaterial()"><i class="fa fa-file-o"></i>审核</a> ');
return actions.join('');
}
}]
};
$.table.init(options);

4
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -435,8 +435,8 @@
exportUrl: prefix + "/export",
detailUrl: prefix + "/edit/{id}",
modalName: "物料信息",
rightFixedColumns: true, // 启用冻结右
rightFixedNumber: 1, // 冻结右列个数
fixedColumns: true, // 启用冻结
fixedRightNumber: 1, // 冻结右列个数
columns: [{
checkbox: true
},

2
ruoyi-admin/src/main/resources/templates/include.html

@ -220,7 +220,7 @@
<link th:href="@{/ajax/libs/bootstrap-table/extensions/fixed-columns/css/bootstrap-table-fixed-columns.css}" rel="stylesheet"/>
</div>
<div th:fragment="bootstrap-table-fixed-columns-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/fixed-columns/js/bootstrap-table-fixed-columns.js?v=20210202}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js?v=20210202}"></script>
</div>
<div th:fragment="bootstrap-table-fixed-columns-min-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.min.js?v=20210202}"></script>

Loading…
Cancel
Save