forked from github/dataease
fix: 数据源布局,编辑驱动bug 修复
This commit is contained in:
parent
eeb775b706
commit
8349fccf43
@ -259,6 +259,7 @@ export default {
|
||||
}
|
||||
updateDriver(this.driverForm).then((res) => {
|
||||
this.$success(i18n.t('commons.success'))
|
||||
this.$emit('DataUpdate', res.data)
|
||||
this.canEdit = false
|
||||
})
|
||||
})
|
||||
|
@ -1100,9 +1100,9 @@ export default {
|
||||
if (this.disabled) {
|
||||
return
|
||||
}
|
||||
this.api_table_title = this.$t('datasource.data_table')
|
||||
if (item) {
|
||||
this.add_api_item = false
|
||||
this.api_table_title = this.$t('datasource.edit_api_table')
|
||||
this.apiItem = JSON.parse(JSON.stringify(item))
|
||||
} else {
|
||||
this.add_api_item = true
|
||||
@ -1112,7 +1112,6 @@ export default {
|
||||
? this.form.apiConfiguration[this.form.apiConfiguration.length - 1]
|
||||
.serialNumber + 1
|
||||
: 0
|
||||
this.api_table_title = this.$t('datasource.add_api_table')
|
||||
}
|
||||
this.active = 1
|
||||
this.edit_api_item = true
|
||||
|
@ -32,6 +32,7 @@
|
||||
:is="component"
|
||||
v-if="!!component"
|
||||
:params="param"
|
||||
@DataUpdate="dataUpdate"
|
||||
:t-data="tData"
|
||||
:ds-types="dsTypes"
|
||||
@refresh-type="refreshType"
|
||||
@ -69,6 +70,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dataUpdate(row) {
|
||||
this.$refs.dsTree.dataUpdate(row)
|
||||
},
|
||||
jump() {
|
||||
this.$refs.dsTree.dsMgm()
|
||||
this.switchMgm('dsMgm')
|
||||
@ -126,7 +130,7 @@ export default {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: nowrap;
|
||||
box-sizing: border-box;
|
||||
.el-empty {
|
||||
height: 100%;
|
||||
@ -149,6 +153,7 @@ export default {
|
||||
height: calc(100vh - 56px);
|
||||
background-color: var(--MainBG, #f5f6f7);
|
||||
padding: 24px;
|
||||
flex-wrap: wrap;
|
||||
.ms-aside-container,
|
||||
.ms-main-container {
|
||||
height: calc(100vh - 170px);
|
||||
|
@ -160,7 +160,6 @@
|
||||
</el-col>
|
||||
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="dialogTitle"
|
||||
class="de-dialog-form"
|
||||
:visible.sync="editDriver"
|
||||
@ -361,6 +360,20 @@ export default {
|
||||
this.datasourceTypes()
|
||||
},
|
||||
methods: {
|
||||
dataUpdate(row) {
|
||||
this.dfsTdata(this.tData, row)
|
||||
},
|
||||
dfsTdata(arr = [], row) {
|
||||
arr.some(ele => {
|
||||
if (ele.id === row.id) {
|
||||
ele.driverClass = row.driverClass
|
||||
return true
|
||||
} else if (ele.children?.length) {
|
||||
this.dfsTdata(ele.children, row)
|
||||
}
|
||||
return false
|
||||
})
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
@ -552,7 +565,7 @@ export default {
|
||||
}
|
||||
this.editDriver = true
|
||||
this.dialogTitle = this.$t('datasource.edit_driver')
|
||||
this.driverForm = row
|
||||
this.driverForm = {...row}
|
||||
},
|
||||
_handleDelete(datasource) {
|
||||
const params = {
|
||||
@ -707,7 +720,7 @@ export default {
|
||||
<style lang="scss">
|
||||
.db-container {
|
||||
width: 100%;
|
||||
max-height: 674px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
Loading…
Reference in New Issue
Block a user