From 351740976c3ef07497be3e142478eb52b8701497 Mon Sep 17 00:00:00 2001 From: dailer Date: Fri, 15 Oct 2021 10:10:25 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"DEC-20201=20feat:=20=E3=80=90?= =?UTF-8?q?=E8=BF=AD=E4=BB=A3=E3=80=91=E3=80=90=E9=A9=B1=E5=8A=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=91=E5=B1=8F=E8=94=BD=E9=A9=B1=E5=8A=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=85=A5=E5=8F=A3=E4=BB=A5=E5=8F=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit bff088b06b13bfe970041ee6667f32980d6855a7. --- src/modules/pages/connection/connection.ts | 2 +- .../driverselector/driverselector.ts | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/modules/pages/connection/connection.ts b/src/modules/pages/connection/connection.ts index f8d175c..90f5ba1 100644 --- a/src/modules/pages/connection/connection.ts +++ b/src/modules/pages/connection/connection.ts @@ -79,7 +79,7 @@ export class Connection extends BI.Widget { right: [ { type: 'dec.connection.driver.entry', - invisible: true, + invisible: !BI.Services.getService('dec.service.global').isAdmin(), from: '.dec-dcm', listeners: [ { diff --git a/src/modules/pages/maintain/components/driverselector/driverselector.ts b/src/modules/pages/maintain/components/driverselector/driverselector.ts index ef6c351..896c157 100644 --- a/src/modules/pages/maintain/components/driverselector/driverselector.ts +++ b/src/modules/pages/maintain/components/driverselector/driverselector.ts @@ -30,14 +30,18 @@ export class DriverSelector extends BI.Widget { customDrivers: SearchTextValueCombo = null; + beforeRender(cb: Function) { + this.store.initDriverClassList(cb); + } + watch = { driverClassItems: items => { - // this.customDrivers.populate(items); - // this.customDrivers.setValue(this.model.customDriver.value); + this.customDrivers.populate(items); + this.customDrivers.setValue(this.model.customDriver.value); }, driverManageEntryVisible: b => { - this.driverManageEntry.setVisible(false); + this.driverManageEntry.setVisible(b); }, }; @@ -55,7 +59,6 @@ export class DriverSelector extends BI.Widget { type: BI.TextValueCombo.xtype, width: 86, value: this.model.selectedDriverType, - invisible: true, items: [ { text: BI.i18nText('Dec-Basic_Default'), @@ -95,7 +98,7 @@ export class DriverSelector extends BI.Widget { this.defaultDrivers = _ref; }, invisible: this.model.driverSource !== '', - width: 300, + width: 204, items: this.model.defaultDrivers, value: this.model.defaultDriver.driver, listeners: [ @@ -116,7 +119,7 @@ export class DriverSelector extends BI.Widget { ref: _ref => { this.customDrivers = _ref; }, - invisible: true, + invisible: this.model.driverSource === '', width: 204, watermark: BI.i18nText('Dec-Please_Input'), items: this.model.driverClassItems, @@ -146,7 +149,7 @@ export class DriverSelector extends BI.Widget { text: BI.i18nText('Dec-Dcm_Create_New_Driver'), }, from: '.dec-dcm', - invisible: true, + invisible: !this.model.driverManageEntryVisible, listeners: [ { eventName: 'EVENT_CLOSE', @@ -175,7 +178,7 @@ export class DriverSelector extends BI.Widget { getValue() { return { - // driverSource: this.model.driverSource, + driverSource: this.model.driverSource, driver: this.model.driverSource === '' ? this.model.defaultDriver.driver : this.model.customDriver.driver, }; }