Browse Source

Merge pull request #119 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:release/10.0 to release/10.0

* commit 'ac77e237121735f8d3d73f423ddc2e1a2582bc3f':
  fix: 去掉 bi-border-radius 改为在fineui中统一改
  fix: DEC-10788 根据视觉文档调整细节
research/10.0
alan 5 years ago
parent
commit
7b7765e103
  1. 3
      src/modules/constants/constant.ts
  2. 3
      src/modules/pages/connection/components/form_item/form_item.ts
  3. 8
      src/modules/pages/connection/connection.ts
  4. 1
      src/modules/pages/connection/connection_jdbc/connection_jdbc.ts
  5. 11
      src/modules/pages/connection/connection_jndi/connection_jndi.ts
  6. 25
      src/modules/pages/connection/list/list_item/list_item.ts
  7. 5
      src/modules/pages/maintain/components/form_item/form_item.ts
  8. 12
      src/modules/pages/maintain/forms/components/form.jdbc.ts
  9. 11
      src/modules/pages/maintain/forms/components/form.jndi.ts
  10. 9
      src/modules/pages/maintain/maintain.ts

3
src/modules/constants/constant.ts

@ -678,8 +678,9 @@ export const DEFAULT_JDBC_POOL = {
}; };
export const CONNECTION_LAYOUT = { export const CONNECTION_LAYOUT = {
hgap: 15, hgap: 5,
vgap: 15, vgap: 15,
labelHeight: 24,
}; };

3
src/modules/pages/connection/components/form_item/form_item.ts

@ -7,6 +7,7 @@ export class FormItem extends BI.Widget {
name: '', name: '',
value: '', value: '',
unit: '', unit: '',
isBold: true,
nameWidth: 140, nameWidth: 140,
} }
@ -20,7 +21,7 @@ export class FormItem extends BI.Widget {
{ {
el: { el: {
type: Label, type: Label,
cls: 'bi-font-bold', cls: this.options.isBold ? 'bi-font-bold' : '',
textAlign: 'left', textAlign: 'left',
text: this.options.name, text: this.options.name,
}, },

8
src/modules/pages/connection/connection.ts

@ -49,17 +49,18 @@ export class Connection extends BI.Widget {
return { return {
type: Htape, type: Htape,
hgap: 10,
items: [ items: [
{ {
el: { el: {
type: Vtape, type: Vtape,
cls: 'bi-border-right', cls: 'bi-border-right',
rgap: 10,
items: [ items: [
{ {
el: { el: {
type: VerticalAdapt, type: VerticalAdapt,
cls: 'bi-border-bottom', cls: 'bi-border-bottom',
lgap: 10,
items: [{ items: [{
type: Button, type: Button,
text: BI.i18nText('Dec-Dcm_Connection_New'), text: BI.i18nText('Dec-Dcm_Connection_New'),
@ -72,7 +73,7 @@ export class Connection extends BI.Widget {
}, },
{ {
type: ConnectionListXtype, type: ConnectionListXtype,
tgap: 5, tgap: 10,
}, },
], ],
}, },
@ -91,7 +92,6 @@ export class Connection extends BI.Widget {
items: [ items: [
{ {
type: Label, type: Label,
lgap: 5,
textAlign: 'left', textAlign: 'left',
ref: (_ref: any) => { ref: (_ref: any) => {
this.connectionTitleWidget = _ref; this.connectionTitleWidget = _ref;
@ -102,7 +102,6 @@ export class Connection extends BI.Widget {
type: VerticalAdapt, type: VerticalAdapt,
items: [{ items: [{
type: Button, type: Button,
level: 'ignore',
invisible: true, invisible: true,
text: BI.i18nText('Dec-Dcm_Edit'), text: BI.i18nText('Dec-Dcm_Edit'),
ref: (_ref: any) => { ref: (_ref: any) => {
@ -125,7 +124,6 @@ export class Connection extends BI.Widget {
}, },
{ {
type: ListView, type: ListView,
vgap: 15,
ref: (_ref: any) => { ref: (_ref: any) => {
this.listView = _ref; this.listView = _ref;
}, },

1
src/modules/pages/connection/connection_jdbc/connection_jdbc.ts

@ -96,6 +96,7 @@ export class ConnectionJdbc extends BI.Widget {
}, },
{ {
type: Vertical, type: Vertical,
tgap: -15,
vgap, vgap,
invisible: true, invisible: true,
ref: (_ref: any) => { ref: (_ref: any) => {

11
src/modules/pages/connection/connection_jndi/connection_jndi.ts

@ -32,7 +32,7 @@ export class ConnectionJdbc extends BI.Widget {
}, },
{ {
type: Htape, type: Htape,
height: 120, height: 115,
items: [ items: [
{ {
el: { el: {
@ -50,31 +50,37 @@ export class ConnectionJdbc extends BI.Widget {
}, },
{ {
type: Vertical, type: Vertical,
bgap: 10, bgap: 15,
height: 115,
items: [ items: [
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'INTIAL_CONTEXT_FACTORY', name: 'INTIAL_CONTEXT_FACTORY',
nameWidth: 200, nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.factory.initial'], value: contextHashtable['java.naming.factory.initial'],
}, },
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'PROVIDER_URL', name: 'PROVIDER_URL',
nameWidth: 200, nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.provider.url'], value: contextHashtable['java.naming.provider.url'],
}, },
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'SECURITY_PRINCIPAL', name: 'SECURITY_PRINCIPAL',
nameWidth: 200, nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.security.principal'], value: contextHashtable['java.naming.security.principal'],
}, },
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'SECURITY_CREDENTIALS', name: 'SECURITY_CREDENTIALS',
nameWidth: 200, nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.security.credentials'], value: contextHashtable['java.naming.security.credentials'],
bgap: -15,
}, },
], ],
}, },
@ -102,6 +108,7 @@ export class ConnectionJdbc extends BI.Widget {
{ {
type: Vertical, type: Vertical,
vgap, vgap,
tgap: -15,
invisible: true, invisible: true,
ref: (_ref: any) => { ref: (_ref: any) => {
this.advancedSet = _ref; this.advancedSet = _ref;

25
src/modules/pages/connection/list/list_item/list_item.ts

@ -1,5 +1,5 @@
import { shortcut, store } from '@core/core'; import { shortcut, store } from '@core/core';
import { Label, LeftRightVerticalAdapt, IconLabel, IconButton, DownListCombo, SignEditor, Layout } from 'ui'; import { Label, IconLabel, IconButton, DownListCombo, SignEditor, Layout, Htape, Vertical } from 'ui';
import './list_item.less'; import './list_item.less';
import { ListItemModel, ListItemModelXtype } from './list_item.model'; import { ListItemModel, ListItemModelXtype } from './list_item.model';
import { PAGE_INDEX } from '@constants/constant'; import { PAGE_INDEX } from '@constants/constant';
@ -41,20 +41,22 @@ export class ListItem extends BI.BasicButton {
const { name, databaseType } = this.options; const { name, databaseType } = this.options;
return { return {
type: LeftRightVerticalAdapt, type: Htape,
items: { items: [{
left: [ el: {
{
type: IconLabel, type: IconLabel,
cls: 'dcm-link-font icon-size-16', cls: 'dcm-link-font icon-size-16',
width: 25,
title: name, title: name,
}, },
width: 25,
}, {
type: Vertical,
items: [
{ {
type: Label, type: Label,
text: name, text: name,
width: 200,
textAlign: 'left', textAlign: 'left',
height: 25,
title: name, title: name,
ref: (_ref: any) => { ref: (_ref: any) => {
this.nameLabel = _ref; this.nameLabel = _ref;
@ -63,7 +65,6 @@ export class ListItem extends BI.BasicButton {
{ {
type: SignEditor, type: SignEditor,
value: name, value: name,
width: 200,
invisible: !this.model.isEdit, invisible: !this.model.isEdit,
ref: (_ref: any) => { ref: (_ref: any) => {
this.nameEditor = _ref; this.nameEditor = _ref;
@ -98,8 +99,8 @@ export class ListItem extends BI.BasicButton {
}], }],
}, },
], ],
right: [ }, {
databaseType ? { el: databaseType ? {
type: DownListCombo, type: DownListCombo,
cls: 'link-item-icon', cls: 'link-item-icon',
stopPropagation: true, stopPropagation: true,
@ -127,8 +128,8 @@ export class ListItem extends BI.BasicButton {
} : { } : {
type: Layout, type: Layout,
}, },
], width: 25,
}, }],
}; };
} }

5
src/modules/pages/maintain/components/form_item/form_item.ts

@ -1,5 +1,6 @@
import { shortcut } from '@core/core'; import { shortcut } from '@core/core';
import { Label, Left } from 'ui'; import { Label, Left } from 'ui';
import { CONNECTION_LAYOUT } from '@constants/constant';
export const FormItemXtype = 'dec.dcm.Maintain_form_item'; export const FormItemXtype = 'dec.dcm.Maintain_form_item';
@shortcut(FormItemXtype) @shortcut(FormItemXtype)
export class FormItem extends BI.Widget { export class FormItem extends BI.Widget {
@ -7,6 +8,7 @@ export class FormItem extends BI.Widget {
name: '', name: '',
forms: '', forms: '',
nameWidth: 140, nameWidth: 140,
isBold: true,
} }
render () { render () {
@ -15,9 +17,10 @@ export class FormItem extends BI.Widget {
items: [ items: [
{ {
type: Label, type: Label,
cls: 'bi-font-bold', cls: this.options.isBold ? 'bi-font-bold' : '',
width: this.options.nameWidth, width: this.options.nameWidth,
textAlign: 'left', textAlign: 'left',
height: CONNECTION_LAYOUT.labelHeight,
text: this.options.name, text: this.options.name,
}, },
...this.options.forms, ...this.options.forms,

12
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -1,5 +1,5 @@
import { shortcut } from '@core/core'; import { shortcut } from '@core/core';
import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton } from 'ui'; import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton, Layout } from 'ui';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { FormItemXtype } from '../../components/form_item/form_item'; import { FormItemXtype } from '../../components/form_item/form_item';
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings'; import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings';
@ -313,6 +313,7 @@ export class FormJdbc extends BI.Widget {
{ {
type: FormItemXtype, type: FormItemXtype,
invisible: !databaseType.hasSchema, invisible: !databaseType.hasSchema,
height: 64,
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'),
forms: [{ forms: [{
type: Vertical, type: Vertical,
@ -344,6 +345,11 @@ export class FormJdbc extends BI.Widget {
}], }],
}], }],
}, },
{
type: Layout,
cls: 'bi-border-top',
bgap: 8,
},
{ {
type: FormItemXtype, type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'),
@ -383,6 +389,7 @@ export class FormJdbc extends BI.Widget {
{ {
type: Vertical, type: Vertical,
vgap, vgap,
tgap: -15,
invisible: true, invisible: true,
ref: (_ref: any) => { ref: (_ref: any) => {
this.advancedSet = _ref; this.advancedSet = _ref;
@ -486,6 +493,7 @@ export class FormJdbc extends BI.Widget {
{ {
type: Label, type: Label,
lgap: 5, lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('Dec-Dcm_Millisecond'), text: BI.i18nText('Dec-Dcm_Millisecond'),
}, },
], ],
@ -573,6 +581,7 @@ export class FormJdbc extends BI.Widget {
{ {
type: Label, type: Label,
lgap: 5, lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('Dec-Dcm_Millisecond'), text: BI.i18nText('Dec-Dcm_Millisecond'),
}, },
], ],
@ -618,6 +627,7 @@ export class FormJdbc extends BI.Widget {
{ {
type: Label, type: Label,
lgap: 5, lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('BI-Basic_Seconds'), text: BI.i18nText('BI-Basic_Seconds'),
}, },
], ],

11
src/modules/pages/maintain/forms/components/form.jndi.ts

@ -74,7 +74,7 @@ export class FormJndi extends BI.Widget {
}, },
{ {
type: Htape, type: Htape,
height: 180, height: 175,
items: [ items: [
{ {
el: { el: {
@ -92,12 +92,14 @@ export class FormJndi extends BI.Widget {
}, },
{ {
type: Vertical, type: Vertical,
bgap: 10, bgap: 15,
height: 175,
items: [ items: [
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'INTIAL_CONTEXT_FACTORY', name: 'INTIAL_CONTEXT_FACTORY',
nameWidth: 200, nameWidth: 200,
isBold: false,
forms: [{ forms: [{
type: EdirotIconCheckCombo, type: EdirotIconCheckCombo,
width: 300, width: 300,
@ -124,6 +126,7 @@ export class FormJndi extends BI.Widget {
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'PROVIDER_URL', name: 'PROVIDER_URL',
isBold: false,
nameWidth: 200, nameWidth: 200,
forms: [{ forms: [{
type: TextEditor, type: TextEditor,
@ -138,6 +141,7 @@ export class FormJndi extends BI.Widget {
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'SECURITY_PRINCIPAL', name: 'SECURITY_PRINCIPAL',
isBold: false,
nameWidth: 200, nameWidth: 200,
forms: [{ forms: [{
type: TextEditor, type: TextEditor,
@ -152,6 +156,7 @@ export class FormJndi extends BI.Widget {
{ {
type: FormItemXtype, type: FormItemXtype,
name: 'SECURITY_CREDENTIALS', name: 'SECURITY_CREDENTIALS',
isBold: false,
nameWidth: 200, nameWidth: 200,
forms: [{ forms: [{
type: TextEditor, type: TextEditor,
@ -165,6 +170,7 @@ export class FormJndi extends BI.Widget {
}, },
{ {
type: Label, type: Label,
bgap: -15,
cls: 'bi-tips', cls: 'bi-tips',
textAlign: 'left', textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Connection_JNDI_Warning'), text: BI.i18nText('Dec-Dcm_Connection_JNDI_Warning'),
@ -203,6 +209,7 @@ export class FormJndi extends BI.Widget {
{ {
type: Vertical, type: Vertical,
vgap, vgap,
tgap: -15,
invisible: true, invisible: true,
ref: (_ref: any) => { ref: (_ref: any) => {
this.advancedSet = _ref; this.advancedSet = _ref;

9
src/modules/pages/maintain/maintain.ts

@ -25,17 +25,18 @@ export class Maintain extends BI.Widget {
return { return {
type: Vtape, type: Vtape,
hgap: 10, hgap: 5,
vgap: 10,
items: [ items: [
{ {
type: VerticalAdapt, type: VerticalAdapt,
cls: 'bi-border-bottom', cls: 'bi-border-bottom',
height: 40,
hgap: 5,
items: [ items: [
{ {
type: IconButton, type: IconButton,
hgap: 5,
cls: 'dcm-back-font', cls: 'dcm-back-font',
height: 15,
invisible: this.model.isCopy || isEdit, invisible: this.model.isCopy || isEdit,
handler: () => { handler: () => {
this.store.setPageIndex(PAGE_INDEX.DATEBASE); this.store.setPageIndex(PAGE_INDEX.DATEBASE);
@ -44,9 +45,9 @@ export class Maintain extends BI.Widget {
{ {
type: Label, type: Label,
text: titleText, text: titleText,
height: 15,
}, },
], ],
height: 40,
}, },
{ {
type: ListView, type: ListView,

Loading…
Cancel
Save