Browse Source

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

* commit '24d1c80203586d9aca63c23626df2d51a74bc450':
  DEC-19934 fix: 【迭代】数据连接出错提示-数据连接点击复制按钮没有反应
research/11.0
superman 3 years ago
parent
commit
b59b82caa6
  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 { export class AppModel extends Model {
static xtype = 'dec.dcm.model.main'; 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() { state() {
return { return {
@ -19,13 +19,17 @@ export class AppModel extends Model {
saveEvent: '', saveEvent: '',
testEvent: '', testEvent: '',
isCopy: false, isCopy: false,
connectionLicInfo: {
currentConnectionNum: 0,
maxConnectionNum: 0,
},
}; };
} }
computed = { computed = {
connectionSelectedOne: () => this.model.connections.find(item => item.connectionName === this.model.connectionSelected), connectionSelectedOne: () => this.model.connections.find(item => item.connectionName === this.model.connectionSelected),
datebaseTypeSelectedOne: () => getAllDatabaseTypes().find(item => item.databaseType === this.model.datebaseTypeSelected), datebaseTypeSelectedOne: () => getAllDatabaseTypes().find(item => item.databaseType === this.model.datebaseTypeSelected),
} };
actions = { actions = {
setPageIndex: (index: string) => { setPageIndex: (index: string) => {
@ -37,5 +41,5 @@ export class AppModel extends Model {
setDatebaseTypeSelected: (datebaseTypeSelected: string) => { setDatebaseTypeSelected: (datebaseTypeSelected: string) => {
this.model.datebaseTypeSelected = datebaseTypeSelected; 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'; static xtype = 'dec.dcm.model.connection';
state() { context = <const>['pageIndex', 'connectionSelected', 'connectionSelectedOne', 'datebaseTypeSelected', 'connectionLicInfo'];
return {
connectionLicInfo: {
currentConnectionNum: 0,
maxConnectionNum: 0,
},
};
}
childContext: ['connectionLicInfo'];
context = <const>['pageIndex', 'connectionSelected', 'connectionSelectedOne', 'datebaseTypeSelected'];
actions = { actions = {
initConnectionLicInfo: (cb: Function) => { initConnectionLicInfo: (cb: Function) => {

Loading…
Cancel
Save