|
|
|
@ -44,7 +44,7 @@ export class MaintainForm extends BI.Widget {
|
|
|
|
|
render() { |
|
|
|
|
const formData = BI.clone(this.getFormData()); |
|
|
|
|
if (this.model.isCopy) { |
|
|
|
|
formData.connectionName = `${formData.connectionName}-${BI.i18nText('Dec-Dcm_Copy')}`; |
|
|
|
|
formData.connectionName = this.getConnectionName(formData.connectionName); |
|
|
|
|
this.isEdit = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -175,8 +175,7 @@ export class MaintainForm extends BI.Widget {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private getConnectionName() { |
|
|
|
|
const name = BI.i18nText('Dec-Dcm_Data_Connections'); |
|
|
|
|
private getConnectionName(name = BI.i18nText('Dec-Dcm_Data_Connections')) { |
|
|
|
|
const connections = this.model.connections.filter(item => item.connectionName.startsWith(name)); |
|
|
|
|
if (connections.length === 0) { |
|
|
|
|
return name; |
|
|
|
|