Browse Source

fix: 改成和bi同样的逻辑

qufenxi
alan 5 years ago
parent
commit
443fdb9172
  1. 8
      src/modules/pages/maintain/forms/form.ts

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

@ -210,13 +210,9 @@ export class MaintainForm extends BI.Widget {
}
private getConnectionName(name = BI.i18nText('Dec-Dcm_Data_Connections')) {
const defaultName = name.replace(/\d+$/, '');
const connections = this.model.connections.filter(item => item.connectionName.startsWith(defaultName));
if (connections.length === 0) {
return name;
}
const connections = this.model.connections.filter(item => item.connectionName.startsWith(name));
return BI.Func.createDistinctName(connections.map(item => item.connectionName), defaultName);
return BI.Func.createDistinctName(connections.map(item => item.connectionName), name);
}
private testConnection() {

Loading…
Cancel
Save