forked from github/dataease
feat(数据集):编辑自助数据集
This commit is contained in:
parent
5c26b5986d
commit
ef36e73948
@ -102,7 +102,7 @@ public class DataSetTableService {
|
||||
int update = datasetTableMapper.updateByPrimaryKeySelective(datasetTable);
|
||||
// sql 更新
|
||||
if (update == 1) {
|
||||
if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "sql")) {
|
||||
if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "sql") || StringUtils.equalsIgnoreCase(datasetTable.getType(), "custom")) {
|
||||
// 删除所有字段,重新抽象
|
||||
dataSetTableFieldsService.deleteByTableId(datasetTable.getId());
|
||||
saveTableField(datasetTable);
|
||||
|
@ -23,7 +23,7 @@
|
||||
</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" />
|
||||
<dataset-group-selector :table="table" :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" />
|
||||
|
@ -122,6 +122,11 @@ export default {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
table: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -153,6 +158,18 @@ export default {
|
||||
'unionData': function() {
|
||||
this.unionDataChange()
|
||||
},
|
||||
'table': function() {
|
||||
if (this.table && this.table.sceneId) {
|
||||
post('dataset/group/getScene/' + this.table.sceneId, {}).then(response => {
|
||||
this.currGroup = response.data
|
||||
|
||||
this.$nextTick(function() {
|
||||
this.sceneMode = true
|
||||
this.tableTree()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
search(val) {
|
||||
if (val && val !== '') {
|
||||
this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.name.includes(val) })))
|
||||
@ -165,10 +182,6 @@ export default {
|
||||
this.tree(this.groupForm)
|
||||
this.tableTree()
|
||||
},
|
||||
activated() {
|
||||
this.tree(this.groupForm)
|
||||
this.tableTree()
|
||||
},
|
||||
created() {
|
||||
this.kettleState()
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user