Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
566a3170
提交
566a3170
authored
11月 15, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 行权限
上级
9620cd71
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
268 行增加
和
1 行删除
+268
-1
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+1
-0
zh.js
frontend/src/lang/zh.js
+1
-0
RowPermissions.vue
frontend/src/views/dataset/data/RowPermissions.vue
+35
-0
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+5
-1
authConfig.vue
frontend/src/views/dataset/data/authConfig.vue
+226
-0
LazyTree.vue
frontend/src/views/dataset/data/components/LazyTree.vue
+0
-0
没有找到文件。
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
566a3170
...
...
@@ -1228,6 +1228,7 @@ public class DataSetTableService {
dataSetDetail
.
setTable
(
table
);
if
(
ObjectUtils
.
isNotEmpty
(
table
))
{
Datasource
datasource
=
datasourceMapper
.
selectByPrimaryKey
(
table
.
getDataSourceId
());
datasource
.
setConfiguration
(
null
);
dataSetDetail
.
setDatasource
(
datasource
);
}
return
dataSetDetail
;
...
...
frontend/src/lang/zh.js
浏览文件 @
566a3170
...
...
@@ -1014,6 +1014,7 @@ export default {
field_check
:
'选中'
,
update_info
:
'更新信息'
,
join_view
:
'数据关联'
,
row_permissions
:
'行权限'
,
text
:
'文本'
,
time
:
'时间'
,
value
:
'数值'
,
...
...
frontend/src/views/dataset/data/RowPermissions.vue
0 → 100644
浏览文件 @
566a3170
<
template
>
<de-main-container
style=
"height: calc(100vh - 56px)"
>
<auth-config
/>
</de-main-container>
</
template
>
<
script
>
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
AuthConfig
from
'./authConfig'
export
default
{
name
:
'RowPermissions'
,
components
:
{
DeMainContainer
,
AuthConfig
},
data
()
{
return
{
authorityType
:
'authConfig'
}
},
watch
:
{
},
mounted
()
{
},
methods
:
{
executeAxios
(
param
)
{
this
.
$emit
(
'execute-axios'
,
param
)
},
handleClick
()
{
console
.
log
(
'===>handleClick'
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
566a3170
...
...
@@ -56,6 +56,9 @@
<el-tab-pane
v-if=
"table.type !== 'custom' && !(table.type === 'sql' && table.mode === 0)"
:label=
"$t('dataset.join_view')"
name=
"joinView"
>
<union-view
:param=
"param"
:table=
"table"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('dataset.row_permissions')"
name=
"rowPermissions"
>
<row-permissions
:param=
"param"
:table=
"table"
/>
</el-tab-pane>
<el-tab-pane
v-if=
"table.mode === 1 && (table.type === 'excel' || table.type === 'db' || table.type === 'sql')"
:label=
"$t('dataset.update_info')"
name=
"updateInfo"
>
<update-info
v-if=
"tabActive=='updateInfo'"
:param=
"param"
:table=
"table"
/>
</el-tab-pane>
...
...
@@ -69,11 +72,12 @@ import TabDataPreview from './TabDataPreview'
import
UpdateInfo
from
'./UpdateInfo'
import
DatasetChartDetail
from
'../common/DatasetChartDetail'
import
UnionView
from
'./UnionView'
import
RowPermissions
from
'./RowPermissions'
import
FieldEdit
from
'./FieldEdit'
export
default
{
name
:
'ViewTable'
,
components
:
{
FieldEdit
,
UnionView
,
DatasetChartDetail
,
UpdateInfo
,
TabDataPreview
},
components
:
{
RowPermissions
,
FieldEdit
,
UnionView
,
DatasetChartDetail
,
UpdateInfo
,
TabDataPreview
},
props
:
{
param
:
{
type
:
Object
,
...
...
frontend/src/views/dataset/data/authConfig.vue
0 → 100644
浏览文件 @
566a3170
<
template
>
<de-container
style=
"height: auto"
>
<de-aside-container
style=
"height: auto"
>
<el-button
v-show=
"!showTargetSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showTargetSearchWidget"
/>
<div
v-show=
"showTargetSearchInput"
class=
"de-input"
>
<el-input
v-model=
"targetFilterText"
class=
"main-area-input"
>
<el-button
slot=
"append"
icon=
"el-icon-close"
@
click=
"closeTargetSearchWidget"
/>
</el-input>
</div>
<el-tabs
v-model=
"targetActiveName"
:class=
"
{'de-search-header': showTargetSearchInput}" @tab-click="handleClick">
<el-tab-pane
v-for=
"(targetInfo, index) in targetInfoArray"
:key=
"index"
:lazy=
"true"
:label=
"targetInfo.tabName"
:name=
"targetInfo.authType"
>
<lazy-tree
v-if=
"targetActiveName===targetInfo.authType"
:active-name=
"targetActiveName"
:filter-text=
"targetFilterText"
:data-info=
"targetInfo"
highlight-current
@
nodeClick=
"authNodeClick"
@
execute-axios=
"executeAxios"
/>
</el-tab-pane>
</el-tabs>
</de-aside-container>
<de-main-container
class=
"de-main-container-auth"
>
<el-button
v-show=
"!showSourceSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showSourceSearchWidget"
/>
<div
v-show=
"showSourceSearchInput"
class=
"de-input"
>
<el-input
v-model=
"sourceFilterText"
class=
"main-area-input"
>
<el-button
slot=
"append"
icon=
"el-icon-close"
@
click=
"closeSourceSearchWidget"
/>
</el-input>
</div>
<el-tabs
v-model=
"sourceActiveName"
:class=
"
{'de-search-header': showSourceSearchInput}" @tab-click="handleClick">
<el-tab-pane
v-for=
"(sourceInfo, index) in sourceInfoTabs"
:key=
"index"
:lazy=
"true"
:label=
"sourceInfo.tabName"
:name=
"sourceInfo.authType"
>
<lazy-tree
v-if=
"authCondition"
:active-name=
"sourceActiveName"
:filter-text=
"sourceFilterText"
:data-info=
"sourceInfo"
show-extent
:auth-condition=
"authCondition"
@
execute-axios=
"executeAxios"
:attach-active-name=
"targetActiveName"
/>
</el-tab-pane>
</el-tabs>
</de-main-container>
</de-container>
</
template
>
<
script
>
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeAsideContainer
from
'@/components/dataease/DeAsideContainer'
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
LazyTree
from
'./components/LazyTree'
export
default
{
name
:
'Authority'
,
components
:
{
LazyTree
,
DeMainContainer
,
DeAsideContainer
,
DeContainer
},
props
:
{
resourceId
:
{
type
:
String
,
default
:
null
}
},
data
()
{
return
{
targetInfoArray
:
[
{
tabName
:
this
.
$t
(
'auth.dept'
),
head
:
this
.
$t
(
'auth.deptHead'
),
direction
:
'target'
,
authType
:
'dept'
},
{
tabName
:
this
.
$t
(
'auth.role'
),
head
:
this
.
$t
(
'auth.roleHead'
),
direction
:
'target'
,
authType
:
'role'
},
{
tabName
:
this
.
$t
(
'auth.user'
),
head
:
this
.
$t
(
'auth.userHead'
),
direction
:
'target'
,
authType
:
'user'
}],
sourceInfoArray
:
[
{
tabName
:
this
.
$t
(
'auth.linkAuth'
),
head
:
this
.
$t
(
'auth.linkAuthHead'
),
direction
:
'source'
,
authType
:
'link'
,
authTargets
:
'dept,role,user'
},
{
tabName
:
this
.
$t
(
'auth.datasetAuth'
),
head
:
this
.
$t
(
'auth.datasetAuthHead'
),
direction
:
'source'
,
authType
:
'dataset'
,
authTargets
:
'dept,role,user'
},
{
tabName
:
this
.
$t
(
'auth.chartAuth'
),
head
:
this
.
$t
(
'auth.chartAuthHead'
),
direction
:
'source'
,
authType
:
'chart'
,
authTargets
:
'dept,role,user'
},
{
tabName
:
this
.
$t
(
'auth.panelAuth'
),
head
:
this
.
$t
(
'auth.panelAuthHead'
),
direction
:
'source'
,
authType
:
'panel'
,
authTargets
:
'dept,role,user'
},
{
tabName
:
this
.
$t
(
'auth.menuAuth'
),
head
:
this
.
$t
(
'auth.menuAuthHead'
),
direction
:
'source'
,
authType
:
'menu'
,
authTargets
:
'dept,role,user'
}
],
targetActiveName
:
null
,
sourceActiveName
:
null
,
showSourceSearchInput
:
false
,
showTargetSearchInput
:
false
,
sourceFilterText
:
''
,
targetFilterText
:
''
,
timeMachine
:
null
,
authCondition
:
null
}
},
computed
:
{
sourceInfoTabs
()
{
const
tabs
=
[]
this
.
sourceInfoArray
.
forEach
(
item
=>
{
if
(
item
.
authTargets
.
indexOf
(
this
.
targetActiveName
)
>
-
1
)
{
tabs
.
push
(
item
)
}
})
return
tabs
}
},
created
()
{
this
.
targetActiveName
=
this
.
targetInfoArray
[
0
].
authType
this
.
sourceActiveName
=
this
.
sourceInfoArray
[
0
].
authType
},
methods
:
{
executeAxios
(
param
)
{
this
.
$emit
(
'execute-axios'
,
param
)
},
handleClick
(
tab
,
event
)
{
},
showSourceSearchWidget
()
{
this
.
showSourceSearchInput
=
true
},
closeSourceSearchWidget
()
{
this
.
sourceFilterText
=
''
this
.
showSourceSearchInput
=
false
},
showTargetSearchWidget
()
{
this
.
showTargetSearchInput
=
true
},
closeTargetSearchWidget
()
{
this
.
targetFilterText
=
''
this
.
showTargetSearchInput
=
false
},
save
()
{
this
.
$refs
[
this
.
activeName
].
save
()
this
.
$emit
(
'close-grant'
,
0
)
},
cancel
()
{
this
.
$refs
[
this
.
activeName
].
cancel
()
this
.
$emit
(
'close-grant'
,
0
)
},
authNodeClick
(
val
)
{
console
.
log
(
'authNodeClick'
)
this
.
authCondition
=
val
},
clickAuth
(
auth
)
{
console
.
log
(
'clickAuth'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.de-tab
{
border
:
1px
solid
#E6E6E6
;
min-height
:
200px
!
important
;
max-height
:
300px
!
important
;
overflow
:auto
;
}
.de-icon
{
position
:
absolute
;
right
:
10px
;
top
:
15px
;
z-index
:
99
;
}
.el-input-group__append
{
background-color
:
#ffffff
;
}
.el-input__inner
{
border-right
:
none
;
}
.auth-root-class
{
margin
:
15px
0px
5px
;
text-align
:
right
;
}
.de-main-container-auth
{
border
:
1px
solid
#E6E6E6
;
height
:
auto
;
}
.blackTheme
.de-main-container-auth
{
border-color
:
#495865
;
}
// ::-webkit-scrollbar {
// }
</
style
>
frontend/src/views/dataset/data/components/LazyTree.vue
0 → 100644
浏览文件 @
566a3170
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论