Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
410aaa2d
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1437
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
410aaa2d
编写于
11月 02, 2018
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加二级菜单展示30%
上级
c1e00acf
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
292 addition
and
140 deletion
+292
-140
skyeye-common/src/main/java/com/skyeye/common/util/ToolUtil.java
...common/src/main/java/com/skyeye/common/util/ToolUtil.java
+46
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveUserServiceImpl.java
.../skyeye/authority/service/impl/SysEveUserServiceImpl.java
+1
-0
skyeye-web/src/main/resources/dbmapper/SysEveUserMapper.xml
skyeye-web/src/main/resources/dbmapper/SysEveUserMapper.xml
+3
-1
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
+36
-14
skyeye-web/src/main/webapp/assets/lib/winui/js/winui.desktop.js
...-web/src/main/webapp/assets/lib/winui/js/winui.desktop.js
+49
-14
skyeye-web/src/main/webapp/assets/lib/winui/js/winui.window.js
...e-web/src/main/webapp/assets/lib/winui/js/winui.window.js
+100
-82
skyeye-web/src/main/webapp/js/index/index.js
skyeye-web/src/main/webapp/js/index/index.js
+30
-4
skyeye-web/src/main/webapp/toolUtil.txt
skyeye-web/src/main/webapp/toolUtil.txt
+27
-25
未找到文件。
skyeye-common/src/main/java/com/skyeye/common/util/ToolUtil.java
浏览文件 @
410aaa2d
...
@@ -398,6 +398,52 @@ public class ToolUtil {
...
@@ -398,6 +398,52 @@ public class ToolUtil {
return
treeNode
;
return
treeNode
;
}
}
/**
* 使用递归建树
* @param deskTops
* @return
*/
public
static
List
<
Map
<
String
,
Object
>>
deskTopsTree
(
List
<
Map
<
String
,
Object
>>
deskTops
){
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
bean
:
deskTops
){
if
(
"0"
.
equals
(
bean
.
get
(
"parentId"
).
toString
()))
{
resultList
.
add
(
findChildren
(
bean
,
deskTops
,
0
));
}
}
for
(
Map
<
String
,
Object
>
bean
:
deskTops
){
if
(!
findChildren
(
resultList
,
bean
.
get
(
"id"
).
toString
())){
resultList
.
add
(
bean
);
}
}
return
resultList
;
}
/**
* 递归判断id是否在集合中存在
* @param treeNode
* @param id
* @return
*/
@SuppressWarnings
(
"unchecked"
)
public
static
boolean
findChildren
(
List
<
Map
<
String
,
Object
>>
treeNode
,
String
id
){
List
<
Map
<
String
,
Object
>>
child
=
null
;
for
(
Map
<
String
,
Object
>
bean
:
treeNode
){
if
(
id
.
equals
(
bean
.
get
(
"id"
).
toString
())){
return
true
;
}
else
{
child
=
(
List
<
Map
<
String
,
Object
>>)
bean
.
get
(
"childs"
);
if
(
child
!=
null
){
boolean
in
=
findChildren
(
child
,
id
);
if
(
in
){
return
in
;
}
}
}
}
return
false
;
}
/**
/**
* 获取ip.properties路径
* 获取ip.properties路径
* @return
* @return
...
...
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveUserServiceImpl.java
浏览文件 @
410aaa2d
...
@@ -155,6 +155,7 @@ public class SysEveUserServiceImpl implements SysEveUserService{
...
@@ -155,6 +155,7 @@ public class SysEveUserServiceImpl implements SysEveUserService{
List
<
Map
<
String
,
Object
>>
deskTops
=
sysEveUserDao
.
queryDeskTopsMenuByUserId
(
userMation
);
//桌面菜单列表
List
<
Map
<
String
,
Object
>>
deskTops
=
sysEveUserDao
.
queryDeskTopsMenuByUserId
(
userMation
);
//桌面菜单列表
List
<
Map
<
String
,
Object
>>
allMenu
=
sysEveUserDao
.
queryAllMenuByUserId
(
userMation
);
List
<
Map
<
String
,
Object
>>
allMenu
=
sysEveUserDao
.
queryAllMenuByUserId
(
userMation
);
allMenu
=
ToolUtil
.
allMenuToTree
(
allMenu
);
allMenu
=
ToolUtil
.
allMenuToTree
(
allMenu
);
deskTops
=
ToolUtil
.
deskTopsTree
(
deskTops
);
jedisClient
.
set
(
"userMation:"
+
userMation
.
get
(
"id"
).
toString
(),
JSON
.
toJSONString
(
userMation
));
jedisClient
.
set
(
"userMation:"
+
userMation
.
get
(
"id"
).
toString
(),
JSON
.
toJSONString
(
userMation
));
jedisClient
.
expire
(
"userMation:"
+
userMation
.
get
(
"id"
).
toString
(),
1800
);
//时间为30分钟
jedisClient
.
expire
(
"userMation:"
+
userMation
.
get
(
"id"
).
toString
(),
1800
);
//时间为30分钟
jedisClient
.
set
(
"deskTopsMation:"
+
userMation
.
get
(
"id"
).
toString
(),
JSON
.
toJSONString
(
deskTops
));
jedisClient
.
set
(
"deskTopsMation:"
+
userMation
.
get
(
"id"
).
toString
(),
JSON
.
toJSONString
(
deskTops
));
...
...
skyeye-web/src/main/resources/dbmapper/SysEveUserMapper.xml
浏览文件 @
410aaa2d
...
@@ -128,7 +128,9 @@
...
@@ -128,7 +128,9 @@
c.open_type openType,
c.open_type openType,
'-1' maxOpen,
'-1' maxOpen,
'false' extend,
'false' extend,
'' childs
null childs,
c.menu_parent_id parentId,
c.menu_level menuLevel
FROM
FROM
sys_eve_user a,
sys_eve_user a,
sys_eve_role_menu b,
sys_eve_role_menu b,
...
...
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
浏览文件 @
410aaa2d
...
@@ -312,12 +312,12 @@ button{
...
@@ -312,12 +312,12 @@ button{
height
:
40px
;
height
:
40px
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
z-index
:
201704011157
;
z-index
:
9998
;
}
}
.winui-taskbar
>
*
{
.winui-taskbar
>
*
{
display
:
inline-block
;
display
:
inline-block
;
}
}
/*开始按钮*/
/*开始按钮*/
...
@@ -330,20 +330,20 @@ button{
...
@@ -330,20 +330,20 @@ button{
position
:
absolute
;
position
:
absolute
;
}
}
.winui-taskbar-start
:hover
{
.winui-taskbar-start
:hover
{
color
:
#1E91EA
;
color
:
#1E91EA
;
}
}
/*开始按钮选中*/
/*开始按钮选中*/
.winui-taskbar-start.winui-this
{
.winui-taskbar-start.winui-this
{
/*background: #004275;*/
/*background: #004275;*/
}
}
.winui-taskbar-start
i
{
.winui-taskbar-start
i
{
font-size
:
18px
;
font-size
:
18px
;
}
}
/*任务栏任务*/
/*任务栏任务*/
...
@@ -2424,6 +2424,28 @@ body .layer-ext-winconfirm {
...
@@ -2424,6 +2424,28 @@ body .layer-ext-winconfirm {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.icon-drawer
{
width
:
35px
;
height
:
35px
;
margin
:
0px
auto
;
border
:
1px
solid
rgba
(
255
,
255
,
255
,
0.5
);
overflow
:
hidden
;
padding
:
4px
;
position
:
relative
;
background-color
:
rgba
(
255
,
255
,
255
,
0.19
);
}
.icon-drawer-icon
{
width
:
50%
;
height
:
50%
;
float
:
left
;
margin-top
:
2px
;
}
.icon-child
{
display
:
none
;
}
/*** 小程序页面管理start ***/
/*** 小程序页面管理start ***/
.smpro
{
.smpro
{
height
:
calc
(
100vh
-
45px
);
height
:
calc
(
100vh
-
45px
);
...
...
skyeye-web/src/main/webapp/assets/lib/winui/js/winui.desktop.js
浏览文件 @
410aaa2d
...
@@ -28,12 +28,47 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
...
@@ -28,12 +28,47 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
//icon的算法存在纰漏,但出现错误几率较小
//icon的算法存在纰漏,但出现错误几率较小
isFaIcon
=
(
item
.
icon
.
indexOf
(
'
fa-
'
)
!=
-
1
&&
item
.
icon
.
indexOf
(
'
.
'
)
==
-
1
),
isFaIcon
=
(
item
.
icon
.
indexOf
(
'
fa-
'
)
!=
-
1
&&
item
.
icon
.
indexOf
(
'
.
'
)
==
-
1
),
icon
=
isFaIcon
?
'
<i class="fa
'
+
item
.
icon
+
'
fa-fw"></i>
'
:
'
<img src="
'
+
item
.
icon
+
'
" />
'
;
icon
=
isFaIcon
?
'
<i class="fa
'
+
item
.
icon
+
'
fa-fw"></i>
'
:
'
<img src="
'
+
item
.
icon
+
'
" />
'
;
if
(
isNull
(
item
.
childs
)){
html
+=
'
<div class="winui-desktop-item"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
>
'
;
html
+=
'
<div class="winui-desktop-item"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
>
'
;
html
+=
'
<div class="winui-icon
'
+
(
isFaIcon
?
'
winui-icon-font
'
:
'
winui-icon-img
'
)
+
'
">
'
;
html
+=
'
<div class="winui-icon
'
+
(
isFaIcon
?
'
winui-icon-font
'
:
'
winui-icon-img
'
)
+
'
">
'
;
html
+=
icon
;
html
+=
icon
;
html
+=
'
</div>
'
;
html
+=
'
</div>
'
;
html
+=
'
<p>
'
+
item
.
name
+
'
</p>
'
;
html
+=
'
<p>
'
+
item
.
name
+
'
</p>
'
;
html
+=
'
</div>
'
;
html
+=
'
</div>
'
;
}
else
{
html
+=
'
<div class="winui-desktop-item"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
>
'
;
html
+=
'
<div class="winui-icon
'
+
(
isFaIcon
?
'
winui-icon-font
'
:
'
winui-icon-img
'
)
+
'
">
'
;
html
+=
'
<div class="icon-drawer">
'
;
var
childsIconContent
=
''
;
var
childsHtml
=
''
;
$
(
item
.
childs
).
each
(
function
(
index
,
bean
)
{
var
childsid
=
(
bean
.
id
==
''
||
bean
.
id
==
undefined
)
?
''
:
'
win-id="
'
+
bean
.
id
+
'
"
'
,
childsurl
=
(
bean
.
pageURL
==
''
||
bean
.
pageURL
==
undefined
)
?
''
:
'
win-url="
'
+
bean
.
pageURL
+
'
"
'
,
childstitle
=
(
bean
.
title
==
''
||
bean
.
title
==
undefined
)
?
''
:
'
win-title="
'
+
bean
.
title
+
'
"
'
,
childsopentype
=
(
bean
.
openType
==
''
||
bean
.
openType
==
undefined
)
?
''
:
'
win-opentype="
'
+
bean
.
openType
+
'
"
'
,
childsmaxOpen
=
(
bean
.
maxOpen
==
''
||
bean
.
maxOpen
==
undefined
)
?
''
:
'
win-maxOpen="
'
+
bean
.
maxOpen
+
'
"
'
,
//icon的算法存在纰漏,但出现错误几率较小
childsisFaIcon
=
(
bean
.
icon
.
indexOf
(
'
fa-
'
)
!=
-
1
&&
bean
.
icon
.
indexOf
(
'
.
'
)
==
-
1
),
childsicon
=
childsisFaIcon
?
'
<i class="fa
'
+
bean
.
icon
+
'
fa-fw"></i>
'
:
'
<img src="
'
+
bean
.
icon
+
'
" />
'
,
childsiconsmall
=
childsisFaIcon
?
'
<i class="fa
'
+
bean
.
icon
+
'
fa-fw icon-drawer-icon"></i>
'
:
'
<img src="
'
+
bean
.
icon
+
'
" />
'
;
childsIconContent
+=
childsiconsmall
;
childsHtml
+=
'
<div class="winui-desktop-item"
'
+
childsid
+
'
'
+
childsurl
+
'
'
+
childstitle
+
'
'
+
childsopentype
+
'
'
+
childsmaxOpen
+
'
>
'
;
childsHtml
+=
'
<div class="winui-icon
'
+
(
childsisFaIcon
?
'
winui-icon-font
'
:
'
winui-icon-img
'
)
+
'
">
'
;
childsHtml
+=
childsicon
;
childsHtml
+=
'
</div>
'
;
childsHtml
+=
'
<p>
'
+
bean
.
name
+
'
</p>
'
;
childsHtml
+=
'
</div>
'
;
});
html
+=
childsIconContent
;
html
+=
'
</div>
'
;
html
+=
'
<div class="icon-child">
'
;
html
+=
childsHtml
;
html
+=
'
</div>
'
;
html
+=
'
</div>
'
;
html
+=
'
<p>
'
+
item
.
name
+
'
</p>
'
;
html
+=
'
</div>
'
;
}
});
});
$
(
'
.winui-desktop
'
).
html
(
html
);
$
(
'
.winui-desktop
'
).
html
(
html
);
//定位应用
//定位应用
...
...
skyeye-web/src/main/webapp/assets/lib/winui/js/winui.window.js
浏览文件 @
410aaa2d
...
@@ -45,6 +45,19 @@ layui.define(['layer', 'winui'], function (exports) {
...
@@ -45,6 +45,19 @@ layui.define(['layer', 'winui'], function (exports) {
if
(
!
winui
.
taskAuto
())
{
if
(
!
winui
.
taskAuto
())
{
return
;
return
;
}
}
if
(
isNull
(
options
.
shadeClose
)){
options
.
shadeClose
=
false
;
}
if
(
isNull
(
options
.
skin
)){
options
.
skin
=
'
winui-window
'
;
}
if
(
isNull
(
options
.
closeBtn
)
&&
options
.
closeBtn
!=
0
){
options
.
closeBtn
=
'
1
'
;
}
if
(
isNull
(
options
.
maxmin
)
&&
options
.
maxmin
!=
false
){
options
.
maxmin
=
true
;
}
//打开窗口
//打开窗口
var
windowIndex
=
layer
.
open
({
var
windowIndex
=
layer
.
open
({
id
:
options
.
id
||
winui
.
guid
(),
id
:
options
.
id
||
winui
.
guid
(),
...
@@ -56,10 +69,13 @@ layui.define(['layer', 'winui'], function (exports) {
...
@@ -56,10 +69,13 @@ layui.define(['layer', 'winui'], function (exports) {
anim
:
options
.
anim
||
this
.
settings
.
anim
,
anim
:
options
.
anim
||
this
.
settings
.
anim
,
move
:
MOVE
,
move
:
MOVE
,
shade
:
options
.
shade
||
0
,
shade
:
options
.
shade
||
0
,
maxmin
:
true
,
//允许最大最小化
maxmin
:
options
.
maxmin
,
//允许最大最小化
moveOut
:
true
,
//允许拖出窗外
moveOut
:
true
,
//允许拖出窗外
skin
:
'
winui-window
'
,
//窗口皮肤
skin
:
options
.
skin
,
//窗口皮肤
zIndex
:
layer
.
zIndex
,
zIndex
:
layer
.
zIndex
,
shadeClose
:
options
.
shadeClose
,
//点击空白处关闭
scrollbar
:
false
,
closeBtn
:
options
.
closeBtn
,
//销毁回调
//销毁回调
end
:
options
.
end
||
function
()
{
end
:
options
.
end
||
function
()
{
...
@@ -127,9 +143,9 @@ layui.define(['layer', 'winui'], function (exports) {
...
@@ -127,9 +143,9 @@ layui.define(['layer', 'winui'], function (exports) {
common
.
setWindowBody
(
window
);
common
.
setWindowBody
(
window
);
}
}
});
});
//重新获取window
var
windowDom
=
common
.
getWindow
(
options
.
id
);
var
windowDom
=
common
.
getWindow
(
options
.
id
);
if
(
!
isNull
(
windowDom
)){
//重新获取window
if
(((
options
.
type
||
this
.
settings
.
type
)
==
2
)
&&
(
options
.
refresh
===
undefined
?
this
.
settings
.
refresh
:
options
.
refresh
))
{
if
(((
options
.
type
||
this
.
settings
.
type
)
==
2
)
&&
(
options
.
refresh
===
undefined
?
this
.
settings
.
refresh
:
options
.
refresh
))
{
$
(
windowDom
).
find
(
'
.layui-layer-setwin
'
).
prepend
(
'
<a class="layui-layer-ico layui-layer-refresh"><i class="layui-icon" style="font-size:14px;left:17px;font-weight:600;">ဂ<i></a>
'
);
$
(
windowDom
).
find
(
'
.layui-layer-setwin
'
).
prepend
(
'
<a class="layui-layer-ico layui-layer-refresh"><i class="layui-icon" style="font-size:14px;left:17px;font-weight:600;">ဂ<i></a>
'
);
$
(
windowDom
).
find
(
'
.layui-layer-refresh
'
).
on
(
'
click
'
,
function
(
e
)
{
$
(
windowDom
).
find
(
'
.layui-layer-refresh
'
).
on
(
'
click
'
,
function
(
e
)
{
...
@@ -212,6 +228,8 @@ layui.define(['layer', 'winui'], function (exports) {
...
@@ -212,6 +228,8 @@ layui.define(['layer', 'winui'], function (exports) {
var
taskItem
=
common
.
getTaskItemByWindowDom
(
this
);
var
taskItem
=
common
.
getTaskItemByWindowDom
(
this
);
common
.
selectDom
(
taskItem
);
common
.
selectDom
(
taskItem
);
});
});
}
//隐藏开始菜单
//隐藏开始菜单
$
(
'
.winui-start
'
).
addClass
(
'
layui-hide
'
);
$
(
'
.winui-start
'
).
addClass
(
'
layui-hide
'
);
//移除开始按钮的选中样式
//移除开始按钮的选中样式
...
...
skyeye-web/src/main/webapp/js/index/index.js
浏览文件 @
410aaa2d
...
@@ -57,7 +57,12 @@
...
@@ -57,7 +57,12 @@
},
//可以为{} 默认 请求 json/desktopmenu.json
},
//可以为{} 默认 请求 json/desktopmenu.json
done
:
function
(
desktopApp
)
{
done
:
function
(
desktopApp
)
{
desktopApp
.
ondblclick
(
function
(
id
,
elem
)
{
desktopApp
.
ondblclick
(
function
(
id
,
elem
)
{
var
item
=
$
(
elem
);
if
(
item
.
find
(
"
.icon-drawer
"
).
length
>
0
){
showBigWin
(
elem
);
}
else
{
OpenWindow
(
elem
);
OpenWindow
(
elem
);
}
});
});
desktopApp
.
contextmenu
({
desktopApp
.
contextmenu
({
item
:
[
"
打开
"
,
"
删除
"
,
'
右键菜单可自定义
'
],
item
:
[
"
打开
"
,
"
删除
"
,
'
右键菜单可自定义
'
],
...
@@ -187,13 +192,13 @@
...
@@ -187,13 +192,13 @@
id
:
id
,
id
:
id
,
type
:
type
,
type
:
type
,
title
:
title
,
title
:
title
,
content
:
content
content
:
content
,
//,area: ['70vw','80vh']
//,area: ['70vw','80vh']
//,offset: ['10vh', '15vw']
//,offset: ['10vh', '15vw']
,
maxOpen
:
maxOpen
maxOpen
:
maxOpen
,
//, max: false
//, max: false
//, min: false
//, min: false
,
refresh
:
true
refresh
:
true
});
});
}
else
{
}
else
{
location
.
href
=
"
login.html
"
;
location
.
href
=
"
login.html
"
;
...
@@ -201,6 +206,27 @@
...
@@ -201,6 +206,27 @@
}});
}});
}
}
function
showBigWin
(
menuItem
){
var
menu
=
$
(
menuItem
);
winui
.
window
.
config
({
anim
:
0
,
miniAnim
:
0
,
maxOpen
:
-
1
}).
open
({
id
:
'
1
'
,
type
:
1
,
title
:
false
,
closeBtn
:
0
,
content
:
'
1111
'
,
area
:
[
'
30vw
'
,
'
40vh
'
],
shadeClose
:
true
,
skin
:
'
demo-class
'
,
scrollbar
:
false
,
shade
:
0.5
,
maxmin
:
false
});
}
//注销登录
//注销登录
$
(
'
.logout
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.logout
'
).
on
(
'
click
'
,
function
()
{
winui
.
hideStartMenu
();
winui
.
hideStartMenu
();
...
...
skyeye-web/src/main/webapp/toolUtil.txt
浏览文件 @
410aaa2d
...
@@ -17,7 +17,9 @@ getProperties(); 读取.properties 结尾的配置文件用,getP, getPara
...
@@ -17,7 +17,9 @@ getProperties(); 读取.properties 结尾的配置文件用,getP, getPara
getSurFaceId(); 获取ID
getSurFaceId(); 获取ID
MD5(); 加密
MD5(); 加密
allMenuToTree(); 使用递归方法建树
allMenuToTree(); 使用递归方法建树
findChildren(); 递归查找子节点
findChildren(Map<String, Object> treeNode, List<Map<String, Object>> treeNodes, int level); 递归查找子节点
deskTopsTree(); 使用递归建树
findChildren(List<Map<String, Object>> treeNode, String id); 递归判断id是否在集合中存在
getIPPropertiesPath(); 获取ip.properties路径
getIPPropertiesPath(); 获取ip.properties路径
deleteFile(); 删除单个文件
deleteFile(); 删除单个文件
card(); 随机不重复的6-8位
card(); 随机不重复的6-8位
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录