Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
d19f0f2a
提交
d19f0f2a
authored
11月 30, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
f8279b11
db04aabd
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
83 行增加
和
88 行删除
+83
-88
ExtVAuthModelMapper.java
...java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.java
+1
-1
ExtVAuthModelMapper.xml
.../java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml
+11
-7
DatasetGroupSelectorTree.vue
...end/src/views/dataset/common/DatasetGroupSelectorTree.vue
+71
-80
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.java
浏览文件 @
d19f0f2a
...
...
@@ -8,6 +8,6 @@ import java.util.List;
public
interface
ExtVAuthModelMapper
{
List
<
VAuthModelDTO
>
queryAuthModel
(
@Param
(
"record"
)
VAuthModelRequest
re
quest
);
List
<
VAuthModelDTO
>
queryAuthModel
(
@Param
(
"record"
)
VAuthModelRequest
re
cord
);
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml
浏览文件 @
d19f0f2a
...
...
@@ -19,9 +19,10 @@
v_auth_model.create_by,
v_auth_model.level,
v_auth_model.mode,
v_auth_model.data_source_id,
authInfo.PRIVILEGES AS `privileges`
FROM
( SELECT GET_V_AUTH_MODEL_ID_P_USE ( #{re
quest.userId}, #{request
.modelType} ) cids ) t,
( SELECT GET_V_AUTH_MODEL_ID_P_USE ( #{re
cord.userId}, #{record
.modelType} ) cids ) t,
v_auth_model
LEFT JOIN (
SELECT
...
...
@@ -35,19 +36,19 @@
)))
WHERE
sys_auth_detail.privilege_value = 1
AND sys_auth.auth_source_type = #{re
quest
.modelType}
AND sys_auth.auth_source_type = #{re
cord
.modelType}
AND (
(
sys_auth.auth_target_type = 'dept'
AND sys_auth.auth_target IN ( SELECT dept_id FROM sys_user WHERE user_id = #{re
quest
.userId} )
AND sys_auth.auth_target IN ( SELECT dept_id FROM sys_user WHERE user_id = #{re
cord
.userId} )
)
OR (
sys_auth.auth_target_type = 'user'
AND sys_auth.auth_target = #{re
quest
.userId}
AND sys_auth.auth_target = #{re
cord
.userId}
)
OR (
sys_auth.auth_target_type = 'role'
AND sys_auth.auth_target IN ( SELECT role_id FROM sys_users_roles WHERE user_id = #{re
quest
.userId} )
AND sys_auth.auth_target IN ( SELECT role_id FROM sys_users_roles WHERE user_id = #{re
cord
.userId} )
)
)
GROUP BY
...
...
@@ -92,11 +93,14 @@
and v_auth_model.`label` = #{record.label,jdbcType=LONGVARCHAR}
</if>
<if
test=
"record.modelInnerTypeArray != null and record.modelInnerTypeArray.size() > 0"
>
v_auth_model.model_inner_type in
<foreach
collection=
"modelInnerTypeArray"
item=
"item"
separator=
","
open=
"("
close=
")"
>
and
v_auth_model.model_inner_type in
<foreach
collection=
"
record.
modelInnerTypeArray"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
'record.modelType != null and record.modelType == "dataset"'
>
or (v_auth_model.`model_inner_type` = 'group' and v_auth_model.model_type = 'dataset')
</if>
ORDER BY v_auth_model.node_type desc, CONVERT(v_auth_model.label using gbk) asc
</select>
...
...
frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue
浏览文件 @
d19f0f2a
...
...
@@ -78,10 +78,7 @@
<
script
>
import
{
isKettleRunning
,
post
}
from
'@/api/dataset/dataset'
import
{
hasDataPermission
}
from
'@/utils/permission'
import
{
queryAuthModel
}
from
'@/api/authModel/authModel'
export
default
{
name
:
'DatasetGroupSelectorTree'
,
props
:
{
...
...
@@ -134,7 +131,7 @@ export default {
type
:
Boolean
,
required
:
false
,
default
:
false
}
,
}
},
data
()
{
return
{
...
...
@@ -198,7 +195,7 @@ export default {
}
},
mounted
()
{
this
.
treeNode
(
true
)
this
.
treeNode
()
},
created
()
{
this
.
kettleState
()
...
...
@@ -220,7 +217,6 @@ export default {
sort
:
'type desc,name asc'
}
},
closeTable
()
{
this
.
editTable
=
false
this
.
tableForm
=
{
...
...
@@ -233,8 +229,18 @@ export default {
if
(
userCache
)
{
this
.
data
=
JSON
.
parse
(
modelInfo
)
}
queryAuthModel
({
modelType
:
'dataset'
,
privileges
:
this
.
privileges
,
datasetMode
:
this
.
mode
,
clearEmptyDir
:
this
.
clearEmptyDir
},
!
userCache
).
then
(
res
=>
{
localStorage
.
setItem
(
'dataset-tree'
,
JSON
.
stringify
(
res
.
data
))
this
.
customType
?
this
.
customType
.
push
(
'group'
)
:
null
queryAuthModel
({
modelType
:
'dataset'
,
privileges
:
this
.
privileges
,
datasetMode
:
this
.
mode
,
clearEmptyDir
:
this
.
clearEmptyDir
,
mode
:
this
.
mode
<
0
?
null
:
this
.
mode
,
modelInnerTypeArray
:
this
.
customType
},
!
userCache
).
then
(
res
=>
{
if
(
cache
)
{
localStorage
.
setItem
(
'dataset-tree'
,
JSON
.
stringify
(
res
.
data
))
}
if
(
!
userCache
)
{
this
.
data
=
res
.
data
}
...
...
@@ -253,11 +259,9 @@ export default {
}
}
},
back
()
{
this
.
sceneMode
=
false
},
sceneClick
(
data
,
node
)
{
if
(
data
.
disabled
)
{
this
.
$message
({
...
...
@@ -287,7 +291,6 @@ export default {
this
.
$emit
(
'getTable'
,
data
)
}
},
unionDataChange
()
{
if
(
!
this
.
sceneMode
)
{
return
...
...
@@ -311,7 +314,6 @@ export default {
})
unionList
.
push
(
this
.
checkedList
[
0
].
tableId
)
const
notUnionList
=
tableList
.
concat
(
unionList
).
filter
(
v
=>
tableList
.
includes
(
v
)
&&
!
unionList
.
includes
(
v
))
notUnionList
.
forEach
(
ele
=>
{
const
span
=
document
.
getElementById
(
ele
).
parentNode
const
div1
=
span
.
parentNode
...
...
@@ -321,7 +323,6 @@ export default {
div2
.
style
.
setProperty
(
'pointer-events'
,
'none'
)
})
},
nodeExpand
(
data
)
{
if
(
data
.
id
)
{
this
.
expandedArray
.
push
(
data
.
id
)
...
...
@@ -353,76 +354,66 @@ export default {
searchTypeClick
(
searchTypeInfo
)
{
this
.
searchType
=
searchTypeInfo
}
}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
}
.search-input
{
padding
:
12px
0
;
}
.tree-list
>>>
.el-tree-node__expand-icon.is-leaf
{
display
:
none
;
}
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
.custom-tree-node-list
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding
:
0
8px
;
}
.custom-position
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
flex-flow
:
row
nowrap
;
}
.form-item
{
margin-bottom
:
0
;
}
.title-css
{
height
:
26px
;
}
.title-text
{
line-height
:
26px
;
}
.scene-title
{
width
:
100%
;
display
:
flex
;
}
.scene-title-name
{
width
:
100%
;
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.tree-style
{
padding
:
10px
;
height
:
100%
;
overflow-y
:
auto
;
}
.el-divider--horizontal
{
margin
:
12px
0
}
.search-input
{
padding
:
12px
0
;
}
.tree-list
>>>
.el-tree-node__expand-icon.is-leaf
{
display
:
none
;
}
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
.custom-tree-node-list
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding
:
0
8px
;
}
.custom-position
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
flex-flow
:
row
nowrap
;
}
.form-item
{
margin-bottom
:
0
;
}
.title-css
{
height
:
26px
;
}
.title-text
{
line-height
:
26px
;
}
.scene-title
{
width
:
100%
;
display
:
flex
;
}
.scene-title-name
{
width
:
100%
;
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.tree-style
{
padding
:
10px
;
height
:
100%
;
overflow-y
:
auto
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论