Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
4afd7101
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1439
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看板
提交
4afd7101
编写于
7月 28, 2022
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【手机端】角色赋权APP权限整改完成
上级
8022ce86
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
97 deletion
+78
-97
userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAppMenu.js
...ain/resources/template/js/sysEveRole/sysEveRoleAppMenu.js
+58
-79
userauth/src/main/resources/template/tpl/appWorkPage/appWorkPageList.html
...n/resources/template/tpl/appWorkPage/appWorkPageList.html
+20
-18
未找到文件。
userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAppMenu.js
浏览文件 @
4afd7101
...
...
@@ -29,13 +29,13 @@ layui.config({
var
pointIds
=
""
;
//权限点
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
){
if
(
i
==
nodes
.
length
-
1
){
if
(
nodes
[
i
].
type
==
"
auth
p
oint
"
){
if
(
nodes
[
i
].
type
==
"
auth
P
oint
"
){
pointIds
+=
nodes
[
i
].
id
;
}
else
{
menuIds
+=
nodes
[
i
].
id
;
}
}
else
{
if
(
nodes
[
i
].
type
==
"
auth
p
oint
"
){
if
(
nodes
[
i
].
type
==
"
auth
P
oint
"
){
pointIds
+=
nodes
[
i
].
id
+
"
,
"
;
}
else
{
menuIds
+=
nodes
[
i
].
id
+
"
,
"
;
...
...
@@ -45,7 +45,7 @@ layui.config({
var
params
=
{
menuIds
:
menuIds
,
pointIds
:
pointIds
,
rowI
d
:
parent
.
rowId
i
d
:
parent
.
rowId
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
sys039
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
...
...
@@ -58,59 +58,48 @@ layui.config({
});
/********* tree 处理 start *************/
var
trees
=
{};
var
treeDoms
=
$
(
"
ul.fsTree
"
);
var
tree
;
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
sys038
"
,
params
:{
rowId
:
parent
.
rowId
},
type
:
'
json
'
,
callback
:
function
(
json
)
{
$
(
"
#roleName
"
).
text
(
json
.
bean
.
roleName
);
$
(
"
#roleDesc
"
).
text
(
json
.
bean
.
roleDesc
);
checkeRows
=
json
.
rows
;
if
(
treeDoms
.
length
>
0
)
{
$
(
treeDoms
).
each
(
function
(
i
)
{
var
treeId
=
$
(
this
).
attr
(
"
id
"
);
var
funcNo
=
$
(
this
).
attr
(
"
funcNo
"
);
var
url
=
$
(
this
).
attr
(
"
url
"
);
var
tree
=
fsTree
.
render
({
id
:
treeId
,
funcNo
:
funcNo
,
url
:
reqBasePath
+
url
,
getTree
:
getTree
,
checkEnable
:
true
,
loadEnable
:
false
,
showLine
:
false
,
showIcon
:
false
,
addDiyDom
:
addDiyDom
,
fontCss
:
setFontCss
},
function
(
id
){
var
zTreeObj
=
$
.
fn
.
zTree
.
getZTreeObj
(
id
);
var
zTree
=
zTreeObj
.
getCheckedNodes
(
false
);
for
(
var
i
=
0
;
i
<
zTree
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
checkeRows
.
length
;
j
++
){
if
(
zTree
[
i
].
id
==
checkeRows
[
j
].
menuId
){
zTreeObj
.
checkNode
(
zTree
[
i
],
true
);
}
}
}
var
li_head
=
'
<li class="head"><a><div class="diy">所属系统</div><div class="diy">菜单权限</div><div class="diy">菜单类型</div></a></li>
'
;
var
rows
=
$
(
"
#
"
+
treeId
).
find
(
'
li
'
);
if
(
rows
.
length
>
0
)
{
rows
.
eq
(
0
).
before
(
li_head
)
}
else
{
$
(
"
#
"
+
treeId
).
append
(
li_head
);
$
(
"
#
"
+
treeId
).
append
(
'
<li ><div style="text-align: center;line-height: 30px;" >无符合条件数据</div></li>
'
)
tree
=
fsTree
.
render
({
id
:
"
treeDemo
"
,
url
:
reqBasePath
+
"
sys037
"
,
getTree
:
getTree
,
checkEnable
:
true
,
loadEnable
:
false
,
showLine
:
false
,
showIcon
:
false
,
addDiyDom
:
addDiyDom
,
fontCss
:
setFontCss
},
function
(
id
){
var
zTreeObj
=
$
.
fn
.
zTree
.
getZTreeObj
(
id
);
var
zTree
=
zTreeObj
.
getCheckedNodes
(
false
);
for
(
var
i
=
0
;
i
<
zTree
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
checkeRows
.
length
;
j
++
){
if
(
zTree
[
i
].
id
==
checkeRows
[
j
].
menuId
){
zTreeObj
.
checkNode
(
zTree
[
i
],
true
);
}
});
if
(
treeDoms
.
length
==
1
)
{
trees
[
treeId
]
=
tree
;
}
else
{
//深度拷贝对象
trees
[
treeId
]
=
$
.
extend
(
true
,
{},
tree
);
}
});
//绑定按钮事件
fsCommon
.
buttonEvent
(
"
tree
"
,
getTree
);
}
}
var
li_head
=
'
<li class="head"><a>
'
+
'
<div class="diy" style="width: 40%">菜单权限</div>
'
+
'
<div class="diy">所属系统</div>
'
+
'
<div class="diy">菜单类型</div>
'
+
'
</a></li>
'
;
var
rows
=
$
(
"
#treeDemo
"
).
find
(
'
li
'
);
if
(
rows
.
length
>
0
)
{
rows
.
eq
(
0
).
before
(
li_head
);
}
else
{
$
(
"
#
"
+
treeId
).
append
(
li_head
);
$
(
"
#
"
+
treeId
).
append
(
'
<li ><div style="text-align: center;line-height: 30px;" >无符合条件数据</div></li>
'
)
}
});
// 绑定按钮事件
fsCommon
.
buttonEvent
(
"
tree
"
,
getTree
);
}});
function
getTree
(
treeId
)
{
...
...
@@ -130,51 +119,41 @@ layui.config({
* 自定义DOM节点
*/
function
addDiyDom
(
treeId
,
treeNode
)
{
var
spaceWidth
=
15
;
var
liObj
=
$
(
"
#
"
+
treeNode
.
tId
);
var
aObj
=
$
(
"
#
"
+
treeNode
.
tId
+
"
_a
"
);
var
switchObj
=
$
(
"
#
"
+
treeNode
.
tId
+
"
_switch
"
);
var
icoObj
=
$
(
"
#
"
+
treeNode
.
tId
+
"
_ico
"
);
var
spanObj
=
$
(
"
#
"
+
treeNode
.
tId
+
"
_span
"
);
aObj
.
attr
(
'
title
'
,
''
);
aObj
.
append
(
'
<div class="diy swich"></div>
'
);
var
div
=
$
(
liObj
).
find
(
'
div
'
).
eq
(
0
);
aObj
.
append
(
'
<div class="diy swich" style="width: 40%"></div>
'
);
switchObj
.
remove
();
spanObj
.
remove
();
icoObj
.
remove
();
var
div
=
$
(
"
#
"
+
treeNode
.
tId
).
find
(
'
.swich
'
).
eq
(
0
);
div
.
append
(
switchObj
);
div
.
append
(
spanObj
);
var
spaceStr
=
"
<span style='height:1px;display: inline-block;width:
"
+
(
spaceWidth
*
treeNode
.
level
)
+
"
px'></span>
"
;
switchObj
.
before
(
spaceStr
);
var
editStr
=
''
;
editStr
=
'
<div class="diy">
'
+
(
treeNode
.
sysName
==
null
?
'
'
:
treeNode
.
sysName
)
+
'
</div>
'
;
aObj
.
before
(
editStr
);
editStr
=
'
<div class="diy">
'
+
(
treeNode
.
appType
==
null
?
'
'
:
treeNode
.
appType
)
+
'
</div>
'
;
aObj
.
append
(
editStr
);
editStr
=
'
<div class="diy layui-hide">
'
+
(
treeNode
.
type
==
null
?
'
'
:
treeNode
.
type
)
+
'
</div>
'
;
aObj
.
append
(
editStr
);
switchObj
.
before
(
"
<span style='height:1px; display: inline-block; width:
"
+
(
15
*
treeNode
.
level
)
+
"
px'></span>
"
);
// 所属系统
aObj
.
append
(
'
<div class="diy">
'
+
treeNode
.
sysName
+
'
</div>
'
);
// 菜单类型
aObj
.
append
(
'
<div class="diy">
'
+
treeNode
.
pageType
+
'
</div>
'
);
}
var
lastValue
=
""
,
nodeList
=
[],
fontCss
=
{},
hiddenNodes
=
[];
var
lastValue
=
""
,
nodeList
=
[],
hiddenNodes
=
[];
$
(
"
#menuName
"
).
val
(
''
);
var
key
=
$
(
"
#menuName
"
);
key
.
bind
(
"
focus
"
,
focusKey
)
.
bind
(
"
blur
"
,
blurKey
)
.
bind
(
"
propertychange
"
,
searchNode
)
//property(属性)change(改变)的时候,触发事件
.
bind
(
"
input
"
,
searchNode
);
function
focusKey
(
e
)
{
if
(
key
.
hasClass
(
"
empty
"
))
{
key
.
removeClass
(
"
empty
"
);
}
}
function
blurKey
(
e
)
{
if
(
key
.
get
(
0
).
value
===
""
)
{
key
.
addClass
(
"
empty
"
);
}
}
key
.
bind
(
"
focus
"
,
function
(
e
)
{
if
(
key
.
hasClass
(
"
empty
"
))
{
key
.
removeClass
(
"
empty
"
);
}
}).
bind
(
"
blur
"
,
function
(
e
)
{
if
(
key
.
get
(
0
).
value
===
""
)
{
key
.
addClass
(
"
empty
"
);
}
}).
bind
(
"
propertychange
"
,
searchNode
)
//property(属性)change(改变)的时候,触发事件
.
bind
(
"
input
"
,
searchNode
);
//搜索树
function
searchNode
(
e
)
{
...
...
userauth/src/main/resources/template/tpl/appWorkPage/appWorkPageList.html
浏览文件 @
4afd7101
...
...
@@ -13,24 +13,26 @@
<button
id=
"addBean"
class=
"winui-toolbtn search-table-btn-right"
auth=
"1563602200836"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
auth
(
'
1563602200836
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1563602242822
'
)
&&
d
.
childNum
==
0
){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
delete
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
d
.
orderBy
!=
1
&&
auth
(
'
1563602259975
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
top
"
>
上移
<
/a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1563602272986
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
lower
"
>
下移
<
/a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1563602587596
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
authpoint
"
>
权限点
<
/a
>
{{
#
}
}}
</script>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
auth
(
'
1563602200836
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1563602242822
'
)
&&
d
.
childNum
==
0
){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
delete
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
d
.
orderBy
!=
1
&&
auth
(
'
1563602259975
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
top
"
>
上移
<
/a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1563602272986
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
lower
"
>
下移
<
/a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1563602587596
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
authpoint
"
>
权限点
<
/a
>
{{
#
}
}}
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录