o2oa api: x-游戏厅捕鱼达人

source

mwf.xdesktop.requireapp("process.xform", "$module", null, false);
/** @class smartbi 统计图表组件。
 * @o2cn 统计图表组件
 * @example
 * //可以在脚本中获取该组件
 * //方法1:
 * var div = this.form.get("name"); //获取组件
 * //方法2
 * var div = this.target; //在组件事件脚本中获取
 * @extends mwf.xapplication.process.xform.$module
 * @o2category formcomponents
 * @o2range {process|cms|portal}
 * @hideconstructor
 */
mwf.xapplication.process.xform.smartbi = mwf.appsmartbi =  new class({
    extends: mwf.app$module,
    _loaduserinterface: function(){
        if (!this.json.smartbiresource || this.json.smartbiresource==="none") this.node.destroy();
        else{
            var url;
            var value = this.json.smartbiresource;
            var smartbiaction = o2.actions.load("x_custom_smartbi_assemble_control");
            var addressuri = smartbiaction.resourceaction.address;
            
            if(addressuri){
                smartbiaction.resourceaction.address(value,function(json){ 
                    if(json.data.value !==""){
                        url = json.data.value;
                        url = url  "&showtoolbar=" this.json.smartbidisplaytoolbar "&showlefttree=" this.json.smartbidisplaylefttree;
                    }
                }.bind(this),null,false)
            }else{
                var address = smartbiaction.resourceaction.action.getaddress();
                var uri = smartbiaction.resourceaction.action.actions.open.uri;
                var url = uri.replace("{id}", encodeuricomponent(value));
                url = url  "?showtoolbar=" this.json.smartbidisplaytoolbar "&showlefttree=" this.json.smartbidisplaylefttree;
                
                url = o2.filter;
            }
                        
            this.iframe = new element("iframe",{
                src:url,
                frameborder:"0",
                scrolling:"auto"
            }).inject(this.node,"after");
            
            var _properties = this.json.properties||{};
            this.node.destroy();
            this.node = this.iframe.setstyles({
                "width":"100%",
                "height":"100%",
                "min-height":"300px",
                "min-width":"300px"
            });
			this.node.set(_properties)
			
        }
        
	}
});
网站地图