Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
c923dae6
Commit
c923dae6
authored
Jul 21, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冻结列适配固定高度
parent
7b090247
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
17 deletions
+54
-17
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
+1
-3
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js
+33
-11
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
+19
-2
ruoyi-admin/src/main/resources/templates/demo/form/wizard.html
+1
-1
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
View file @
c923dae6
...
...
@@ -108,12 +108,10 @@ public class SysDeptController extends BaseController
{
return
error
(
"修改部门'"
+
dept
.
getDeptName
()
+
"'失败,部门名称已存在"
);
}
if
(
dept
.
getParentId
().
equals
(
dept
.
getDeptId
()))
else
if
(
dept
.
getParentId
().
equals
(
dept
.
getDeptId
()))
{
return
error
(
"修改部门'"
+
dept
.
getDeptName
()
+
"'失败,上级部门不能是自己"
);
}
dept
.
setUpdateBy
(
ShiroUtils
.
getLoginName
());
return
toAjax
(
deptService
.
updateDept
(
dept
));
}
...
...
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js
View file @
c923dae6
/**
* 基于bootstrap-table-fixed-columns修改
* 支持左右列冻结
* 支持左右列冻结
、支持固定高度
* Copyright (c) 2019 ruoyi
*/
(
function
(
$
)
{
...
...
@@ -22,17 +22,25 @@
this
.
timeoutHeaderColumns_
=
0
;
this
.
timeoutBodyColumns_
=
0
;
if
(
this
.
options
.
fixedColumns
)
{
this
.
$fixed
Body
=
$
([
this
.
$fixed
Header
=
$
([
'<div class="left-fixed-table-columns">'
,
'<table>'
,
'<thead></thead>'
,
'<tbody></tbody>'
,
'</table>'
,
'</div>'
].
join
(
''
));
this
.
$fixedHeader
.
find
(
'table'
).
attr
(
'class'
,
this
.
$el
.
attr
(
'class'
));
this
.
$fixedHeaderColumns
=
this
.
$fixedHeader
.
find
(
'thead'
);
this
.
$tableHeader
.
before
(
this
.
$fixedHeader
);
this
.
$fixedBody
=
$
([
'<div class="left-fixed-body-columns">'
,
'<table>'
,
'<tbody></tbody>'
,
'</table>'
,
'</div>'
].
join
(
''
));
this
.
$fixedBody
.
find
(
'table'
).
attr
(
'class'
,
this
.
$el
.
attr
(
'class'
));
this
.
$fixedHeaderColumns
=
this
.
$fixedBody
.
find
(
'thead'
);
this
.
$fixedBodyColumns
=
this
.
$fixedBody
.
find
(
'tbody'
);
this
.
$tableBody
.
before
(
this
.
$fixedBody
);
}
...
...
@@ -167,12 +175,11 @@
if
(
that
.
options
.
detailView
&&
!
that
.
options
.
cardView
)
{
index
=
i
-
1
;
}
that
.
$fixedBody
.
find
(
'thead th[data-field="'
+
visibleFields
[
index
]
+
'"]'
)
.
find
(
'.fht-cell'
).
width
(
$this
.
innerWidth
()
-
1
);
that
.
$fixedHeader
.
find
(
'thead th[data-field="'
+
visibleFields
[
index
]
+
'"]'
)
.
find
(
'.fht-cell'
).
width
(
$this
.
innerWidth
());
headerWidth
+=
$this
.
outerWidth
();
});
this
.
$fixed
Body
.
width
(
headerWidth
-
1
).
show
();
this
.
$fixed
Header
.
width
(
headerWidth
+
2
).
show
();
}
if
(
that
.
options
.
rightFixedColumns
)
{
this
.
$body
.
find
(
'tr:first-child:not(.no-records-found) > *'
).
each
(
function
(
i
)
{
...
...
@@ -197,17 +204,32 @@
BootstrapTable
.
prototype
.
fitBodyColumns
=
function
()
{
var
that
=
this
,
top
=
-
(
parseInt
(
this
.
$el
.
css
(
'margin-top'
))
-
2
),
height
=
this
.
$tableBody
.
height
()
-
2
;
top
=
-
(
parseInt
(
this
.
$el
.
css
(
'margin-top'
))),
height
=
this
.
$tableBody
.
height
();
if
(
that
.
options
.
fixedColumns
)
{
if
(
!
this
.
$body
.
find
(
'> tr[data-index]'
).
length
)
{
this
.
$fixedBody
.
hide
();
return
;
}
if
(
!
this
.
options
.
height
)
{
top
=
this
.
$fixedHeader
.
height
()
-
1
;
height
=
height
-
top
;
}
this
.
$fixedBody
.
css
({
width
:
this
.
$fixedHeader
.
width
(),
height
:
height
,
top
:
top
+
1
}).
show
();
this
.
$body
.
find
(
'> tr'
).
each
(
function
(
i
)
{
that
.
$fixedBody
.
find
(
'tbody tr:eq('
+
i
+
')'
).
height
(
$
(
this
).
height
());
that
.
$fixedBody
.
find
(
'tr:eq('
+
i
+
')'
).
height
(
$
(
this
).
height
()
-
0.5
);
var
thattds
=
this
;
that
.
$fixedBody
.
find
(
'tr:eq('
+
i
+
')'
).
find
(
'td'
).
each
(
function
(
j
)
{
$
(
this
).
width
(
$
(
$
(
thattds
).
find
(
'td'
)[
j
]).
width
()
+
1
);
});
});
$
.
btTable
.
on
(
"check.bs.table uncheck.bs.table"
,
function
(
e
,
rows
,
$element
)
{
...
...
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
View file @
c923dae6
...
...
@@ -816,14 +816,31 @@ label {
}
/** 表格冻结列样式 **/
.left-fixed-table-columns
{
.left-fixed-table-columns
,
.left-fixed-body-columns
{
position
:
absolute
;
background-color
:
#fff
;
display
:
none
;
bo
rder-right
:
1px
solid
#ddd
;
bo
x-sizing
:
border-box
;
overflow
:
hidden
;
}
.left-fixed-table-columns
.table
,
.left-fixed-body-columns
.table
{
border-right
:
1px
solid
#ddd
;
}
.left-fixed-table-columns
.table.table-no-bordered
,
.left-fixed-body-columns
.table.table-no-bordered
{
border-right
:
1px
solid
transparent
;
}
.left-fixed-body-columns
table
{
position
:
absolute
;
animation
:
none
;
}
.bootstrap-table
.table-hover
>
tbody
>
tr
.hover
>
td
{
background-color
:
#f5f5f5
;
}
.right-fixed-table-columns
{
position
:
absolute
;
right
:
63px
;
...
...
ruoyi-admin/src/main/resources/templates/demo/form/wizard.html
View file @
c923dae6
...
...
@@ -74,7 +74,7 @@
下面这个示例展示了如何在表单向导中使用 jQuery Validation 插件
</p>
<form
id=
"form"
action=
"
http://www.zi-han.net/theme/hplus/form_wizard.html#
"
class=
"wizard-big"
>
<form
id=
"form"
action=
""
class=
"wizard-big"
>
<h1>
账户
</h1>
<fieldset>
<h2>
账户信息
</h2>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment