forked from github/dataease
fix: 校验重复数据源
This commit is contained in:
parent
20f0b85dc7
commit
7fa3ec1ca9
@ -338,7 +338,7 @@ export default {
|
|||||||
this.$refs.dsForm.resetFields()
|
this.$refs.dsForm.resetFields()
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
if (!this.form.configuration.schema && (this.form.type === 'oracle' || this.form.type === 'sqlServer')) {
|
if (!this.form.configuration.schema && (this.form.type === 'oracle' || this.form.type === 'sqlServer' || this.form.type === 'pg' || this.form.type === 'redshift' || this.form.type === 'db2')) {
|
||||||
this.$message.error(i18n.t('datasource.please_choose_schema'))
|
this.$message.error(i18n.t('datasource.please_choose_schema'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -378,11 +378,13 @@ export default {
|
|||||||
case 'oracle':
|
case 'oracle':
|
||||||
case 'db2':
|
case 'db2':
|
||||||
if(configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port && configuration.schema == this.form.configuration.schema){
|
if(configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port && configuration.schema == this.form.configuration.schema){
|
||||||
|
repeatDsName = child.name
|
||||||
repeat = true
|
repeat = true
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'es':
|
case 'es':
|
||||||
if(configuration.url == this.form.configuration.url){
|
if(configuration.url == this.form.configuration.url){
|
||||||
|
repeatDsName = child.name
|
||||||
repeat = true
|
repeat = true
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user