From c2f19a7dde62b3f5f5dc2173a5c39bc5b1ad12d4 Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 2 Sep 2019 15:42:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E5=91=BD=E5=90=8D=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E5=AE=BD=E5=BA=A6=EF=BC=8C=E4=BF=AE=E6=94=B9jndi?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/connection/list/list_item/list_item.ts | 2 +- .../pages/maintain/forms/components/form.jndi.ts | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/modules/pages/connection/list/list_item/list_item.ts b/src/modules/pages/connection/list/list_item/list_item.ts index e101629..b072ebd 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/src/modules/pages/connection/list/list_item/list_item.ts @@ -58,7 +58,7 @@ export class ListItem extends BI.BasicButton { { type: SignEditor, value: name, - width: 100, + width: 200, invisible: !this.model.isEdit, ref: (_ref: any) => { this.nameEditor = _ref; diff --git a/src/modules/pages/maintain/forms/components/form.jndi.ts b/src/modules/pages/maintain/forms/components/form.jndi.ts index e76a278..d1a65ce 100644 --- a/src/modules/pages/maintain/forms/components/form.jndi.ts +++ b/src/modules/pages/maintain/forms/components/form.jndi.ts @@ -371,6 +371,12 @@ export class FormJndi extends BI.Widget { 'java.naming.language': this.form.language.getValue(), 'java.naming.applet': this.form.applet.getValue(), }; + + for (const propName in contextHashtable) { + if (contextHashtable[propName] === null || contextHashtable[propName] === undefined || contextHashtable[propName] === '') { + delete contextHashtable[propName]; + } + } return { connectionId: this.form.connectionName.getValue(), @@ -378,10 +384,10 @@ export class FormJndi extends BI.Widget { connectionType: connectionType.JNDI, connectionData: { jndiname: this.form.jndiname.getValue(), - originalCharsetName: this.form.newCharsetName.getValue(), - newCharsetName: this.form.newCharsetName.getValue(), + newCharsetName: this.form.newCharsetName.getValue()[0] || '', + originalCharsetName: this.form.newCharsetName.getValue()[0] || '', creator: Dec ? Dec.personal.username : '', - contextHashtable: BI.pick(contextHashtable) as ContextHashtable, + contextHashtable: contextHashtable as ContextHashtable, }, }; }