Browse Source

Pull request #3452: Feature/x

Merge in DEC/decision-webui-dcm from feature/x to release/11.0

* commit '98827aa6eb6300b9dbe7cb0b50a1c6444d253a0c':
  Revert "DEC-20201 feat: 【迭代】【驱动管理】屏蔽驱动管理入口以及相关功能"
bugfix/11.0
Dailer 3 years ago
parent
commit
25d4b2fb98
  1. 2
      src/modules/pages/connection/connection.ts
  2. 19
      src/modules/pages/maintain/components/driverselector/driverselector.ts

2
src/modules/pages/connection/connection.ts

@ -79,7 +79,7 @@ export class Connection extends BI.Widget {
right: [ right: [
{ {
type: 'dec.connection.driver.entry', type: 'dec.connection.driver.entry',
invisible: true, invisible: !BI.Services.getService('dec.service.global').isAdmin(),
from: '.dec-dcm', from: '.dec-dcm',
listeners: [ listeners: [
{ {

19
src/modules/pages/maintain/components/driverselector/driverselector.ts

@ -30,14 +30,18 @@ export class DriverSelector extends BI.Widget {
customDrivers: SearchTextValueCombo = null; customDrivers: SearchTextValueCombo = null;
beforeRender(cb: Function) {
this.store.initDriverClassList(cb);
}
watch = { watch = {
driverClassItems: items => { driverClassItems: items => {
// this.customDrivers.populate(items); this.customDrivers.populate(items);
// this.customDrivers.setValue(this.model.customDriver.value); this.customDrivers.setValue(this.model.customDriver.value);
}, },
driverManageEntryVisible: b => { driverManageEntryVisible: b => {
this.driverManageEntry.setVisible(false); this.driverManageEntry.setVisible(b);
}, },
}; };
@ -55,7 +59,6 @@ export class DriverSelector extends BI.Widget {
type: BI.TextValueCombo.xtype, type: BI.TextValueCombo.xtype,
width: 86, width: 86,
value: this.model.selectedDriverType, value: this.model.selectedDriverType,
invisible: true,
items: [ items: [
{ {
text: BI.i18nText('Dec-Basic_Default'), text: BI.i18nText('Dec-Basic_Default'),
@ -95,7 +98,7 @@ export class DriverSelector extends BI.Widget {
this.defaultDrivers = _ref; this.defaultDrivers = _ref;
}, },
invisible: this.model.driverSource !== '', invisible: this.model.driverSource !== '',
width: 300, width: 204,
items: this.model.defaultDrivers, items: this.model.defaultDrivers,
value: this.model.defaultDriver.driver, value: this.model.defaultDriver.driver,
listeners: [ listeners: [
@ -116,7 +119,7 @@ export class DriverSelector extends BI.Widget {
ref: _ref => { ref: _ref => {
this.customDrivers = _ref; this.customDrivers = _ref;
}, },
invisible: true, invisible: this.model.driverSource === '',
width: 204, width: 204,
watermark: BI.i18nText('Dec-Please_Input'), watermark: BI.i18nText('Dec-Please_Input'),
items: this.model.driverClassItems, items: this.model.driverClassItems,
@ -146,7 +149,7 @@ export class DriverSelector extends BI.Widget {
text: BI.i18nText('Dec-Dcm_Create_New_Driver'), text: BI.i18nText('Dec-Dcm_Create_New_Driver'),
}, },
from: '.dec-dcm', from: '.dec-dcm',
invisible: true, invisible: !this.model.driverManageEntryVisible,
listeners: [ listeners: [
{ {
eventName: 'EVENT_CLOSE', eventName: 'EVENT_CLOSE',
@ -175,7 +178,7 @@ export class DriverSelector extends BI.Widget {
getValue() { getValue() {
return { return {
// driverSource: this.model.driverSource, driverSource: this.model.driverSource,
driver: this.model.driverSource === '' ? this.model.defaultDriver.driver : this.model.customDriver.driver, driver: this.model.driverSource === '' ? this.model.defaultDriver.driver : this.model.customDriver.driver,
}; };
} }

Loading…
Cancel
Save