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
f96328ea
Commit
f96328ea
authored
Jan 02, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整表格树兼容父节点判断
parent
2d55917f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
15 deletions
+28
-15
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
+0
-0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js
+12
-9
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
+15
-5
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+1
-1
No files found.
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
View file @
f96328ea
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js
View file @
f96328ea
...
...
@@ -241,19 +241,22 @@
// 缓存并格式化数据
var
formatData
=
function
(
data
)
{
var
_root
=
options
.
rootIdValue
?
options
.
rootIdValue
:
null
;
var
firstCode
=
data
[
0
][
options
.
parentCode
];
// 父节点属性列表
var
parentCodes
=
[];
var
rootFlag
=
false
;
$
.
each
(
data
,
function
(
index
,
item
)
{
if
(
$
.
inArray
(
item
[
options
.
parentCode
],
parentCodes
)
==
-
1
){
parentCodes
.
push
(
item
[
options
.
parentCode
]);
}
});
$
.
each
(
data
,
function
(
index
,
item
)
{
// 添加一个默认属性,用来判断当前节点有没有被显示
item
.
isShow
=
false
;
// 这里兼容几种常见Root节点写法
// 默认的几种判断
var
_defaultRootFlag
=
item
[
options
.
parentCode
]
==
'0'
||
item
[
options
.
parentCode
]
==
0
||
item
[
options
.
parentCode
]
==
null
||
item
[
options
.
parentCode
]
==
firstCode
||
item
[
options
.
parentCode
]
==
''
;
// 顶级节点校验判断
var
_defaultRootFlag
=
$
.
inArray
(
item
[
options
.
code
],
parentCodes
)
>
0
&&
!
rootFlag
;
if
(
!
item
[
options
.
parentCode
]
||
(
_root
?
(
item
[
options
.
parentCode
]
==
options
.
rootIdValue
)
:
_defaultRootFlag
))
{
if
(
!
target
.
data_list
[
"_root_"
])
{
rootFlag
=
true
;
if
(
!
target
.
data_list
[
"_root_"
])
{
target
.
data_list
[
"_root_"
]
=
[];
}
if
(
!
target
.
data_obj
[
"id_"
+
item
[
options
.
code
]])
{
...
...
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
View file @
f96328ea
...
...
@@ -817,12 +817,26 @@ label {
border
:
0px
!important
;
}
.table-striped
.table
,
.table-striped
.table
,
.table
>
thead
>
tr
>
th
,
.table
>
tbody
>
tr
>
th
,
.table
>
tfoot
>
tr
>
th
,
.table
>
thead
>
tr
>
td
,
.table
>
tbody
>
tr
>
td
,
.
table
>
tfoot
>
tr
>
td
{
.table-striped
table
>
thead
>
tr
>
th
,
.table-striped
table
>
tbody
>
tr
>
th
,
.table-striped
table
>
tfoot
>
tr
>
th
,
.table-striped
table
>
thead
>
tr
>
td
,
.table-striped
table
>
tbody
>
tr
>
td
,
.table-striped
table
>
tfoot
>
tr
>
td
{
border-bottom
:
1px
solid
#e7eaec
!important
;
background-color
:
transparent
;
border
:
0px
;
}
.table-bordered
table
>
thead
>
tr
>
th
:first-child
,
.table-bordered
table
>
tbody
>
tr
>
td
:first-child
{
border-left
:
1px
solid
#ddd
;
}
.table-bordered
table
>
thead
>
tr
>
th
:last-child
,
.table-bordered
table
>
tbody
>
tr
>
td
:last-child
{
border-right
:
1px
solid
#ddd
;
}
.table-bordered
table
>
thead
>
tr
>
th
,
.table-bordered
table
>
tbody
>
tr
>
td
{
border-top
:
1px
solid
#ddd
!important
;
border-bottom
:
1px
solid
#ddd
;
}
.fixed-table-footer
{
border-top
:
0px
solid
#ddd
;
}
...
...
@@ -844,10 +858,6 @@ label {
background-color
:
#eff3f8
;
}
.table-bordered
td
,
.table-bordered
th
{
border
:
1px
solid
#ddd
!important
}
.fixed-table-container
thead
th
>
.both
{
display
:
inline-block
}
...
...
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
f96328ea
...
...
@@ -528,7 +528,7 @@ var table = {
height
:
options
.
height
,
// 表格树的高度
expandColumn
:
options
.
expandColumn
,
// 在哪一列上面显示展开按钮
striped
:
options
.
striped
,
// 是否显示行间隔色
bordered
:
true
,
// 是否显示边框
bordered
:
false
,
// 是否显示边框
toolbar
:
'#'
+
options
.
toolbar
,
// 指定工作栏
showSearch
:
options
.
showSearch
,
// 是否显示检索信息
showRefresh
:
options
.
showRefresh
,
// 是否显示刷新按钮
...
...
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