Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
11956c87
提交
11956c87
authored
6月 02, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
b3fec2c7
94ae2414
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
86 行增加
和
54 行删除
+86
-54
ExtPanelViewMapper.java
.../java/io/dataease/base/mapper/ext/ExtPanelViewMapper.java
+2
-3
ExtPanelViewMapper.xml
...n/java/io/dataease/base/mapper/ext/ExtPanelViewMapper.xml
+14
-23
ViewApi.java
...c/main/java/io/dataease/controller/panel/api/ViewApi.java
+6
-2
ViewServer.java
.../java/io/dataease/controller/panel/server/ViewServer.java
+3
-10
ScheduleManager.java
.../main/java/io/dataease/job/sechedule/ScheduleManager.java
+32
-2
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+2
-2
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+2
-2
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+2
-2
index.scss
frontend/src/styles/index.scss
+6
-2
Group.vue
frontend/src/views/chart/group/Group.vue
+1
-0
Group.vue
frontend/src/views/dataset/group/Group.vue
+1
-0
index.vue
frontend/src/views/panel/edit/index.vue
+1
-1
filterDialog.vue
frontend/src/views/panel/filter/filterDialog.vue
+5
-4
index.vue
frontend/src/views/system/user/index.vue
+9
-1
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelViewMapper.java
浏览文件 @
11956c87
package
io
.
dataease
.
base
.
mapper
.
ext
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.dto.panel.po.PanelViewPo
;
import
java.util.List
;
public
interface
ExtPanelViewMapper
{
List
<
PanelViewPo
>
groups
(
GridExample
example
);
List
<
PanelViewPo
>
groups
(
String
userId
);
List
<
PanelViewPo
>
views
(
GridExample
example
);
List
<
PanelViewPo
>
views
(
String
userId
);
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelViewMapper.xml
浏览文件 @
11956c87
...
...
@@ -11,32 +11,23 @@
<select
id=
"groups"
parameterType=
"io.dataease.base.mapper.ext.query.GridExample"
resultMap=
"treeNodeMap"
>
<select
id=
"groups"
resultMap=
"treeNodeMap"
>
select id, pid, name, `type`
from chart_group
<if
test=
"_parameter != null"
>
<include
refid=
"io.dataease.base.mapper.ext.query.GridSql.gridCondition"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
<if
test=
"orderByClause == null"
>
order by create_time desc
</if>
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'chart') cids) t,chart_group
<where>
FIND_IN_SET(chart_group.id,cids)
</where>
order by create_time desc
</select>
<select
id=
"views"
parameterType=
"io.dataease.base.mapper.ext.query.GridExample"
resultMap=
"treeNodeMap"
>
select id, scene_id as pid ,title as name, `type`
from chart_view
<if
test=
"_parameter != null"
>
<include
refid=
"io.dataease.base.mapper.ext.query.GridSql.gridCondition"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
<if
test=
"orderByClause == null"
>
order by create_time desc
</if>
<select
id=
"views"
resultMap=
"treeNodeMap"
>
select id, scene_id as pid , name, `type`
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'chart') cids) t, chart_view
<where>
FIND_IN_SET(chart_view.id,cids)
</where>
order by create_time desc
</select>
...
...
backend/src/main/java/io/dataease/controller/panel/api/ViewApi.java
浏览文件 @
11956c87
...
...
@@ -18,9 +18,13 @@ import java.util.List;
public
interface
ViewApi
{
@ApiOperation
(
"视图树"
)
// @ApiOperation("视图树")
// @PostMapping("/tree")
// List<PanelViewDto> tree(BaseGridRequest request);
@ApiOperation
(
"授权的视图树"
)
@PostMapping
(
"/tree"
)
List
<
PanelViewDto
>
tree
(
BaseGridRequest
request
);
List
<
PanelViewDto
>
tree
WithAuth
(
);
@ApiOperation
(
"根据仪表板Id查询视图"
)
...
...
backend/src/main/java/io/dataease/controller/panel/server/ViewServer.java
浏览文件 @
11956c87
...
...
@@ -34,16 +34,9 @@ public class ViewServer implements ViewApi {
* @return
*/
@Override
public
List
<
PanelViewDto
>
tree
(
@RequestBody
BaseGridRequest
request
)
{
List
<
ConditionEntity
>
conditions
=
new
ArrayList
<>();
ConditionEntity
condition
=
new
ConditionEntity
();
condition
.
setField
(
"create_by"
);
condition
.
setOperator
(
"eq"
);
condition
.
setValue
(
AuthUtils
.
getUser
().
getUsername
());
conditions
.
add
(
condition
);
request
.
setConditions
(
conditions
);
List
<
PanelViewPo
>
groups
=
panelViewService
.
groups
(
request
);
List
<
PanelViewPo
>
views
=
panelViewService
.
views
(
request
);
public
List
<
PanelViewDto
>
treeWithAuth
()
{
List
<
PanelViewPo
>
groups
=
panelViewService
.
groups
();
List
<
PanelViewPo
>
views
=
panelViewService
.
views
();
List
<
PanelViewDto
>
panelViewDtos
=
panelViewService
.
buildTree
(
groups
,
views
);
return
panelViewDtos
;
}
...
...
backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java
浏览文件 @
11956c87
...
...
@@ -2,9 +2,16 @@ package io.dataease.job.sechedule;
import
io.dataease.commons.utils.LogUtil
;
import
org.quartz.*
;
import
org.quartz.impl.triggers.CronTriggerImpl
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.time.ZonedDateTime
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -73,7 +80,9 @@ public class ScheduleManager {
triggerBuilder
.
withIdentity
(
triggerKey
);
triggerBuilder
.
startAt
(
startTime
);
if
(
startTime
.
before
(
new
Date
()))
{
triggerBuilder
.
startAt
(
getNTimeByCron
(
cron
));
}
if
(
endTime
!=
null
)
{
triggerBuilder
.
endAt
(
endTime
);
...
...
@@ -149,7 +158,9 @@ public class ScheduleManager {
triggerBuilder
.
withIdentity
(
triggerKey
);
// 触发器名,触发器组
triggerBuilder
.
startAt
(
startTime
);
if
(
startTime
.
before
(
new
Date
()))
{
triggerBuilder
.
startAt
(
getNTimeByCron
(
cron
));
}
if
(
endTime
!=
null
)
{
triggerBuilder
.
endAt
(
endTime
);
...
...
@@ -395,4 +406,23 @@ public class ScheduleManager {
return
returnMap
;
}
public
static
Date
getNTimeByCron
(
String
cron
)
{
try
{
CronTriggerImpl
cronTriggerImpl
=
new
CronTriggerImpl
();
cronTriggerImpl
.
setCronExpression
(
cron
);
Calendar
calendar
=
Calendar
.
getInstance
();
Date
now
=
calendar
.
getTime
();
// calendar.add(java.util.Calendar.YEAR, 1);
calendar
.
add
(
Calendar
.
MONTH
,
2
);
List
<
Date
>
dates
=
TriggerUtils
.
computeFireTimesBetween
(
cronTriggerImpl
,
null
,
now
,
calendar
.
getTime
());
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
nextTime
=
dateFormat
.
format
(
dates
.
get
(
0
));
Date
date
=
dateFormat
.
parse
(
nextTime
);
return
date
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
11956c87
...
...
@@ -228,11 +228,11 @@ i18n_auth_manage=Manage
i18n_auth_grant
=
Grant
i18n_template_system
=
System Template
i18n_template_self
=
Self Template
i18n_name_cant_repeat_same_group
=
Name is already
exists
in the same group
i18n_name_cant_repeat_same_group
=
Name is already
used
in the same group
i18n_chart_count
=
Count*
i18n_excel_have_merge_region
=
Excel has merged region
i18n_cron_expression_error
=
Cron expression error
i18n_same_folder_can_not_repeat
=
Same Folder Can Not Repeat
i18n_same_folder_can_not_repeat
=
Name is already used in the same folder
i18n_default_panel
=
Default Dashboard
i18n_panel_list
=
Dashboard
i18n_processing_data
=
Processing data now, Refresh later
...
...
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
11956c87
...
...
@@ -230,11 +230,11 @@ i18n_auth_manage=管理
i18n_auth_grant
=
授权
i18n_template_system
=
系统模板
i18n_template_self
=
用户模板
i18n_name_cant_repeat_same_group
=
同一分组下
名称不能重复
i18n_name_cant_repeat_same_group
=
同一分组下
该名称已被使用
i18n_chart_count
=
记录数*
i18n_excel_have_merge_region
=
Excel 存在合并单元格
i18n_cron_expression_error
=
Cron 表达式校验错误
i18n_same_folder_can_not_repeat
=
相同的目录下名称不能重复
i18n_same_folder_can_not_repeat
=
同一目录下该名称已被使用
i18n_default_panel
=
默认仪表板
i18n_panel_list
=
仪表板
i18n_processing_data
=
正在处理数据,稍后刷新
...
...
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
11956c87
...
...
@@ -230,11 +230,11 @@ i18n_auth_manage=管理
i18n_auth_grant
=
授權
i18n_template_system
=
系統模板
i18n_template_self
=
用戶模板
i18n_name_cant_repeat_same_group
=
同一分組下
名稱不能重復
i18n_name_cant_repeat_same_group
=
同一分組下
該名稱已被使用
i18n_chart_count
=
記錄數*
i18n_excel_have_merge_region
=
Excel存在合並單元格
i18n_cron_expression_error
=
Cron表達式校驗錯誤
i18n_same_folder_can_not_repeat
=
相同的目錄下名稱不能重復
i18n_same_folder_can_not_repeat
=
同一目錄下該名稱已被使用
i18n_default_panel
=
默認儀表板
i18n_panel_list
=
儀表板
i18n_processing_data
=
正在處理數據,稍後刷新
...
...
frontend/src/styles/index.scss
浏览文件 @
11956c87
...
...
@@ -90,11 +90,15 @@ div:focus {
width
:
50%
!
important
;
.el-dialog__header
{
background-color
:
#f4f4f5
;
//
background-color: #f4f4f5;
padding
:
10px
20px
!
important
;
.el-dialog__headerbtn
{
top
:
15px
!
important
;
}
}
.el-dialog__body
{
padding
:
1px
20
px
!
important
;
padding
:
1px
15
px
!
important
;
}
}
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
11956c87
...
...
@@ -445,6 +445,7 @@ export default {
},
close
()
{
this
.
$refs
[
'groupForm'
].
resetFields
()
this
.
editGroup
=
false
this
.
groupForm
=
{
name
:
''
,
...
...
frontend/src/views/dataset/group/Group.vue
浏览文件 @
11956c87
...
...
@@ -458,6 +458,7 @@ export default {
},
close
()
{
this
.
$refs
[
'groupForm'
].
resetFields
()
this
.
editGroup
=
false
this
.
groupForm
=
{
name
:
''
,
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
11956c87
...
...
@@ -127,7 +127,7 @@
:in-draw=
"false"
/>
</filter-dialog>
<div
style=
"text-align: end !important;margin: 0 15px !important;"
>
<div
style=
"text-align: end !important;margin: 0 15px
10px
!important;"
>
<span
slot=
"footer"
>
<el-button
size=
"mini"
@
click=
"cancelFilter"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
:disabled=
"!currentFilterCom.options.attrs.fieldId"
type=
"primary"
size=
"mini"
@
click=
"sureFilter"
>
{{
$t
(
'commons.confirm'
)
}}
</el-button>
...
...
frontend/src/views/panel/filter/filterDialog.vue
浏览文件 @
11956c87
...
...
@@ -521,7 +521,7 @@ export default {
.ms-main-container
{
height
:
100%
;
min-height
:
400px
;
padding
:
5px
10px
;
}
.filter-field
{
...
...
@@ -588,13 +588,14 @@ export default {
}
.filter-content
{
height
:
calc
(
50vh
-
1
3
0px
);
height
:
calc
(
50vh
-
1
2
0px
);
top
:
160px
;
}
.filter-dialog-tabs
{
border
:
1px
solid
#E6E6E6
;
padding
:
10px
;
height
:
100%
;
>>>
div
.el-tabs__content
{
height
:
calc
(
100%
-
55px
);
...
...
@@ -602,12 +603,12 @@ export default {
}
.filter-common
{
margin
:
10px
10
px
;
margin
:
10px
5
px
;
}
.component-header
{
margin
:
20px
10px
!
important
;
margin
:
5px
5px
15px
;
}
.component-result-content
{
...
...
frontend/src/views/system/user/index.vue
浏览文件 @
11956c87
...
...
@@ -309,8 +309,16 @@ export default {
methods
:
{
sortChange
({
column
,
prop
,
order
})
{
this
.
orderConditions
=
[]
if
(
!
order
)
{
this
.
search
(
this
.
last_condition
)
return
}
if
(
prop
===
'dept'
)
{
prop
=
'deptId'
prop
=
'u.deptId'
}
if
(
prop
===
'status'
)
{
prop
=
'u.enabled'
}
this
.
orderConditions
=
[]
addOrder
({
field
:
prop
,
value
:
order
},
this
.
orderConditions
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论