Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
7c429d96
提交
7c429d96
authored
6月 03, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
101a8a24
31a59021
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
49 行增加
和
24 行删除
+49
-24
ExtPanelShareMapper.java
...java/io/dataease/base/mapper/ext/ExtPanelShareMapper.java
+2
-1
ExtPanelShareMapper.xml
.../java/io/dataease/base/mapper/ext/ExtPanelShareMapper.xml
+8
-7
ShareService.java
...src/main/java/io/dataease/service/panel/ShareService.java
+12
-3
dataset.js
frontend/src/api/dataset/dataset.js
+2
-2
cron.vue
frontend/src/components/cron/cron.vue
+1
-1
index.scss
frontend/src/styles/index.scss
+3
-1
index.vue
frontend/src/views/chart/index.vue
+5
-1
DatasetGroupSelector.vue
frontend/src/views/dataset/common/DatasetGroupSelector.vue
+1
-1
index.vue
frontend/src/views/dataset/index.vue
+6
-2
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+1
-1
PanelMain.vue
frontend/src/views/panel/list/PanelMain.vue
+5
-1
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+3
-3
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelShareMapper.java
浏览文件 @
7c429d96
...
...
@@ -7,12 +7,13 @@ import io.dataease.dto.panel.PanelSharePo;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
public
interface
ExtPanelShareMapper
{
int
batchInsert
(
@Param
(
"shares"
)
List
<
PanelShare
>
shares
);
List
<
PanelSharePo
>
query
(
GridExample
example
);
List
<
PanelSharePo
>
query
(
Map
<
String
,
Object
>
param
);
List
<
PanelShare
>
queryWithResource
(
GridExample
example
);
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelShareMapper.xml
浏览文件 @
7c429d96
...
...
@@ -16,16 +16,17 @@
</foreach>
</insert>
<select
id=
"query"
parameterType=
"io.dataease.base.mapper.ext.query.GridExample"
resultMap=
"treeNodeMap"
>
<select
id=
"query"
resultMap=
"treeNodeMap"
>
select distinct s.panel_group_id as id, g.create_by as creator, g.name
from panel_share s
left join panel_group g on g.id = s.panel_group_id
<if
test=
"_parameter != null"
>
<include
refid=
"io.dataease.base.mapper.ext.query.GridSql.gridCondition"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
where
( s.target_id = #{userId} and s.type = 0 ) or
( s.target_id = #{deptId} and s.type = 1 ) or
s.target_id in
<foreach
collection=
"roleIds"
item=
"roleId"
open=
'('
separator=
','
close=
')'
>
#{roleId}
</foreach>
<if
test=
"orderByClause == null"
>
order by s.create_time desc
</if>
...
...
backend/src/main/java/io/dataease/service/panel/ShareService.java
浏览文件 @
7c429d96
...
...
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -92,7 +93,14 @@ public class ShareService {
Long
deptId
=
user
.
getDeptId
();
List
<
Long
>
roleIds
=
user
.
getRoles
().
stream
().
map
(
CurrentRoleDto:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
targetIds
=
new
ArrayList
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"userId"
,
userId
);
param
.
put
(
"deptId"
,
deptId
);
param
.
put
(
"roleIds"
,
roleIds
);
List
<
PanelSharePo
>
datas
=
extPanelShareMapper
.
query
(
param
);
/*List<Long> targetIds = new ArrayList<>();
targetIds.add(userId);
targetIds.add(deptId);
targetIds.addAll(roleIds);
...
...
@@ -105,14 +113,15 @@ public class ShareService {
request.setConditions(new ArrayList<ConditionEntity>(){{add(condition);}});
GridExample example = request.convertExample();
List
<
PanelSharePo
>
datas
=
extPanelShareMapper
.
query
(
example
);
List<PanelSharePo> datas = extPanelShareMapper.query(example);
*/
List
<
PanelShareDto
>
dtoLists
=
datas
.
stream
().
map
(
po
->
BeanUtils
.
copyBean
(
new
PanelShareDto
(),
po
)).
collect
(
Collectors
.
toList
());
return
convertTree
(
dtoLists
);
}
//List构建Tree
private
List
<
PanelShareDto
>
convertTree
(
List
<
PanelShareDto
>
datas
){
Map
<
String
,
List
<
PanelShareDto
>>
map
=
datas
.
stream
().
filter
(
panelShareDto
->
StringUtils
.
isNotEmpty
(
panelShareDto
.
getCreator
())).
collect
(
Collectors
.
groupingBy
(
PanelShareDto:
:
getCreator
));
String
username
=
AuthUtils
.
getUser
().
getUsername
();
Map
<
String
,
List
<
PanelShareDto
>>
map
=
datas
.
stream
().
filter
(
panelShareDto
->
StringUtils
.
isNotEmpty
(
panelShareDto
.
getCreator
())
&&
!
StringUtils
.
equals
(
username
,
panelShareDto
.
getCreator
())).
collect
(
Collectors
.
groupingBy
(
PanelShareDto:
:
getCreator
));
return
map
.
entrySet
().
stream
().
map
(
entry
->
{
PanelShareDto
panelShareDto
=
new
PanelShareDto
();
panelShareDto
.
setName
(
entry
.
getKey
());
...
...
frontend/src/api/dataset/dataset.js
浏览文件 @
7c429d96
...
...
@@ -119,11 +119,11 @@ export function fieldValues(fieldId) {
})
}
export
function
isKettleRunning
()
{
export
function
isKettleRunning
(
showLoading
=
true
)
{
return
request
({
url
:
'/dataset/group/isKettleRunning'
,
method
:
'post'
,
loading
:
true
loading
:
showLoading
})
}
...
...
frontend/src/components/cron/cron.vue
浏览文件 @
7c429d96
...
...
@@ -158,7 +158,7 @@ export default {
}
</
script
>
<
style
lang=
"css"
>
<
style
lang=
"css"
scoped
>
.cron
{
text-align
:
left
;
padding
:
10px
;
...
...
frontend/src/styles/index.scss
浏览文件 @
7c429d96
...
...
@@ -238,7 +238,9 @@ div:focus {
color
:
#23beef
;
margin
:
0
2px
0
0
;
}
.el-popper
{
.showRightPanel
{
.el-popper
{
position
:
fixed
!
important
;
}
}
frontend/src/views/chart/index.vue
浏览文件 @
7c429d96
...
...
@@ -20,6 +20,7 @@ import Group from './group/Group'
import
ChartHome
from
'./data/ChartHome'
import
ChartEdit
from
'./view/ChartEdit'
import
{
removeClass
}
from
'@/utils'
export
default
{
name
:
'Chart'
,
...
...
@@ -30,6 +31,9 @@ export default {
param
:
{}
}
},
mounted
()
{
removeClass
(
document
.
body
,
'showRightPanel'
)
},
methods
:
{
switchComponent
(
c
)
{
this
.
param
=
c
.
param
...
...
@@ -49,7 +53,7 @@ export default {
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
15px
;
padding
:
1
0px
1
5px
;
min-width
:
260px
;
max-width
:
460px
;
}
...
...
frontend/src/views/dataset/common/DatasetGroupSelector.vue
浏览文件 @
7c429d96
...
...
@@ -188,7 +188,7 @@ export default {
},
methods
:
{
kettleState
()
{
isKettleRunning
().
then
(
res
=>
{
isKettleRunning
(
false
).
then
(
res
=>
{
this
.
kettleRunning
=
res
.
data
})
},
...
...
frontend/src/views/dataset/index.vue
浏览文件 @
7c429d96
...
...
@@ -25,6 +25,7 @@ import AddSQL from './add/AddSQL'
import
AddExcel
from
'./add/AddExcel'
import
AddCustom
from
'./add/AddCustom'
import
FieldEdit
from
'./data/FieldEdit'
import
{
removeClass
}
from
'@/utils'
export
default
{
name
:
'DataSet'
,
...
...
@@ -35,6 +36,9 @@ export default {
param
:
{}
}
},
mounted
()
{
removeClass
(
document
.
body
,
'showRightPanel'
)
},
methods
:
{
switchComponent
(
c
)
{
this
.
param
=
c
.
param
...
...
@@ -69,14 +73,14 @@ export default {
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
15px
;
padding
:
1
0px
1
5px
;
min-width
:
260px
;
max-width
:
460px
;
}
.ms-main-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
1
5
px
15px
0
15px
;
padding
:
1
0
px
15px
0
15px
;
}
</
style
>
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
7c429d96
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<el-col
style=
"padding: 0
10px 0 10
px;"
>
<el-col
style=
"padding: 0
5px 0 5
px;"
>
<el-col>
<el-row>
<span
class=
"header-title"
>
{{
$t
(
'panel.default_panel'
)
}}
</span>
...
...
frontend/src/views/panel/list/PanelMain.vue
浏览文件 @
7c429d96
<
template
>
<de-container>
<de-aside-container>
<de-aside-container
style=
"padding: 0 10px;"
>
<el-tabs
v-model=
"activeName"
class=
"tab-panel"
:stretch=
"true"
@
tab-click=
"handleClick"
>
<el-tab-pane
name=
"PanelList"
>
<span
slot=
"label"
><i
class=
"el-icon-document"
/>
{{
$t
(
'panel.panel_list'
)
}}
</span>
...
...
@@ -107,4 +107,8 @@ export default {
.tab-panel
>>>
.el-tabs__nav-wrap
::after
{
height
:
1px
;
}
.tab-panel
>>>
.el-tabs__item
{
/* width: 10px; */
padding
:
0
10px
;
}
</
style
>
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
7c429d96
...
...
@@ -3,6 +3,7 @@
<el-col
v-if=
"panelInfo.name.length>0"
class=
"panel-design"
>
<el-row
class=
"panel-design-head"
>
<!--仪表板头部区域-->
<div
style=
"border-bottom: 1px solid #dfe4ed;height: 100%;"
>
<el-col
:span=
"12"
style=
"text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px"
>
<span>
{{
panelInfo
.
name
||
'测试仪表板'
}}
</span>
</el-col>
...
...
@@ -35,7 +36,7 @@
</el-tooltip>
</span>
</el-col>
</div>
</el-row>
<!-- 仪表板预览区域-->
<el-row
class=
"panel-design-preview"
>
...
...
@@ -217,9 +218,8 @@ export default {
.panel-design-head
{
height
:
40px
;
background-color
:
white
;
padding
:
0
6
px
;
padding
:
0
10
px
;
line-height
:
40px
;
border-bottom
:
1px
solid
#dfe4ed
;
}
.panel-design-preview
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论