Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
4891c38a
提交
4891c38a
authored
5月 10, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
# Conflicts: # frontend/src/lang/zh.js # frontend/src/views/dataset/common/DatasetGroupSelector.vue
上级
08f0cd24
2ae0b71d
全部展开
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
333 行增加
和
66 行删除
+333
-66
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+5
-0
DataTableInfoCustomUnion.java
...ava/io/dataease/dto/dataset/DataTableInfoCustomUnion.java
+17
-0
DataTableInfoDTO.java
...c/main/java/io/dataease/dto/dataset/DataTableInfoDTO.java
+3
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+0
-0
zh.js
frontend/src/lang/zh.js
+3
-1
AddCustom.vue
frontend/src/views/dataset/add/AddCustom.vue
+128
-60
DatasetCustomField.vue
frontend/src/views/dataset/common/DatasetCustomField.vue
+102
-0
DatasetGroupSelector.vue
frontend/src/views/dataset/common/DatasetGroupSelector.vue
+61
-2
UnionView.vue
frontend/src/views/dataset/data/UnionView.vue
+12
-2
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+1
-1
index.vue
frontend/src/views/dataset/index.vue
+1
-0
没有找到文件。
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
4891c38a
...
@@ -73,6 +73,11 @@ public class DataSetTableController {
...
@@ -73,6 +73,11 @@ public class DataSetTableController {
return
dataSetTableService
.
getSQLPreview
(
dataSetTableRequest
);
return
dataSetTableService
.
getSQLPreview
(
dataSetTableRequest
);
}
}
@PostMapping
(
"customPreview"
)
public
Map
<
String
,
Object
>
customPreview
(
@RequestBody
DataSetTableRequest
dataSetTableRequest
)
throws
Exception
{
return
dataSetTableService
.
getCustomPreview
(
dataSetTableRequest
);
}
@PostMapping
(
"incrementalConfig"
)
@PostMapping
(
"incrementalConfig"
)
public
DatasetTableIncrementalConfig
incrementalConfig
(
@RequestBody
DatasetTableIncrementalConfig
datasetTableIncrementalConfig
)
throws
Exception
{
public
DatasetTableIncrementalConfig
incrementalConfig
(
@RequestBody
DatasetTableIncrementalConfig
datasetTableIncrementalConfig
)
throws
Exception
{
return
dataSetTableService
.
incrementalConfig
(
datasetTableIncrementalConfig
);
return
dataSetTableService
.
incrementalConfig
(
datasetTableIncrementalConfig
);
...
...
backend/src/main/java/io/dataease/dto/dataset/DataTableInfoCustomUnion.java
0 → 100644
浏览文件 @
4891c38a
package
io
.
dataease
.
dto
.
dataset
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/5/9 10:08 上午
*/
@Getter
@Setter
public
class
DataTableInfoCustomUnion
{
private
String
tableId
;
private
List
<
String
>
checkedFields
;
}
backend/src/main/java/io/dataease/dto/dataset/DataTableInfoDTO.java
浏览文件 @
4891c38a
...
@@ -3,6 +3,8 @@ package io.dataease.dto.dataset;
...
@@ -3,6 +3,8 @@ package io.dataease.dto.dataset;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
java.util.List
;
/**
/**
* @Author gin
* @Author gin
* @Date 2021/2/23 8:47 下午
* @Date 2021/2/23 8:47 下午
...
@@ -13,4 +15,5 @@ public class DataTableInfoDTO {
...
@@ -13,4 +15,5 @@ public class DataTableInfoDTO {
private
String
table
;
private
String
table
;
private
String
sql
;
private
String
sql
;
private
String
data
;
// file path
private
String
data
;
// file path
private
List
<
DataTableInfoCustomUnion
>
list
;
}
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
4891c38a
差异被折叠。
点击展开。
frontend/src/lang/zh.js
浏览文件 @
4891c38a
...
@@ -812,7 +812,9 @@ export default {
...
@@ -812,7 +812,9 @@ export default {
target_field
:
'被关联字段'
,
target_field
:
'被关联字段'
,
union_relation
:
'关联关系'
,
union_relation
:
'关联关系'
,
pls_setting_union_success
:
'请正确设置关联关系'
,
pls_setting_union_success
:
'请正确设置关联关系'
,
invalid_dataset
:
'Kettle未运行,无效数据集'
invalid_dataset
:
'Kettle未运行,无效数据集'
,
check_all
:
'全选'
,
can_not_union_self
:
'被关联表不能与关联表相同'
},
},
datasource
:
{
datasource
:
{
datasource
:
'数据源'
,
datasource
:
'数据源'
,
...
...
frontend/src/views/dataset/add/AddCustom.vue
浏览文件 @
4891c38a
<
template
>
<
template
>
<el-col>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_custom_table'
)
}}
{{
$t
(
'dataset.add_custom_table'
)
}}
...
@@ -9,29 +8,57 @@
...
@@ -9,29 +8,57 @@
<el-button
size=
"mini"
@
click=
"cancel"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'dataset.cancel'
)
}}
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"primary"
:disabled=
"checkTableList.length
<
1
"
@
click=
"save"
>
<el-button
:disabled=
"!name || checkedList.length === 0"
size=
"mini"
type=
"primary
"
@
click=
"save"
>
{{
$t
(
'dataset.confirm'
)
}}
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</el-button>
</el-row>
</el-row>
</el-row>
</el-row>
<el-divider
/>
<el-divider
/>
<el-row>
<el-row>
<el-col>
<el-form
:inline=
"true"
>
自助数据集
<el-form-item
class=
"form-item"
>
<el-input
v-model=
"name"
size=
"mini"
:placeholder=
"$t('commons.name')"
/>
</el-form-item>
</el-form>
</el-row>
<el-col
style=
"display: flex;flex-direction: row"
>
<el-col
class=
"panel-height"
style=
"width: 220px;border-right:solid 1px #dcdfe6;border-top:solid 1px #dcdfe6;padding-right: 15px;overflow-y: auto;"
>
<dataset-group-selector
:mode=
"1"
:checked-list=
"checkedList"
:union-data=
"unionData"
@
getTable=
"getTable"
/>
</el-col>
<el-col
class=
"panel-height"
style=
"width: 235px;border-top:solid 1px #dcdfe6;padding: 0 15px;overflow-y: auto;"
>
<dataset-custom-field
:table=
"table"
:checked-list=
"checkedList"
@
getChecked=
"getChecked"
/>
</el-col>
<el-col
class=
"panel-height"
style=
"flex: 1;"
>
<ux-grid
ref=
"plxTable"
size=
"mini"
style=
"width: 100%;"
:height=
"height"
:checkbox-config=
"
{highlight: true}"
:width-resize="true"
>
<ux-table-column
v-for=
"field in fields"
:key=
"field.fieldName"
min-width=
"200px"
:field=
"field.fieldName"
:title=
"field.remarks"
:resizable=
"true"
/>
</ux-grid>
</el-col>
</el-col>
<el-col>
TODO
</el-col>
</el-col>
</el-row>
</el-row>
</el-col>
</el-col>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
import
{
post
}
from
'@/api/dataset/dataset'
import
DatasetGroupSelector
from
'../common/DatasetGroupSelector'
import
DatasetCustomField
from
'../common/DatasetCustomField'
export
default
{
export
default
{
name
:
'AddCustom'
,
name
:
'AddCustom'
,
components
:
{
DatasetCustomField
,
DatasetGroupSelector
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -40,62 +67,104 @@ export default {
...
@@ -40,62 +67,104 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
searchTable
:
'
'
,
name
:
'自助数据集
'
,
options
:
[]
,
table
:
{}
,
dataSource
:
''
,
checkedList
:
[]
,
tables
:
[],
unionData
:
[],
checkTableList
:
[]
,
height
:
500
,
mode
:
'0'
,
data
:
[]
,
tableData
:
[]
fields
:
[]
}
}
},
},
watch
:
{
watch
:
{
// dataSource(val) {
'checkedList'
:
function
()
{
// if (val) {
// console.log(this.checkedList)
// post('/datasource/getTables', { id: val }).then(response => {
if
(
this
.
checkedList
&&
this
.
checkedList
.
length
>
0
)
{
// this.tables = response.data
// 根据第一个选择的数据集找到关联视图
// this.tableData = JSON.parse(JSON.stringify(this.tables))
post
(
'dataset/union/listByTableId/'
+
this
.
checkedList
[
0
].
tableId
,
{}).
then
(
response
=>
{
// })
// console.log(response)
// }
this
.
unionData
=
response
.
data
// },
})
// searchTable(val) {
}
else
{
// if (val && val !== '') {
this
.
unionData
=
[]
// this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.includes(val) })))
}
// } else {
}
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// }
// }
},
},
mounted
()
{
mounted
()
{
// this.initDataSource()
window
.
onresize
=
()
=>
{
},
this
.
calHeight
()
activated
()
{
}
// this.initDataSource
()
this
.
calHeight
()
},
},
methods
:
{
methods
:
{
// initDataSource() {
calHeight
()
{
// listDatasource().then(response => {
const
that
=
this
// this.options = response.data
setTimeout
(
function
()
{
// })
const
currentHeight
=
document
.
documentElement
.
clientHeight
// },
that
.
height
=
currentHeight
-
56
-
15
-
26
-
25
-
43
},
10
)
},
save
(
)
{
getTable
(
table
)
{
// console.log(t
his.checkTableList);
// console.log(t
able)
// console.log(this.scene);
this
.
table
=
table
const
sceneId
=
this
.
param
.
id
},
const
dataSourceId
=
this
.
dataSource
getChecked
(
tableCheckedField
)
{
const
tables
=
[]
// console.log(tableCheckedField)
// const mode = this.mode
if
(
tableCheckedField
.
checkedFields
&&
tableCheckedField
.
checkedFields
.
length
>
0
)
{
this
.
checkTableList
.
forEach
(
function
(
name
)
{
if
(
!
this
.
checkedList
.
some
(
ele
=>
ele
.
tableId
===
tableCheckedField
.
tableId
)
)
{
tables
.
push
({
this
.
checkedList
.
push
(
tableCheckedField
)
name
:
name
,
}
else
{
sceneId
:
sceneId
,
this
.
checkedList
.
forEach
(
ele
=>
{
dataSourceId
:
dataSourceId
,
if
(
ele
.
tableId
===
tableCheckedField
.
tableId
)
{
type
:
'excel'
,
ele
.
checkedFields
=
tableCheckedField
.
checkedFields
mode
:
1
}
})
})
}
}
else
{
let
index
=
-
1
for
(
let
i
=
0
;
i
<
this
.
checkedList
.
length
;
i
++
)
{
if
(
this
.
checkedList
[
i
].
tableId
===
tableCheckedField
.
tableId
)
{
index
=
i
break
}
}
if
(
index
>
-
1
)
{
this
.
checkedList
.
splice
(
index
,
1
)
}
}
// console.log(this.checkedList)
// request to get data
if
(
this
.
checkedList
.
length
>
0
)
{
const
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'custom'
,
mode
:
1
,
info
:
'{"list":'
+
JSON
.
stringify
(
this
.
checkedList
)
+
'}'
}
post
(
'/dataset/table/customPreview'
,
table
).
then
(
response
=>
{
console
.
log
(
response
)
this
.
fields
=
response
.
data
.
fields
this
.
data
=
response
.
data
.
data
const
datas
=
this
.
data
this
.
$refs
.
plxTable
.
reloadData
(
datas
)
})
})
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
}
},
save
()
{
const
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'custom'
,
mode
:
1
,
info
:
'{"list":'
+
JSON
.
stringify
(
this
.
checkedList
)
+
'}'
}
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
this
.
cancel
()
this
.
cancel
()
})
})
...
@@ -103,16 +172,11 @@ export default {
...
@@ -103,16 +172,11 @@ export default {
cancel
()
{
cancel
()
{
this
.
dataReset
()
this
.
dataReset
()
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
},
dataReset
()
{
dataReset
()
{
this
.
searchTable
=
''
this
.
options
=
[]
this
.
dataSource
=
''
this
.
tables
=
[]
this
.
checkTableList
=
[]
}
}
}
}
...
@@ -141,4 +205,8 @@ export default {
...
@@ -141,4 +205,8 @@ export default {
span
{
span
{
font-size
:
14px
;
font-size
:
14px
;
}
}
.panel-height
{
height
:
calc
(
100vh
-
56px
-
15px
-
26px
-
25px
-
43px
);
}
</
style
>
</
style
>
frontend/src/views/dataset/common/DatasetCustomField.vue
0 → 100644
浏览文件 @
4891c38a
<
template
>
<el-col>
<el-checkbox
v-model=
"checkAll"
:disabled=
"!(fields.length > 0)"
:indeterminate=
"isIndeterminate"
@
change=
"handleCheckAllChange"
>
{{
$t
(
'dataset.check_all'
)
}}
</el-checkbox>
<el-checkbox-group
v-model=
"checkedFields"
@
change=
"handleCheckedFieldsChange"
>
<el-checkbox
v-for=
"f in fields"
:key=
"f.id"
:label=
"f.id"
style=
"display: block;margin-top: 4px;width: 100%;"
>
<span
style=
"display: flex;flex-direction: row;flex: 1;"
>
<span>
<span
v-if=
"f.deType === 0"
>
<svg-icon
v-if=
"f.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
</span>
<span
v-if=
"f.deType === 1"
>
<svg-icon
v-if=
"f.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
</span>
<span
v-if=
"f.deType === 2 || f.deType === 3"
>
<svg-icon
v-if=
"f.deType === 2 || f.deType === 3"
icon-class=
"field_value"
class=
"field-icon-value"
/>
</span>
</span>
<span
style=
"display: flex;flex: 1;width: 100%;"
>
<span
style=
"text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 160px;"
>
{{
f
.
name
}}
</span>
</span>
</span>
</el-checkbox>
</el-checkbox-group>
</el-col>
</
template
>
<
script
>
import
{
fieldList
}
from
'../../../api/dataset/dataset'
export
default
{
name
:
'DatasetCustomField'
,
props
:
{
table
:
{
type
:
Object
,
required
:
true
},
checkedList
:
{
type
:
Array
,
required
:
true
}
},
data
()
{
return
{
fields
:
[],
checkAll
:
false
,
checkedFields
:
[],
isIndeterminate
:
false
}
},
watch
:
{
'table'
:
function
()
{
fieldList
(
this
.
table
.
id
).
then
(
response
=>
{
this
.
fields
=
response
.
data
this
.
checkedFields
=
[]
this
.
checkedList
.
forEach
(
ele
=>
{
if
(
ele
.
tableId
===
this
.
table
.
id
)
{
this
.
checkedFields
=
ele
.
checkedFields
}
})
const
checkedCount
=
this
.
checkedFields
.
length
this
.
checkAll
=
checkedCount
===
this
.
fields
.
length
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
fields
.
length
})
}
},
mounted
()
{
this
.
initField
()
},
methods
:
{
initField
()
{
if
(
this
.
table
.
id
)
{
fieldList
(
this
.
table
.
id
).
then
(
response
=>
{
this
.
fields
=
response
.
data
})
}
},
handleCheckAllChange
(
val
)
{
this
.
checkedFields
=
val
?
this
.
fields
.
map
(
ele
=>
{
return
ele
.
id
})
:
[]
this
.
isIndeterminate
=
false
this
.
getChecked
()
},
handleCheckedFieldsChange
(
value
)
{
const
checkedCount
=
value
.
length
this
.
checkAll
=
checkedCount
===
this
.
fields
.
length
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
fields
.
length
this
.
getChecked
()
},
getChecked
()
{
this
.
$emit
(
'getChecked'
,
{
tableId
:
this
.
table
.
id
,
checkedFields
:
this
.
checkedFields
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/views/dataset/common/DatasetGroupSelector.vue
浏览文件 @
4891c38a
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
@
node-click=
"sceneClick"
@
node-click=
"sceneClick"
>
>
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list">
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<span
:id=
"data.id"
style=
"display: flex;flex: 1;width: 0;"
>
<span>
<span>
<svg-icon
v-if=
"data.type === 'db'"
icon-class=
"ds-db"
class=
"ds-icon-db"
/>
<svg-icon
v-if=
"data.type === 'db'"
icon-class=
"ds-db"
class=
"ds-icon-db"
/>
<svg-icon
v-if=
"data.type === 'sql'"
icon-class=
"ds-sql"
class=
"ds-icon-sql"
/>
<svg-icon
v-if=
"data.type === 'sql'"
icon-class=
"ds-sql"
class=
"ds-icon-sql"
/>
...
@@ -107,6 +107,23 @@ import {isKettleRunning, post} from '@/api/dataset/dataset'
...
@@ -107,6 +107,23 @@ import {isKettleRunning, post} from '@/api/dataset/dataset'
export
default
{
export
default
{
name
:
'DatasetGroupSelector'
,
name
:
'DatasetGroupSelector'
,
props
:
{
mode
:
{
type
:
Number
,
required
:
false
,
default
:
-
1
},
unionData
:
{
type
:
Array
,
required
:
false
,
default
:
null
},
checkedList
:
{
type
:
Array
,
required
:
false
,
default
:
null
}
},
data
()
{
data
()
{
return
{
return
{
isKettleRunning
:
false
,
isKettleRunning
:
false
,
...
@@ -133,6 +150,9 @@ export default {
...
@@ -133,6 +150,9 @@ export default {
},
},
computed
:
{},
computed
:
{},
watch
:
{
watch
:
{
'unionData'
:
function
()
{
this
.
unionDataChange
()
},
search
(
val
)
{
search
(
val
)
{
if
(
val
&&
val
!==
''
)
{
if
(
val
&&
val
!==
''
)
{
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tables
.
filter
(
ele
=>
{
return
ele
.
name
.
includes
(
val
)
})))
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tables
.
filter
(
ele
=>
{
return
ele
.
name
.
includes
(
val
)
})))
...
@@ -188,7 +208,8 @@ export default {
...
@@ -188,7 +208,8 @@ export default {
if
(
this
.
currGroup
)
{
if
(
this
.
currGroup
)
{
post
(
'/dataset/table/list'
,
{
post
(
'/dataset/table/list'
,
{
sort
:
'type asc,create_time desc,name asc'
,
sort
:
'type asc,create_time desc,name asc'
,
sceneId
:
this
.
currGroup
.
id
sceneId
:
this
.
currGroup
.
id
,
mode
:
this
.
mode
<
0
?
null
:
this
.
mode
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
tables
=
response
.
data
this
.
tables
=
response
.
data
for
(
let
i
=
0
;
i
<
this
.
tables
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
tables
.
length
;
i
++
)
{
...
@@ -197,6 +218,10 @@ export default {
...
@@ -197,6 +218,10 @@ export default {
}
}
}
}
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tables
))
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tables
))
this
.
$nextTick
(
function
()
{
this
.
unionDataChange
()
})
})
})
}
}
},
},
...
@@ -232,6 +257,40 @@ export default {
...
@@ -232,6 +257,40 @@ export default {
return
return
}
}
this
.
$emit
(
'getTable'
,
data
)
this
.
$emit
(
'getTable'
,
data
)
},
unionDataChange
()
{
if
(
!
this
.
sceneMode
)
{
return
}
if
(
!
this
.
checkedList
||
this
.
checkedList
.
length
===
0
)
{
this
.
tableData
.
forEach
(
ele
=>
{
const
span
=
document
.
getElementById
(
ele
.
id
).
parentNode
const
div1
=
span
.
parentNode
const
div2
=
div1
.
parentNode
span
.
style
.
removeProperty
(
'color'
)
div1
.
style
.
removeProperty
(
'cursor'
)
div2
.
style
.
removeProperty
(
'pointer-events'
)
})
return
}
const
tableList
=
this
.
tableData
.
map
(
ele
=>
{
return
ele
.
id
})
const
unionList
=
this
.
unionData
.
map
(
ele
=>
{
return
ele
.
targetTableId
})
unionList
.
push
(
this
.
checkedList
[
0
].
tableId
)
const
notUnionList
=
tableList
.
concat
(
unionList
).
filter
(
v
=>
tableList
.
includes
(
v
)
&&
!
unionList
.
includes
(
v
))
notUnionList
.
forEach
(
ele
=>
{
const
span
=
document
.
getElementById
(
ele
).
parentNode
const
div1
=
span
.
parentNode
const
div2
=
div1
.
parentNode
span
.
style
.
setProperty
(
'color'
,
'#c0c4cc'
)
div1
.
style
.
setProperty
(
'cursor'
,
'not-allowed'
)
div2
.
style
.
setProperty
(
'pointer-events'
,
'none'
)
})
}
}
}
}
}
}
...
...
frontend/src/views/dataset/data/UnionView.vue
浏览文件 @
4891c38a
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
width=
"500"
width=
"500"
trigger=
"click"
trigger=
"click"
>
>
<dataset-group-selector
@
getTable=
"getTable"
/>
<dataset-group-selector
:mode=
"1"
@
getTable=
"getTable"
/>
<el-button
slot=
"reference"
size=
"mini"
>
{{ targetTable.name || $t('dataset.pls_slc_union_table') }}
</el-button>
<el-button
slot=
"reference"
size=
"mini"
>
{{ targetTable.name || $t('dataset.pls_slc_union_table') }}
</el-button>
</el-popover>
</el-popover>
...
@@ -169,10 +169,12 @@ export default {
...
@@ -169,10 +169,12 @@ export default {
},
},
methods
:
{
methods
:
{
initUnion
()
{
initUnion
()
{
if
(
this
.
table
.
id
)
{
post
(
'dataset/union/listByTableId/'
+
this
.
table
.
id
,
{}).
then
(
response
=>
{
post
(
'dataset/union/listByTableId/'
+
this
.
table
.
id
,
{}).
then
(
response
=>
{
// console.log(response)
// console.log(response)
this
.
unionData
=
response
.
data
this
.
unionData
=
response
.
data
})
})
}
},
},
showUnionEdit
()
{
showUnionEdit
()
{
...
@@ -183,7 +185,7 @@ export default {
...
@@ -183,7 +185,7 @@ export default {
this
.
editUnion
=
true
this
.
editUnion
=
true
},
},
saveUnion
()
{
saveUnion
()
{
console
.
log
(
this
.
union
)
//
console.log(this.union)
if
(
!
this
.
union
.
sourceTableFieldId
||
!
this
.
union
.
sourceUnionRelation
||
!
this
.
union
.
targetTableId
||
!
this
.
union
.
targetTableFieldId
)
{
if
(
!
this
.
union
.
sourceTableFieldId
||
!
this
.
union
.
sourceUnionRelation
||
!
this
.
union
.
targetTableId
||
!
this
.
union
.
targetTableFieldId
)
{
this
.
$message
({
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
...
@@ -245,6 +247,14 @@ export default {
...
@@ -245,6 +247,14 @@ export default {
},
},
getTable
(
param
)
{
getTable
(
param
)
{
// console.log(param)
// console.log(param)
if
(
param
.
id
===
this
.
table
.
id
)
{
this
.
$message
({
type
:
'error'
,
message
:
this
.
$t
(
'dataset.can_not_union_self'
),
showClose
:
true
})
return
}
this
.
targetTable
=
param
this
.
targetTable
=
param
this
.
union
.
targetTableId
=
param
.
id
this
.
union
.
targetTableId
=
param
.
id
this
.
union
.
targetTableFieldId
=
''
this
.
union
.
targetTableFieldId
=
''
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
4891c38a
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<el-tab-pane
:label=
"$t('dataset.data_preview')"
name=
"dataPreview"
>
<el-tab-pane
:label=
"$t('dataset.data_preview')"
name=
"dataPreview"
>
<tab-data-preview
:table=
"table"
:fields=
"fields"
:data=
"data"
:page=
"page"
:form=
"tableViewRowForm"
@
reSearch=
"reSearch"
/>
<tab-data-preview
:table=
"table"
:fields=
"fields"
:data=
"data"
:page=
"page"
:form=
"tableViewRowForm"
@
reSearch=
"reSearch"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"$t('dataset.join_view')"
name=
"joinView"
>
<el-tab-pane
v-if=
"table.type !== 'custom'"
:label=
"$t('dataset.join_view')"
name=
"joinView"
>
<union-view
:table=
"table"
/>
<union-view
:table=
"table"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
v-if=
"table.mode === 1 && (table.type === 'db' || table.type === 'sql')"
:label=
"$t('dataset.update_info')"
name=
"updateInfo"
>
<el-tab-pane
v-if=
"table.mode === 1 && (table.type === 'db' || table.type === 'sql')"
:label=
"$t('dataset.update_info')"
name=
"updateInfo"
>
...
...
frontend/src/views/dataset/index.vue
浏览文件 @
4891c38a
...
@@ -76,6 +76,7 @@ export default {
...
@@ -76,6 +76,7 @@ export default {
.ms-main-container
{
.ms-main-container
{
height
:
calc
(
100vh
-
56px
);
height
:
calc
(
100vh
-
56px
);
padding
:
15px
15px
0
15px
;
}
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论