forked from github/dataease
refactor: 显示所有的重复数据源
This commit is contained in:
parent
f99e1488f5
commit
095a66f225
@ -351,7 +351,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let repeat = false
|
let repeat = false
|
||||||
let repeatDsName = ''
|
let repeatDsName = []
|
||||||
this.tData.forEach(item => {
|
this.tData.forEach(item => {
|
||||||
if(item.id === this.form.type){
|
if(item.id === this.form.type){
|
||||||
item.children.forEach(child => {
|
item.children.forEach(child => {
|
||||||
@ -369,7 +369,7 @@ export default {
|
|||||||
case 'mariadb':
|
case 'mariadb':
|
||||||
if(configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port){
|
if(configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port){
|
||||||
repeat = true
|
repeat = true
|
||||||
repeatDsName = child.name
|
repeatDsName.push(child.name)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'pg':
|
case 'pg':
|
||||||
@ -378,13 +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
|
repeatDsName.push(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
|
repeatDsName.push(child.name)
|
||||||
repeat = true
|
repeat = true
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@ -404,7 +404,7 @@ export default {
|
|||||||
form.configuration = JSON.stringify(form.configuration)
|
form.configuration = JSON.stringify(form.configuration)
|
||||||
if (this.formType === 'modify' && this.originConfiguration !== form.configuration) {
|
if (this.formType === 'modify' && this.originConfiguration !== form.configuration) {
|
||||||
if(repeat){
|
if(repeat){
|
||||||
$confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName + '], ' + i18n.t('datasource.confirm_save'), () => {
|
$confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName.join(',') + '], ' + i18n.t('datasource.confirm_save'), () => {
|
||||||
$confirm(i18n.t('datasource.edit_datasource_msg'), () => {
|
$confirm(i18n.t('datasource.edit_datasource_msg'), () => {
|
||||||
this.method(method, form)
|
this.method(method, form)
|
||||||
})
|
})
|
||||||
@ -417,7 +417,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(repeat){
|
if(repeat){
|
||||||
$confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName + '], ' + i18n.t('datasource.confirm_save'), () => {
|
$confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName.join(',') + '], ' + i18n.t('datasource.confirm_save'), () => {
|
||||||
this.method(method, form)
|
this.method(method, form)
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
|
Loading…
Reference in New Issue
Block a user