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.
 
 
 

40 lines
1.5 KiB

;!(function () {
BI.Plugin.registerWidget("bi.subject.relationship.map.button", function (widget) {
widget.beforeCreate = function () {
var self = this;
/**
* 修改图标
* @type {function(): (*)}
*/
self.oldGetIconCls = self.getIconCls;
self.getIconCls = function () {
const {itemType, nodeInfo} = this.options;
var find = BI.find(BI.Front.SUPPORT_REPORT, function (index, item) {
return itemType === item.typeValue;
})
if (find) {
return find.iconCls;
}
return self.oldGetIconCls();
}
/**
* 修改title
* @type {function(*=, *=): (*)}
*/
self.store.oldGetTitle = self.store.getTitle;
self.store.getTitle = function (itemType, nodeInfo) {
var find = BI.find(BI.Front.SUPPORT_REPORT, function (index, item) {
return itemType === item.typeValue;
})
if (find) {
var result = [];
result.push("报表名称:" + nodeInfo.name);
result.push("创建用户:" + nodeInfo.createBy);
return result.join('\n');
}
return self.store.oldGetTitle(itemType, nodeInfo);
}
}
})
})();