forked from github/dataease
Merge pull request #7962 from dataease/pr@dev_one_dot_x
Pr@dev one dot x
This commit is contained in:
commit
db2af20827
@ -967,7 +967,7 @@ export default {
|
||||
).sql
|
||||
}
|
||||
if (JSON.parse(table.info).hasOwnProperty("setKey")) {
|
||||
this.param.setKey = JSON.parse(table.info).setKey
|
||||
this.$set(this.param, 'setKey', JSON.parse(table.info).setKey)
|
||||
this.param.keys = JSON.parse(table.info).keys
|
||||
}
|
||||
this.variables = JSON.parse(table.sqlVariableDetails)
|
||||
|
@ -694,6 +694,14 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async cancelEdit() {
|
||||
const params = this.configFromTabs?.id ? this.configFromTabs : this.$route.query
|
||||
let { id, showModel } = params
|
||||
await this.getDatasourceDetail(id, showModel)
|
||||
this.edit(this.params)
|
||||
this.changeType(true)
|
||||
this.editDatasource(false)
|
||||
},
|
||||
editDatasource(type) {
|
||||
this.$emit('update:canEdit', type)
|
||||
this.disabled = !type
|
||||
|
@ -24,7 +24,7 @@
|
||||
v-if="privileges && canEdit"
|
||||
key="cancel"
|
||||
secondary
|
||||
@click="editDatasource(false)"
|
||||
@click="cancelEdit"
|
||||
>{{ $t('commons.cancel') }}
|
||||
</deBtn>
|
||||
<deBtn
|
||||
@ -109,6 +109,10 @@ export default {
|
||||
this.$refs.DsFormContent.editDatasource(type)
|
||||
this.canEdit = type
|
||||
},
|
||||
cancelEdit() {
|
||||
this.$refs.DsFormContent.cancelEdit()
|
||||
this.canEdit = false
|
||||
},
|
||||
validaDatasource() {
|
||||
this.$refs.DsFormContent.validaDatasource()
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user