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
64f0e9d2
Commit
64f0e9d2
authored
Sep 20, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始多表格demo修改
parent
d5d2ae1d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
28 deletions
+84
-28
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+13
-5
ruoyi-admin/src/main/resources/templates/demo/table/curd.html
+1
-1
ruoyi-admin/src/main/resources/templates/demo/table/multi.html
+69
-21
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
+1
-1
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
64f0e9d2
...
...
@@ -245,9 +245,9 @@
}
},
// 搜索-默认第一个form
search
:
function
(
formId
,
data
)
{
search
:
function
(
formId
,
tableId
,
data
)
{
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
var
params
=
$
.
btTable
.
bootstrapTable
(
'getOptions'
);
var
params
=
$
.
common
.
isEmpty
(
tableId
)
?
$
.
btTable
.
bootstrapTable
(
'getOptions'
)
:
$
(
"#"
+
tableId
)
.
bootstrapTable
(
'getOptions'
);
params
.
queryParams
=
function
(
params
)
{
var
search
=
$
.
common
.
formToJSON
(
currentId
);
if
(
$
.
common
.
isNotEmpty
(
data
)){
...
...
@@ -262,7 +262,11 @@
search
.
isAsc
=
params
.
order
;
return
search
;
}
$
.
btTable
.
bootstrapTable
(
'refresh'
,
params
);
if
(
$
.
common
.
isNotEmpty
(
tableId
)){
$
(
"#"
+
tableId
).
bootstrapTable
(
'refresh'
,
params
);
}
else
{
$
.
btTable
.
bootstrapTable
(
'refresh'
,
params
);
}
},
// 导出数据
exportExcel
:
function
(
formId
)
{
...
...
@@ -478,11 +482,15 @@
// 表单封装处理
form
:
{
// 表单重置
reset
:
function
(
formId
)
{
reset
:
function
(
formId
,
tableId
)
{
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
$
(
"#"
+
currentId
)[
0
].
reset
();
if
(
$
.
table
.
_option
.
type
==
table_type
.
bootstrapTable
)
{
$
.
btTable
.
bootstrapTable
(
'refresh'
);
if
(
$
.
common
.
isEmpty
(
tableId
)){
$
.
btTable
.
bootstrapTable
(
'refresh'
);
}
else
{
$
(
"#"
+
tableId
).
bootstrapTable
(
'refresh'
);
}
}
},
// 获取选中复选框项
...
...
ruoyi-admin/src/main/resources/templates/demo/table/curd.html
View file @
64f0e9d2
...
...
@@ -15,7 +15,7 @@
<a
class=
"btn btn-danger"
onclick=
"removeRowByUniqueId()"
>
<i
class=
"fa fa-remove"
></i>
根据值删除行
</a>
<a
class=
"btn btn-danger"
onclick=
"removeRowAll()"
>
<a
class=
"btn btn-danger"
onclick=
"removeRowAll()"
>
<i
class=
"fa fa-remove"
></i>
删除所有行
</a>
<a
class=
"btn btn-info"
onclick=
"updateRow()"
>
...
...
ruoyi-admin/src/main/resources/templates/demo/table/multi.html
View file @
64f0e9d2
...
...
@@ -4,15 +4,71 @@
<th:block
th:include=
"include :: header('初始多表格')"
/>
</head>
<body
class=
"gray-bg"
>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 search-collapse"
>
<form
id=
"form1"
>
<div
class=
"select-list"
>
<ul>
<li>
用户名称:
<input
type=
"text"
name=
"userName"
/>
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search('form1', 'bootstrap-table1')"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"$.form.reset('form1', 'bootstrap-table1')"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
</form>
</div>
<div
class=
"btn-group-sm"
id=
"toolbar1"
role=
"group"
>
<a
class=
"btn btn-success"
>
<i
class=
"fa fa-plus"
></i>
新增
</a>
<a
class=
"btn btn-primary"
>
<i
class=
"fa fa-edit"
></i>
修改
</a>
<a
class=
"btn btn-danger"
>
<i
class=
"fa fa-remove"
></i>
删除
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table
-
1"
data-mobile-responsive=
"true"
></table>
<table
id=
"bootstrap-table1"
data-mobile-responsive=
"true"
></table>
</div>
</div>
<div
class=
"row"
>
</div>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 search-collapse"
>
<form
id=
"form2"
>
<div
class=
"select-list"
>
<ul>
<li>
用户名称:
<input
type=
"text"
name=
"userName"
/>
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search('form2', 'bootstrap-table2')"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"$.form.reset('form2', 'bootstrap-table2')"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
</form>
</div>
<div
class=
"btn-group-sm"
id=
"toolbar2"
role=
"group"
>
<a
class=
"btn btn-success"
>
<i
class=
"fa fa-plus"
></i>
新增
</a>
<a
class=
"btn btn-primary"
>
<i
class=
"fa fa-edit"
></i>
修改
</a>
<a
class=
"btn btn-danger"
>
<i
class=
"fa fa-remove"
></i>
删除
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table
-
2"
data-mobile-responsive=
"true"
></table>
<table
id=
"bootstrap-table2"
data-mobile-responsive=
"true"
></table>
</div>
</div>
</div>
...
...
@@ -23,12 +79,9 @@
$
(
function
()
{
var
options
=
{
id
:
"bootstrap-table-1"
,
id
:
"bootstrap-table1"
,
toolbar
:
"toolbar1"
,
url
:
prefix
+
"/list"
,
createUrl
:
prefix
+
"/add"
,
updateUrl
:
prefix
+
"/edit/{id}"
,
removeUrl
:
prefix
+
"/remove"
,
exportUrl
:
prefix
+
"/export"
,
showSearch
:
false
,
showRefresh
:
false
,
showToggle
:
false
,
...
...
@@ -73,8 +126,8 @@
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>'
);
actions
.
push
(
'<a class="btn btn-success btn-xs" href="
javascript:void(0)
"><i class="fa fa-edit"></i>编辑</a> '
);
actions
.
push
(
'<a class="btn btn-danger btn-xs" href="
javascript:void(0)
"><i class="fa fa-remove"></i>删除</a>'
);
return
actions
.
join
(
''
);
}
}]
...
...
@@ -82,21 +135,16 @@
$
.
table
.
init
(
options
);
});
function
queryParams
(
params
)
{
var
search
=
$
.
table
.
queryParams
(
params
);
search
.
userName
=
'测试1'
;
return
search
;
}
$
(
function
()
{
var
options
=
{
id
:
"bootstrap-table-2"
,
id
:
"bootstrap-table2"
,
toolbar
:
"toolbar2"
,
url
:
prefix
+
"/list"
,
showSearch
:
false
,
showRefresh
:
false
,
showToggle
:
false
,
showColumns
:
false
,
queryParams
:
queryParams
,
columns
:
[{
checkbox
:
true
},
...
...
@@ -137,8 +185,8 @@
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>'
);
actions
.
push
(
'<a class="btn btn-success btn-xs" href="
javascript:void(0)
"><i class="fa fa-edit"></i>编辑</a> '
);
actions
.
push
(
'<a class="btn btn-danger btn-xs" href="
javascript:void(0)
"><i class="fa fa-remove"></i>删除</a>'
);
return
actions
.
join
(
''
);
}
}]
...
...
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
View file @
64f0e9d2
...
...
@@ -151,7 +151,7 @@
function
searchPre
()
{
var
data
=
{};
data
.
businessTypes
=
$
.
common
.
join
(
$
(
'#businessTypes'
).
selectpicker
(
'val'
));
$
.
table
.
search
(
'operlog-form'
,
data
);
$
.
table
.
search
(
'operlog-form'
,
'bootstrap-table'
,
data
);
}
function
resetPre
()
{
...
...
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