Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
63d7d2b2
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1283
Star
158
Fork
129
代码
文件
提交
分支
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看板
提交
63d7d2b2
编写于
3月 20, 2022
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增分布式域名属性
上级
a32f8baa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
125 addition
and
130 deletion
+125
-130
web/src/main/resources/template/assets/lib/layui/customer/indexMenu.js
...resources/template/assets/lib/layui/customer/indexMenu.js
+45
-7
web/src/main/resources/template/assets/lib/winui/js/winui.desktop.js
...n/resources/template/assets/lib/winui/js/winui.desktop.js
+26
-24
web/src/main/resources/template/assets/lib/winui/js/winui.start.js
...ain/resources/template/assets/lib/winui/js/winui.start.js
+11
-9
web/src/main/resources/template/assets/lib/winui/js/winui.window.js
...in/resources/template/assets/lib/winui/js/winui.window.js
+9
-9
web/src/main/resources/template/js/index/index.js
web/src/main/resources/template/js/index/index.js
+30
-79
web/src/main/resources/template/tpl/traditionpage/index.html
web/src/main/resources/template/tpl/traditionpage/index.html
+4
-2
未找到文件。
web/src/main/resources/template/assets/lib/layui/customer/indexMenu.js
浏览文件 @
63d7d2b2
...
...
@@ -2,9 +2,25 @@
// 菜单按钮相关工具类
var
indexMenu
=
{
getUrlPath
:
function
(){
/**
* 分布式部署获取真实的访问路径
*
* @param url 系统自定义路径
* @param menuSysWinUrl 分布式系统域名
* @returns {string|*}
*/
getUrlPath
:
function
(
url
,
menuSysWinUrl
){
if
((
url
.
substr
(
0
,
7
).
toLowerCase
()
==
"
http://
"
||
url
.
substr
(
0
,
8
).
toLowerCase
()
==
"
https://
"
)
&&
url
.
indexOf
(
"
/tpl/
"
)
!=
-
1
){
url
+=
'
?userToken=
'
+
getCookie
(
"
userToken
"
);
return
url
;
}
else
{
if
(
!
isNull
(
menuSysWinUrl
)){
url
=
menuSysWinUrl
+
url
+
'
?userToken=
'
+
getCookie
(
"
userToken
"
);
}
}
return
url
;
},
/**
...
...
@@ -17,26 +33,48 @@ var indexMenu = {
if
(
isNull
(
icon
)){
icon
=
""
;
}
var
id
=
dataMenu
.
attr
(
"
data-id
"
);
var
title
=
dataMenu
.
attr
(
"
data-title
"
);
var
sysWinUrl
=
dataMenu
.
attr
(
"
data-sysWinUrl
"
);
var
url
=
dataMenu
.
attr
(
"
data-url
"
);
url
=
indexMenu
.
getUrlPath
(
url
,
sysWinUrl
);
// 这时会判断右侧#LAY_app_tabsheader属性下的有lay-id属性的li的数目,即已经打开的tab项数目
if
(
$
(
"
#LAY_app_tabsheader li[lay-id]
"
).
length
<=
0
)
{
// 如果比零小,则直接打开新的tab项
active
.
tabAdd
(
dataMenu
.
attr
(
"
data-url
"
),
dataMenu
.
attr
(
"
data-id
"
),
icon
+
dataMenu
.
attr
(
"
data-title
"
)
);
active
.
tabAdd
(
url
,
id
,
icon
+
title
);
}
else
{
// 否则判断该tab项是否以及存在
var
isData
=
false
;
// 初始化一个标志,为false说明未打开该tab项 为true则说明已有
$
.
each
(
$
(
"
#LAY_app_tabsheader li[lay-id]
"
),
function
()
{
// 如果点击左侧菜单栏所传入的id 在右侧tab项中的lay-id属性可以找到,则说明该tab项已经打开
if
(
$
(
this
).
attr
(
"
lay-id
"
)
===
dataMenu
.
attr
(
"
data-id
"
)
)
{
if
(
$
(
this
).
attr
(
"
lay-id
"
)
===
id
)
{
isData
=
true
;
}
})
if
(
isData
==
false
)
{
// 标志为false 新增一个tab项
active
.
tabAdd
(
dataMenu
.
attr
(
"
data-url
"
),
dataMenu
.
attr
(
"
data-id
"
),
icon
+
dataMenu
.
attr
(
"
data-title
"
)
);
active
.
tabAdd
(
url
,
id
,
icon
+
title
);
}
}
// 最后不管是否新增tab,最后都转到要打开的选项页面上
active
.
tabChange
(
dataMenu
.
attr
(
"
data-id
"
));
active
.
tabChange
(
id
);
indexMenu
.
sendMessageToChildIFrame
(
url
,
id
);
},
/**
* 分布式部署,发送消息给其他项目,实现权限点共享
*
* @param url url地址
* @param id frame的id
*/
sendMessageToChildIFrame
:
function
(
url
,
id
){
if
((
url
.
substr
(
0
,
7
).
toLowerCase
()
==
"
http://
"
||
url
.
substr
(
0
,
8
).
toLowerCase
()
==
"
https://
"
)
&&
url
.
indexOf
(
"
/tpl/
"
)
!=
-
1
){
var
childIframe
=
$
(
"
#
"
+
id
).
find
(
'
iframe
'
)[
0
];
// 发送消息,实现权限点共享
childIframe
.
contentWindow
.
postMessage
(
localStorage
.
getItem
(
"
authpoints
"
),
"
*
"
);
}
}
}
...
...
web/src/main/resources/template/assets/lib/winui/js/winui.desktop.js
浏览文件 @
63d7d2b2
...
...
@@ -15,7 +15,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
this
.
data
=
null
;
};
//渲染HTML
//
渲染HTML
Desktop
.
prototype
.
render
=
function
(
callback
)
{
if
(
this
.
data
===
null
)
return
;
var
html
=
''
;
...
...
@@ -23,17 +23,18 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
if
(
languageType
==
'
cn
'
){
item
.
name
=
item
.
menuNameEn
;
}
var
id
=
(
item
.
id
==
''
||
item
.
id
==
undefine
d
)
?
''
:
'
win-id="
'
+
item
.
id
+
'
"
'
,
url
=
(
item
.
pageURL
==
''
||
item
.
pageURL
==
undefined
)
?
''
:
'
win-url="
'
+
item
.
pageURL
+
'
"
'
,
var
id
=
isNull
(
item
.
i
d
)
?
''
:
'
win-id="
'
+
item
.
id
+
'
"
'
,
url
=
isNull
(
item
.
pageURL
)
?
''
:
'
win-url="
'
+
item
.
pageURL
+
'
"
'
,
title
=
isNull
(
item
.
name
)
?
''
:
'
win-title="
'
+
item
.
name
+
'
"
'
,
opentype
=
(
item
.
openType
==
''
||
item
.
openType
==
undefined
)
?
''
:
'
win-opentype="
'
+
item
.
openType
+
'
"
'
,
maxOpen
=
(
item
.
maxOpen
==
''
||
item
.
maxOpen
==
undefined
)
?
''
:
'
win-maxOpen="
'
+
item
.
maxOpen
+
'
"
'
,
menuIconBg
=
(
item
.
menuIconBg
==
''
||
item
.
menuIconBg
==
undefined
)
?
''
:
'
win-menuIconBg="
'
+
item
.
menuIconBg
+
'
"
'
,
menuIconColor
=
(
item
.
menuIconColor
==
''
||
item
.
menuIconColor
==
undefined
)
?
''
:
'
win-menuIconColor="
'
+
item
.
menuIconColor
+
'
"
'
,
opentype
=
isNull
(
item
.
openType
)
?
''
:
'
win-opentype="
'
+
item
.
openType
+
'
"
'
,
maxOpen
=
isNull
(
item
.
maxOpen
)
?
''
:
'
win-maxOpen="
'
+
item
.
maxOpen
+
'
"
'
,
menuIconBg
=
isNull
(
item
.
menuIconBg
)
?
''
:
'
win-menuIconBg="
'
+
item
.
menuIconBg
+
'
"
'
,
menuIconColor
=
isNull
(
item
.
menuIconColor
)
?
''
:
'
win-menuIconColor="
'
+
item
.
menuIconColor
+
'
"
'
,
menuSysWinUrl
=
isNull
(
item
.
sysWinUrl
)
?
''
:
'
win-sysWinUrl="
'
+
item
.
sysWinUrl
+
'
"
'
,
menuIcon
=
''
;
var
icon
=
""
,
isFaIcon
=
""
;
if
(
item
.
menuIconType
===
'
1
'
){
//icon
menuIcon
=
(
item
.
icon
==
''
||
item
.
icon
==
undefined
)
?
''
:
'
win-icon="
'
+
item
.
icon
+
'
"
'
;
menuIcon
=
isNull
(
item
.
icon
)
?
''
:
'
win-icon="
'
+
item
.
icon
+
'
"
'
;
if
(
!
isNull
(
item
.
menuIconColor
)){
icon
=
'
<i class="fa
'
+
item
.
icon
+
'
fa-fw" style="color:
'
+
item
.
menuIconColor
+
'
" win-i-id="
'
+
item
.
id
+
'
"></i>
'
;
}
else
{
...
...
@@ -41,8 +42,8 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
}
isFaIcon
=
"
winui-icon-font
"
;
}
else
if
(
item
.
menuIconType
===
'
2
'
){
//图片
menuIcon
=
(
item
.
menuIconPic
==
''
||
item
.
menuIconPic
==
undefined
)
?
''
:
'
win-icon="
'
+
item
.
menuIconPic
+
'
"
'
;
icon
=
'
<img src="
'
+
fileBasePath
+
item
.
menuIconPic
+
'
"
class="desktop-img"/>
'
;
menuIcon
=
isNull
(
item
.
menuIconPic
)
?
''
:
'
win-icon="
'
+
item
.
menuIconPic
+
'
"
'
;
icon
=
'
<img src="
'
+
fileBasePath
+
item
.
menuIconPic
+
'
" class="desktop-img"/>
'
;
isFaIcon
=
"
winui-icon-img
"
;
}
if
(
isNull
(
item
.
childs
)){
//没有子菜单
...
...
@@ -55,7 +56,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
html
+=
'
<p>
'
+
item
.
name
+
'
</p>
'
;
html
+=
'
</div>
'
;
}
else
{
html
+=
'
<div class="winui-desktop-item sec-btn"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
'
+
menuIconBg
+
'
'
+
menuIconColor
+
'
'
+
menuIcon
+
'
>
'
;
html
+=
'
<div class="winui-desktop-item sec-btn"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
'
+
menuIconBg
+
'
'
+
menuIconColor
+
'
'
+
menuIcon
+
'
'
+
menuSysWinUrl
+
'
>
'
;
if
(
!
isNull
(
item
.
menuIconBg
)){
html
+=
'
<div class="winui-icon
'
+
isFaIcon
+
'
" style="background-color:
'
+
item
.
menuIconBg
+
'
">
'
;
}
else
{
...
...
@@ -67,7 +68,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
html
+=
'
</div>
'
;
}
}
else
{
//有子菜单
html
+=
'
<div class="winui-desktop-item win-menu-group" id="
'
+
item
.
id
+
'
"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
'
+
menuIconBg
+
'
'
+
menuIconColor
+
'
>
'
;
html
+=
'
<div class="winui-desktop-item win-menu-group" id="
'
+
item
.
id
+
'
"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxOpen
+
'
'
+
menuIconBg
+
'
'
+
menuIconColor
+
'
'
+
menuSysWinUrl
+
'
>
'
;
html
+=
'
<div class="winui-icon
'
+
isFaIcon
+
'
">
'
;
html
+=
'
<div class="icon-drawer">
'
;
var
childsIconContent
=
''
;
...
...
@@ -76,13 +77,14 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
if
(
languageType
==
'
cn
'
){
bean
.
name
=
bean
.
menuNameEn
;
}
var
childsid
=
(
bean
.
id
==
''
||
bean
.
id
==
undefine
d
)
?
''
:
'
win-id="
'
+
bean
.
id
+
'
"
'
,
childsurl
=
(
bean
.
pageURL
==
''
||
bean
.
pageURL
==
undefined
)
?
''
:
'
win-url="
'
+
bean
.
pageURL
+
'
"
'
,
var
childsid
=
isNull
(
bean
.
i
d
)
?
''
:
'
win-id="
'
+
bean
.
id
+
'
"
'
,
childsurl
=
isNull
(
bean
.
pageURL
)
?
''
:
'
win-url="
'
+
bean
.
pageURL
+
'
"
'
,
childstitle
=
isNull
(
bean
.
name
)
?
''
:
'
win-title="
'
+
bean
.
name
+
'
"
'
,
childsopentype
=
(
bean
.
openType
==
''
||
bean
.
openType
==
undefined
)
?
''
:
'
win-opentype="
'
+
bean
.
openType
+
'
"
'
,
childsmaxOpen
=
(
bean
.
maxOpen
==
''
||
bean
.
maxOpen
==
undefined
)
?
''
:
'
win-maxOpen="
'
+
bean
.
maxOpen
+
'
"
'
,
childsmenuIconBg
=
(
bean
.
menuIconBg
==
''
||
bean
.
menuIconBg
==
undefined
)
?
''
:
'
win-menuIconBg="
'
+
bean
.
menuIconBg
+
'
"
'
,
childsmenuIconColor
=
(
bean
.
menuIconColor
==
''
||
bean
.
menuIconColor
==
undefined
)
?
''
:
'
win-menuIconColor="
'
+
bean
.
menuIconColor
+
'
"
'
,
childsopentype
=
isNull
(
bean
.
openType
)
?
''
:
'
win-opentype="
'
+
bean
.
openType
+
'
"
'
,
childsmaxOpen
=
isNull
(
bean
.
maxOpen
)
?
''
:
'
win-maxOpen="
'
+
bean
.
maxOpen
+
'
"
'
,
childsmenuIconBg
=
isNull
(
bean
.
menuIconBg
)
?
''
:
'
win-menuIconBg="
'
+
bean
.
menuIconBg
+
'
"
'
,
childsmenuIconColor
=
isNull
(
bean
.
menuIconColor
)
?
''
:
'
win-menuIconColor="
'
+
bean
.
menuIconColor
+
'
"
'
,
childsmenuSysWinUrl
=
isNull
(
bean
.
sysWinUrl
)
?
''
:
'
win-sysWinUrl="
'
+
bean
.
sysWinUrl
+
'
"
'
,
childsmenuIcon
=
''
;
//如果子菜单的所属桌面和父菜单的一样或者该菜单所属桌面不存在
if
(
bean
.
deskTopId
===
item
.
deskTopId
||
$
(
'
.winui-desktop
'
).
find
(
"
article[id='
"
+
bean
.
deskTopId
+
"
']
"
).
length
==
0
||
bean
.
deskTopId
===
'
winfixedpage00000000
'
){
...
...
@@ -90,7 +92,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
var
childsiconsmall
;
var
childsisFaIcon
=
""
;
if
(
bean
.
menuIconType
===
'
1
'
){
//icon
childsmenuIcon
=
(
bean
.
icon
==
''
||
bean
.
icon
==
undefined
)
?
''
:
'
win-icon="
'
+
bean
.
icon
+
'
"
'
;
childsmenuIcon
=
isNull
(
bean
.
icon
)
?
''
:
'
win-icon="
'
+
bean
.
icon
+
'
"
'
;
if
(
!
isNull
(
bean
.
menuIconColor
)){
if
(
!
isNull
(
bean
.
menuIconBg
)){
childsiconsmall
=
'
<i class="fa
'
+
bean
.
icon
+
'
fa-fw icon-drawer-icon" style="color:
'
+
bean
.
menuIconColor
+
'
;background-color:
'
+
bean
.
menuIconBg
+
'
" win-i-id="
'
+
bean
.
id
+
'
"></i>
'
;
...
...
@@ -110,14 +112,14 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
}
childsisFaIcon
=
"
winui-icon-font
"
;
}
else
if
(
bean
.
menuIconType
===
'
2
'
){
//图片
childsmenuIcon
=
(
bean
.
menuIconPic
==
''
||
bean
.
menuIconPic
==
undefined
)
?
''
:
'
win-icon="
'
+
bean
.
menuIconPic
+
'
"
'
;
childsmenuIcon
=
isNull
(
bean
.
menuIconPic
)
?
''
:
'
win-icon="
'
+
bean
.
menuIconPic
+
'
"
'
;
childsiconsmall
=
'
<i class="fa icon-drawer-icon" win-i-id="
'
+
bean
.
id
+
'
"><img src="
'
+
fileBasePath
+
bean
.
menuIconPic
+
'
" class="desktop-img"/></i>
'
;
childsicon
=
'
<img src="
'
+
fileBasePath
+
bean
.
menuIconPic
+
'
" class="desktop-img"/>
'
;
childsisFaIcon
=
"
winui-icon-img
"
;
}
childsIconContent
+=
childsiconsmall
;
childsHtml
+=
'
<div class="winui-desktop-item sec-clsss-btn sec-btn"
'
+
childsid
+
'
'
+
childsurl
+
'
'
+
childstitle
+
'
'
+
childsopentype
+
'
'
+
childsmaxOpen
+
'
'
+
childsmenuIconBg
+
'
'
+
childsmenuIconColor
+
'
'
+
childsmenuIcon
+
'
>
'
;
childsHtml
+=
'
<div class="winui-desktop-item sec-clsss-btn sec-btn"
'
+
childsid
+
'
'
+
childsurl
+
'
'
+
childstitle
+
'
'
+
childsopentype
+
'
'
+
childsmaxOpen
+
'
'
+
childsmenuIconBg
+
'
'
+
childsmenuIconColor
+
'
'
+
childsmenuIcon
+
'
'
+
childsmenuSysWinUrl
+
'
>
'
;
if
(
!
isNull
(
bean
.
menuIconBg
)){
childsHtml
+=
'
<div class="winui-icon
'
+
childsisFaIcon
+
'
" style="background-color:
'
+
bean
.
menuIconBg
+
'
">
'
;
}
else
{
...
...
@@ -132,7 +134,7 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
var
childsicon
;
var
childsisFaIcon
=
""
;
if
(
bean
.
menuIconType
===
'
1
'
){
//icon
childsmenuIcon
=
(
bean
.
icon
==
''
||
bean
.
icon
==
undefined
)
?
''
:
'
win-icon="
'
+
bean
.
icon
+
'
"
'
;
childsmenuIcon
=
isNull
(
bean
.
icon
)
?
''
:
'
win-icon="
'
+
bean
.
icon
+
'
"
'
;
if
(
!
isNull
(
bean
.
menuIconColor
)){
if
(
!
isNull
(
bean
.
menuIconBg
)){
childsicon
=
'
<i class="fa
'
+
bean
.
icon
+
'
fa-fw" style="color:
'
+
bean
.
menuIconColor
+
'
;background-color:
'
+
bean
.
menuIconBg
+
'
" win-i-id="
'
+
bean
.
id
+
'
"></i>
'
;
...
...
@@ -148,11 +150,11 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
}
childsisFaIcon
=
"
winui-icon-font
"
;
}
else
if
(
bean
.
menuIconType
===
'
2
'
){
//图片
childsmenuIcon
=
(
bean
.
menuIconPic
==
''
||
bean
.
menuIconPic
==
undefined
)
?
''
:
'
win-icon="
'
+
bean
.
menuIconPic
+
'
"
'
;
childsmenuIcon
=
isNull
(
bean
.
menuIconPic
)
?
''
:
'
win-icon="
'
+
bean
.
menuIconPic
+
'
"
'
;
childsicon
=
'
<img src="
'
+
fileBasePath
+
bean
.
menuIconPic
+
'
" class="desktop-img"/>
'
;
childsisFaIcon
=
"
winui-icon-img
"
;
}
childDeskHtml
+=
'
<div class="winui-desktop-item sec-btn"
'
+
childsid
+
'
'
+
childsurl
+
'
'
+
childstitle
+
'
'
+
childsopentype
+
'
'
+
childsmaxOpen
+
'
'
+
childsmenuIconBg
+
'
'
+
childsmenuIconColor
+
'
'
+
childsmenuIcon
+
'
>
'
;
childDeskHtml
+=
'
<div class="winui-desktop-item sec-btn"
'
+
childsid
+
'
'
+
childsurl
+
'
'
+
childstitle
+
'
'
+
childsopentype
+
'
'
+
childsmaxOpen
+
'
'
+
childsmenuIconBg
+
'
'
+
childsmenuIconColor
+
'
'
+
childsmenuIcon
+
'
'
+
childsmenuSysWinUrl
+
'
>
'
;
if
(
!
isNull
(
bean
.
menuIconBg
)){
childDeskHtml
+=
'
<div class="winui-icon
'
+
childsisFaIcon
+
'
" style="background-color:
'
+
bean
.
menuIconBg
+
'
">
'
;
}
else
{
...
...
web/src/main/resources/template/assets/lib/winui/js/winui.start.js
浏览文件 @
63d7d2b2
...
...
@@ -24,15 +24,16 @@ layui.define(['jquery', 'element', 'layer', 'winui'], function (exports) {
if
(
languageType
==
'
cn
'
){
item
.
name
=
item
.
menuNameEn
;
}
var
id
=
(
item
.
id
==
''
||
item
.
id
==
undefine
d
)
?
''
:
'
win-id="
'
+
item
.
id
+
'
"
'
,
url
=
(
item
.
pageURL
==
''
||
item
.
pageURL
==
undefined
)
?
''
:
'
win-url="
'
+
item
.
pageURL
+
'
"
'
,
var
id
=
isNull
(
item
.
i
d
)
?
''
:
'
win-id="
'
+
item
.
id
+
'
"
'
,
url
=
isNull
(
item
.
pageURL
)
?
''
:
'
win-url="
'
+
item
.
pageURL
+
'
"
'
,
title
=
isNull
(
item
.
name
)
?
''
:
'
win-title="
'
+
item
.
name
+
'
"
'
,
opentype
=
(
item
.
openType
==
''
||
item
.
openType
==
undefined
)
?
''
:
'
win-opentype="
'
+
item
.
openType
+
'
"
'
,
maxopen
=
(
item
.
maxOpen
==
''
||
item
.
maxOpen
==
undefined
)
?
''
:
'
win-maxopen="
'
+
item
.
maxOpen
+
'
"
'
,
winIcon
=
(
item
.
icon
==
''
||
item
.
icon
==
undefined
)
?
''
:
'
win-icon="
'
+
item
.
icon
+
'
"
'
,
opentype
=
isNull
(
item
.
openType
)
?
''
:
'
win-opentype="
'
+
item
.
openType
+
'
"
'
,
maxopen
=
isNull
(
item
.
maxOpen
)
?
''
:
'
win-maxopen="
'
+
item
.
maxOpen
+
'
"
'
,
winIcon
=
isNull
(
item
.
icon
)
?
''
:
'
win-icon="
'
+
item
.
icon
+
'
"
'
,
isParent
=
item
.
childs
?
'
parent
'
:
''
,
menuIconBg
=
(
item
.
menuIconBg
==
''
||
item
.
menuIconBg
==
undefined
)
?
''
:
'
win-menuIconBg="
'
+
item
.
menuIconBg
+
'
"
'
,
menuIconColor
=
(
item
.
menuIconColor
==
''
||
item
.
menuIconColor
==
undefined
)
?
''
:
'
win-menuIconColor="
'
+
item
.
menuIconColor
+
'
"
'
,
menuIconBg
=
isNull
(
item
.
menuIconBg
)
?
''
:
'
win-menuIconBg="
'
+
item
.
menuIconBg
+
'
"
'
,
menuIconColor
=
isNull
(
item
.
menuIconColor
)
?
''
:
'
win-menuIconColor="
'
+
item
.
menuIconColor
+
'
"
'
,
menuSysWinUrl
=
isNull
(
item
.
sysWinUrl
)
?
''
:
'
win-sysWinUrl="
'
+
item
.
sysWinUrl
+
'
"
'
,
menuDeskTopId
=
'
win-menuDeskTopId="
'
+
item
.
deskTopId
+
'
"
'
;
var
icon
=
""
;
if
(
item
.
menuIconType
===
'
1
'
||
item
.
menuIconType
==
1
){
//icon
...
...
@@ -51,7 +52,7 @@ layui.define(['jquery', 'element', 'layer', 'winui'], function (exports) {
}
else
{
var
extend
=
''
;
}
html
+=
'
<li class="layui-nav-item
'
+
isParent
+
'
'
+
extend
+
'
"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxopen
+
'
'
+
winIcon
+
'
'
+
menuIconBg
+
'
'
+
menuIconColor
+
'
'
+
menuDeskTopId
+
'
>
'
;
html
+=
'
<li class="layui-nav-item
'
+
isParent
+
'
'
+
extend
+
'
"
'
+
id
+
'
'
+
url
+
'
'
+
title
+
'
'
+
opentype
+
'
'
+
maxopen
+
'
'
+
winIcon
+
'
'
+
menuIconBg
+
'
'
+
menuIconColor
+
'
'
+
menu
SysWinUrl
+
'
'
+
menu
DeskTopId
+
'
>
'
;
if
(
!
isNull
(
item
.
menuIconBg
)){
html
+=
'
<a><div class="winui-menu-icon" style="background-color:
'
+
item
.
menuIconBg
+
'
!important;">
'
;
}
else
{
...
...
@@ -74,6 +75,7 @@ layui.define(['jquery', 'element', 'layer', 'winui'], function (exports) {
cWinIcon
=
(
cItem
.
icon
==
''
||
cItem
.
icon
==
undefined
)
?
''
:
'
win-icon="
'
+
cItem
.
icon
+
'
"
'
,
cmenuIconBg
=
(
cItem
.
menuIconBg
==
''
||
cItem
.
menuIconBg
==
undefined
)
?
''
:
'
win-menuIconBg="
'
+
cItem
.
menuIconBg
+
'
"
'
,
cmenuIconColor
=
(
cItem
.
menuIconColor
==
''
||
cItem
.
menuIconColor
==
undefined
)
?
''
:
'
win-menuIconColor="
'
+
cItem
.
menuIconColor
+
'
"
'
,
cmenuSysWinUrl
=
isNull
(
cItem
.
sysWinUrl
)
?
''
:
'
win-sysWinUrl="
'
+
cItem
.
sysWinUrl
+
'
"
'
,
menuDeskTopId
=
'
win-menuDeskTopId="
'
+
cItem
.
deskTopId
+
'
"
'
;;
var
cicon
=
""
;
if
(
cItem
.
menuIconType
===
'
1
'
||
cItem
.
menuIconType
==
1
){
//icon
...
...
@@ -87,7 +89,7 @@ layui.define(['jquery', 'element', 'layer', 'winui'], function (exports) {
cicon
=
'
<img src="
'
+
fileBasePath
+
cItem
.
menuIconPic
+
'
" />
'
;
cWinIcon
=
(
cItem
.
menuIconPic
==
''
||
cItem
.
menuIconPic
==
undefined
)
?
''
:
'
win-icon="
'
+
cItem
.
menuIconPic
+
'
"
'
}
html
+=
'
<dd
'
+
cId
+
'
'
+
cUrl
+
'
'
+
cTitle
+
'
'
+
cOpentype
+
'
'
+
cMaxopen
+
'
'
+
cWinIcon
+
'
'
+
cmenuIconBg
+
'
'
+
cmenuIconColor
+
'
'
+
menuDeskTopId
+
'
>
'
;
html
+=
'
<dd
'
+
cId
+
'
'
+
cUrl
+
'
'
+
cTitle
+
'
'
+
cOpentype
+
'
'
+
cMaxopen
+
'
'
+
cWinIcon
+
'
'
+
cmenuIconBg
+
'
'
+
cmenuIconColor
+
'
'
+
cmenuSysWinUrl
+
'
'
+
menuDeskTopId
+
'
>
'
;
if
(
!
isNull
(
cItem
.
menuIconBg
)){
html
+=
'
<a><div class="winui-menu-icon" style="background-color:
'
+
cItem
.
menuIconBg
+
'
!important;">
'
;
}
else
{
...
...
web/src/main/resources/template/assets/lib/winui/js/winui.window.js
浏览文件 @
63d7d2b2
...
...
@@ -556,7 +556,7 @@ layui.define(['layer', 'winui'], function (exports) {
var
winLayer
=
new
WinLayer
();
//置顶窗口(显示窗口且置于顶层)
//
置顶窗口(显示窗口且置于顶层)
winLayer
.
setTop
=
function
(
param
)
{
var
windowDom
=
common
.
getWindow
(
param
);
if
(
windowDom
)
{
...
...
@@ -571,7 +571,7 @@ layui.define(['layer', 'winui'], function (exports) {
}
};
//显示信息(为了显示在所有窗口最前面而添加的方法)
//
显示信息(为了显示在所有窗口最前面而添加的方法)
winLayer
.
msg
=
function
(
msg
,
options
,
func
)
{
//移除请求遮罩层
$
(
"
body
"
).
find
(
"
.mask-req-str
"
).
remove
();
...
...
@@ -584,7 +584,7 @@ layui.define(['layer', 'winui'], function (exports) {
layer
.
msg
(
msg
,
options
,
func
);
};
//显示提示框(为了显示在所有窗口最前面而添加的方法)
//
显示提示框(为了显示在所有窗口最前面而添加的方法)
winLayer
.
confirm
=
function
(
msg
,
options
,
yes
,
cancel
)
{
var
type
=
typeof
options
===
'
function
'
;
if
(
type
)
{
...
...
@@ -598,15 +598,15 @@ layui.define(['layer', 'winui'], function (exports) {
else
options
.
skin
=
'
layer-ext-winconfirm
'
;
layer
.
confirm
(
msg
,
options
,
yes
,
cancel
);
//替换窗体的关闭图标
//
替换窗体的关闭图标
$
(
'
.layer-ext-winconfirm
'
).
find
(
'
.layui-layer-close
'
).
html
(
'
<i class="layui-icon">ဆ<i>
'
);
//移除移动窗体的div
//
移除移动窗体的div
$
(
'
.layui-layer-move
'
).
remove
();
//移除最小化最大化关闭按钮a标签的href属性
//
移除最小化最大化关闭按钮a标签的href属性
$
(
'
.layer-ext-winconfirm
'
).
find
(
'
.layui-layer-setwin
'
).
children
(
'
a
'
).
removeAttr
(
'
href
'
);
};
//显示加载(为了显示在所有窗口最前面而添加的方法)
//
显示加载(为了显示在所有窗口最前面而添加的方法)
winLayer
.
load
=
function
(
icon
,
options
)
{
icon
=
icon
||
1
;
options
=
options
||
{};
...
...
@@ -614,7 +614,7 @@ layui.define(['layer', 'winui'], function (exports) {
return
layer
.
load
(
icon
,
options
);
};
//打开主题设置窗口
//
打开主题设置窗口
winLayer
.
openTheme
=
function
(
loadBottomMenuIcon
)
{
var
that
=
this
;
$
.
get
(
winui
.
path
+
'
../../../tpl/systheme/systheme.html
'
,
{},
function
(
content
)
{
...
...
@@ -631,7 +631,7 @@ layui.define(['layer', 'winui'], function (exports) {
});
}
//打开我的消息通知
//
打开我的消息通知
winLayer
.
openSysNotice
=
function
(
loadBottomMenuIcon
)
{
var
that
=
this
;
var
title
=
'
<i class="fa title-icon fa-fw fa-list-ul" style="background-color: #0491fe;color: #ecf3f8;"></i>
'
+
'
<font class="win-title-class">消息中心</font>
'
;
...
...
web/src/main/resources/template/js/index/index.js
浏览文件 @
63d7d2b2
...
...
@@ -1007,6 +1007,7 @@ layui.config({
var
menuIconBg
=
$this
.
attr
(
"
win-menuiconbg
"
);
var
menuIconColor
=
$this
.
attr
(
"
win-menuiconcolor
"
);
var
menuIcon
=
$this
.
attr
(
"
win-icon
"
);
var
menuSysWinUrl
=
$this
.
attr
(
"
win-sysWinUrl
"
);
var
str
=
''
,
iconStr
=
''
;
if
(
menuIcon
.
indexOf
(
'
fa-
'
)
!=
-
1
){
//icon图标
str
=
'
<i class="fa fa-fw title-icon
'
;
//图标+文字
...
...
@@ -1044,76 +1045,34 @@ layui.config({
winui
.
window
.
msg
(
'
菜单配置错误(菜单链接、标题、id缺一不可)
'
);
return
;
}
if
((
url
.
substr
(
0
,
7
).
toLowerCase
()
==
"
http://
"
||
url
.
substr
(
0
,
8
).
toLowerCase
()
==
"
https://
"
)
&&
url
.
indexOf
(
"
/tpl/
"
)
!=
-
1
){
url
+=
'
?userToken=
'
+
getCookie
(
"
userToken
"
);
}
var
content
;
url
=
indexMenu
.
getUrlPath
(
url
,
menuSysWinUrl
);
if
(
type
===
1
)
{
$
.
ajax
({
type
:
'
get
'
,
url
:
url
,
async
:
false
,
success
:
function
(
data
)
{
content
=
data
;
},
error
:
function
(
e
)
{
var
page
=
''
;
switch
(
e
.
status
)
{
case
404
:
page
=
'
404.html
'
;
break
;
case
500
:
page
=
'
500.html
'
;
break
;
default
:
content
=
"
打开窗口失败
"
;
}
$
.
ajax
({
type
:
'
get
'
,
url
:
reqBasePath
+
'
tpl/sysmessage/
'
+
page
,
async
:
false
,
success
:
function
(
data
)
{
content
=
data
;
},
error
:
function
()
{
layer
.
close
(
load
);
}
});
}
});
// 新窗口打开
window
.
open
(
url
);
}
else
{
content
=
url
;
}
//核心方法(参数请看文档,config是全局配置 open是本次窗口配置 open优先级大于config)
winui
.
window
.
config
({
anim
:
0
,
miniAnim
:
0
,
maxOpen
:
-
1
}).
open
({
id
:
id
,
type
:
type
,
title
:
title
,
content
:
content
,
loadBgColor
:
menuIconBg
,
loadIcon
:
menuIcon
,
loadIconColor
:
menuIconColor
,
area
:
[
'
90vw
'
,
'
90vh
'
],
maxOpen
:
maxOpen
,
loadBottomMenuIcon
:
loadBottomMenuIcon
,
iconTitle
:
iconTitle
,
refresh
:
true
,
success
:
function
(){
if
((
url
.
substr
(
0
,
7
).
toLowerCase
()
==
"
http://
"
||
url
.
substr
(
0
,
8
).
toLowerCase
()
==
"
https://
"
)
&&
url
.
indexOf
(
"
/tpl/
"
)
!=
-
1
){
var
childIframe
=
$
(
"
#
"
+
id
).
find
(
'
iframe
'
)[
0
];
//发送消息
childIframe
.
contentWindow
.
postMessage
(
localStorage
.
getItem
(
"
authpoints
"
),
"
*
"
);
}
}
});
// 核心方法(参数请看文档,config是全局配置 open是本次窗口配置 open优先级大于config)
winui
.
window
.
config
({
anim
:
0
,
miniAnim
:
0
,
maxOpen
:
-
1
}).
open
({
id
:
id
,
type
:
type
,
title
:
title
,
content
:
url
,
loadBgColor
:
menuIconBg
,
loadIcon
:
menuIcon
,
loadIconColor
:
menuIconColor
,
area
:
[
'
90vw
'
,
'
90vh
'
],
maxOpen
:
maxOpen
,
loadBottomMenuIcon
:
loadBottomMenuIcon
,
iconTitle
:
iconTitle
,
refresh
:
true
,
success
:
function
(){
indexMenu
.
sendMessageToChildIFrame
(
url
,
id
);
}
});
}
}
//打开二级窗口
...
...
@@ -1162,19 +1121,11 @@ layui.config({
}).
on
(
'
drop
'
,
function
(
el
,
container
)
{
//放置
var
times
=
$
(
"
#childWindow
"
).
parent
().
attr
(
"
times
"
);
$
(
"
#layui-layer-shade
"
+
times
).
css
({
width
:
'
100%
'
});
var
boxId
=
$
(
container
).
attr
(
"
win-id
"
);
//盒子id
var
drawer
=
$
(
'
#
'
+
boxId
).
find
(
"
.icon-drawer
"
);
//盒子icon
var
child
=
$
(
'
#
'
+
boxId
).
find
(
"
.icon-child
"
);
//盒子child
var
thisMenuIcon
=
$
(
el
).
eq
(
0
).
attr
(
"
win-icon
"
);
var
thisMenuBg
=
$
(
el
).
eq
(
0
).
attr
(
"
win-menuiconbg
"
);
var
thisMenuIconColor
=
$
(
el
).
eq
(
0
).
attr
(
"
win-menuIconColor
"
);
var
thisMenuId
=
$
(
el
).
eq
(
0
).
attr
(
"
win-id
"
);
var
thisMenuUrl
=
$
(
el
).
eq
(
0
).
attr
(
"
win-url
"
);
var
thisMenuTitle
=
$
(
el
).
eq
(
0
).
attr
(
"
win-title
"
);
var
thisMenuOpenType
=
$
(
el
).
eq
(
0
).
attr
(
"
win-opentype
"
);
var
thisMenuMaxOpen
=
$
(
el
).
eq
(
0
).
attr
(
"
win-maxopen
"
);
$
(
'
i[win-i-id="
'
+
thisMenuId
+
'
"]
'
).
remove
();
$
(
'
div[class="winui-desktop-item sec-clsss-btn sec-btn"][win-id="
'
+
thisMenuId
+
'
"]
'
).
remove
();
$
(
el
).
removeClass
(
'
sec-clsss-btn
'
);
...
...
@@ -1238,7 +1189,7 @@ layui.config({
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
sysevewindragdrop007
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
//此处不需要去获取当前滚动展示的模块
//
此处不需要去获取当前滚动展示的模块
$
(
"
#winui-desktop
"
).
find
(
'
div[id="
'
+
rowId
+
'
"]
'
).
attr
(
"
win-title
"
,
menuName
);
$
(
"
#winui-desktop
"
).
find
(
'
div[id="
'
+
rowId
+
'
"]
'
).
find
(
'
p
'
).
html
(
menuName
);
$
(
'
#childWindowtext
'
).
show
();
...
...
@@ -1256,7 +1207,7 @@ layui.config({
}
});
//注销登录
//
注销登录
$
(
'
.logout
'
).
on
(
'
click
'
,
function
()
{
winui
.
hideStartMenu
();
winui
.
window
.
confirm
(
'
确认注销吗?
'
,
{
id
:
'
exit-confim
'
,
icon
:
3
,
title
:
'
提示
'
,
skin
:
'
msg-skin-message
'
,
success
:
function
(
layero
,
index
){
...
...
web/src/main/resources/template/tpl/traditionpage/index.html
浏览文件 @
63d7d2b2
...
...
@@ -208,7 +208,8 @@
<
dl
class
=
"
layui-nav-child
"
>
{{
#
each
childs
}}
<
dd
>
<
a
href
=
"
javascript:;
"
class
=
"
page-item-click
"
data
-
url
=
"
{{pageURL}}
"
data
-
id
=
"
{{id}}
"
data
-
title
=
"
{{icon}}{{name}}
"
data
-
type
=
"
{{menuType}}
"
>
<
a
href
=
"
javascript:;
"
class
=
"
page-item-click
"
data
-
url
=
"
{{pageURL}}
"
data
-
id
=
"
{{id}}
"
data
-
title
=
"
{{icon}}{{name}}
"
data
-
type
=
"
{{menuType}}
"
data
-
sysWinUrl
=
"
{{sysWinUrl}}
"
>
{{{
icon
}}}
<
cite
>
{{
name
}}
<
/cite
>
<
/a
>
...
...
@@ -223,7 +224,8 @@
<script
type=
"text/x-handlebars-template"
id=
"menuTemplate"
>
{{
#
bean
}}
<
li
class
=
"
layui-nav-item
"
>
<
a
href
=
"
javascript:;
"
class
=
"
page-item-click
"
data
-
url
=
"
{{pageURL}}
"
data
-
id
=
"
{{id}}
"
data
-
title
=
"
{{icon}}{{name}}
"
data
-
type
=
"
{{menuType}}
"
>
<
a
href
=
"
javascript:;
"
class
=
"
page-item-click
"
data
-
url
=
"
{{pageURL}}
"
data
-
id
=
"
{{id}}
"
data
-
title
=
"
{{icon}}{{name}}
"
data
-
type
=
"
{{menuType}}
"
data
-
sysWinUrl
=
"
{{sysWinUrl}}
"
>
{{{
icon
}}}
<
cite
>
{{
name
}}
<
/cite
>
<
/a
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录