提交 7fa3ec1c authored 作者: taojinlong's avatar taojinlong

fix: 校验重复数据源

上级 20f0b85d
......@@ -338,7 +338,7 @@ export default {
this.$refs.dsForm.resetFields()
},
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'))
return
}
......@@ -378,11 +378,13 @@ export default {
case 'oracle':
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){
repeatDsName = child.name
repeat = true
}
break
case 'es':
if(configuration.url == this.form.configuration.url){
repeatDsName = child.name
repeat = true
}
break
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论