Browse Source

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

* commit '133c1f4677361695fcce1d9286e6ee1da1dfbbdd':
  fix: 清除无用代码
  fix: DEC-10148 修改布局,防止数据连接名过长显示导致布局错乱。
qufenxi
alan 5 years ago
parent
commit
b1d4f3dd67
  1. 61
      src/modules/pages/connection/connection.ts
  2. 2
      src/modules/pages/connection/list/list_item/list_item.ts

61
src/modules/pages/connection/connection.ts

@ -1,4 +1,4 @@
import { Button, Htape, Vtape, Label, VerticalAdapt, ListView, LeftRightVerticalAdapt, CenterAdapt, Layout } from 'ui';
import { Button, Htape, Vtape, Label, VerticalAdapt, ListView, CenterAdapt, Layout } from 'ui';
import { shortcut, store } from '@core/core';
import { ConnectionModel, ConnectionModelXtype } from './connection.model';
import { PAGE_INDEX } from '@constants/constant';
@ -83,41 +83,42 @@ export class Connection extends BI.Widget {
items: [
{
el: {
type: LeftRightVerticalAdapt,
type: Htape,
ref: (_ref: any) => {
this.title = _ref;
},
cls: 'bi-border-bottom',
items: {
left: [
{
type: Label,
lgap: 5,
ref: (_ref: any) => {
this.connectionTitleWidget = _ref;
},
items: [
{
type: Label,
lgap: 5,
ref: (_ref: any) => {
this.connectionTitleWidget = _ref;
},
],
right: [
{
type: Button,
rgap: 5,
level: 'ignore',
invisible: true,
text: BI.i18nText('Dec-Dcm_Edit'),
ref: (_ref: any) => {
this.connectionEditWidget = _ref;
},
handler: () => {
this.store.getConnectionStatus().then(re => {
this.store.setPageIndex(PAGE_INDEX.MAINTAIN);
this.store.setDatebaseTypeSelected('');
})
.catch(() => {});
},
},
{
el: {
type: VerticalAdapt,
items: [{
type: Button,
level: 'ignore',
invisible: true,
text: BI.i18nText('Dec-Dcm_Edit'),
ref: (_ref: any) => {
this.connectionEditWidget = _ref;
},
handler: () => {
this.store.getConnectionStatus().then(re => {
this.store.setPageIndex(PAGE_INDEX.MAINTAIN);
this.store.setDatebaseTypeSelected('');
})
.catch(() => {});
},
}],
},
],
},
width: 90,
},
],
},
height: 40,
},

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

@ -53,6 +53,8 @@ export class ListItem extends BI.BasicButton {
{
type: Label,
text: name,
width: 210,
textAlign: 'left',
ref: (_ref: any) => {
this.nameLabel = _ref;
},

Loading…
Cancel
Save