Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
b637b778
提交
b637b778
authored
5月 12, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into main
上级
f62f3e63
75337adf
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
47 行增加
和
28 行删除
+47
-28
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+9
-5
UnionView.vue
frontend/src/views/dataset/data/UnionView.vue
+13
-2
UpdateInfo.vue
frontend/src/views/dataset/data/UpdateInfo.vue
+25
-21
没有找到文件。
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
b637b778
...
...
@@ -112,7 +112,7 @@ public class DataSetTableService {
return
datasetTable
;
}
public
void
delete
(
String
id
)
throws
Exception
{
public
void
delete
(
String
id
)
throws
Exception
{
datasetTableMapper
.
deleteByPrimaryKey
(
id
);
dataSetTableFieldsService
.
deleteByTableId
(
id
);
// 删除同步任务
...
...
@@ -120,10 +120,11 @@ public class DataSetTableService {
deleteDorisTable
(
id
);
}
private
void
deleteDorisTable
(
String
datasetId
)
throws
Exception
{
private
void
deleteDorisTable
(
String
datasetId
)
throws
Exception
{
String
dorisTableName
=
DorisTableUtils
.
dorisName
(
datasetId
);
Datasource
dorisDatasource
=
(
Datasource
)
CommonBeanFactory
.
getBean
(
"DorisDatasource"
);
JdbcProvider
jdbcProvider
=
CommonBeanFactory
.
getBean
(
JdbcProvider
.
class
);;
Datasource
dorisDatasource
=
(
Datasource
)
CommonBeanFactory
.
getBean
(
"DorisDatasource"
);
JdbcProvider
jdbcProvider
=
CommonBeanFactory
.
getBean
(
JdbcProvider
.
class
);
;
DatasourceRequest
datasourceRequest
=
new
DatasourceRequest
();
datasourceRequest
.
setDatasource
(
dorisDatasource
);
datasourceRequest
.
setQuery
(
"drop table if exists "
+
dorisTableName
);
...
...
@@ -548,7 +549,10 @@ public class DataSetTableService {
JdbcProvider
jdbcProvider
=
CommonBeanFactory
.
getBean
(
JdbcProvider
.
class
);
DatasourceRequest
datasourceRequest
=
new
DatasourceRequest
();
datasourceRequest
.
setDatasource
(
dorisDatasource
);
datasourceRequest
.
setQuery
(
"CREATE VIEW "
+
dorisTableName
+
" AS ("
+
customSql
+
")"
);
// 先删除表
datasourceRequest
.
setQuery
(
"DROP VIEW IF EXISTS "
+
dorisTableName
);
jdbcProvider
.
exec
(
datasourceRequest
);
datasourceRequest
.
setQuery
(
"CREATE VIEW IF NOT EXISTS"
+
dorisTableName
+
" AS ("
+
customSql
+
")"
);
jdbcProvider
.
exec
(
datasourceRequest
);
}
...
...
frontend/src/views/dataset/data/UnionView.vue
浏览文件 @
b637b778
...
...
@@ -5,6 +5,8 @@
<el-table
size=
"mini"
:data=
"unionData"
:height=
"height"
border
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
...
...
@@ -28,8 +30,8 @@
:label=
"$t('dataset.target_field')"
/>
<el-table-column
fixed=
"righ
t"
width=
"100
"
align=
"lef
t"
:label=
"$t('dataset.operate')
"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"edit(scope.row)"
>
{{
$t
(
'dataset.edit'
)
}}
</el-button>
...
...
@@ -143,6 +145,7 @@ export default {
},
data
()
{
return
{
height
:
500
,
union
:
{
id
:
null
,
sourceTableId
:
this
.
table
.
id
,
...
...
@@ -165,9 +168,17 @@ export default {
}
},
mounted
()
{
this
.
calHeight
()
this
.
initUnion
()
},
methods
:
{
calHeight
()
{
const
that
=
this
setTimeout
(
function
()
{
const
currentHeight
=
document
.
documentElement
.
clientHeight
that
.
height
=
currentHeight
-
56
-
30
-
26
-
25
-
55
-
38
-
28
-
10
},
10
)
},
initUnion
()
{
if
(
this
.
table
.
id
)
{
post
(
'dataset/union/listByTableId/'
+
this
.
table
.
id
,
{}).
then
(
response
=>
{
...
...
frontend/src/views/dataset/data/UpdateInfo.vue
浏览文件 @
b637b778
...
...
@@ -13,6 +13,7 @@
size=
"mini"
:data=
"taskLogData"
border
:height=
"height"
style=
"width: 100%"
>
<el-table-column
...
...
@@ -32,18 +33,18 @@
:label=
"$t('dataset.end_time')"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
endTime
|
timestampFormatDate
}}
</span>
<span>
{{
scope
.
row
.
endTime
|
timestampFormatDate
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
:label=
"$t('dataset.status')"
>
<el-table-column
prop=
"status"
:label=
"$t('dataset.status')"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.status === 'Completed'"
style=
"color: green"
>
{{
$t
(
'dataset.completed'
)
}}
</span>
<span
v-if=
"scope.row.status === 'Underway'"
style=
"color: blue"
>
<i
class=
"el-icon-loading"
></i
>
<span
v-if=
"scope.row.status === 'Completed'"
style=
"color: green"
>
{{
$t
(
'dataset.completed'
)
}}
</span>
<span
v-if=
"scope.row.status === 'Underway'"
style=
"color: blue"
>
<i
class=
"el-icon-loading"
/
>
{{
$t
(
'dataset.underway'
)
}}
</span>
<span
v-if=
"scope.row.status === 'Error'"
style=
"color: red"
>
<span
v-if=
"scope.row.status === 'Error'"
style=
"color: red"
>
<el-link
type=
"danger"
style=
"font-size: 12px"
@
click=
"showErrorMassage(scope.row.info)"
>
{{
$t
(
'dataset.error'
)
}}
</el-link>
</span>
</
template
>
...
...
@@ -67,8 +68,9 @@
:visible=
"show_error_massage"
:show-close=
"false"
width=
"50%"
class=
"dialog-css"
>
<span>
{{error_massage}}
</span>
class=
"dialog-css"
>
<span>
{{ error_massage }}
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"show_error_massage = false"
>
{{ $t('dataset.close') }}
</el-button>
</span>
...
...
@@ -161,7 +163,7 @@
<el-button
type=
"primary"
size=
"mini"
@
click=
"saveTask(taskForm)"
>
{{ $t('dataset.confirm') }}
</el-button>
</div>
</el-dialog>
<el-row
>
<el-row>
<el-button
icon=
"el-icon-plus"
size=
"mini"
@
click=
"addTask(undefined)"
>
{{ $t('dataset.add_task') }}
</el-button>
...
...
@@ -295,6 +297,7 @@ export default {
},
data
()
{
return
{
height
:
500
,
update_setting
:
false
,
update_task
:
false
,
show_error_massage
:
false
,
...
...
@@ -355,8 +358,7 @@ export default {
},
watch
:
{
table
:
{
handler
()
{
handler
()
{
this
.
listTask
()
this
.
listTaskLog
()
},
...
...
@@ -364,21 +366,23 @@ export default {
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
return
(()
=>
{
this
.
height
=
window
.
innerHeight
/
2
})()
}
this
.
height
=
window
.
innerHeight
/
2
this
.
calHeight
()
},
methods
:
{
cellStyle
({
row
,
column
})
{
calHeight
()
{
const
that
=
this
setTimeout
(
function
()
{
const
currentHeight
=
document
.
documentElement
.
clientHeight
that
.
height
=
currentHeight
-
56
-
30
-
26
-
25
-
55
-
38
-
28
-
10
},
10
)
},
cellStyle
({
row
,
column
})
{
// 状态列字体颜色
if
(
row
.
status
===
'Underway'
&&
column
===
'status'
)
{
return
'color: blue'
}
else
if
(
row
.
status
===
'Completed'
&&
column
===
'status'
)
{
return
'color: green'
}
else
if
(
row
.
status
===
'Error'
&&
column
===
'status'
)
{
}
else
if
(
row
.
status
===
'Error'
&&
column
===
'status'
)
{
return
'color: red'
}
},
...
...
@@ -414,10 +418,10 @@ export default {
this
.
listTask
()
this
.
getIncrementalConfig
()
},
refreshLog
(){
refreshLog
()
{
this
.
listTaskLog
()
},
showErrorMassage
(
massage
){
showErrorMassage
(
massage
)
{
this
.
show_error_massage
=
true
this
.
error_massage
=
massage
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论