Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
b8d07ce0
提交
b8d07ce0
authored
6月 21, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into main
上级
a7b67c5c
40c76c7f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
438 行增加
和
109 行删除
+438
-109
.gitmodules
.gitmodules
+6
-0
README.md
README.md
+4
-4
ExtChartGroupMapper.java
...java/io/dataease/base/mapper/ext/ExtChartGroupMapper.java
+0
-1
ChartGroupController.java
...va/io/dataease/controller/chart/ChartGroupController.java
+5
-0
ChartViewController.java
...ava/io/dataease/controller/chart/ChartViewController.java
+5
-0
DataSetGroupController.java
...o/dataease/controller/dataset/DataSetGroupController.java
+8
-2
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+5
-0
ChartViewDTO.java
...end/src/main/java/io/dataease/dto/chart/ChartViewDTO.java
+3
-0
DataSetTableDTO.java
...rc/main/java/io/dataease/dto/dataset/DataSetTableDTO.java
+3
-0
ScheduleService.java
...nd/src/main/java/io/dataease/service/ScheduleService.java
+11
-7
ChartGroupService.java
...ain/java/io/dataease/service/chart/ChartGroupService.java
+10
-0
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+33
-4
DataSetGroupService.java
...java/io/dataease/service/dataset/DataSetGroupService.java
+10
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+31
-5
ExtractDataService.java
.../java/io/dataease/service/dataset/ExtractDataService.java
+8
-10
dataease-plugin-xpack
dataease-plugin-xpack
+1
-0
dataease-plugins
dataease-plugins
+1
-0
datasource.svg
frontend/src/icons/svg/datasource.svg
+2
-0
Topbar.vue
frontend/src/layout/components/Topbar.vue
+1
-1
ChartMoveSelector.vue
...views/chart/components/TreeSelector/ChartMoveSelector.vue
+85
-0
GroupMoveSelector.vue
...views/chart/components/TreeSelector/GroupMoveSelector.vue
+92
-0
ColorSelector.vue
...d/src/views/chart/components/shape-attr/ColorSelector.vue
+4
-3
TableNormal.vue
frontend/src/views/chart/components/table/TableNormal.vue
+27
-25
Group.vue
frontend/src/views/chart/group/Group.vue
+0
-0
index.vue
frontend/src/views/chart/index.vue
+7
-3
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+23
-14
TableSelector.vue
frontend/src/views/chart/view/TableSelector.vue
+4
-3
AddCustom.vue
frontend/src/views/dataset/add/AddCustom.vue
+2
-1
AddDB.vue
frontend/src/views/dataset/add/AddDB.vue
+2
-1
AddExcel.vue
frontend/src/views/dataset/add/AddExcel.vue
+2
-1
AddSQL.vue
frontend/src/views/dataset/add/AddSQL.vue
+2
-1
DatasetGroupSelector.vue
frontend/src/views/dataset/common/DatasetGroupSelector.vue
+28
-15
DatasetGroupSelectorTree.vue
...end/src/views/dataset/common/DatasetGroupSelectorTree.vue
+0
-0
FieldEdit.vue
frontend/src/views/dataset/data/FieldEdit.vue
+3
-3
DsMoveSelector.vue
frontend/src/views/dataset/group/DsMoveSelector.vue
+1
-1
Group.vue
frontend/src/views/dataset/group/Group.vue
+0
-0
index.vue
frontend/src/views/dataset/index.vue
+8
-3
DsTree.vue
frontend/src/views/system/datasource/DsTree.vue
+1
-1
没有找到文件。
.gitmodules
0 → 100644
浏览文件 @
b8d07ce0
[submodule "dataease-plugins"]
path = dataease-plugins
url = git@github.com:dataease/dataease-plugins.git
[submodule "dataease-plugin-xpack"]
path = dataease-plugin-xpack
url = git@github.com:dataease/dataease-plugin-xpack.git
README.md
浏览文件 @
b8d07ce0
...
@@ -155,7 +155,7 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
...
@@ -155,7 +155,7 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
<tr
height=
"18"
style=
'height:18.00pt;'
>
<tr
height=
"18"
style=
'height:18.00pt;'
>
<td
class=
"xl67"
height=
"36"
rowspan=
"2"
style=
'height:36.00pt;border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;'
x:str
>
数据源
</td>
<td
class=
"xl67"
height=
"36"
rowspan=
"2"
style=
'height:36.00pt;border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;'
x:str
>
数据源
</td>
<td
class=
"xl68"
rowspan=
"2"
style=
'border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;'
x:str
>
数据源管理
</td>
<td
class=
"xl68"
rowspan=
"2"
style=
'border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;'
x:str
>
数据源管理
</td>
<td
class=
"xl70"
x:str
>
支持 MySQL
和 SQL Server 类型的
数据源
</td>
<td
class=
"xl70"
x:str
>
支持 MySQL 数据源
</td>
</tr>
</tr>
<tr
height=
"18"
style=
'height:18.00pt;'
>
<tr
height=
"18"
style=
'height:18.00pt;'
>
<td
class=
"xl70"
x:str
>
支持对数据源有效性校验
</td>
<td
class=
"xl70"
x:str
>
支持对数据源有效性校验
</td>
...
@@ -184,15 +184,15 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
...
@@ -184,15 +184,15 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
## 技术栈
## 技术栈
-
后端:
[
Spring Boot
](
https://
www.tutorialspoint.com/spring_boot/spring_boot_introduction.htm
)
;
-
后端:
[
Spring Boot
](
https://
spring.io/projects/spring-boot
)
;
-
前端:
[
Vue.js
](
https://vuejs.org/
)
;
-
前端:
[
Vue.js
](
https://vuejs.org/
)
;
-
中间件:
[
MySQL
](
https://www.mysql.com/
)
;
-
中间件:
[
MySQL
](
https://www.mysql.com/
)
;
-
数据处理:
[
Kettle
](
https://
community.hitachivantara.com/s/article/data-integration-kettle/
)
、
[
Apache Doris
](
https://doris.apache.org
/
)
;
-
数据处理:
[
Kettle
](
https://
github.com/pentaho/pentaho-kettle
)
、
[
Apache Doris
](
https://github.com/apache/incubator-doris
/
)
;
-
基础设施:
[
Docker
](
https://www.docker.com/
)
。
-
基础设施:
[
Docker
](
https://www.docker.com/
)
。
## 致谢
## 致谢
-
[
Kettle
](
https://
community.hitachivantara.com/s/article/data-integration
-kettle/
)
:DataEase 使用了 Kettle 进行数据处理工作;
-
[
Kettle
](
https://
github.com/pentaho/pentaho
-kettle/
)
:DataEase 使用了 Kettle 进行数据处理工作;
-
[
Apache Doris
](
https://doris.apache.org/
)
:DataEase 使用了 Apache Doris 进行快速的数据分析;
-
[
Apache Doris
](
https://doris.apache.org/
)
:DataEase 使用了 Apache Doris 进行快速的数据分析;
-
[
Element
](
https://element.eleme.cn/
)
:感谢 Element 提供的优秀组件库。
-
[
Element
](
https://element.eleme.cn/
)
:感谢 Element 提供的优秀组件库。
...
...
backend/src/main/java/io/dataease/base/mapper/ext/ExtChartGroupMapper.java
浏览文件 @
b8d07ce0
package
io
.
dataease
.
base
.
mapper
.
ext
;
package
io
.
dataease
.
base
.
mapper
.
ext
;
import
io.dataease.controller.request.BaseTreeRequest
;
import
io.dataease.controller.request.chart.ChartGroupRequest
;
import
io.dataease.controller.request.chart.ChartGroupRequest
;
import
io.dataease.dto.chart.ChartGroupDTO
;
import
io.dataease.dto.chart.ChartGroupDTO
;
...
...
backend/src/main/java/io/dataease/controller/chart/ChartGroupController.java
浏览文件 @
b8d07ce0
...
@@ -26,6 +26,11 @@ public class ChartGroupController {
...
@@ -26,6 +26,11 @@ public class ChartGroupController {
return
chartGroupService
.
tree
(
ChartGroup
);
return
chartGroupService
.
tree
(
ChartGroup
);
}
}
@PostMapping
(
"/treeNode"
)
public
List
<
ChartGroupDTO
>
treeNode
(
@RequestBody
ChartGroupRequest
ChartGroup
)
{
return
chartGroupService
.
tree
(
ChartGroup
);
}
@PostMapping
(
"/delete/{id}"
)
@PostMapping
(
"/delete/{id}"
)
public
void
tree
(
@PathVariable
String
id
)
{
public
void
tree
(
@PathVariable
String
id
)
{
chartGroupService
.
delete
(
id
);
chartGroupService
.
delete
(
id
);
...
...
backend/src/main/java/io/dataease/controller/chart/ChartViewController.java
浏览文件 @
b8d07ce0
...
@@ -32,6 +32,11 @@ public class ChartViewController {
...
@@ -32,6 +32,11 @@ public class ChartViewController {
return
chartViewService
.
list
(
chartViewRequest
);
return
chartViewService
.
list
(
chartViewRequest
);
}
}
@PostMapping
(
"/listAndGroup"
)
public
List
<
ChartViewDTO
>
listAndGroup
(
@RequestBody
ChartViewRequest
chartViewRequest
)
{
return
chartViewService
.
listAndGroup
(
chartViewRequest
);
}
@PostMapping
(
"/get/{id}"
)
@PostMapping
(
"/get/{id}"
)
public
ChartViewWithBLOBs
get
(
@PathVariable
String
id
)
{
public
ChartViewWithBLOBs
get
(
@PathVariable
String
id
)
{
return
chartViewService
.
get
(
id
);
return
chartViewService
.
get
(
id
);
...
...
backend/src/main/java/io/dataease/controller/dataset/DataSetGroupController.java
浏览文件 @
b8d07ce0
...
@@ -21,6 +21,7 @@ public class DataSetGroupController {
...
@@ -21,6 +21,7 @@ public class DataSetGroupController {
private
DataSetGroupService
dataSetGroupService
;
private
DataSetGroupService
dataSetGroupService
;
@Resource
@Resource
private
ExtractDataService
extractDataService
;
private
ExtractDataService
extractDataService
;
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
DataSetGroupDTO
save
(
@RequestBody
DatasetGroup
datasetGroup
)
{
public
DataSetGroupDTO
save
(
@RequestBody
DatasetGroup
datasetGroup
)
{
return
dataSetGroupService
.
save
(
datasetGroup
);
return
dataSetGroupService
.
save
(
datasetGroup
);
...
@@ -31,8 +32,13 @@ public class DataSetGroupController {
...
@@ -31,8 +32,13 @@ public class DataSetGroupController {
return
dataSetGroupService
.
tree
(
datasetGroup
);
return
dataSetGroupService
.
tree
(
datasetGroup
);
}
}
@PostMapping
(
"/treeNode"
)
public
List
<
DataSetGroupDTO
>
treeNode
(
@RequestBody
DataSetGroupRequest
datasetGroup
)
{
return
dataSetGroupService
.
treeNode
(
datasetGroup
);
}
@PostMapping
(
"/delete/{id}"
)
@PostMapping
(
"/delete/{id}"
)
public
void
tree
(
@PathVariable
String
id
)
throws
Exception
{
public
void
tree
(
@PathVariable
String
id
)
throws
Exception
{
dataSetGroupService
.
delete
(
id
);
dataSetGroupService
.
delete
(
id
);
}
}
...
@@ -42,7 +48,7 @@ public class DataSetGroupController {
...
@@ -42,7 +48,7 @@ public class DataSetGroupController {
}
}
@PostMapping
(
"/isKettleRunning"
)
@PostMapping
(
"/isKettleRunning"
)
public
boolean
isKettleRunning
()
{
public
boolean
isKettleRunning
()
{
return
extractDataService
.
isKettleRunning
();
return
extractDataService
.
isKettleRunning
();
}
}
}
}
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
b8d07ce0
...
@@ -44,6 +44,11 @@ public class DataSetTableController {
...
@@ -44,6 +44,11 @@ public class DataSetTableController {
return
dataSetTableService
.
list
(
dataSetTableRequest
);
return
dataSetTableService
.
list
(
dataSetTableRequest
);
}
}
@PostMapping
(
"listAndGroup"
)
public
List
<
DataSetTableDTO
>
listAndGroup
(
@RequestBody
DataSetTableRequest
dataSetTableRequest
)
{
return
dataSetTableService
.
listAndGroup
(
dataSetTableRequest
);
}
@PostMapping
(
"get/{id}"
)
@PostMapping
(
"get/{id}"
)
public
DatasetTable
get
(
@PathVariable
String
id
)
{
public
DatasetTable
get
(
@PathVariable
String
id
)
{
return
dataSetTableService
.
get
(
id
);
return
dataSetTableService
.
get
(
id
);
...
...
backend/src/main/java/io/dataease/dto/chart/ChartViewDTO.java
浏览文件 @
b8d07ce0
...
@@ -16,4 +16,7 @@ public class ChartViewDTO extends ChartViewWithBLOBs {
...
@@ -16,4 +16,7 @@ public class ChartViewDTO extends ChartViewWithBLOBs {
private
Map
<
String
,
Object
>
data
;
private
Map
<
String
,
Object
>
data
;
private
String
privileges
;
private
String
privileges
;
private
Boolean
isLeaf
;
private
String
pid
;
}
}
backend/src/main/java/io/dataease/dto/dataset/DataSetTableDTO.java
浏览文件 @
b8d07ce0
...
@@ -15,4 +15,7 @@ import java.util.List;
...
@@ -15,4 +15,7 @@ import java.util.List;
public
class
DataSetTableDTO
extends
DatasetTable
{
public
class
DataSetTableDTO
extends
DatasetTable
{
private
List
<
DataSetTableDTO
>
children
;
private
List
<
DataSetTableDTO
>
children
;
private
String
privileges
;
private
String
privileges
;
private
Boolean
isLeaf
;
private
String
pid
;
}
}
backend/src/main/java/io/dataease/service/ScheduleService.java
浏览文件 @
b8d07ce0
...
@@ -30,17 +30,21 @@ public class ScheduleService {
...
@@ -30,17 +30,21 @@ public class ScheduleService {
scheduleManager
.
getDefaultJobDataMap
(
datasetTableTask
.
getTableId
(),
datasetTableTask
.
getCron
(),
datasetTableTask
.
getId
(),
datasetTableTask
.
getType
()));
scheduleManager
.
getDefaultJobDataMap
(
datasetTableTask
.
getTableId
(),
datasetTableTask
.
getCron
(),
datasetTableTask
.
getId
(),
datasetTableTask
.
getType
()));
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTableTask
.
getRate
(),
ScheduleType
.
CRON
.
toString
()))
{
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTableTask
.
getRate
(),
ScheduleType
.
CRON
.
toString
()))
{
Date
endTime
;
Date
endTime
;
if
(
datasetTableTask
.
getEndTime
()
==
null
||
datasetTableTask
.
getEndTime
()
==
0
)
{
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTableTask
.
getEnd
(),
"1"
))
{
endTime
=
null
;
if
(
datasetTableTask
.
getEndTime
()
==
null
||
datasetTableTask
.
getEndTime
()
==
0
)
{
}
else
{
endTime
=
null
;
endTime
=
new
Date
(
datasetTableTask
.
getEndTime
());
}
else
{
endTime
=
new
Date
(
datasetTableTask
.
getEndTime
());
// if (endTime.before(new Date())) {
// if (endTime.before(new Date())) {
// return;
// return;
// }
// }
if
(
endTime
.
before
(
new
Date
()))
{
if
(
endTime
.
before
(
new
Date
()))
{
deleteSchedule
(
datasetTableTask
);
deleteSchedule
(
datasetTableTask
);
return
;
return
;
}
}
}
}
else
{
endTime
=
null
;
}
}
scheduleManager
.
addOrUpdateCronJob
(
new
JobKey
(
datasetTableTask
.
getId
(),
datasetTableTask
.
getTableId
()),
scheduleManager
.
addOrUpdateCronJob
(
new
JobKey
(
datasetTableTask
.
getId
(),
datasetTableTask
.
getTableId
()),
...
...
backend/src/main/java/io/dataease/service/chart/ChartGroupService.java
浏览文件 @
b8d07ce0
...
@@ -89,6 +89,16 @@ public class ChartGroupService {
...
@@ -89,6 +89,16 @@ public class ChartGroupService {
return
result
;
return
result
;
}
}
public
List
<
ChartGroupDTO
>
treeNode
(
ChartGroupRequest
chartGroup
)
{
chartGroup
.
setLevel
(
null
);
chartGroup
.
setPid
(
"0"
);
chartGroup
.
setType
(
"group"
);
chartGroup
.
setUserId
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
List
<
ChartGroupDTO
>
treeInfo
=
extChartGroupMapper
.
search
(
chartGroup
);
List
<
ChartGroupDTO
>
result
=
TreeUtils
.
mergeTree
(
treeInfo
);
return
result
;
}
public
List
<
String
>
getAllId
(
List
<
ChartGroupDTO
>
list
,
List
<
String
>
ids
)
{
public
List
<
String
>
getAllId
(
List
<
ChartGroupDTO
>
list
,
List
<
String
>
ids
)
{
for
(
ChartGroupDTO
dto
:
list
)
{
for
(
ChartGroupDTO
dto
:
list
)
{
ids
.
add
(
dto
.
getId
());
ids
.
add
(
dto
.
getId
());
...
...
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
b8d07ce0
...
@@ -4,21 +4,23 @@ import com.google.gson.Gson;
...
@@ -4,21 +4,23 @@ import com.google.gson.Gson;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.mapper.ChartViewMapper
;
import
io.dataease.base.mapper.ChartViewMapper
;
import
io.dataease.base.mapper.ext.ExtChartGroupMapper
;
import
io.dataease.base.mapper.ext.ExtChartViewMapper
;
import
io.dataease.base.mapper.ext.ExtChartViewMapper
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.controller.request.chart.ChartExtFilterRequest
;
import
io.dataease.controller.request.chart.ChartExtFilterRequest
;
import
io.dataease.controller.request.chart.ChartExtRequest
;
import
io.dataease.controller.request.chart.ChartExtRequest
;
import
io.dataease.controller.request.chart.ChartGroupRequest
;
import
io.dataease.controller.request.chart.ChartViewRequest
;
import
io.dataease.controller.request.chart.ChartViewRequest
;
import
io.dataease.controller.request.dataset.DataSetGroupRequest
;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.datasource.service.DatasourceService
;
import
io.dataease.datasource.service.DatasourceService
;
import
io.dataease.dto.chart.ChartCustomFilterDTO
;
import
io.dataease.dto.chart.*
;
import
io.dataease.dto.chart.ChartViewDTO
;
import
io.dataease.dto.dataset.DataSetGroupDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.dataset.DataSetTableDTO
;
import
io.dataease.dto.chart.Series
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
...
@@ -51,6 +53,8 @@ public class ChartViewService {
...
@@ -51,6 +53,8 @@ public class ChartViewService {
private
DatasourceService
datasourceService
;
private
DatasourceService
datasourceService
;
@Resource
@Resource
private
DataSetTableFieldsService
dataSetTableFieldsService
;
private
DataSetTableFieldsService
dataSetTableFieldsService
;
@Resource
private
ExtChartGroupMapper
extChartGroupMapper
;
public
ChartViewWithBLOBs
save
(
ChartViewWithBLOBs
chartView
)
{
public
ChartViewWithBLOBs
save
(
ChartViewWithBLOBs
chartView
)
{
checkName
(
chartView
);
checkName
(
chartView
);
...
@@ -72,6 +76,31 @@ public class ChartViewService {
...
@@ -72,6 +76,31 @@ public class ChartViewService {
return
extChartViewMapper
.
search
(
chartViewRequest
);
return
extChartViewMapper
.
search
(
chartViewRequest
);
}
}
public
List
<
ChartViewDTO
>
listAndGroup
(
ChartViewRequest
chartViewRequest
)
{
chartViewRequest
.
setUserId
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
List
<
ChartViewDTO
>
charts
=
extChartViewMapper
.
search
(
chartViewRequest
);
charts
.
forEach
(
ele
->
ele
.
setIsLeaf
(
true
));
// 获取group下的子group
ChartGroupRequest
chartGroupRequest
=
new
ChartGroupRequest
();
chartGroupRequest
.
setLevel
(
null
);
chartGroupRequest
.
setType
(
"group"
);
chartGroupRequest
.
setPid
(
chartViewRequest
.
getSceneId
());
chartGroupRequest
.
setUserId
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
chartGroupRequest
.
setSort
(
"name asc,create_time desc"
);
List
<
ChartGroupDTO
>
groups
=
extChartGroupMapper
.
search
(
chartGroupRequest
);
List
<
ChartViewDTO
>
group
=
groups
.
stream
().
map
(
ele
->
{
ChartViewDTO
dto
=
new
ChartViewDTO
();
dto
.
setId
(
ele
.
getId
());
dto
.
setName
(
ele
.
getName
());
dto
.
setIsLeaf
(
false
);
dto
.
setType
(
"group"
);
dto
.
setPid
(
ele
.
getPid
());
return
dto
;
}).
collect
(
Collectors
.
toList
());
group
.
addAll
(
charts
);
return
group
;
}
public
ChartViewWithBLOBs
get
(
String
id
)
{
public
ChartViewWithBLOBs
get
(
String
id
)
{
return
chartViewMapper
.
selectByPrimaryKey
(
id
);
return
chartViewMapper
.
selectByPrimaryKey
(
id
);
}
}
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java
浏览文件 @
b8d07ce0
...
@@ -87,6 +87,16 @@ public class DataSetGroupService {
...
@@ -87,6 +87,16 @@ public class DataSetGroupService {
}
}
}
}
public
List
<
DataSetGroupDTO
>
treeNode
(
DataSetGroupRequest
datasetGroup
)
{
datasetGroup
.
setLevel
(
null
);
datasetGroup
.
setPid
(
"0"
);
datasetGroup
.
setType
(
"group"
);
datasetGroup
.
setUserId
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
List
<
DataSetGroupDTO
>
treeInfo
=
extDataSetGroupMapper
.
search
(
datasetGroup
);
List
<
DataSetGroupDTO
>
result
=
TreeUtils
.
mergeTree
(
treeInfo
);
return
result
;
}
public
List
<
DataSetGroupDTO
>
tree
(
DataSetGroupRequest
datasetGroup
)
{
public
List
<
DataSetGroupDTO
>
tree
(
DataSetGroupRequest
datasetGroup
)
{
datasetGroup
.
setLevel
(
null
);
datasetGroup
.
setLevel
(
null
);
datasetGroup
.
setPid
(
null
);
datasetGroup
.
setPid
(
null
);
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
b8d07ce0
...
@@ -5,21 +5,19 @@ import com.fit2cloud.quartz.anno.QuartzScheduled;
...
@@ -5,21 +5,19 @@ import com.fit2cloud.quartz.anno.QuartzScheduled;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.mapper.*
;
import
io.dataease.base.mapper.*
;
import
io.dataease.base.mapper.ext.ExtDataSetGroupMapper
;
import
io.dataease.base.mapper.ext.ExtDataSetTableMapper
;
import
io.dataease.base.mapper.ext.ExtDataSetTableMapper
;
import
io.dataease.base.mapper.ext.UtilMapper
;
import
io.dataease.base.mapper.ext.UtilMapper
;
import
io.dataease.commons.constants.JobStatus
;
import
io.dataease.commons.constants.JobStatus
;
import
io.dataease.commons.utils.*
;
import
io.dataease.commons.utils.*
;
import
io.dataease.controller.request.dataset.DataSetGroupRequest
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.datasource.dto.TableFiled
;
import
io.dataease.datasource.dto.TableFiled
;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.JdbcProvider
;
import
io.dataease.datasource.provider.JdbcProvider
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.dto.dataset.DataSetPreviewPage
;
import
io.dataease.dto.dataset.*
;
import
io.dataease.dto.dataset.DataSetTableDTO
;
import
io.dataease.dto.dataset.DataSetTableUnionDTO
;
import
io.dataease.dto.dataset.DataTableInfoCustomUnion
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
import
io.dataease.provider.DDLProvider
;
import
io.dataease.provider.DDLProvider
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
...
@@ -81,6 +79,8 @@ public class DataSetTableService {
...
@@ -81,6 +79,8 @@ public class DataSetTableService {
private
QrtzSchedulerStateMapper
qrtzSchedulerStateMapper
;
private
QrtzSchedulerStateMapper
qrtzSchedulerStateMapper
;
@Resource
@Resource
private
DatasetTableTaskLogMapper
datasetTableTaskLogMapper
;
private
DatasetTableTaskLogMapper
datasetTableTaskLogMapper
;
@Resource
private
ExtDataSetGroupMapper
extDataSetGroupMapper
;
private
static
String
lastUpdateTime
=
"${__last_update_time__}"
;
private
static
String
lastUpdateTime
=
"${__last_update_time__}"
;
private
static
String
currentUpdateTime
=
"${__current_update_time__}"
;
private
static
String
currentUpdateTime
=
"${__current_update_time__}"
;
...
@@ -186,6 +186,32 @@ public class DataSetTableService {
...
@@ -186,6 +186,32 @@ public class DataSetTableService {
return
extDataSetTableMapper
.
search
(
dataSetTableRequest
);
return
extDataSetTableMapper
.
search
(
dataSetTableRequest
);
}
}
public
List
<
DataSetTableDTO
>
listAndGroup
(
DataSetTableRequest
dataSetTableRequest
)
{
dataSetTableRequest
.
setUserId
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
dataSetTableRequest
.
setTypeFilter
(
dataSetTableRequest
.
getTypeFilter
());
List
<
DataSetTableDTO
>
ds
=
extDataSetTableMapper
.
search
(
dataSetTableRequest
);
ds
.
forEach
(
ele
->
ele
.
setIsLeaf
(
true
));
// 获取group下的子group
DataSetGroupRequest
datasetGroup
=
new
DataSetGroupRequest
();
datasetGroup
.
setLevel
(
null
);
datasetGroup
.
setType
(
"group"
);
datasetGroup
.
setPid
(
dataSetTableRequest
.
getSceneId
());
datasetGroup
.
setUserId
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
datasetGroup
.
setSort
(
"name asc,create_time desc"
);
List
<
DataSetGroupDTO
>
groups
=
extDataSetGroupMapper
.
search
(
datasetGroup
);
List
<
DataSetTableDTO
>
group
=
groups
.
stream
().
map
(
ele
->
{
DataSetTableDTO
dto
=
new
DataSetTableDTO
();
dto
.
setId
(
ele
.
getId
());
dto
.
setName
(
ele
.
getName
());
dto
.
setIsLeaf
(
false
);
dto
.
setType
(
"group"
);
dto
.
setPid
(
ele
.
getPid
());
return
dto
;
}).
collect
(
Collectors
.
toList
());
group
.
addAll
(
ds
);
return
group
;
}
public
DatasetTable
get
(
String
id
)
{
public
DatasetTable
get
(
String
id
)
{
return
datasetTableMapper
.
selectByPrimaryKey
(
id
);
return
datasetTableMapper
.
selectByPrimaryKey
(
id
);
}
}
...
...
backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java
浏览文件 @
b8d07ce0
...
@@ -763,12 +763,11 @@ public class ExtractDataService {
...
@@ -763,12 +763,11 @@ public class ExtractDataService {
userDefinedJavaClassMeta
.
setFieldInfo
(
fields
);
userDefinedJavaClassMeta
.
setFieldInfo
(
fields
);
List
<
UserDefinedJavaClassDef
>
definitions
=
new
ArrayList
<
UserDefinedJavaClassDef
>();
List
<
UserDefinedJavaClassDef
>
definitions
=
new
ArrayList
<
UserDefinedJavaClassDef
>();
String
tmp_code
=
code
.
replace
(
"alterColumnTypeCode"
,
needToChangeColumnType
).
replace
(
"Column_Fields"
,
String
.
join
(
","
,
datasetTableFields
.
stream
().
map
(
DatasetTableField:
:
getOriginName
).
collect
(
Collectors
.
toList
())));
String
tmp_code
=
code
.
replace
(
"alterColumnTypeCode"
,
needToChangeColumnType
).
replace
(
"Column_Fields"
,
String
.
join
(
","
,
datasetTableFields
.
stream
().
map
(
DatasetTableField:
:
getOriginName
).
collect
(
Collectors
.
toList
())));
tmp_code
=
tmp_code
.
replace
(
"handleWraps"
,
handleWraps
);
if
(
isExcel
){
if
(
isExcel
){
tmp_code
=
tmp_code
.
replace
(
"handleExcelIntColumn"
,
handleExcelIntColumn
);
tmp_code
=
tmp_code
.
replace
(
"handleExcelIntColumn"
,
handleExcelIntColumn
);
tmp_code
=
tmp_code
.
replace
(
"handleExcelWraps"
,
handleExcelWraps
);
}
else
{
}
else
{
tmp_code
=
tmp_code
.
replace
(
"handleExcelIntColumn"
,
""
);
tmp_code
=
tmp_code
.
replace
(
"handleExcelIntColumn"
,
""
);
tmp_code
=
tmp_code
.
replace
(
"handleExcelWraps"
,
""
);
}
}
UserDefinedJavaClassDef
userDefinedJavaClassDef
=
new
UserDefinedJavaClassDef
(
UserDefinedJavaClassDef
.
ClassType
.
TRANSFORM_CLASS
,
"Processor"
,
tmp_code
);
UserDefinedJavaClassDef
userDefinedJavaClassDef
=
new
UserDefinedJavaClassDef
(
UserDefinedJavaClassDef
.
ClassType
.
TRANSFORM_CLASS
,
"Processor"
,
tmp_code
);
...
@@ -861,13 +860,12 @@ public class ExtractDataService {
...
@@ -861,13 +860,12 @@ public class ExtractDataService {
" }catch (Exception e){}\n"
+
" }catch (Exception e){}\n"
+
" }"
;
" }"
;
private
static
String
handleExcelWraps
=
" \n"
+
private
static
String
handleWraps
=
" if(tmp != null && ( tmp.contains(\"\\r\") || tmp.contains(\"\\n\"))){\n"
+
" if(tmp != null ){\n"
+
"\t\t\ttmp = tmp.trim();\n"
+
" tmp = tmp.trim();\n"
+
" tmp = tmp.replaceAll(\"\\r\",\" \");\n"
+
" tmp = tmp.replaceAll(\"\\r\",\" \");\n"
+
" tmp = tmp.replaceAll(\"\\n\",\" \");\n"
+
" tmp = tmp.replaceAll(\"\\n\",\" \");\n"
+
" get(Fields.Out, filed).setValue(r, tmp);\n"
+
" get(Fields.Out, filed).setValue(r, tmp);\n"
+
" } "
;
" }"
;
private
static
String
code
=
"import org.pentaho.di.core.row.ValueMetaInterface;\n"
+
private
static
String
code
=
"import org.pentaho.di.core.row.ValueMetaInterface;\n"
+
"import java.util.List;\n"
+
"import java.util.List;\n"
+
...
@@ -898,7 +896,7 @@ public class ExtractDataService {
...
@@ -898,7 +896,7 @@ public class ExtractDataService {
" List<String> fileds = Arrays.asList(\"Column_Fields\".split(\",\"));\n"
+
" List<String> fileds = Arrays.asList(\"Column_Fields\".split(\",\"));\n"
+
" for (String filed : fileds) {\n"
+
" for (String filed : fileds) {\n"
+
" String tmp = get(Fields.In, filed).getString(r);\n"
+
" String tmp = get(Fields.In, filed).getString(r);\n"
+
"handle
Excel
Wraps \n"
+
"handleWraps \n"
+
"alterColumnTypeCode \n"
+
"alterColumnTypeCode \n"
+
"handleExcelIntColumn \n"
+
"handleExcelIntColumn \n"
+
" str = str + tmp;\n"
+
" str = str + tmp;\n"
+
...
...
dataease-plugin-xpack
@
9879b705
Subproject commit 9879b705aa4a5105056109ecf5b9da70b783969d
dataease-plugins
@
2541de3d
Subproject commit 2541de3d2c82f37dcf9916fda70ada0ca3fc6132
frontend/src/icons/svg/datasource.svg
0 → 100644
浏览文件 @
b8d07ce0
<?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=
"1624249976156"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2309"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M279.04 483.584l193.706667 114.218667v227.242666L279.04 938.666667 85.333333 825.045333v-227.242666l193.706667-114.218667z m465.92 0L938.666667 597.802667v227.242666L744.96 938.666667l-193.706667-113.621334v-227.242666l193.706667-114.218667zM279.04 567.381333L156.586667 639.573333v143.573334l122.453333 71.765333 122.453333-71.765333V639.573333l-122.453333-72.192z m465.92 0l-122.453333 72.192v143.573334l122.453333 71.765333 122.368-71.765333V639.573333l-122.410667-72.149333zM512 85.333333l193.706667 113.621334v227.242666L512 540.416 318.293333 426.197333V198.954667L512 85.333333z m0 83.669334L389.546667 240.853333v143.530667L512 456.533333l122.410667-72.192V240.853333l-122.453334-71.850666z"
p-id=
"2310"
fill=
"#707070"
></path></svg>
\ No newline at end of file
frontend/src/layout/components/Topbar.vue
浏览文件 @
b8d07ce0
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<lang-select
class=
"right-menu-item hover-effect"
/>
<lang-select
class=
"right-menu-item hover-effect"
/>
<div
style=
"height: 100%;padding: 0 8px;"
class=
"right-menu-item hover-effect"
>
<div
style=
"height: 100%;padding: 0 8px;"
class=
"right-menu-item hover-effect"
>
<a
href=
"https://d
e-docs.fit2cloud.com
/"
target=
"_blank"
style=
"display: flex;height: 100%;width: 100%;justify-content: center;align-items: center;"
>
<a
href=
"https://d
ocs.dataease.io
/"
target=
"_blank"
style=
"display: flex;height: 100%;width: 100%;justify-content: center;align-items: center;"
>
<svg-icon
icon-class=
"docs"
/>
<svg-icon
icon-class=
"docs"
/>
</a>
</a>
</div>
</div>
...
...
frontend/src/views/chart/components/TreeSelector/ChartMoveSelector.vue
0 → 100644
浏览文件 @
b8d07ce0
<
template
>
<el-col
style=
"height: 400px;overflow-y: auto;margin-bottom: 10px;"
>
<el-tree
:data=
"tData"
node-key=
"id"
:expand-on-click-node=
"false"
highlight-current
@
node-click=
"nodeClick"
>
<span
slot-scope=
"
{ node, data }" :class="treeClass(data,node)">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<span
v-if=
"data.type === 'scene'"
>
<svg-icon
icon-class=
"scene"
class=
"ds-icon-scene"
/>
</span>
<span
style=
"margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
:title=
"data.name"
>
{{
data
.
name
}}
</span>
</span>
</span>
</el-tree>
</el-col>
</
template
>
<
script
>
import
{
post
}
from
'@/api/chart/chart'
export
default
{
name
:
'ChartMoveSelector'
,
props
:
{
item
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
tData
:
[],
currGroup
:
''
,
groupForm
:
{
name
:
''
,
pid
:
'0'
,
level
:
0
,
type
:
'group'
,
children
:
[],
sort
:
'type desc,name asc'
},
targetGroup
:
{}
}
},
watch
:
{
'item'
:
function
()
{
this
.
tree
(
this
.
groupForm
)
}
},
mounted
()
{
this
.
tree
(
this
.
groupForm
)
},
methods
:
{
tree
(
group
)
{
post
(
'/chart/group/tree'
,
group
).
then
(
res
=>
{
this
.
tData
=
res
.
data
})
},
nodeClick
(
data
,
node
)
{
this
.
targetGroup
=
data
this
.
$emit
(
'targetDs'
,
data
)
},
treeClass
(
data
,
node
)
{
if
(
data
.
id
===
this
.
item
.
id
)
{
node
.
visible
=
false
}
return
'custom-tree-node'
}
}
}
</
script
>
<
style
scoped
>
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
</
style
>
frontend/src/views/chart/components/TreeSelector/GroupMoveSelector.vue
0 → 100644
浏览文件 @
b8d07ce0
<
template
>
<el-col
style=
"height: 400px;overflow-y: auto;margin-bottom: 10px;"
>
<el-tree
:data=
"tData"
node-key=
"id"
:expand-on-click-node=
"false"
highlight-current
@
node-click=
"nodeClick"
>
<span
slot-scope=
"
{ node, data }" :class="treeClass(data,node)">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<span
v-if=
"data.type === 'scene'"
>
<svg-icon
icon-class=
"scene"
class=
"ds-icon-scene"
/>
</span>
<span
style=
"margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
:title=
"data.name"
>
{{
data
.
name
}}
</span>
</span>
</span>
</el-tree>
</el-col>
</
template
>
<
script
>
import
{
post
}
from
'@/api/chart/chart'
export
default
{
name
:
'GroupMoveSelector'
,
props
:
{
item
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
tData
:
[],
currGroup
:
''
,
groupForm
:
{
name
:
''
,
pid
:
'0'
,
level
:
0
,
type
:
'group'
,
children
:
[],
sort
:
'type desc,name asc'
},
targetGroup
:
{}
}
},
watch
:
{
'item'
:
function
()
{
this
.
tree
(
this
.
groupForm
)
}
},
mounted
()
{
this
.
tree
(
this
.
groupForm
)
},
methods
:
{
tree
(
group
)
{
post
(
'/chart/group/tree'
,
group
).
then
(
res
=>
{
this
.
tData
=
[{
id
:
'0'
,
name
:
this
.
$t
(
'dataset.dataset_group'
),
pid
:
'0'
,
privileges
:
'grant,manage,use'
,
type
:
'group'
,
children
:
res
.
data
}]
})
},
nodeClick
(
data
,
node
)
{
this
.
targetGroup
=
data
this
.
$emit
(
'targetGroup'
,
data
)
},
treeClass
(
data
,
node
)
{
if
(
data
.
id
===
this
.
item
.
id
)
{
node
.
visible
=
false
}
return
'custom-tree-node'
}
}
}
</
script
>
<
style
scoped
>
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
</
style
>
frontend/src/views/chart/components/shape-attr/ColorSelector.vue
浏览文件 @
b8d07ce0
...
@@ -37,9 +37,10 @@
...
@@ -37,9 +37,10 @@
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.table_item_font_color')"
class=
"form-item"
>
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.table_item_font_color')"
class=
"form-item"
>
<colorPicker
v-model=
"colorForm.tableFontColor"
style=
"margin-top: 6px;cursor: pointer;z-index: 1002;border: solid 1px black"
@
change=
"changeColorCase"
/>
<colorPicker
v-model=
"colorForm.tableFontColor"
style=
"margin-top: 6px;cursor: pointer;z-index: 1002;border: solid 1px black"
@
change=
"changeColorCase"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.stripe')"
class=
"form-item"
>
<!-- 暂时不支持该功能-->
<el-checkbox
v-model=
"colorForm.tableStripe"
@
change=
"changeColorCase"
>
{{
$t
(
'chart.stripe'
)
}}
</el-checkbox>
<!--
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.stripe')"
class=
"form-item"
>
-->
</el-form-item>
<!--
<el-checkbox
v-model=
"colorForm.tableStripe"
@
change=
"changeColorCase"
>
{{
$t
(
'chart.stripe'
)
}}
</el-checkbox>
-->
<!--
</el-form-item>
-->
</div>
</div>
<el-form-item
v-show=
"chart.type && !chart.type.includes('text')"
:label=
"$t('chart.not_alpha')"
class=
"form-item form-item-slider"
>
<el-form-item
v-show=
"chart.type && !chart.type.includes('text')"
:label=
"$t('chart.not_alpha')"
class=
"form-item form-item-slider"
>
...
...
frontend/src/views/chart/components/table/TableNormal.vue
浏览文件 @
b8d07ce0
...
@@ -117,23 +117,24 @@ export default {
...
@@ -117,23 +117,24 @@ export default {
}
}
},
},
calcHeight
()
{
calcHeight
()
{
const
that
=
this
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(
function
()
{
setTimeout
(()
=>
{
if
(
that
.
$refs
.
tableContainer
)
{
if
(
this
.
$refs
.
tableContainer
)
{
const
currentHeight
=
that
.
$refs
.
tableContainer
.
offsetHeight
const
currentHeight
=
this
.
$refs
.
tableContainer
.
offsetHeight
const
tableMaxHeight
=
currentHeight
-
that
.
$refs
.
title
.
offsetHeight
const
tableMaxHeight
=
currentHeight
-
this
.
$refs
.
title
.
offsetHeight
let
tableHeight
let
tableHeight
if
(
that
.
chart
.
data
)
{
if
(
this
.
chart
.
data
)
{
tableHeight
=
(
that
.
chart
.
data
.
tableRow
.
length
+
2
)
*
36
tableHeight
=
(
this
.
chart
.
data
.
tableRow
.
length
+
2
)
*
36
}
else
{
}
else
{
tableHeight
=
0
tableHeight
=
0
}
}
if
(
tableHeight
>
tableMaxHeight
)
{
if
(
tableHeight
>
tableMaxHeight
)
{
that
.
height
=
tableMaxHeight
+
'px'
this
.
height
=
tableMaxHeight
+
'px'
}
else
{
}
else
{
that
.
height
=
'auto'
this
.
height
=
'auto'
}
}
}
}
}
,
100
)
})
})
},
},
initStyle
()
{
initStyle
()
{
...
@@ -150,15 +151,16 @@ export default {
...
@@ -150,15 +151,16 @@ export default {
this
.
table_item_class
.
fontSize
=
customAttr
.
size
.
tableItemFontSize
+
'px'
this
.
table_item_class
.
fontSize
=
customAttr
.
size
.
tableItemFontSize
+
'px'
}
}
this
.
table_item_class_stripe
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
table_item_class
))
this
.
table_item_class_stripe
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
table_item_class
))
if
(
customAttr
.
color
.
tableStripe
)
{
// 暂不支持斑马纹
// this.table_item_class_stripe.background = hexColorToRGBA(customAttr.color.tableItemBgColor, customAttr.color.alpha - 40)
// if (customAttr.color.tableStripe) {
if
(
this
.
chart
.
customStyle
)
{
// // this.table_item_class_stripe.background = hexColorToRGBA(customAttr.color.tableItemBgColor, customAttr.color.alpha - 40)
const
customStyle
=
JSON
.
parse
(
this
.
chart
.
customStyle
)
// if (this.chart.customStyle) {
if
(
customStyle
.
background
)
{
// const customStyle = JSON.parse(this.chart.customStyle)
this
.
table_item_class_stripe
.
background
=
hexColorToRGBA
(
customStyle
.
background
.
color
,
customStyle
.
background
.
alpha
)
// if (customStyle.background) {
}
// this.table_item_class_stripe.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
}
// }
}
// }
// }
}
}
if
(
this
.
chart
.
customStyle
)
{
if
(
this
.
chart
.
customStyle
)
{
const
customStyle
=
JSON
.
parse
(
this
.
chart
.
customStyle
)
const
customStyle
=
JSON
.
parse
(
this
.
chart
.
customStyle
)
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
b8d07ce0
差异被折叠。
点击展开。
frontend/src/views/chart/index.vue
浏览文件 @
b8d07ce0
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-aside-container>
<de-aside-container>
<group
@
switchComponent=
"switchComponent"
/>
<group
:save-status=
"saveStatus"
@
switchComponent=
"switchComponent"
/>
</de-aside-container>
</de-aside-container>
<de-main-container>
<de-main-container>
<!--
<router-view
/>
-->
<!--
<router-view
/>
-->
<component
:is=
"component"
:param=
"param"
@
switchComponent=
"switchComponent"
/>
<component
:is=
"component"
:param=
"param"
@
switchComponent=
"switchComponent"
@
saveSuccess=
"saveSuccess"
/>
</de-main-container>
</de-main-container>
</de-container>
</de-container>
</
template
>
</
template
>
...
@@ -28,7 +28,8 @@ export default {
...
@@ -28,7 +28,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
component
:
ChartHome
,
component
:
ChartHome
,
param
:
{}
param
:
{},
saveStatus
:
null
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -45,6 +46,9 @@ export default {
...
@@ -45,6 +46,9 @@ export default {
this
.
component
=
ChartHome
this
.
component
=
ChartHome
break
break
}
}
},
saveSuccess
(
val
)
{
this
.
saveStatus
=
val
}
}
}
}
}
}
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
b8d07ce0
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<el-radio-group
<el-radio-group
v-model=
"view.type"
v-model=
"view.type"
style=
"width: 100%"
style=
"width: 100%"
@
change=
"save(true,'chart')"
@
change=
"save(true,'chart'
,true
)"
>
>
<div
style=
"width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;"
>
<div
style=
"width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;"
>
<el-radio
value=
"table-normal"
label=
"table-normal"
>
<el-radio
value=
"table-normal"
label=
"table-normal"
>
...
@@ -471,17 +471,19 @@ export default {
...
@@ -471,17 +471,19 @@ export default {
}
}
},
},
initTableField
(
id
)
{
initTableField
(
id
)
{
post
(
'/dataset/table/getFieldsFromDE'
,
this
.
table
).
then
(
response
=>
{
if
(
this
.
table
)
{
this
.
dimension
=
response
.
data
.
dimension
post
(
'/dataset/table/getFieldsFromDE'
,
this
.
table
).
then
(
response
=>
{
this
.
quota
=
response
.
data
.
quota
this
.
dimension
=
response
.
data
.
dimension
}).
catch
(
err
=>
{
this
.
quota
=
response
.
data
.
quota
this
.
resetView
()
}).
catch
(
err
=>
{
this
.
httpRequest
.
status
=
err
.
response
.
data
.
success
this
.
resetView
()
this
.
httpRequest
.
msg
=
err
.
response
.
data
.
message
this
.
httpRequest
.
status
=
err
.
response
.
data
.
success
return
true
this
.
httpRequest
.
msg
=
err
.
response
.
data
.
message
})
return
true
})
}
},
},
save
(
getData
,
trigger
)
{
save
(
getData
,
trigger
,
needRefreshGroup
=
false
)
{
const
view
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
view
))
const
view
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
view
))
view
.
id
=
this
.
view
.
id
view
.
id
=
this
.
view
.
id
view
.
sceneId
=
this
.
view
.
sceneId
view
.
sceneId
=
this
.
view
.
sceneId
...
@@ -549,8 +551,11 @@ export default {
...
@@ -549,8 +551,11 @@ export default {
this
.
getChart
(
response
.
data
.
id
)
this
.
getChart
(
response
.
data
.
id
)
}
}
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
null
)
// this.$store.dispatch('chart/setChartSceneData', null)
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
response
.
data
)
// this.$store.dispatch('chart/setChartSceneData', response.data)
if
(
needRefreshGroup
)
{
this
.
refreshGroup
(
view
)
}
})
})
},
},
...
@@ -797,7 +802,7 @@ export default {
...
@@ -797,7 +802,7 @@ export default {
onTextChange
(
val
)
{
onTextChange
(
val
)
{
this
.
view
.
customStyle
.
text
=
val
this
.
view
.
customStyle
.
text
=
val
this
.
view
.
title
=
val
.
title
this
.
view
.
title
=
val
.
title
this
.
save
()
this
.
save
(
false
,
''
,
true
)
},
},
onLegendChange
(
val
)
{
onLegendChange
(
val
)
{
...
@@ -921,6 +926,10 @@ export default {
...
@@ -921,6 +926,10 @@ export default {
yAxis
:
[],
yAxis
:
[],
type
:
''
type
:
''
}
}
},
refreshGroup
(
view
)
{
this
.
$emit
(
'saveSuccess'
,
view
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/view/TableSelector.vue
浏览文件 @
b8d07ce0
<
template
>
<
template
>
<de-container>
<de-container>
<de-aside-container>
<de-aside-container>
<dataset-group-selector
@
getTable=
"getTable"
/>
<dataset-group-selector
-tree
@
getTable=
"getTable"
/>
</de-aside-container>
</de-aside-container>
<de-main-container>
<de-main-container>
...
@@ -15,14 +15,15 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
...
@@ -15,14 +15,15 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeAsideContainer
from
'@/components/dataease/DeAsideContainer'
import
DeAsideContainer
from
'@/components/dataease/DeAsideContainer'
import
DatasetGroupSelector
from
'../../dataset/common/DatasetGroupSelector'
// import DatasetGroupSelector from '../../dataset/common/DatasetGroupSelector'
import
DatasetGroupSelectorTree
from
'../../dataset/common/DatasetGroupSelectorTree'
import
DatasetTableData
from
'../../dataset/common/DatasetTableData'
import
DatasetTableData
from
'../../dataset/common/DatasetTableData'
export
default
{
export
default
{
name
:
'TableSelector'
,
name
:
'TableSelector'
,
components
:
{
components
:
{
DatasetTableData
,
DatasetTableData
,
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
DatasetGroupSelector
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
DatasetGroupSelector
Tree
},
},
data
()
{
data
()
{
return
{
return
{
...
...
frontend/src/views/dataset/add/AddCustom.vue
浏览文件 @
b8d07ce0
...
@@ -208,7 +208,8 @@ export default {
...
@@ -208,7 +208,8 @@ export default {
info
:
'{"list":'
+
JSON
.
stringify
(
this
.
checkedList
)
+
'}'
info
:
'{"list":'
+
JSON
.
stringify
(
this
.
checkedList
)
+
'}'
}
}
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
// this.$store.dispatch('dataset/setSceneData', new Date().getTime())
this
.
$emit
(
'saveSuccess'
,
table
)
this
.
cancel
()
this
.
cancel
()
})
})
},
},
...
...
frontend/src/views/dataset/add/AddDB.vue
浏览文件 @
b8d07ce0
...
@@ -141,7 +141,8 @@ export default {
...
@@ -141,7 +141,8 @@ export default {
})
})
})
})
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
// this.$store.dispatch('dataset/setSceneData', new Date().getTime())
this
.
$emit
(
'saveSuccess'
,
tables
[
0
])
this
.
cancel
()
this
.
cancel
()
})
})
},
},
...
...
frontend/src/views/dataset/add/AddExcel.vue
浏览文件 @
b8d07ce0
...
@@ -202,7 +202,8 @@ export default {
...
@@ -202,7 +202,8 @@ export default {
}
}
}
}
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
// this.$store.dispatch('dataset/setSceneData', new Date().getTime())
this
.
$emit
(
'saveSuccess'
,
table
)
this
.
cancel
()
this
.
cancel
()
})
})
},
},
...
...
frontend/src/views/dataset/add/AddSQL.vue
浏览文件 @
b8d07ce0
...
@@ -265,7 +265,8 @@ export default {
...
@@ -265,7 +265,8 @@ export default {
info
:
JSON
.
stringify
({
sql
:
this
.
sql
})
info
:
JSON
.
stringify
({
sql
:
this
.
sql
})
}
}
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
// this.$store.dispatch('dataset/setSceneData', new Date().getTime())
this
.
$emit
(
'saveSuccess'
,
table
)
this
.
cancel
()
this
.
cancel
()
})
})
},
},
...
...
frontend/src/views/dataset/common/DatasetGroupSelector.vue
浏览文件 @
b8d07ce0
...
@@ -29,8 +29,10 @@
...
@@ -29,8 +29,10 @@
:default-expanded-keys=
"expandedArray"
:default-expanded-keys=
"expandedArray"
:data=
"data"
:data=
"data"
node-key=
"id"
node-key=
"id"
:expand-on-click-node=
"
tru
e"
:expand-on-click-node=
"
fals
e"
@
node-click=
"nodeClick"
@
node-click=
"nodeClick"
@
node-expand=
"nodeExpand"
@
node-collapse=
"nodeCollapse"
>
>
<span
slot-scope=
"
{ node, data }" class="custom-tree-node">
<span
slot-scope=
"
{ node, data }" class="custom-tree-node">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<span
style=
"display: flex;flex: 1;width: 0;"
>
...
@@ -234,7 +236,7 @@ export default {
...
@@ -234,7 +236,7 @@ export default {
if
(
this
.
currGroup
)
{
if
(
this
.
currGroup
)
{
this
.
dsLoading
=
true
this
.
dsLoading
=
true
post
(
'/dataset/table/list'
,
{
post
(
'/dataset/table/list'
,
{
sort
:
'type asc,
create_time desc,name a
sc'
,
sort
:
'type asc,
name asc,create_time de
sc'
,
sceneId
:
this
.
currGroup
.
id
,
sceneId
:
this
.
currGroup
.
id
,
mode
:
this
.
mode
<
0
?
null
:
this
.
mode
,
mode
:
this
.
mode
<
0
?
null
:
this
.
mode
,
typeFilter
:
this
.
customType
?
this
.
customType
:
null
typeFilter
:
this
.
customType
?
this
.
customType
:
null
...
@@ -258,19 +260,19 @@ export default {
...
@@ -258,19 +260,19 @@ export default {
},
},
nodeClick
(
data
,
node
)
{
nodeClick
(
data
,
node
)
{
if
(
data
.
type
===
'scene'
)
{
//
if (data.type === 'scene') {
this
.
sceneMode
=
true
this
.
sceneMode
=
true
this
.
currGroup
=
data
this
.
currGroup
=
data
this
.
tableTree
()
this
.
tableTree
()
}
//
}
if
(
node
.
expanded
)
{
//
if (node.expanded) {
this
.
expandedArray
.
push
(
data
.
id
)
//
this.expandedArray.push(data.id)
}
else
{
//
} else {
const
index
=
this
.
expandedArray
.
indexOf
(
data
.
id
)
//
const index = this.expandedArray.indexOf(data.id)
if
(
index
>
-
1
)
{
//
if (index > -1) {
this
.
expandedArray
.
splice
(
index
,
1
)
//
this.expandedArray.splice(index, 1)
}
//
}
}
//
}
// console.log(this.expandedArray);
// console.log(this.expandedArray);
},
},
...
@@ -339,6 +341,17 @@ export default {
...
@@ -339,6 +341,17 @@ export default {
div1
.
style
.
setProperty
(
'cursor'
,
'not-allowed'
)
div1
.
style
.
setProperty
(
'cursor'
,
'not-allowed'
)
div2
.
style
.
setProperty
(
'pointer-events'
,
'none'
)
div2
.
style
.
setProperty
(
'pointer-events'
,
'none'
)
})
})
},
nodeExpand
(
data
)
{
if
(
data
.
id
)
{
this
.
expandedArray
.
push
(
data
.
id
)
}
},
nodeCollapse
(
data
)
{
if
(
data
.
id
)
{
this
.
expandedArray
.
splice
(
this
.
expandedArray
.
indexOf
(
data
.
id
),
1
)
}
}
}
}
}
}
}
...
...
frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue
0 → 100644
浏览文件 @
b8d07ce0
差异被折叠。
点击展开。
frontend/src/views/dataset/data/FieldEdit.vue
浏览文件 @
b8d07ce0
...
@@ -57,9 +57,9 @@
...
@@ -57,9 +57,9 @@
<svg-icon
v-if=
"scope.row.deExtractType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"scope.row.deExtractType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<span
class=
"field-class"
>
{{
$t
(
'dataset.time'
)
}}
</span>
<span
class=
"field-class"
>
{{
$t
(
'dataset.time'
)
}}
</span>
</span>
</span>
<span
v-if=
"scope.row.deExtractType === 2 || scope.row.deExtractType === 3"
>
<span
v-if=
"scope.row.deExtractType === 2 || scope.row.deExtractType === 3
|| scope.row.deExtractType === 4
"
>
<svg-icon
v-if=
"scope.row.deExtractType === 2 || scope.row.deExtractType === 3"
icon-class=
"field_value"
class=
"field-icon-value"
/>
<svg-icon
v-if=
"scope.row.deExtractType === 2 || scope.row.deExtractType === 3
|| scope.row.deExtractType === 4
"
icon-class=
"field_value"
class=
"field-icon-value"
/>
<span
v-if=
"scope.row.deExtractType === 2"
class=
"field-class"
>
{{
$t
(
'dataset.value'
)
}}
</span>
<span
v-if=
"scope.row.deExtractType === 2
|| scope.row.deExtractType === 4
"
class=
"field-class"
>
{{
$t
(
'dataset.value'
)
}}
</span>
<span
v-if=
"scope.row.deExtractType === 3"
class=
"field-class"
>
{{
$t
(
'dataset.value'
)
+
'('
+
$t
(
'dataset.float'
)
+
')'
}}
</span>
<span
v-if=
"scope.row.deExtractType === 3"
class=
"field-class"
>
{{
$t
(
'dataset.value'
)
+
'('
+
$t
(
'dataset.float'
)
+
')'
}}
</span>
</span>
</span>
</span>
</span>
...
...
frontend/src/views/dataset/group/DsMoveSelector.vue
浏览文件 @
b8d07ce0
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
name
:
''
,
name
:
''
,
pid
:
'0'
,
pid
:
'0'
,
level
:
0
,
level
:
0
,
type
:
''
,
type
:
'
group
'
,
children
:
[],
children
:
[],
sort
:
'type desc,name asc'
sort
:
'type desc,name asc'
},
},
...
...
frontend/src/views/dataset/group/Group.vue
浏览文件 @
b8d07ce0
差异被折叠。
点击展开。
frontend/src/views/dataset/index.vue
浏览文件 @
b8d07ce0
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-aside-container>
<de-aside-container>
<group
@
switchComponent=
"switchComponent"
/>
<group
:save-status=
"saveStatus"
@
switchComponent=
"switchComponent"
/>
</de-aside-container>
</de-aside-container>
<de-main-container>
<de-main-container>
<!--
<router-view/>
-->
<!--
<router-view/>
-->
<component
:is=
"component"
:param=
"param"
@
switchComponent=
"switchComponent"
/>
<component
:is=
"component"
:param=
"param"
@
switchComponent=
"switchComponent"
@
saveSuccess=
"saveSuccess"
/>
</de-main-container>
</de-main-container>
</de-container>
</de-container>
</
template
>
</
template
>
...
@@ -33,7 +33,8 @@ export default {
...
@@ -33,7 +33,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
component
:
DataHome
,
component
:
DataHome
,
param
:
{}
param
:
{},
saveStatus
:
null
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -65,6 +66,10 @@ export default {
...
@@ -65,6 +66,10 @@ export default {
this
.
component
=
DataHome
this
.
component
=
DataHome
break
break
}
}
},
saveSuccess
(
val
)
{
this
.
saveStatus
=
val
}
}
}
}
}
}
...
...
frontend/src/views/system/datasource/DsTree.vue
浏览文件 @
b8d07ce0
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list father">
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list father">
<span
style=
"display: flex; flex: 1 1 0%; width: 0px;"
>
<span
style=
"display: flex; flex: 1 1 0%; width: 0px;"
>
<span
v-if=
"data.type !== 'folder'"
>
<span
v-if=
"data.type !== 'folder'"
>
<svg-icon
icon-class=
"
panel
"
class=
"ds-icon-scene"
/>
<svg-icon
icon-class=
"
datasource
"
class=
"ds-icon-scene"
/>
</span>
</span>
<span
v-if=
"data.type === 'folder'"
>
<span
v-if=
"data.type === 'folder'"
>
<i
class=
"el-icon-folder"
/>
<i
class=
"el-icon-folder"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论