|
|
|
@ -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, |
|
|
|
|
}], |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|