Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
7854f36d
提交
7854f36d
authored
5月 26, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: UI调整
上级
91fdee6e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
26 行增加
和
39 行删除
+26
-39
SystemConstants.java
...n/java/io/dataease/commons/constants/SystemConstants.java
+4
-0
SysAuthService.java
...src/main/java/io/dataease/service/sys/SysAuthService.java
+7
-8
lock_closed.svg
frontend/src/icons/svg/lock_closed.svg
+2
-2
lock_open.svg
frontend/src/icons/svg/lock_open.svg
+2
-2
LazyTree.vue
frontend/src/views/system/authority/components/LazyTree.vue
+11
-27
没有找到文件。
backend/src/main/java/io/dataease/commons/constants/SystemConstants.java
浏览文件 @
7854f36d
...
...
@@ -14,6 +14,10 @@ public class SystemConstants {
}
public
static
final
class
PRIVILEGE_VALUE
{
public
final
static
Integer
ON
=
1
;
public
final
static
Integer
OFF
=
0
;
}
}
backend/src/main/java/io/dataease/service/sys/SysAuthService.java
浏览文件 @
7854f36d
...
...
@@ -91,14 +91,13 @@ public class SysAuthService {
});
});
// 授权修改
extSysAuthDetailMapper
.
authDetailsChange
(
sysAuthDetail
.
getPrivilegeValue
(),
sysAuthDetail
.
getPrivilegeType
(),
authIdChange
);
// if(sysAuthDetail.getPrivilegeValue()==SystemConstants.PRIVILEGE_VALUE_ON){
// //当前为开启1 >>> 关闭0 需要将权限级别(PrivilegeType)大于当前级别的全新都修改为关闭 0
// extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_OFF,sysAuthDetail.getPrivilegeType(),authIdChange);
// }else{
// //当前为关闭0 >>> 开启1 需要将权限级别(PrivilegeType)小于当前级别的全新都修改为开启 1
// extSysAuthDetailMapper.authDetailsChange(SystemConstants.PRIVILEGE_VALUE_ON,sysAuthDetail.getPrivilegeType(),authIdChange);
// }
if
(
sysAuthDetail
.
getPrivilegeValue
()==
SystemConstants
.
PRIVILEGE_VALUE
.
ON
){
//当前为开启1 >>> 关闭0 需要将权限级别(PrivilegeType)大于当前级别的全新都修改为关闭 0
extSysAuthDetailMapper
.
authDetailsChange
(
SystemConstants
.
PRIVILEGE_VALUE
.
OFF
,
sysAuthDetail
.
getPrivilegeType
(),
authIdChange
);
}
else
{
//当前为关闭0 >>> 开启1 需要将权限级别(PrivilegeType)小于当前级别的全新都修改为开启 1
extSysAuthDetailMapper
.
authDetailsChange
(
SystemConstants
.
PRIVILEGE_VALUE
.
ON
,
sysAuthDetail
.
getPrivilegeType
(),
authIdChange
);
}
}
}
...
...
frontend/src/icons/svg/lock_closed.svg
浏览文件 @
7854f36d
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1620789091905"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"11831"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M295.424 831.36512l450.56 0c11.30496 0 20.48-9.17504 20.48-20.48l0-350.4128c0-11.30496-9.17504-20.48-20.48-20.48l-9.70752 0c0-21.0944 0-50.95424 0-51.36384-1.26976-117.248-97.95584-212.62336-215.552-212.62336-117.94432 0-214.6304 95.66208-215.57248 213.4016l0 50.5856-9.70752 0c-11.30496 0-20.48 9.17504-20.48 20.48l0 350.4128C274.944 822.19008 284.09856 831.36512 295.424 831.36512zM725.504 790.40512l-409.6 0 0-309.4528 409.6 0L725.504 790.40512zM346.09152 389.57056c0.75776-95.17056 79.07328-172.60544 174.61248-172.60544 95.25248 0 173.58848 77.2096 174.592 172.01152 0 1.3312 0 30.35136 0 51.01568L346.07104 439.99232 346.09152 389.57056z"
p-id=
"11832"
></path><path
d=
"M476.01664 721.69472c0 11.30496 9.17504 20.48 20.48 20.48l48.37376 0c11.30496 0 20.48-9.17504 20.48-20.48l0-66.17088c16.6912-13.37344 26.64448-33.56672 26.64448-55.1936 0-39.23968-31.98976-71.168-71.31136-71.168s-71.31136 31.92832-71.31136 71.168c0 21.62688 9.95328 41.82016 26.64448 55.1936L476.01664 721.69472zM520.704 570.14272c16.73216 0 30.35136 13.55776 30.35136 30.208 0 10.87488-6.10304 20.97152-15.95392 26.3168-6.59456 3.584-10.69056 10.48576-10.69056 17.98144l0 56.56576-7.41376 0 0-56.56576c0-7.49568-4.096-14.41792-10.69056-17.98144-9.8304-5.34528-15.95392-15.44192-15.95392-26.3168C490.33216 583.68 503.95136 570.14272 520.704 570.14272z"
p-id=
"11833"
></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1622003025732"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"7043"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M810.666667 213.333333l0 597.333333L213.333333 810.666667 213.333333 213.333333 810.666667 213.333333M810.666667 128 213.333333 128C166.4 128 128 166.4 128 213.333333l0 597.333333c0 46.933333 38.4 85.333333 85.333333 85.333333l597.333333 0c46.933333 0 85.333333-38.4 85.333333-85.333333L896 213.333333C896 166.4 857.6 128 810.666667 128L810.666667 128z"
p-id=
"7044"
fill=
"#bfbfbf"
></path></svg>
\ No newline at end of file
frontend/src/icons/svg/lock_open.svg
浏览文件 @
7854f36d
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1620789052806"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"11539"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M476.01664 721.69472c0 11.30496 9.17504 20.48 20.48 20.48l48.37376 0c11.30496 0 20.48-9.17504 20.48-20.48l0-66.17088c16.6912-13.37344 26.64448-33.56672 26.64448-55.1936 0-39.23968-31.98976-71.168-71.31136-71.168s-71.31136 31.92832-71.31136 71.168c0 21.62688 9.95328 41.82016 26.64448 55.1936L476.01664 721.69472zM520.704 570.14272c16.73216 0 30.35136 13.55776 30.35136 30.208 0 10.87488-6.10304 20.97152-15.95392 26.3168-6.59456 3.584-10.69056 10.48576-10.69056 17.98144l0 56.56576-7.41376 0 0-56.56576c0-7.49568-4.096-14.41792-10.69056-17.98144-9.8304-5.34528-15.95392-15.44192-15.95392-26.3168C490.33216 583.68 503.95136 570.14272 520.704 570.14272z"
p-id=
"11540"
fill=
"#1296db"
></path><path
d=
"M295.424 831.22176l450.56 0c11.30496 0 20.48-9.17504 20.48-20.48L766.464 463.72864c0-11.30496-9.17504-20.48-20.48-20.48L338.1248 443.24864c-20.7872-61.56288-5.2224-129.59744 41.69728-175.9232 67.42016-66.53952 177.664-67.11296 245.71904-1.37216 1.47456 1.4336 50.72896 50.05312 50.72896 50.05312l28.7744-29.16352c0 0-50.50368-49.84832-50.97472-50.29888-83.98848-81.16224-219.91424-80.42496-303.0016 1.6384-54.84544 54.14912-75.48928 132.34176-56.0128 205.12768-11.12064 0.2048-20.09088 9.23648-20.09088 20.39808l0 347.01312C274.944 822.04672 284.09856 831.22176 295.424 831.22176zM725.504 790.26176l-409.6 0L315.904 484.20864l409.6 0L725.504 790.26176z"
p-id=
"11541"
fill=
"#1296db"
></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1622002928181"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"6752"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m-384 597.333333l-213.333334-213.333333 59.733334-59.733333 153.6 153.6 324.266666-324.266667L810.666667 341.333333l-384 384z"
p-id=
"6753"
fill=
"#0a7be0"
></path></svg>
\ No newline at end of file
frontend/src/views/system/authority/components/LazyTree.vue
浏览文件 @
7854f36d
...
...
@@ -18,23 +18,26 @@
@
node-click=
"nodeClick"
>
<span
slot-scope=
"
{ node, data }" class="custom-tree-node">
<span
style=
"display: flex; flex: 1 1 0%; width: 0px;"
>
<span
style=
"margin-left: 6px
;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
"
v-html=
"data.name"
/>
<span>
<span
style=
"margin-left: 6px"
v-html=
"data.name"
/>
</span>
<span
v-if=
"showExtent"
@
click
.
stop
>
<div
v-if=
"auth
Ready && auth
Details[data.id]"
>
<div
v-if=
"authDetails[data.id]"
>
<span
v-for=
"auth in authDetails[data.id]"
:key=
"auth.privilegeType"
class=
"auth-span"
>
<!-- 1-
{{
auth
.
privilegeType
}}
-
{{
auth
.
privilegeValue
}}
-->
<el-switch
v-model=
"auth.privilegeValue"
:active-value=
"1"
:inactive-value=
"0"
inactive-color=
"#DCDFE6"
@
change=
"clickAuth(data.id,auth)"
/>
<a
href=
"javascript:;"
@
click=
"clickAuth(data.id,auth)"
>
<svg-icon
style=
"width: 22px;height: 22px"
:icon-class=
"auth.privilegeValue===1?'lock_open':'lock_closed'"
/>
</a>
</span>
</div>
<div
v-else
>
<span
v-for=
"auth in defaultAuthDetails"
:key=
"auth.privilegeType"
class=
"auth-span"
>
<!--2-
{{
auth
.
privilegeType
}}
-
{{
auth
.
privilegeValue
}}
-->
<el-switch
v-model=
"auth.privilegeValue"
:active-value=
"1"
:inactive-value=
"0"
inactive-color=
"#DCDFE6"
@
change=
"clickAuth(data.id,auth)"
/>
<a
href=
"javascript:;"
@
click=
"clickAuth(data.id,auth)"
>
<svg-icon
style=
"width: 22px;height: 22px"
:icon-class=
"auth.privilegeValue===1?'lock_open':'lock_closed'"
/>
</a>
</span>
</div>
</span>
</div></span>
</span>
</el-tree>
</el-row>
...
...
@@ -91,8 +94,6 @@ export default {
},
authDetails
:
{},
defaultAuthDetails
:
[],
// 刷新 解决 authDetails 对象改变 authDetails[id] 报错的情况
authReady
:
false
,
searchStatus
:
false
,
// 当前是否在搜索状态 (搜索状态 展开不加载子节点)
// 当前已经加载的节点ID 备用(当前把当前authTarget的所有授权加载进来)
loadedNodeIds
:
new
Set
()
...
...
@@ -133,7 +134,6 @@ export default {
loadAuth
()
{
if
(
this
.
authCondition
&&
this
.
showExtent
)
{
debugger
this
.
authReady
=
false
let
authQueryCondition
=
{}
if
(
this
.
dataInfo
.
direction
===
'source'
)
{
// 当前为授权数据 获取当前authTarget 的授权信息 authSource
...
...
@@ -149,7 +149,6 @@ export default {
}
authDetails
(
authQueryCondition
).
then
(
res
=>
{
this
.
authDetails
=
res
.
data
this
.
authReady
=
true
})
}
},
...
...
@@ -253,7 +252,6 @@ export default {
}
}
authChange
(
authChangeCondition
).
then
(
res
=>
{
this
.
authDetails
=
res
.
data
// 重新加载权限
this
.
loadAuth
()
})
...
...
@@ -283,9 +281,8 @@ export default {
padding-left
:
8px
;
}
.tree-main
{
height
:
calc
(
100vh
-
206px
)
;
height
:
100vh
;
border
:
1px
solid
#e6e6e6
;
overflow-y
:
auto
;
}
.tree-head
{
height
:
30px
;
...
...
@@ -305,17 +302,4 @@ export default {
color
:
#faaa39
!important
;
}
>>>
.el-switch__core
{
width
:
30px
!important
;
height
:
13px
;
/*color:#409EFF;*/
}
/*设置圆*/
>>>
.el-switch__core
::after
{
width
:
13px
;
height
:
13px
;
margin-top
:
-2px
;
margin-bottom
:
2px
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论