Merge pull request #7962 from dataease/pr@dev_one_dot_x
Pr@dev one dot x
This commit is contained in:
commit
db2af20827
@ -966,8 +966,8 @@ export default {
|
|||||||
table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r')
|
table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r')
|
||||||
).sql
|
).sql
|
||||||
}
|
}
|
||||||
if(JSON.parse(table.info).hasOwnProperty("setKey")){
|
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.param.keys = JSON.parse(table.info).keys
|
||||||
}
|
}
|
||||||
this.variables = JSON.parse(table.sqlVariableDetails)
|
this.variables = JSON.parse(table.sqlVariableDetails)
|
||||||
|
|||||||
@ -694,6 +694,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
editDatasource(type) {
|
||||||
this.$emit('update:canEdit', type)
|
this.$emit('update:canEdit', type)
|
||||||
this.disabled = !type
|
this.disabled = !type
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
v-if="privileges && canEdit"
|
v-if="privileges && canEdit"
|
||||||
key="cancel"
|
key="cancel"
|
||||||
secondary
|
secondary
|
||||||
@click="editDatasource(false)"
|
@click="cancelEdit"
|
||||||
>{{ $t('commons.cancel') }}
|
>{{ $t('commons.cancel') }}
|
||||||
</deBtn>
|
</deBtn>
|
||||||
<deBtn
|
<deBtn
|
||||||
@ -109,6 +109,10 @@ export default {
|
|||||||
this.$refs.DsFormContent.editDatasource(type)
|
this.$refs.DsFormContent.editDatasource(type)
|
||||||
this.canEdit = type
|
this.canEdit = type
|
||||||
},
|
},
|
||||||
|
cancelEdit() {
|
||||||
|
this.$refs.DsFormContent.cancelEdit()
|
||||||
|
this.canEdit = false
|
||||||
|
},
|
||||||
validaDatasource() {
|
validaDatasource() {
|
||||||
this.$refs.DsFormContent.validaDatasource()
|
this.$refs.DsFormContent.validaDatasource()
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user