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
65d01c2c
Commit
65d01c2c
authored
May 29, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加一些触发的事件
parent
202bf1ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
18 deletions
+32
-18
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+31
-17
ruoyi-system/src/main/resources/mapper/system/SysUserOnlineMapper.xml
+1
-1
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
65d01c2c
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
sortOrder
:
"asc"
,
sortOrder
:
"asc"
,
pagination
:
true
,
pagination
:
true
,
pageSize
:
10
,
pageSize
:
10
,
pageList
:
[
10
,
25
,
50
],
toolbar
:
"toolbar"
,
toolbar
:
"toolbar"
,
striped
:
false
,
striped
:
false
,
escape
:
false
,
escape
:
false
,
...
@@ -57,7 +58,7 @@
...
@@ -57,7 +58,7 @@
pagination
:
options
.
pagination
,
// 是否显示分页(*)
pagination
:
options
.
pagination
,
// 是否显示分页(*)
pageNumber
:
1
,
// 初始化加载第一页,默认第一页
pageNumber
:
1
,
// 初始化加载第一页,默认第一页
pageSize
:
options
.
pageSize
,
// 每页的记录行数(*)
pageSize
:
options
.
pageSize
,
// 每页的记录行数(*)
pageList
:
[
10
,
25
,
50
],
// 可供选择的每页的行数(*)
pageList
:
options
.
pageList
,
// 可供选择的每页的行数(*)
escape
:
options
.
escape
,
// 转义HTML字符串
escape
:
options
.
escape
,
// 转义HTML字符串
showFooter
:
options
.
showFooter
,
// 是否显示表尾
showFooter
:
options
.
showFooter
,
// 是否显示表尾
iconSize
:
'outline'
,
// 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
iconSize
:
'outline'
,
// 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
...
@@ -72,6 +73,9 @@
...
@@ -72,6 +73,9 @@
showExport
:
options
.
showExport
,
// 是否支持导出文件
showExport
:
options
.
showExport
,
// 是否支持导出文件
clickToSelect
:
options
.
clickToSelect
,
// 是否启用点击选中行
clickToSelect
:
options
.
clickToSelect
,
// 是否启用点击选中行
onClickRow
:
options
.
onClickRow
,
// 点击某行触发的事件
onClickRow
:
options
.
onClickRow
,
// 点击某行触发的事件
onDblClickRow
:
options
.
onDblClickRow
,
// 双击某行触发的事件
onClickCell
:
options
.
onClickCell
,
// 单击某格触发的事件
onDblClickCell
:
options
.
onDblClickCell
,
// 双击某格触发的事件
rememberSelected
:
options
.
rememberSelected
,
// 启用翻页记住前面的选择
rememberSelected
:
options
.
rememberSelected
,
// 启用翻页记住前面的选择
fixedColumns
:
options
.
fixedColumns
,
// 是否启用冻结列(左侧)
fixedColumns
:
options
.
fixedColumns
,
// 是否启用冻结列(左侧)
fixedNumber
:
options
.
fixedNumber
,
// 列冻结的个数(左侧)
fixedNumber
:
options
.
fixedNumber
,
// 列冻结的个数(左侧)
...
@@ -87,17 +91,22 @@
...
@@ -87,17 +91,22 @@
},
},
// 查询条件
// 查询条件
queryParams
:
function
(
params
)
{
queryParams
:
function
(
params
)
{
return
{
var
curParams
=
{
// 传递参数查询参数
// 传递参数查询参数
pageSize
:
params
.
limit
,
pageSize
:
params
.
limit
,
pageNum
:
params
.
offset
/
params
.
limit
+
1
,
pageNum
:
params
.
offset
/
params
.
limit
+
1
,
searchValue
:
params
.
search
,
searchValue
:
params
.
search
,
orderByColumn
:
params
.
sort
,
orderByColumn
:
params
.
sort
,
isAsc
:
params
.
order
isAsc
:
params
.
order
};
};
var
currentId
=
$
.
common
.
isEmpty
(
$
.
table
.
_option
.
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
$
.
table
.
_option
.
formId
;
return
$
.
extend
(
curParams
,
$
.
common
.
formToJSON
(
currentId
));
},
},
// 请求获取数据后处理回调函数
// 请求获取数据后处理回调函数
responseHandler
:
function
(
res
)
{
responseHandler
:
function
(
res
)
{
if
(
typeof
$
.
table
.
_option
.
responseHandler
==
"function"
)
{
options
.
responseHandler
(
res
);
}
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
if
(
$
.
common
.
isNotEmpty
(
$
.
table
.
_option
.
sidePagination
)
&&
$
.
table
.
_option
.
sidePagination
==
'client'
)
{
if
(
$
.
common
.
isNotEmpty
(
$
.
table
.
_option
.
sidePagination
)
&&
$
.
table
.
_option
.
sidePagination
==
'client'
)
{
return
res
.
rows
;
return
res
.
rows
;
...
@@ -153,6 +162,9 @@
...
@@ -153,6 +162,9 @@
},
},
// 当所有数据被加载时触发
// 当所有数据被加载时触发
onLoadSuccess
:
function
(
data
)
{
onLoadSuccess
:
function
(
data
)
{
if
(
typeof
$
.
table
.
_option
.
onLoadSuccess
==
"function"
)
{
$
.
table
.
_option
.
onLoadSuccess
(
data
);
}
// 浮动提示框特效
// 浮动提示框特效
$
(
"[data-toggle='tooltip']"
).
tooltip
();
$
(
"[data-toggle='tooltip']"
).
tooltip
();
},
},
...
@@ -209,10 +221,7 @@
...
@@ -209,10 +221,7 @@
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
var
params
=
$
(
"#"
+
$
.
table
.
_option
.
id
).
bootstrapTable
(
'getOptions'
);
var
params
=
$
(
"#"
+
$
.
table
.
_option
.
id
).
bootstrapTable
(
'getOptions'
);
params
.
queryParams
=
function
(
params
)
{
params
.
queryParams
=
function
(
params
)
{
var
search
=
{};
var
search
=
$
.
common
.
formToJSON
(
currentId
);
$
.
each
(
$
(
"#"
+
currentId
).
serializeArray
(),
function
(
i
,
field
)
{
search
[
field
.
name
]
=
field
.
value
;
});
if
(
$
.
common
.
isNotEmpty
(
data
)){
if
(
$
.
common
.
isNotEmpty
(
data
)){
$
.
each
(
data
,
function
(
key
)
{
$
.
each
(
data
,
function
(
key
)
{
search
[
key
]
=
data
[
key
];
search
[
key
]
=
data
[
key
];
...
@@ -412,10 +421,7 @@
...
@@ -412,10 +421,7 @@
// 条件查询
// 条件查询
search
:
function
(
formId
)
{
search
:
function
(
formId
)
{
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
var
params
=
{};
var
params
=
$
.
common
.
formToJSON
(
currentId
);
$
.
each
(
$
(
"#"
+
currentId
).
serializeArray
(),
function
(
i
,
field
)
{
params
[
field
.
name
]
=
field
.
value
;
});
$
.
_treeTable
.
bootstrapTreeTable
(
'refresh'
,
params
);
$
.
_treeTable
.
bootstrapTreeTable
(
'refresh'
,
params
);
},
},
// 刷新
// 刷新
...
@@ -1260,6 +1266,14 @@
...
@@ -1260,6 +1266,14 @@
return
null
;
return
null
;
}
}
return
array
.
join
(
separator
);
return
array
.
join
(
separator
);
},
// 获取form下所有的字段并转换为json对象
formToJSON
:
function
(
formId
)
{
var
json
=
{};
$
.
each
(
$
(
"#"
+
formId
).
serializeArray
(),
function
(
i
,
field
)
{
json
[
field
.
name
]
=
field
.
value
;
});
return
json
;
}
}
}
}
});
});
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserOnlineMapper.xml
View file @
65d01c2c
...
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectOnlineVo"
>
<sql
id=
"selectOnlineVo"
>
select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, sta
tus, sta
rt_timestamp, last_access_time, expire_time
select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time
from sys_user_online
from sys_user_online
</sql>
</sql>
...
...
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