Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
53d83083
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1195
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
53d83083
编写于
10月 18, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
菜单和icon关联
上级
7cf05919
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
187 addition
and
5 deletion
+187
-5
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysEveIconDao.java
...src/main/java/com/skyeye/authority/dao/SysEveIconDao.java
+2
-0
skyeye-service/src/main/java/com/skyeye/authority/service/SysEveIconService.java
.../java/com/skyeye/authority/service/SysEveIconService.java
+2
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveIconServiceImpl.java
.../skyeye/authority/service/impl/SysEveIconServiceImpl.java
+21
-0
skyeye-web/src/main/java/com/skyeye/authority/controller/SysEveIconController.java
...com/skyeye/authority/controller/SysEveIconController.java
+16
-0
skyeye-web/src/main/resources/dbmapper/SysEveIconMapper.xml
skyeye-web/src/main/resources/dbmapper/SysEveIconMapper.xml
+8
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+4
-0
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
+8
-2
skyeye-web/src/main/webapp/assets/lib/layui/layui.js
skyeye-web/src/main/webapp/assets/lib/layui/layui.js
+1
-1
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
+8
-0
skyeye-web/src/main/webapp/js/sysevemenu/icon.js
skyeye-web/src/main/webapp/js/sysevemenu/icon.js
+36
-0
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenuadd.js
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenuadd.js
+20
-1
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenuedit.js
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenuedit.js
+19
-0
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenulist.js
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenulist.js
+3
-0
skyeye-web/src/main/webapp/tpl/syseveicon/icon-item.tpl
skyeye-web/src/main/webapp/tpl/syseveicon/icon-item.tpl
+1
-1
skyeye-web/src/main/webapp/tpl/sysevemenu/icon-item.tpl
skyeye-web/src/main/webapp/tpl/sysevemenu/icon-item.tpl
+16
-0
skyeye-web/src/main/webapp/tpl/sysevemenu/icon.html
skyeye-web/src/main/webapp/tpl/sysevemenu/icon.html
+22
-0
未找到文件。
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysEveIconDao.java
浏览文件 @
53d83083
...
...
@@ -21,4 +21,6 @@ public interface SysEveIconDao {
public
int
editSysIconMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysIconListToMenu
(
Map
<
String
,
Object
>
map
,
PageBounds
pageBounds
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/SysEveIconService.java
浏览文件 @
53d83083
...
...
@@ -15,5 +15,7 @@ public interface SysEveIconService {
public
void
editSysIconMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysIconListToMenu
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveIconServiceImpl.java
浏览文件 @
53d83083
...
...
@@ -120,6 +120,27 @@ public class SysEveIconServiceImpl implements SysEveIconService{
outputObject
.
setreturnMessage
(
"该ICON属性已存在,不可进行二次保存"
);
}
}
/**
*
* @Title: querySysIconListToMenu
* @Description: 获取ICON列表供menu菜单使用
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysIconListToMenu
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
sysEveIconDao
.
querySysIconListToMenu
(
map
,
new
PageBounds
(
Integer
.
parseInt
(
map
.
get
(
"page"
).
toString
()),
Integer
.
parseInt
(
map
.
get
(
"limit"
).
toString
())));
PageList
<
Map
<
String
,
Object
>>
beansPageList
=
(
PageList
<
Map
<
String
,
Object
>>)
beans
;
int
total
=
beansPageList
.
getPaginator
().
getTotalCount
();
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
total
);
}
...
...
skyeye-web/src/main/java/com/skyeye/authority/controller/SysEveIconController.java
浏览文件 @
53d83083
...
...
@@ -95,4 +95,20 @@ public class SysEveIconController {
sysEveIconService
.
editSysIconMationById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysIconListToMenu
* @Description: 获取ICON列表供menu菜单使用
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysEveIconController/querySysIconListToMenu"
)
@ResponseBody
public
void
querySysIconListToMenu
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysEveIconService
.
querySysIconListToMenu
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/SysEveIco
m
Mapper.xml
→
skyeye-web/src/main/resources/dbmapper/SysEveIco
n
Mapper.xml
浏览文件 @
53d83083
...
...
@@ -70,4 +70,12 @@
WHERE id = #{id}
</update>
<select
id=
"querySysIconListToMenu"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.icon_class iconClass
FROM
sys_eve_icon a
</select>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
53d83083
...
...
@@ -126,6 +126,10 @@
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"icon属性id"
/>
<property
id=
"iconClass"
name=
"iconClass"
ref=
"required"
var=
"icon属性"
/>
</url>
<url
id=
"icon006"
path=
"/post/SysEveIconController/querySysIconListToMenu"
val=
"获取ICON列表供menu菜单使用"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
</url>
<url
id=
"database001"
path=
"/post/SysDataBaseController/querySysDataBaseList"
val=
"获取数据库信息"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
...
...
skyeye-web/src/main/webapp/assets/lib/layui/custom.js
浏览文件 @
53d83083
...
...
@@ -29,6 +29,12 @@ function _openNewWindows(mation){
s
+=
"
&
"
+
param
+
"
=
"
+
mation
.
params
[
param
];
mation
.
url
=
mation
.
url
+
"
?
"
+
s
.
slice
(
1
);
}
if
(
isNull
(
mation
.
area
)){
mation
.
area
=
[
window
.
screen
.
width
/
2
+
'
px
'
,
window
.
screen
.
height
/
2
+
'
px
'
];
}
if
(
isNull
(
mation
.
offset
)){
mation
.
offset
=
[
'
15vh
'
,
'
20vw
'
];
}
var
index
=
layer
.
load
(
1
);
refreshCode
=
""
;
layui
.
$
.
ajax
({
...
...
@@ -44,8 +50,8 @@ function _openNewWindows(mation){
type
:
2
,
title
:
mation
.
title
,
content
:
mation
.
url
,
area
:
[
window
.
screen
.
width
/
2
+
'
px
'
,
window
.
screen
.
height
/
2
+
'
px
'
]
,
offset
:
[
'
15vh
'
,
'
20vw
'
]
,
area
:
mation
.
area
,
offset
:
mation
.
offset
,
end
:
function
(){
if
(
typeof
(
mation
.
callBack
)
==
"
function
"
)
{
mation
.
callBack
(
refreshCode
);
...
...
skyeye-web/src/main/webapp/assets/lib/layui/layui.js
浏览文件 @
53d83083
...
...
@@ -46,7 +46,7 @@ var getFileContent = function(url){
//判断内容是否为空
function
isNull
(
str
){
if
(
str
==
null
||
str
==
""
||
str
==
''
||
str
==
"
null
"
){
if
(
str
==
null
||
str
==
""
||
str
==
''
||
str
==
"
null
"
||
str
==
"
undefined
"
){
return
true
;
}
else
{
return
false
;
...
...
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
浏览文件 @
53d83083
...
...
@@ -2010,6 +2010,7 @@ body .layer-ext-winconfirm {
.item
{
padding-top
:
10px
;
height
:
140px
;
}
.icon-item
{
...
...
@@ -2022,6 +2023,13 @@ body .layer-ext-winconfirm {
font-size
:
50px
;
}
.icon-class
{
height
:
30px
;
}
.icon-item
>
span
{
}
.icon-item
>
div
{
text-align
:
center
;
margin-top
:
10px
;
...
...
skyeye-web/src/main/webapp/js/sysevemenu/icon.js
0 → 100644
浏览文件 @
53d83083
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
winui
.
renderColor
();
var
$
=
layui
.
$
;
//初始化数据
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
icon006
"
,
params
:
{},
pagination
:
true
,
pagesize
:
18
,
template
:
getFileContent
(
'
tpl/sysevemenu/icon-item.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
},
options
:
{
'
click .choose
'
:
function
(
i
,
row
){
parent
.
childIcon
=
row
.
iconClass
;
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
},
ajaxSendAfter
:
function
(
json
){
}
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
(){
});
exports
(
'
icon
'
,
{});
});
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenuadd.js
浏览文件 @
53d83083
var
childIcon
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
...
...
@@ -112,7 +115,7 @@ layui.config({
}});
}
//获取菜单级别
//获取菜单级别
function
getMenuLevelName
(
level
){
if
(
level
==
'
0
'
){
return
"
创世菜单
"
;
...
...
@@ -121,6 +124,22 @@ layui.config({
}
}
//菜单图标选中事件
$
(
"
body
"
).
on
(
"
focus
"
,
"
#menuIcon
"
,
function
(
e
){
_openNewWindows
({
url
:
"
../../tpl/sysevemenu/icon.html
"
,
title
:
"
选择ICON图标
"
,
pageId
:
"
icon
"
,
area
:
[
'
640px
'
,
'
360px
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
$
(
"
#menuIcon
"
).
val
(
childIcon
);
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
//初始化加载隐藏创世菜单
$
(
"
#parentIdBox
"
).
addClass
(
"
layui-hide
"
);
...
...
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenuedit.js
浏览文件 @
53d83083
var
childIcon
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
...
...
@@ -195,6 +198,22 @@ layui.config({
}});
}
//菜单图标选中事件
$
(
"
body
"
).
on
(
"
focus
"
,
"
#menuIcon
"
,
function
(
e
){
_openNewWindows
({
url
:
"
../../tpl/sysevemenu/icon.html
"
,
title
:
"
选择ICON图标
"
,
pageId
:
"
icon
"
,
area
:
[
'
640px
'
,
'
360px
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
$
(
"
#menuIcon
"
).
val
(
childIcon
);
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
//获取菜单级别
function
getMenuLevelName
(
level
){
if
(
level
==
'
0
'
){
...
...
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenulist.js
浏览文件 @
53d83083
...
...
@@ -74,6 +74,9 @@ layui.config({
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
menuName
'
,
title
:
'
菜单名称
'
,
width
:
120
},
{
field
:
'
menuIcon
'
,
title
:
'
图标码
'
,
width
:
120
},
{
field
:
'
menuIcon
'
,
title
:
'
图标
'
,
width
:
120
,
templet
:
function
(
d
){
return
'
<i class="fa fa-fw
'
+
d
.
menuIcon
+
'
"></i>
'
;
}},
{
field
:
'
titleName
'
,
title
:
'
标题名称
'
,
width
:
120
},
{
field
:
'
menuLevel
'
,
title
:
'
菜单级别
'
,
width
:
180
,
templet
:
function
(
d
){
if
(
d
.
parentId
==
'
0
'
){
...
...
skyeye-web/src/main/webapp/tpl/syseveicon/icon-item.tpl
浏览文件 @
53d83083
...
...
@@ -4,7 +4,7 @@
<div
class=
"layui-col-xs12 icon-item"
>
<i
class=
"fa {
{
iconClass
}
} fa-fw"
></i>
</div>
<div
class=
"layui-col-xs12 icon-item"
>
<div
class=
"layui-col-xs12 icon-item
icon-class
"
>
<span>
{
{
iconClass
}
}
</span>
</div>
<div
class=
"layui-col-xs12 icon-item"
>
...
...
skyeye-web/src/main/webapp/tpl/sysevemenu/icon-item.tpl
0 → 100644
浏览文件 @
53d83083
{
{
#
each
rows
}
}
<div
class=
"layui-col-xs2 item"
>
<div
class=
"layui-col-xs12 icon-item"
>
<i
class=
"fa {
{
iconClass
}
} fa-fw"
></i>
</div>
<div
class=
"layui-col-xs12 icon-item icon-class"
>
<span>
{
{
iconClass
}
}
</span>
</div>
<div
class=
"layui-col-xs12 icon-item"
>
<div>
<a
class=
"layui-btn layui-btn-xs choose"
>
选择
</a>
</div>
</div>
</div>
{
{/
each
}
}
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/sysevemenu/icon.html
0 → 100644
浏览文件 @
53d83083
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/font-awesome-4.7.0/css/font-awesome.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"width:600px;margin:0 auto;padding-top:20px;"
>
<div
class=
"layui-col-xs12"
id=
"showForm"
>
</div>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/sysevemenu/
'
}).
use
(
'
icon
'
);
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录