Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
73bf2294
提交
73bf2294
authored
2月 23, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(数据集): 添加DB,DB curd
上级
318ff159
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
1451 行增加
和
27 行删除
+1451
-27
DatasetTable.java
...d/src/main/java/io/dataease/base/domain/DatasetTable.java
+24
-0
DatasetTableExample.java
...ain/java/io/dataease/base/domain/DatasetTableExample.java
+681
-0
DatasetTableMapper.java
...main/java/io/dataease/base/mapper/DatasetTableMapper.java
+31
-0
DatasetTableMapper.xml
.../main/java/io/dataease/base/mapper/DatasetTableMapper.xml
+244
-0
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+45
-0
DataSetTableRequest.java
...aease/controller/request/dataset/DataSetTableRequest.java
+18
-0
DataSetTableDTO.java
...rc/main/java/io/dataease/dto/dataset/DataSetTableDTO.java
+17
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+57
-0
V9__dataset_tables.sql
...nd/src/main/resources/db/migration/V9__dataset_tables.sql
+11
-0
AddDB.vue
frontend/src/business/components/dataset/data/AddDB.vue
+17
-3
TabDataPreview.vue
...d/src/business/components/dataset/data/TabDataPreview.vue
+64
-0
ViewTable.vue
frontend/src/business/components/dataset/data/ViewTable.vue
+94
-0
Group.vue
frontend/src/business/components/dataset/group/Group.vue
+120
-18
router.js
frontend/src/business/components/dataset/router.js
+6
-0
store.js
frontend/src/business/store.js
+5
-1
en-US.js
frontend/src/i18n/en-US.js
+5
-1
zh-CN.js
frontend/src/i18n/zh-CN.js
+7
-3
zh-TW.js
frontend/src/i18n/zh-TW.js
+5
-1
没有找到文件。
backend/src/main/java/io/dataease/base/domain/DatasetTable.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
DatasetTable
implements
Serializable
{
private
String
id
;
private
String
name
;
private
String
sceneId
;
private
String
dataSourceId
;
private
String
type
;
private
String
createBy
;
private
Long
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/DatasetTableExample.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
base
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
DatasetTableExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
DatasetTableExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
String
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
String
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
String
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
String
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLike
(
String
value
)
{
addCriterion
(
"id like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotLike
(
String
value
)
{
addCriterion
(
"id not like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIsNull
()
{
addCriterion
(
"`name` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIsNotNull
()
{
addCriterion
(
"`name` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameEqualTo
(
String
value
)
{
addCriterion
(
"`name` ="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotEqualTo
(
String
value
)
{
addCriterion
(
"`name` <>"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameGreaterThan
(
String
value
)
{
addCriterion
(
"`name` >"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`name` >="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLessThan
(
String
value
)
{
addCriterion
(
"`name` <"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`name` <="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLike
(
String
value
)
{
addCriterion
(
"`name` like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotLike
(
String
value
)
{
addCriterion
(
"`name` not like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIn
(
List
<
String
>
values
)
{
addCriterion
(
"`name` in"
,
values
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`name` not in"
,
values
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`name` between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`name` not between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdIsNull
()
{
addCriterion
(
"scene_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdIsNotNull
()
{
addCriterion
(
"scene_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdEqualTo
(
String
value
)
{
addCriterion
(
"scene_id ="
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdNotEqualTo
(
String
value
)
{
addCriterion
(
"scene_id <>"
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdGreaterThan
(
String
value
)
{
addCriterion
(
"scene_id >"
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"scene_id >="
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdLessThan
(
String
value
)
{
addCriterion
(
"scene_id <"
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"scene_id <="
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdLike
(
String
value
)
{
addCriterion
(
"scene_id like"
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdNotLike
(
String
value
)
{
addCriterion
(
"scene_id not like"
,
value
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"scene_id in"
,
values
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"scene_id not in"
,
values
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"scene_id between"
,
value1
,
value2
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSceneIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"scene_id not between"
,
value1
,
value2
,
"sceneId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdIsNull
()
{
addCriterion
(
"data_source_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdIsNotNull
()
{
addCriterion
(
"data_source_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id ="
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id <>"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdGreaterThan
(
String
value
)
{
addCriterion
(
"data_source_id >"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id >="
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdLessThan
(
String
value
)
{
addCriterion
(
"data_source_id <"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id <="
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdLike
(
String
value
)
{
addCriterion
(
"data_source_id like"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotLike
(
String
value
)
{
addCriterion
(
"data_source_id not like"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"data_source_id in"
,
values
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"data_source_id not in"
,
values
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"data_source_id between"
,
value1
,
value2
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"data_source_id not between"
,
value1
,
value2
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNull
()
{
addCriterion
(
"`type` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNotNull
()
{
addCriterion
(
"`type` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeEqualTo
(
String
value
)
{
addCriterion
(
"`type` ="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotEqualTo
(
String
value
)
{
addCriterion
(
"`type` <>"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThan
(
String
value
)
{
addCriterion
(
"`type` >"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`type` >="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThan
(
String
value
)
{
addCriterion
(
"`type` <"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`type` <="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLike
(
String
value
)
{
addCriterion
(
"`type` like"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotLike
(
String
value
)
{
addCriterion
(
"`type` not like"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIn
(
List
<
String
>
values
)
{
addCriterion
(
"`type` in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`type` not in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`type` between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNull
()
{
addCriterion
(
"create_by is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNotNull
()
{
addCriterion
(
"create_by is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByEqualTo
(
String
value
)
{
addCriterion
(
"create_by ="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotEqualTo
(
String
value
)
{
addCriterion
(
"create_by <>"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThan
(
String
value
)
{
addCriterion
(
"create_by >"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by >="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThan
(
String
value
)
{
addCriterion
(
"create_by <"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by <="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLike
(
String
value
)
{
addCriterion
(
"create_by like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotLike
(
String
value
)
{
addCriterion
(
"create_by not like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by not in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by not between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Long
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Long
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Long
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/DatasetTableMapper.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.DatasetTable
;
import
io.dataease.base.domain.DatasetTableExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
DatasetTableMapper
{
long
countByExample
(
DatasetTableExample
example
);
int
deleteByExample
(
DatasetTableExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
DatasetTable
record
);
int
insertSelective
(
DatasetTable
record
);
List
<
DatasetTable
>
selectByExample
(
DatasetTableExample
example
);
DatasetTable
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
DatasetTable
record
,
@Param
(
"example"
)
DatasetTableExample
example
);
int
updateByExample
(
@Param
(
"record"
)
DatasetTable
record
,
@Param
(
"example"
)
DatasetTableExample
example
);
int
updateByPrimaryKeySelective
(
DatasetTable
record
);
int
updateByPrimaryKey
(
DatasetTable
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/DatasetTableMapper.xml
0 → 100644
浏览文件 @
73bf2294
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.dataease.base.mapper.DatasetTableMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.DatasetTable"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"scene_id"
jdbcType=
"VARCHAR"
property=
"sceneId"
/>
<result
column=
"data_source_id"
jdbcType=
"VARCHAR"
property=
"dataSourceId"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, `name`, scene_id, data_source_id, `type`, create_by, create_time
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.DatasetTableExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from dataset_table
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from dataset_table
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dataset_table
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.DatasetTableExample"
>
delete from dataset_table
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.DatasetTable"
>
insert into dataset_table (id, `name`, scene_id,
data_source_id, `type`, create_by,
create_time)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR},
#{dataSourceId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.DatasetTable"
>
insert into dataset_table
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"sceneId != null"
>
scene_id,
</if>
<if
test=
"dataSourceId != null"
>
data_source_id,
</if>
<if
test=
"type != null"
>
`type`,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"sceneId != null"
>
#{sceneId,jdbcType=VARCHAR},
</if>
<if
test=
"dataSourceId != null"
>
#{dataSourceId,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.DatasetTableExample"
resultType=
"java.lang.Long"
>
select count(*) from dataset_table
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update dataset_table
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.sceneId != null"
>
scene_id = #{record.sceneId,jdbcType=VARCHAR},
</if>
<if
test=
"record.dataSourceId != null"
>
data_source_id = #{record.dataSourceId,jdbcType=VARCHAR},
</if>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=VARCHAR},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update dataset_table
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
scene_id = #{record.sceneId,jdbcType=VARCHAR},
data_source_id = #{record.dataSourceId,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.DatasetTable"
>
update dataset_table
<set>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"sceneId != null"
>
scene_id = #{sceneId,jdbcType=VARCHAR},
</if>
<if
test=
"dataSourceId != null"
>
data_source_id = #{dataSourceId,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.DatasetTable"
>
update dataset_table
set `name` = #{name,jdbcType=VARCHAR},
scene_id = #{sceneId,jdbcType=VARCHAR},
data_source_id = #{dataSourceId,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
controller
.
dataset
;
import
io.dataease.base.domain.DatasetTable
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.service.dataset.DataSetTableService
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/2/20 8:29 下午
*/
@RestController
@RequestMapping
(
"dataset/table"
)
public
class
DataSetTableController
{
@Resource
private
DataSetTableService
dataSetTableService
;
@PostMapping
(
"batchAdd"
)
public
void
batchAdd
(
@RequestBody
List
<
DatasetTable
>
datasetTable
)
{
dataSetTableService
.
batchInsert
(
datasetTable
);
}
@PostMapping
(
"update"
)
public
DatasetTable
save
(
@RequestBody
DatasetTable
datasetTable
)
{
return
dataSetTableService
.
save
(
datasetTable
);
}
@PostMapping
(
"delete/{id}"
)
public
void
delete
(
@PathVariable
String
id
)
{
dataSetTableService
.
delete
(
id
);
}
@PostMapping
(
"list"
)
public
List
<
DatasetTable
>
list
(
@RequestBody
DataSetTableRequest
dataSetTableRequest
)
{
return
dataSetTableService
.
list
(
dataSetTableRequest
);
}
@PostMapping
(
"get/{id}"
)
public
DatasetTable
get
(
@PathVariable
String
id
)
{
return
dataSetTableService
.
get
(
id
);
}
}
backend/src/main/java/io/dataease/controller/request/dataset/DataSetTableRequest.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
controller
.
request
.
dataset
;
import
io.dataease.base.domain.DatasetTable
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/2/23 3:06 下午
*/
@Setter
@Getter
public
class
DataSetTableRequest
extends
DatasetTable
{
private
String
sort
;
private
List
<
String
>
tableNames
;
}
backend/src/main/java/io/dataease/dto/dataset/DataSetTableDTO.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
dto
.
dataset
;
import
io.dataease.base.domain.DatasetTable
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/2/23 2:55 下午
*/
@Setter
@Getter
public
class
DataSetTableDTO
extends
DatasetTable
{
private
List
<
DataSetTableDTO
>
children
;
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
0 → 100644
浏览文件 @
73bf2294
package
io
.
dataease
.
service
.
dataset
;
import
com.alibaba.nacos.common.util.UuidUtils
;
import
io.dataease.base.domain.DatasetTable
;
import
io.dataease.base.domain.DatasetTableExample
;
import
io.dataease.base.mapper.DatasetTableMapper
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/2/23 2:54 下午
*/
@Service
public
class
DataSetTableService
{
@Resource
private
DatasetTableMapper
datasetTableMapper
;
public
void
batchInsert
(
List
<
DatasetTable
>
datasetTable
)
{
for
(
DatasetTable
table
:
datasetTable
)
{
save
(
table
);
}
}
public
DatasetTable
save
(
DatasetTable
datasetTable
)
{
if
(
StringUtils
.
isEmpty
(
datasetTable
.
getId
()))
{
datasetTable
.
setId
(
UuidUtils
.
generateUuid
());
datasetTable
.
setCreateTime
(
System
.
currentTimeMillis
());
datasetTableMapper
.
insert
(
datasetTable
);
}
else
{
datasetTableMapper
.
updateByPrimaryKey
(
datasetTable
);
}
return
datasetTable
;
}
public
void
delete
(
String
id
)
{
datasetTableMapper
.
deleteByPrimaryKey
(
id
);
}
public
List
<
DatasetTable
>
list
(
DataSetTableRequest
dataSetTableRequest
)
{
DatasetTableExample
datasetTableExample
=
new
DatasetTableExample
();
datasetTableExample
.
createCriteria
().
andSceneIdEqualTo
(
dataSetTableRequest
.
getSceneId
());
if
(
StringUtils
.
isNotEmpty
(
dataSetTableRequest
.
getSort
()))
{
datasetTableExample
.
setOrderByClause
(
dataSetTableRequest
.
getSort
());
}
return
datasetTableMapper
.
selectByExample
(
datasetTableExample
);
}
public
DatasetTable
get
(
String
id
)
{
return
datasetTableMapper
.
selectByPrimaryKey
(
id
);
}
}
backend/src/main/resources/db/migration/V9__dataset_tables.sql
0 → 100644
浏览文件 @
73bf2294
CREATE
TABLE
IF
NOT
EXISTS
`dataset_table`
(
`id`
varchar
(
50
)
NOT
NULL
COMMENT
'ID'
,
`name`
varchar
(
64
)
NOT
NULL
COMMENT
'表名称'
,
`scene_id`
varchar
(
50
)
NOT
NULL
COMMENT
'场景ID'
,
`data_source_id`
varchar
(
50
)
NOT
NULL
COMMENT
'数据源ID'
,
`type`
varchar
(
50
)
COMMENT
'db,sql,excel,custom'
,
`create_by`
varchar
(
50
)
COMMENT
'创建人ID'
,
`create_time`
bigint
(
13
)
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
frontend/src/business/components/dataset/data/AddDB.vue
浏览文件 @
73bf2294
...
...
@@ -81,9 +81,23 @@ export default {
},
save
()
{
console
.
log
(
this
.
checkTableList
);
console
.
log
(
this
.
scene
);
this
.
$store
.
commit
(
'setSceneData'
,
new
Date
().
getTime
());
// console.log(this.checkTableList);
// console.log(this.scene);
let
sceneId
=
this
.
scene
.
id
;
let
dataSourceId
=
this
.
dataSource
;
let
tables
=
[];
this
.
checkTableList
.
forEach
(
function
(
name
)
{
tables
.
push
({
name
:
name
,
sceneId
:
sceneId
,
dataSourceId
:
dataSourceId
,
type
:
'db'
})
});
this
.
$post
(
'/dataset/table/batchAdd'
,
tables
,
response
=>
{
this
.
$store
.
commit
(
'setSceneData'
,
new
Date
().
getTime
());
this
.
cancel
();
});
},
cancel
()
{
...
...
frontend/src/business/components/dataset/data/TabDataPreview.vue
0 → 100644
浏览文件 @
73bf2294
<
template
>
<el-col>
<el-table
size=
"mini"
:data=
"tableData"
border
style=
"width: 100%"
>
<el-table-column
prop=
"date"
label=
"日期"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"姓名"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"address"
label=
"地址"
>
</el-table-column>
</el-table>
</el-col>
</
template
>
<
script
>
export
default
{
name
:
"TabDataPreview"
,
data
()
{
return
{
tableData
:
[{
date
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
},
{
date
:
'2016-05-04'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1517 弄'
},
{
date
:
'2016-05-01'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1519 弄'
},
{
date
:
'2016-05-03'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1516 弄'
}]
}
},
computed
:
{},
created
()
{
},
mounted
()
{
},
activated
()
{
},
methods
:
{},
watch
:
{}
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/business/components/dataset/data/ViewTable.vue
0 → 100644
浏览文件 @
73bf2294
<
template
>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<span
v-show=
"false"
>
{{
tableId
}}
</span>
<span
style=
"line-height: 26px;"
>
{{
table
.
name
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
>
{{
$t
(
'dataset.edit'
)
}}
</el-button>
<el-button
size=
"mini"
>
{{
$t
(
'dataset.create_view'
)
}}
</el-button>
</el-row>
</el-row>
<el-divider/>
<el-tabs
v-model=
"tabActive"
>
<el-tab-pane
:label=
"$t('dataset.data_preview')"
name=
"dataPreview"
>
<tab-data-preview/>
</el-tab-pane>
<el-tab-pane
label=
"tab2"
name=
"tab2"
>
tab2
</el-tab-pane>
<el-tab-pane
label=
"tab3"
name=
"tab3"
>
tab3
</el-tab-pane>
<el-tab-pane
label=
"tab4"
name=
"tab4"
>
tab4
</el-tab-pane>
</el-tabs>
</el-row>
</el-col>
</
template
>
<
script
>
import
TabDataPreview
from
"./TabDataPreview"
;
export
default
{
name
:
"ViewTable"
,
components
:
{
TabDataPreview
},
data
()
{
return
{
table
:
{
name
:
''
},
tabActive
:
'dataPreview'
}
},
computed
:
{
tableId
()
{
this
.
initTable
(
this
.
$store
.
state
.
dataset
.
table
);
return
this
.
$store
.
state
.
dataset
.
table
;
}
},
created
()
{
this
.
resetTable
();
},
mounted
()
{
this
.
resetTable
();
},
activated
()
{
this
.
resetTable
();
},
methods
:
{
initTable
(
id
)
{
if
(
id
!==
null
)
{
this
.
$post
(
'/dataset/table/get/'
+
id
,
null
,
response
=>
{
this
.
table
=
response
.
data
;
})
}
},
resetTable
()
{
this
.
table
=
{
name
:
''
}
}
},
watch
:
{}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
;
}
.form-item
{
margin-bottom
:
6px
;
}
</
style
>
frontend/src/business/components/dataset/group/Group.vue
浏览文件 @
73bf2294
...
...
@@ -164,20 +164,15 @@
</el-form>
</el-row>
<span
v-show=
"false"
>
{{
sceneData
}}
</span>
<!-- todo el-tree -->
<el-tree
:data=
"
null
"
:data=
"
tableData
"
node-key=
"id"
:expand-on-click-node=
"true"
@
node-click=
"sceneClick"
>
<span
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
<span
v-if=
"data.type === 'scene'"
>
<el-button
icon=
"el-icon-folder"
type=
"text"
size=
"mini"
>
</el-button>
<span>
(
{{
data
.
type
}}
)
</span>
<span
style=
"margin-left: 6px"
>
{{
data
.
name
}}
</span>
</span>
...
...
@@ -192,13 +187,13 @@
</el-button>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-edit-outline"
:command=
"beforeClickMore('rename',data,node)"
>
<el-dropdown-item
icon=
"el-icon-edit-outline"
:command=
"beforeClickMore('rename
Table
',data,node)"
>
{{
$t
(
'dataset.rename'
)
}}
</el-dropdown-item>
<!--
<el-dropdown-item
icon=
"el-icon-right"
:command=
"beforeClickMore('move',data,node)"
>
-->
<!--
{{
$t
(
'dataset.move_to'
)
}}
-->
<!--
</el-dropdown-item>
-->
<el-dropdown-item
icon=
"el-icon-delete"
:command=
"beforeClickMore('delete',data,node)"
>
<el-dropdown-item
icon=
"el-icon-delete"
:command=
"beforeClickMore('delete
Table
',data,node)"
>
{{
$t
(
'dataset.delete'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -207,6 +202,19 @@
</span>
</span>
</el-tree>
<el-dialog
:title=
"$t('dataset.table')"
:visible=
"editTable"
:show-close=
"false"
width=
"30%"
>
<el-form
:model=
"tableForm"
:rules=
"tableFormRules"
ref=
"tableForm"
>
<el-form-item
:label=
"$t('commons.name')"
prop=
"name"
>
<el-input
v-model=
"tableForm.name"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeTable()"
size=
"mini"
>
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"saveTable(tableForm)"
size=
"mini"
>
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</div>
</el-dialog>
</el-col>
</el-col>
</
template
>
...
...
@@ -220,7 +228,9 @@ export default {
dialogTitle
:
''
,
search
:
''
,
editGroup
:
false
,
data
:
null
,
editTable
:
false
,
data
:
[],
tableData
:
[],
currGroup
:
null
,
expandedArray
:
[],
groupForm
:
{
...
...
@@ -231,25 +241,37 @@ export default {
children
:
[],
sort
:
'type desc,name asc'
},
tableForm
:
{
name
:
''
,
sort
:
'type asc,create_time desc,name asc'
},
groupFormRules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
},
],
},
tableFormRules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
},
],
}
}
},
computed
:
{
sceneData
:
function
()
{
console
.
log
(
this
.
$store
.
state
.
dataset
.
sceneData
+
' do post'
);
this
.
tableTree
();
return
this
.
$store
.
state
.
dataset
.
sceneData
;
}
},
mounted
()
{
this
.
tree
(
this
.
groupForm
);
this
.
tableTree
();
this
.
$router
.
push
(
'/dataset'
);
},
activated
()
{
this
.
tree
(
this
.
groupForm
);
this
.
tableTree
();
this
.
$router
.
push
(
'/dataset'
);
},
watch
:
{
...
...
@@ -275,11 +297,11 @@ export default {
},
clickMore
(
param
)
{
//
console.log(param);
console
.
log
(
param
);
switch
(
param
.
type
)
{
case
'rename'
:
this
.
add
(
param
.
data
.
type
);
this
.
groupForm
=
param
.
data
;
this
.
groupForm
=
JSON
.
parse
(
JSON
.
stringify
(
param
.
data
))
;
break
;
case
'move'
:
...
...
@@ -287,6 +309,13 @@ export default {
case
'delete'
:
this
.
delete
(
param
.
data
);
break
;
case
'renameTable'
:
this
.
editTable
=
true
;
this
.
tableForm
=
JSON
.
parse
(
JSON
.
stringify
(
param
.
data
));
break
;
case
'deleteTable'
:
this
.
deleteTable
(
param
.
data
);
break
;
}
},
...
...
@@ -335,6 +364,32 @@ export default {
});
},
saveTable
(
table
)
{
console
.
log
(
table
);
this
.
$refs
[
'tableForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$post
(
"/dataset/table/update"
,
table
,
response
=>
{
this
.
closeTable
();
this
.
$message
({
message
:
this
.
$t
(
'commons.save_success'
),
type
:
'success'
,
showClose
:
true
,
});
this
.
tableTree
();
this
.
$router
.
push
(
'/dataset/home'
);
this
.
$store
.
commit
(
'setTable'
,
null
);
})
}
else
{
this
.
$message
({
message
:
this
.
$t
(
'commons.input_content'
),
type
:
'error'
,
showClose
:
true
,
});
return
false
;
}
});
},
delete
(
data
)
{
this
.
$confirm
(
this
.
$t
(
'dataset.confirm_delete'
),
this
.
$t
(
'dataset.tips'
),
{
confirmButtonText
:
this
.
$t
(
'dataset.confirm'
),
...
...
@@ -353,6 +408,26 @@ export default {
});
},
deleteTable
(
data
)
{
this
.
$confirm
(
this
.
$t
(
'dataset.confirm_delete'
),
this
.
$t
(
'dataset.tips'
),
{
confirmButtonText
:
this
.
$t
(
'dataset.confirm'
),
cancelButtonText
:
this
.
$t
(
'dataset.cancel'
),
type
:
'warning'
}).
then
(()
=>
{
this
.
$post
(
"/dataset/table/delete/"
+
data
.
id
,
null
,
response
=>
{
this
.
$message
({
type
:
'success'
,
message
:
this
.
$t
(
'dataset.delete_success'
),
showClose
:
true
,
});
this
.
tableTree
();
this
.
$router
.
push
(
'/dataset/home'
);
this
.
$store
.
commit
(
'setTable'
,
null
);
});
}).
catch
(()
=>
{
});
},
close
()
{
this
.
editGroup
=
false
;
this
.
groupForm
=
{
...
...
@@ -365,12 +440,31 @@ export default {
}
},
closeTable
()
{
this
.
editTable
=
false
;
this
.
tableForm
=
{
name
:
''
,
}
},
tree
(
group
)
{
this
.
$post
(
"/dataset/group/tree"
,
group
,
response
=>
{
this
.
data
=
response
.
data
;
})
},
tableTree
()
{
this
.
tableData
=
[];
if
(
this
.
currGroup
)
{
this
.
$post
(
'/dataset/table/list'
,
{
sort
:
'type asc,create_time desc,name asc'
,
sceneId
:
this
.
currGroup
.
id
},
response
=>
{
this
.
tableData
=
response
.
data
;
});
}
},
nodeClick
(
data
,
node
)
{
// console.log(data);
// console.log(node);
...
...
@@ -418,10 +512,6 @@ export default {
}
},
sceneClick
()
{
},
addDB
()
{
this
.
$router
.
push
({
name
:
'add_db'
,
...
...
@@ -429,8 +519,20 @@ export default {
scene
:
this
.
currGroup
}
})
},
sceneClick
(
data
,
node
)
{
// console.log(data);
this
.
$store
.
commit
(
'setTable'
,
data
.
id
);
this
.
$router
.
push
({
name
:
'table'
,
params
:
{
table
:
data
}
}
});
},
},
}
</
script
>
...
...
frontend/src/business/components/dataset/router.js
浏览文件 @
73bf2294
const
DataSet
=
()
=>
import
(
'@/business/components/dataset/DataSet'
);
const
DataSetHome
=
()
=>
import
(
'@/business/components/dataset/data/DataHome'
);
const
DataSetAddDB
=
()
=>
import
(
'@/business/components/dataset/data/AddDB'
);
const
DataSetTable
=
()
=>
import
(
'@/business/components/dataset/data/ViewTable'
);
// const PerformanceTestHome = () => import('@/business/components/performance/home/PerformanceTestHome')
// const EditPerformanceTest = () => import('@/business/components/performance/test/EditPerformanceTest')
// const PerformanceTestList = () => import('@/business/components/performance/test/PerformanceTestList')
...
...
@@ -26,6 +27,11 @@ export default {
name
:
'add_db'
,
component
:
DataSetAddDB
,
},
{
path
:
'table'
,
name
:
'table'
,
component
:
DataSetTable
,
},
// {
// path: 'test/create',
// name: "createPerTest",
...
...
frontend/src/business/store.js
浏览文件 @
73bf2294
...
...
@@ -5,11 +5,15 @@ Vue.use(Vuex);
const
Dataset
=
{
state
:
{
sceneData
:
""
sceneData
:
""
,
table
:
""
},
mutations
:
{
setSceneData
(
state
,
sceneData
)
{
state
.
sceneData
=
sceneData
;
},
setTable
(
state
,
table
)
{
state
.
table
=
table
;
}
}
}
...
...
frontend/src/i18n/en-US.js
浏览文件 @
73bf2294
...
...
@@ -1545,6 +1545,10 @@ export default {
custom_data
:
'Custom Data'
,
pls_slc_tbl_left
:
'Please select table from left'
,
add_db_table
:
'Add Table'
,
pls_slc_data_source
:
'Select Data Source'
pls_slc_data_source
:
'Select Data Source'
,
table
:
'Table'
,
edit
:
'Edit'
,
create_view
:
'Create View'
,
data_preview
:
'Data Preview'
}
};
frontend/src/i18n/zh-CN.js
浏览文件 @
73bf2294
...
...
@@ -1552,9 +1552,13 @@ export default {
sql_data
:
'SQL数据集'
,
excel_data
:
'Excel数据集'
,
custom_data
:
'自助数据集'
,
pls_slc_tbl_left
:
'请从左侧选择表'
,
add_db_table
:
'添加数据库表'
,
pls_slc_data_source
:
'请选择数据库连接'
pls_slc_tbl_left
:
'请从左侧选择表'
,
add_db_table
:
'添加数据库表'
,
pls_slc_data_source
:
'请选择数据库连接'
,
table
:
'表'
,
edit
:
'编辑'
,
create_view
:
'创建试图'
,
data_preview
:
'数据预览'
},
datasource
:
{
create
:
'新建数据连接'
,
...
...
frontend/src/i18n/zh-TW.js
浏览文件 @
73bf2294
...
...
@@ -1546,6 +1546,10 @@ export default {
custom_data
:
'自助數據集'
,
pls_slc_tbl_left
:
'請從左側選擇表'
,
add_db_table
:
'添加數據庫表'
,
pls_slc_data_source
:
'請選擇數據庫連接'
pls_slc_data_source
:
'請選擇數據庫連接'
,
table
:
'表'
,
edit
:
'編輯'
,
create_view
:
'創建試圖'
,
data_preview
:
'數據預覽'
}
};
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论