|
@@ -422,16 +422,21 @@ export default {
|
|
|
}
|
|
|
this.$refs['datasourceForm'].validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.connDialogVisible = true
|
|
|
- if (this.checkDataSourceParam(2, false)) {
|
|
|
+ if (this.chooseConnServer && !this.checkDataSourceParam(3, true)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.chooseConnServer && this.checkDataSourceParam(2, false)) {
|
|
|
return
|
|
|
}
|
|
|
+ this.connDialogVisible = true
|
|
|
if (this.chooseConnServer) {
|
|
|
this.$nextTick(() => {
|
|
|
- this.connForm = JSON.parse(JSON.stringify(this.chooseConnServer))
|
|
|
- this.connForm.connType = {
|
|
|
- 'type' : this.chooseConnServer.dataSourceTypeKey,
|
|
|
- 'id': this.chooseConnServer.typeId
|
|
|
+ if (!this.connForm || this.connForm.id != this.chooseConnServer.id) {
|
|
|
+ this.connForm = JSON.parse(JSON.stringify(this.chooseConnServer))
|
|
|
+ this.connForm.connType = {
|
|
|
+ 'type' : this.chooseConnServer.dataSourceTypeKey,
|
|
|
+ 'id': this.chooseConnServer.typeId
|
|
|
+ }
|
|
|
}
|
|
|
this.driverList = []
|
|
|
this.driverList.push({
|