帆软决策平台数据连接界面库
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.
 
 
 
 

31 lines
856 B

import {WidgetType, Vertical} from '@ui';
import Model from './left.model';
import {LinkType} from '@ui/type';
import {getLinks} from './left.service';
const className = 'fr.component.linkStatus.left';
let leftContent: any = null;
const Widget: WidgetType = {
_store() {
return BI.Models.getModel(Model);
},
watch: {
linkList(linkList: LinkType[]) {
const title = linkList.length > 0 ? linkList[0].connectionName : '';
this.store.setStatusSelected(title);
},
statusSelected(title: string) {
const linkList = this.model.linkList;
leftContent.populate(BI.createItems(getLinks(linkList, title)));
},
},
render() {
return {
type: Vertical,
ref(_ref: any) {
leftContent = _ref;
},
};
},
};
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
export default className;