Browse Source

Merge pull request #2573 in DEC/decision-webui-dcm from feature/10.0 to release/11.0

* commit '0d2393630868215a02e5506cfe0b6c7b289dfa82':
  DEC-19934 fix: 【迭代】数据连接出错提示-数据连接点击复制按钮没有反应
persist/11.0
superman 3 years ago
parent
commit
24d1c80203
  1. 10
      src/modules/app.model.ts
  2. 13
      src/modules/pages/connection/connection.model.ts

10
src/modules/app.model.ts

@ -7,7 +7,7 @@ import { getAllDatabaseTypes } from './app.service';
export class AppModel extends Model {
static xtype = 'dec.dcm.model.main';
childContext = <const>['pageIndex', 'datebaseTypeSelected', 'datebaseTypeSelectedOne', 'filter', 'connections', 'connectionSelected', 'connectionSelectedOne', 'saveEvent', 'testEvent', 'isCopy'];
childContext = <const>['pageIndex', 'datebaseTypeSelected', 'datebaseTypeSelectedOne', 'filter', 'connections', 'connectionSelected', 'connectionSelectedOne', 'saveEvent', 'testEvent', 'isCopy', 'connectionLicInfo'];
state() {
return {
@ -19,13 +19,17 @@ export class AppModel extends Model {
saveEvent: '',
testEvent: '',
isCopy: false,
connectionLicInfo: {
currentConnectionNum: 0,
maxConnectionNum: 0,
},
};
}
computed = {
connectionSelectedOne: () => this.model.connections.find(item => item.connectionName === this.model.connectionSelected),
datebaseTypeSelectedOne: () => getAllDatabaseTypes().find(item => item.databaseType === this.model.datebaseTypeSelected),
}
};
actions = {
setPageIndex: (index: string) => {
@ -37,5 +41,5 @@ export class AppModel extends Model {
setDatebaseTypeSelected: (datebaseTypeSelected: string) => {
this.model.datebaseTypeSelected = datebaseTypeSelected;
},
}
};
}

13
src/modules/pages/connection/connection.model.ts

@ -19,18 +19,7 @@ export class ConnectionModel extends Model<{
}> {
static xtype = 'dec.dcm.model.connection';
state() {
return {
connectionLicInfo: {
currentConnectionNum: 0,
maxConnectionNum: 0,
},
};
}
childContext: ['connectionLicInfo'];
context = <const>['pageIndex', 'connectionSelected', 'connectionSelectedOne', 'datebaseTypeSelected'];
context = <const>['pageIndex', 'connectionSelected', 'connectionSelectedOne', 'datebaseTypeSelected', 'connectionLicInfo'];
actions = {
initConnectionLicInfo: (cb: Function) => {

Loading…
Cancel
Save