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