帆软决策平台数据连接界面库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

54 lines
1.2 KiB

import MoreLink from './more_link';
let SubbitButton: any = null;
let selectKey = '';
export const moreLink = (onConfirm?: Function): void => {
const id = BI.UUID();
let Popovers: any = null;
BI.Popovers.create(id, {
type: 'bi.bar_popover',
size: 'normal',
header: BI.i18nText('Dec-Dcm_Connection_More-Title'),
width: 550,
height: 500,
body: {
type: MoreLink,
listeners: [
{
eventName: 'EVENT_SELECT',
action (text: string) {
selectKey = text;
SubbitButton.setEnable(true);
},
},
],
},
footer: {
type: 'bi.right_vertical_adapt',
lgap: 10,
items: [{
type: 'bi.button',
text: BI.i18nText('BI-Basic_Cancel'),
value: 1,
level: 'ignore',
handler (v: any) {
Popovers.close(v);
},
}, {
type: 'bi.button',
text: BI.i18nText('BI-Basic_Sure'),
disabled: true,
value: 0,
ref(ref: any) {
SubbitButton = ref;
},
handler (v: any) {
Popovers.close(v);
onConfirm ? onConfirm(selectKey) : null;
},
}],
},
ref(ref: any) {
Popovers = ref;
},
}).open(id);
};