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. 81
      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 = {
hgap: 15,
hgap: 5,
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: '',
value: '',
unit: '',
isBold: true,
nameWidth: 140,
}
@ -20,7 +21,7 @@ export class FormItem extends BI.Widget {
{
el: {
type: Label,
cls: 'bi-font-bold',
cls: this.options.isBold ? 'bi-font-bold' : '',
textAlign: 'left',
text: this.options.name,
},

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

@ -49,17 +49,18 @@ export class Connection extends BI.Widget {
return {
type: Htape,
hgap: 10,
items: [
{
el: {
type: Vtape,
cls: 'bi-border-right',
rgap: 10,
items: [
{
el: {
type: VerticalAdapt,
cls: 'bi-border-bottom',
lgap: 10,
items: [{
type: Button,
text: BI.i18nText('Dec-Dcm_Connection_New'),
@ -72,7 +73,7 @@ export class Connection extends BI.Widget {
},
{
type: ConnectionListXtype,
tgap: 5,
tgap: 10,
},
],
},
@ -91,7 +92,6 @@ export class Connection extends BI.Widget {
items: [
{
type: Label,
lgap: 5,
textAlign: 'left',
ref: (_ref: any) => {
this.connectionTitleWidget = _ref;
@ -102,7 +102,6 @@ export class Connection extends BI.Widget {
type: VerticalAdapt,
items: [{
type: Button,
level: 'ignore',
invisible: true,
text: BI.i18nText('Dec-Dcm_Edit'),
ref: (_ref: any) => {
@ -125,7 +124,6 @@ export class Connection extends BI.Widget {
},
{
type: ListView,
vgap: 15,
ref: (_ref: any) => {
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,
tgap: -15,
vgap,
invisible: true,
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,
height: 120,
height: 115,
items: [
{
el: {
@ -50,31 +50,37 @@ export class ConnectionJdbc extends BI.Widget {
},
{
type: Vertical,
bgap: 10,
bgap: 15,
height: 115,
items: [
{
type: FormItemXtype,
name: 'INTIAL_CONTEXT_FACTORY',
nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.factory.initial'],
},
{
type: FormItemXtype,
name: 'PROVIDER_URL',
nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.provider.url'],
},
{
type: FormItemXtype,
name: 'SECURITY_PRINCIPAL',
nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.security.principal'],
},
{
type: FormItemXtype,
name: 'SECURITY_CREDENTIALS',
nameWidth: 200,
isBold: false,
value: contextHashtable['java.naming.security.credentials'],
bgap: -15,
},
],
},
@ -102,6 +108,7 @@ export class ConnectionJdbc extends BI.Widget {
{
type: Vertical,
vgap,
tgap: -15,
invisible: true,
ref: (_ref: any) => {
this.advancedSet = _ref;

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

@ -1,5 +1,5 @@
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 { ListItemModel, ListItemModelXtype } from './list_item.model';
import { PAGE_INDEX } from '@constants/constant';
@ -41,20 +41,22 @@ export class ListItem extends BI.BasicButton {
const { name, databaseType } = this.options;
return {
type: LeftRightVerticalAdapt,
items: {
left: [
{
type: IconLabel,
cls: 'dcm-link-font icon-size-16',
width: 25,
title: name,
},
type: Htape,
items: [{
el: {
type: IconLabel,
cls: 'dcm-link-font icon-size-16',
title: name,
},
width: 25,
}, {
type: Vertical,
items: [
{
type: Label,
text: name,
width: 200,
textAlign: 'left',
height: 25,
title: name,
ref: (_ref: any) => {
this.nameLabel = _ref;
@ -63,7 +65,6 @@ export class ListItem extends BI.BasicButton {
{
type: SignEditor,
value: name,
width: 200,
invisible: !this.model.isEdit,
ref: (_ref: any) => {
this.nameEditor = _ref;
@ -98,37 +99,37 @@ export class ListItem extends BI.BasicButton {
}],
},
],
right: [
databaseType ? {
type: DownListCombo,
cls: 'link-item-icon',
stopPropagation: true,
hgap: 8,
el: {
type: IconButton,
cls: 'dcm-link-other-font icon-size-16',
}, {
el: databaseType ? {
type: DownListCombo,
cls: 'link-item-icon',
stopPropagation: true,
hgap: 8,
el: {
type: IconButton,
cls: 'dcm-link-other-font icon-size-16',
},
items: this.renderDownList(),
ref: (_ref: any) => {
this.downListCombo = _ref;
},
listeners: [{
eventName: BI.DownListCombo.EVENT_CHANGE,
action: (value: string) => {
this.itemActionCalculate().actionClac(value);
},
items: this.renderDownList(),
ref: (_ref: any) => {
this.downListCombo = _ref;
}, {
eventName: BI.DownListCombo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.downListCombo.setValue('');
},
listeners: [{
eventName: BI.DownListCombo.EVENT_CHANGE,
action: (value: string) => {
this.itemActionCalculate().actionClac(value);
},
}, {
eventName: BI.DownListCombo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.downListCombo.setValue('');
},
}],
}],
} : {
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 { Label, Left } from 'ui';
import { CONNECTION_LAYOUT } from '@constants/constant';
export const FormItemXtype = 'dec.dcm.Maintain_form_item';
@shortcut(FormItemXtype)
export class FormItem extends BI.Widget {
@ -7,6 +8,7 @@ export class FormItem extends BI.Widget {
name: '',
forms: '',
nameWidth: 140,
isBold: true,
}
render () {
@ -15,9 +17,10 @@ export class FormItem extends BI.Widget {
items: [
{
type: Label,
cls: 'bi-font-bold',
cls: this.options.isBold ? 'bi-font-bold' : '',
width: this.options.nameWidth,
textAlign: 'left',
height: CONNECTION_LAYOUT.labelHeight,
text: this.options.name,
},
...this.options.forms,

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

@ -1,5 +1,5 @@
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 { FormItemXtype } from '../../components/form_item/form_item';
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings';
@ -313,6 +313,7 @@ export class FormJdbc extends BI.Widget {
{
type: FormItemXtype,
invisible: !databaseType.hasSchema,
height: 64,
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'),
forms: [{
type: Vertical,
@ -344,6 +345,11 @@ export class FormJdbc extends BI.Widget {
}],
}],
},
{
type: Layout,
cls: 'bi-border-top',
bgap: 8,
},
{
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'),
@ -383,6 +389,7 @@ export class FormJdbc extends BI.Widget {
{
type: Vertical,
vgap,
tgap: -15,
invisible: true,
ref: (_ref: any) => {
this.advancedSet = _ref;
@ -486,6 +493,7 @@ export class FormJdbc extends BI.Widget {
{
type: Label,
lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('Dec-Dcm_Millisecond'),
},
],
@ -573,6 +581,7 @@ export class FormJdbc extends BI.Widget {
{
type: Label,
lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
text: BI.i18nText('Dec-Dcm_Millisecond'),
},
],
@ -618,6 +627,7 @@ export class FormJdbc extends BI.Widget {
{
type: Label,
lgap: 5,
height: CONNECTION_LAYOUT.labelHeight,
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,
height: 180,
height: 175,
items: [
{
el: {
@ -92,12 +92,14 @@ export class FormJndi extends BI.Widget {
},
{
type: Vertical,
bgap: 10,
bgap: 15,
height: 175,
items: [
{
type: FormItemXtype,
name: 'INTIAL_CONTEXT_FACTORY',
nameWidth: 200,
isBold: false,
forms: [{
type: EdirotIconCheckCombo,
width: 300,
@ -124,6 +126,7 @@ export class FormJndi extends BI.Widget {
{
type: FormItemXtype,
name: 'PROVIDER_URL',
isBold: false,
nameWidth: 200,
forms: [{
type: TextEditor,
@ -138,6 +141,7 @@ export class FormJndi extends BI.Widget {
{
type: FormItemXtype,
name: 'SECURITY_PRINCIPAL',
isBold: false,
nameWidth: 200,
forms: [{
type: TextEditor,
@ -152,6 +156,7 @@ export class FormJndi extends BI.Widget {
{
type: FormItemXtype,
name: 'SECURITY_CREDENTIALS',
isBold: false,
nameWidth: 200,
forms: [{
type: TextEditor,
@ -165,6 +170,7 @@ export class FormJndi extends BI.Widget {
},
{
type: Label,
bgap: -15,
cls: 'bi-tips',
textAlign: 'left',
text: BI.i18nText('Dec-Dcm_Connection_JNDI_Warning'),
@ -203,6 +209,7 @@ export class FormJndi extends BI.Widget {
{
type: Vertical,
vgap,
tgap: -15,
invisible: true,
ref: (_ref: any) => {
this.advancedSet = _ref;

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

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

Loading…
Cancel
Save