Browse Source

Merge pull request #89 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:feature/10.0 to feature/10.0

* commit 'a02e38a15908375e6c5fc3e903b5010accc38bff':
  fix: DEC-10165 复制数据连接时,名字后面自动添加后缀
  fix: DEC-10147 修改复制数据连接的bug
qufenxi
alan 5 years ago
parent
commit
98b40f18e8
  1. 4
      src/modules/pages/connection/connection.ts
  2. 5
      src/modules/pages/maintain/forms/form.ts

4
src/modules/pages/connection/connection.ts

@ -134,6 +134,10 @@ export class Connection extends BI.Widget {
};
}
mounted() {
this.store.setDatebaseTypeSelected('');
}
private renderItems() {
switch (this.model.connectionSelectedOne.connectionType) {
case connectionType.JDBC:

5
src/modules/pages/maintain/forms/form.ts

@ -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;

Loading…
Cancel
Save